@kong-ui-public/entities-upstreams-targets 1.3.3 → 1.3.4
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,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as le, ref as B, computed as
|
|
1
|
+
import { defineComponent as le, ref as B, computed as O, watch as ye, renderSlot as ae, createCommentVNode as Y, unref as c, useSlots as ct, onBeforeMount as Ze, resolveComponent as U, openBlock as b, createBlock as D, createSlots as He, withCtx as p, createElementVNode as x, createTextVNode as G, toDisplayString as C, createVNode as y, createElementBlock as K, renderList as me, Fragment as ce, normalizeClass as Ae, withModifiers as kt, withDirectives as et, vShow as tt, useCssVars as $l, resolveDynamicComponent as Je, normalizeProps as Ns, guardReactiveProps as Ps, mergeProps as _t, onMounted as js, onUnmounted as Bs, normalizeStyle as Es, inject as Ls, pushScopeId as Vs, popScopeId as Rs, reactive as lt } from "vue";
|
|
2
2
|
import Ds from "axios";
|
|
3
3
|
import { createI18n as qt, i18nTComponent as Ml } from "@kong-ui-public/i18n";
|
|
4
4
|
import { MethodsArray as Js } from "@kong/kongponents";
|
|
5
5
|
import { useRouter as $t } from "vue-router";
|
|
6
|
-
var Mt = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Mt || {}), ke = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ke || {}), xe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(xe || {}), se = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(se || {}),
|
|
6
|
+
var Mt = /* @__PURE__ */ ((e) => (e.GatewayService = "service", e.Route = "route", e.Consumer = "consumer", e.ConsumerGroup = "consumer group", e.Plugin = "plugin", e.Upstream = "upstream", e.Certificate = "certificate", e.CACertificate = "ca certificate", e.SNI = "SNI", e.Key = "key", e.KeySet = "key set", e.Vault = "vault", e.Application = "application", e.Developer = "developer", e.acls = "ACL Credential", e["basic-auth"] = "Basic Auth Credential", e["key-auth"] = "Key Auth Credential", e["key-auth-enc"] = "Key Auth Encrypted Credential", e.oauth2 = "OAuth 2.0 Credential", e["hmac-auth"] = "HMAC Credential", e.jwt = "JWT Credential", e.Target = "target", e.Policy = "policy", e))(Mt || {}), ke = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ke || {}), xe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(xe || {}), se = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(se || {}), ie = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(ie || {});
|
|
7
7
|
function Kt(e = {}) {
|
|
8
8
|
return {
|
|
9
9
|
axiosInstance: Ds.create({
|
|
@@ -114,7 +114,7 @@ const Ys = {
|
|
|
114
114
|
entryTitle: "Entry {index}",
|
|
115
115
|
structuredFormat: "Structured"
|
|
116
116
|
}
|
|
117
|
-
},
|
|
117
|
+
}, er = {
|
|
118
118
|
filterButtonText: "Filter",
|
|
119
119
|
fieldLabel: "Filter by:",
|
|
120
120
|
inputPlaceholder: "Enter a value",
|
|
@@ -122,15 +122,15 @@ const Ys = {
|
|
|
122
122
|
applyButtonText: "Apply",
|
|
123
123
|
clearButtonText: "Clear",
|
|
124
124
|
clearAllButtonText: "Clear all filters"
|
|
125
|
-
},
|
|
125
|
+
}, tr = {
|
|
126
126
|
errors: {
|
|
127
127
|
fetch: "Could not fetch available items",
|
|
128
128
|
invalid: "Please select a valid value"
|
|
129
129
|
}
|
|
130
|
-
},
|
|
130
|
+
}, ar = {
|
|
131
131
|
unexpected: "An unexpected error has occurred",
|
|
132
132
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
133
|
-
},
|
|
133
|
+
}, lr = {
|
|
134
134
|
enable: {
|
|
135
135
|
title: "Enable {entityType}",
|
|
136
136
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -141,89 +141,89 @@ const Ys = {
|
|
|
141
141
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
142
142
|
confirmText: "Yes, disable"
|
|
143
143
|
}
|
|
144
|
-
},
|
|
144
|
+
}, sr = {
|
|
145
145
|
deleteModal: Ys,
|
|
146
146
|
baseForm: Gs,
|
|
147
147
|
baseTable: Zs,
|
|
148
148
|
baseConfigCard: Xs,
|
|
149
|
-
filter:
|
|
150
|
-
debouncedFilter:
|
|
151
|
-
errors:
|
|
152
|
-
toggleModal:
|
|
149
|
+
filter: er,
|
|
150
|
+
debouncedFilter: tr,
|
|
151
|
+
errors: ar,
|
|
152
|
+
toggleModal: lr
|
|
153
153
|
};
|
|
154
154
|
function Nt() {
|
|
155
|
-
const e = qt("en-us",
|
|
155
|
+
const e = qt("en-us", sr);
|
|
156
156
|
return {
|
|
157
157
|
i18n: e,
|
|
158
158
|
i18nT: Ml(e)
|
|
159
159
|
// Translation component <i18n-t>
|
|
160
160
|
};
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function rr(e, a, t, l = {
|
|
163
163
|
fetchedItemsKey: "data",
|
|
164
164
|
searchKeys: ["id"]
|
|
165
165
|
}) {
|
|
166
166
|
t || (t = "100");
|
|
167
167
|
const { axiosInstance: s } = Kt({
|
|
168
168
|
headers: e.requestHeaders
|
|
169
|
-
}), { i18n: { t:
|
|
169
|
+
}), { i18n: { t: n } } = Nt(), { debounce: o } = zs(), d = o(async (_) => {
|
|
170
170
|
await H(_);
|
|
171
|
-
}, 200),
|
|
171
|
+
}, 200), i = B(!1), u = B(""), f = B(""), h = B([]), r = B(void 0), k = c(a);
|
|
172
172
|
let S = `${e.apiBaseUrl}${k}`;
|
|
173
173
|
e.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (S = S.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
174
174
|
const g = async () => {
|
|
175
175
|
try {
|
|
176
|
-
|
|
176
|
+
i.value = !0;
|
|
177
177
|
const { data: _ } = await s.get(`${S}?size=${t}`);
|
|
178
|
-
_ != null && _.next || (
|
|
178
|
+
_ != null && _.next || (r.value = l.fetchedItemsKey in _ ? _[l.fetchedItemsKey] : []), h.value = l.fetchedItemsKey in _ ? _[l.fetchedItemsKey] : [];
|
|
179
179
|
} catch {
|
|
180
|
-
h.value = [], u.value =
|
|
180
|
+
h.value = [], u.value = n("debouncedFilter.errors.fetch");
|
|
181
181
|
} finally {
|
|
182
|
-
|
|
182
|
+
i.value = !1;
|
|
183
183
|
}
|
|
184
184
|
}, m = B(""), H = async (_) => {
|
|
185
185
|
var q, Q;
|
|
186
186
|
if (m.value !== _)
|
|
187
|
-
if (m.value = _ || "",
|
|
187
|
+
if (m.value = _ || "", r.value === void 0)
|
|
188
188
|
try {
|
|
189
|
-
|
|
189
|
+
i.value = !0, u.value = "", f.value = "";
|
|
190
190
|
let A = S + "";
|
|
191
191
|
_ && (A += `/${_}`);
|
|
192
192
|
const { data: N } = await s.get(`${A}?size=${t}`);
|
|
193
193
|
l.fetchedItemsKey in N ? h.value = N[l.fetchedItemsKey] : N != null && N.id ? h.value = [N] : h.value = [];
|
|
194
194
|
} catch (A) {
|
|
195
|
-
((q = A == null ? void 0 : A.response) == null ? void 0 : q.status) === 404 ? f.value =
|
|
195
|
+
((q = A == null ? void 0 : A.response) == null ? void 0 : q.status) === 404 ? f.value = n("debouncedFilter.errors.invalid") : (h.value = [], u.value = n("debouncedFilter.errors.fetch"));
|
|
196
196
|
} finally {
|
|
197
|
-
|
|
197
|
+
i.value = !1;
|
|
198
198
|
}
|
|
199
199
|
else
|
|
200
|
-
|
|
200
|
+
i.value = !0, f.value = "", _ ? (h.value = (Q = r.value) == null ? void 0 : Q.filter((A) => {
|
|
201
201
|
var N;
|
|
202
202
|
let P = !1;
|
|
203
|
-
for (const
|
|
204
|
-
const M = typeof A[
|
|
203
|
+
for (const F of l.searchKeys) {
|
|
204
|
+
const M = typeof A[F] == "string" ? (N = A[F]) == null ? void 0 : N.toLowerCase() : A[F];
|
|
205
205
|
M != null && M.includes(_.toLowerCase()) && (P = !0);
|
|
206
206
|
}
|
|
207
207
|
return P;
|
|
208
|
-
}), (!h.value || !h.value.length) && (f.value =
|
|
208
|
+
}), (!h.value || !h.value.length) && (f.value = n("debouncedFilter.errors.invalid"))) : h.value = r.value, i.value = !1;
|
|
209
209
|
};
|
|
210
210
|
return {
|
|
211
|
-
loading:
|
|
211
|
+
loading: i,
|
|
212
212
|
error: u,
|
|
213
213
|
validationError: f,
|
|
214
214
|
results: h,
|
|
215
|
-
allRecords:
|
|
215
|
+
allRecords: r,
|
|
216
216
|
loadItems: g,
|
|
217
217
|
debouncedQueryChange: d
|
|
218
218
|
};
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
const t = c(a), l =
|
|
220
|
+
function ir(e, a) {
|
|
221
|
+
const t = c(a), l = O(
|
|
222
222
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
223
223
|
);
|
|
224
224
|
return l.value.search = "", (s) => `${l.value.href}/${s}`;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function nr() {
|
|
227
227
|
const { i18n: { t: e } } = Nt();
|
|
228
228
|
return {
|
|
229
229
|
getMessageFromError: (a) => {
|
|
@@ -234,54 +234,54 @@ function on() {
|
|
|
234
234
|
if (a.response.data.detail)
|
|
235
235
|
return a.response.data.detail;
|
|
236
236
|
if ((l = a.response.data.details) != null && l.length)
|
|
237
|
-
return a.response.data.details.map((
|
|
237
|
+
return a.response.data.details.map((n) => {
|
|
238
238
|
let o = e("errors.unexpected");
|
|
239
|
-
return
|
|
239
|
+
return n.messages && typeof n.messages == "object" && n.messages.length && (o = n.messages.join(", ")), n.field ? `${n.field} - ${o}` : o;
|
|
240
240
|
}).join("; ");
|
|
241
241
|
if (a.response.data.message) {
|
|
242
|
-
const { message:
|
|
243
|
-
return Array.isArray(
|
|
242
|
+
const { message: n } = a.response.data;
|
|
243
|
+
return Array.isArray(n) ? (s = n[0]) != null && s.constraints ? Object.values(n[0].constraints)[0] : n[0] : n;
|
|
244
244
|
}
|
|
245
245
|
if (typeof a.response.data == "string")
|
|
246
246
|
return a.response.data;
|
|
247
247
|
if (typeof a.response.data == "object")
|
|
248
|
-
return Object.keys(a.response.data).map((
|
|
248
|
+
return Object.keys(a.response.data).map((n) => `${n} ${a.response.data[n]}`).join(", ");
|
|
249
249
|
}
|
|
250
250
|
return a.message || e("errors.unexpected");
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
}
|
|
254
254
|
function Kl(e, a) {
|
|
255
|
-
const t = B(c(e)), l = B(c(a)), s =
|
|
255
|
+
const t = B(c(e)), l = B(c(a)), s = O(
|
|
256
256
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
257
|
-
),
|
|
257
|
+
), n = O(
|
|
258
258
|
() => l.value.startsWith("/") ? new URL(`${window.location.origin}${l.value}`) : new URL(l.value)
|
|
259
259
|
);
|
|
260
260
|
return (o) => {
|
|
261
|
-
const { page: d, pageSize:
|
|
261
|
+
const { page: d, pageSize: i, offset: u, sortColumnKey: f, sortColumnOrder: h, query: r } = o;
|
|
262
262
|
try {
|
|
263
|
-
let k = new URL(
|
|
264
|
-
return s.value &&
|
|
263
|
+
let k = new URL(n.value.href);
|
|
264
|
+
return s.value && r ? (k.search = "", k = new URL(`${k.href}/${r}/`)) : (s.value || new URLSearchParams(r).forEach((S, g) => {
|
|
265
265
|
k.searchParams.append(g, S);
|
|
266
|
-
}), f && k.searchParams.append("sort_by", f), h === "desc" && k.searchParams.append("sort_desc", "1"), k.searchParams.append("size", String(
|
|
266
|
+
}), f && k.searchParams.append("sort_by", f), h === "desc" && k.searchParams.append("sort_desc", "1"), k.searchParams.append("size", String(i))), u && d !== 1 && k.searchParams.append("offset", String(u)), k.href;
|
|
267
267
|
} catch (k) {
|
|
268
268
|
return console.error("RouteList(fetcher)", k), l.value;
|
|
269
269
|
}
|
|
270
270
|
};
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function or(e, a, t = "data") {
|
|
273
273
|
const l = c(a), { axiosInstance: s } = Kt({
|
|
274
274
|
headers: e.requestHeaders
|
|
275
|
-
}),
|
|
275
|
+
}), n = Kl(e, l), o = B({
|
|
276
276
|
status: xe.Idle
|
|
277
277
|
});
|
|
278
278
|
return { fetcher: async (d) => {
|
|
279
279
|
try {
|
|
280
280
|
o.value = { status: xe.Loading };
|
|
281
|
-
const
|
|
281
|
+
const i = n(d), { data: u } = await s.get(i), f = t && t.replace(/[^\w-_]/gi, "");
|
|
282
282
|
let h;
|
|
283
283
|
u[f] && Array.isArray(u[f]) ? h = u[f] : h = Object.keys(u).length ? [u] : [];
|
|
284
|
-
const
|
|
284
|
+
const r = {
|
|
285
285
|
data: h,
|
|
286
286
|
total: h.length,
|
|
287
287
|
...u.offset ? {
|
|
@@ -292,31 +292,31 @@ function un(e, a, t = "data") {
|
|
|
292
292
|
};
|
|
293
293
|
return o.value = {
|
|
294
294
|
status: xe.Idle,
|
|
295
|
-
response:
|
|
296
|
-
},
|
|
297
|
-
} catch (
|
|
295
|
+
response: r
|
|
296
|
+
}, r;
|
|
297
|
+
} catch (i) {
|
|
298
298
|
const u = {
|
|
299
299
|
data: [],
|
|
300
300
|
total: 0
|
|
301
301
|
};
|
|
302
|
-
return d.query &&
|
|
302
|
+
return d.query && i.response.status === 404 ? (o.value = {
|
|
303
303
|
status: xe.NoResults,
|
|
304
304
|
response: u,
|
|
305
|
-
error:
|
|
305
|
+
error: i
|
|
306
306
|
}, u) : (o.value = {
|
|
307
307
|
status: xe.Error,
|
|
308
308
|
response: u,
|
|
309
|
-
error:
|
|
309
|
+
error: i
|
|
310
310
|
}, u);
|
|
311
311
|
}
|
|
312
312
|
}, fetcherState: o };
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function ur() {
|
|
315
315
|
return {
|
|
316
316
|
getPropValue: (e, a) => (a == null ? void 0 : a[e]) ?? void 0
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function cr() {
|
|
320
320
|
return {
|
|
321
321
|
convertKeyToTitle: (e, a = "_") => e ? e.split(a).map((t) => t.toLowerCase() === "id" ? t.toUpperCase() : t.charAt(0).toUpperCase() + t.substring(1)).join(" ") : ""
|
|
322
322
|
};
|
|
@@ -331,24 +331,24 @@ const Nl = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
331
331
|
}, ul = (e) => e === "*" || e === "x" || e === "X", cl = (e) => {
|
|
332
332
|
const a = parseInt(e, 10);
|
|
333
333
|
return isNaN(a) ? e : a;
|
|
334
|
-
},
|
|
334
|
+
}, dr = (e, a) => typeof e != typeof a ? [String(e), String(a)] : [e, a], hr = (e, a) => {
|
|
335
335
|
if (ul(e) || ul(a))
|
|
336
336
|
return 0;
|
|
337
|
-
const [t, l] =
|
|
337
|
+
const [t, l] = dr(cl(e), cl(a));
|
|
338
338
|
return t > l ? 1 : t < l ? -1 : 0;
|
|
339
339
|
}, dl = (e, a) => {
|
|
340
340
|
for (let t = 0; t < Math.max(e.length, a.length); t++) {
|
|
341
|
-
const l =
|
|
341
|
+
const l = hr(e[t] || "0", a[t] || "0");
|
|
342
342
|
if (l !== 0)
|
|
343
343
|
return l;
|
|
344
344
|
}
|
|
345
345
|
return 0;
|
|
346
|
-
},
|
|
347
|
-
const t = ol(e), l = ol(a), s = t.pop(),
|
|
348
|
-
return o !== 0 ? o : s &&
|
|
346
|
+
}, pr = (e, a) => {
|
|
347
|
+
const t = ol(e), l = ol(a), s = t.pop(), n = l.pop(), o = dl(t, l);
|
|
348
|
+
return o !== 0 ? o : s && n ? dl(s.split("."), n.split(".")) : s || n ? s ? -1 : 1 : 0;
|
|
349
349
|
}, hl = (e, a, t) => {
|
|
350
|
-
|
|
351
|
-
const l =
|
|
350
|
+
fr(t);
|
|
351
|
+
const l = pr(e, a);
|
|
352
352
|
return Pl[t].includes(l);
|
|
353
353
|
}, Pl = {
|
|
354
354
|
">": [1],
|
|
@@ -357,46 +357,46 @@ const Nl = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
357
357
|
"<=": [-1, 0],
|
|
358
358
|
"<": [-1],
|
|
359
359
|
"!=": [-1, 1]
|
|
360
|
-
}, pl = Object.keys(Pl),
|
|
360
|
+
}, pl = Object.keys(Pl), fr = (e) => {
|
|
361
361
|
if (typeof e != "string")
|
|
362
362
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
363
363
|
if (pl.indexOf(e) === -1)
|
|
364
364
|
throw new Error(`Invalid operator, expected one of ${pl.join("|")}`);
|
|
365
|
-
},
|
|
366
|
-
function
|
|
365
|
+
}, mr = (e) => typeof e == "string" && /^[v\d]/.test(e) && Nl.test(e);
|
|
366
|
+
function gr(e) {
|
|
367
367
|
const { gatewayInfo: a, supportedRange: t } = e;
|
|
368
368
|
if (!a)
|
|
369
369
|
return !0;
|
|
370
370
|
const { edition: l, version: s } = a;
|
|
371
|
-
if (!
|
|
371
|
+
if (!mr(s))
|
|
372
372
|
return console.error("Invalid version"), !1;
|
|
373
|
-
const
|
|
374
|
-
if (!
|
|
373
|
+
const n = t[l];
|
|
374
|
+
if (!n)
|
|
375
375
|
return !1;
|
|
376
|
-
const [o, d] =
|
|
376
|
+
const [o, d] = n;
|
|
377
377
|
return !(o && hl(s, o, "<") || d && hl(s, d, ">"));
|
|
378
378
|
}
|
|
379
379
|
const de = {
|
|
380
380
|
useAxios: Kt,
|
|
381
|
-
useDebouncedFilter:
|
|
382
|
-
useDeleteUrlBuilder:
|
|
383
|
-
useErrors:
|
|
384
|
-
useFetcher:
|
|
381
|
+
useDebouncedFilter: rr,
|
|
382
|
+
useDeleteUrlBuilder: ir,
|
|
383
|
+
useErrors: nr,
|
|
384
|
+
useFetcher: or,
|
|
385
385
|
useFetchUrlBuilder: Kl,
|
|
386
|
-
useHelpers:
|
|
387
|
-
useStringHelpers:
|
|
386
|
+
useHelpers: ur,
|
|
387
|
+
useStringHelpers: cr,
|
|
388
388
|
useI18n: Nt,
|
|
389
|
-
useGatewayFeatureSupported:
|
|
390
|
-
},
|
|
389
|
+
useGatewayFeatureSupported: gr
|
|
390
|
+
}, yr = {
|
|
391
391
|
fail: "Failed to copy id to clipboard",
|
|
392
392
|
success: {
|
|
393
393
|
prefix: "Successfully",
|
|
394
394
|
content: " copied to clipboard"
|
|
395
395
|
}
|
|
396
|
-
},
|
|
397
|
-
message:
|
|
398
|
-
iconTitle:
|
|
399
|
-
},
|
|
396
|
+
}, vr = "Copy to clipboard", br = {
|
|
397
|
+
message: yr,
|
|
398
|
+
iconTitle: vr
|
|
399
|
+
}, kr = "kong-ui-copy-uuid-notify", _r = { class: "kong-ui-copy-uuid" }, Cr = ["onClick"], fl = 15, wr = /* @__PURE__ */ le({
|
|
400
400
|
__name: "CopyUuid",
|
|
401
401
|
props: {
|
|
402
402
|
uuid: {
|
|
@@ -440,24 +440,24 @@ const de = {
|
|
|
440
440
|
},
|
|
441
441
|
emits: ["success", "error"],
|
|
442
442
|
setup(e, { emit: a }) {
|
|
443
|
-
const t = e, { t: l } = qt("en-us",
|
|
444
|
-
}),
|
|
443
|
+
const t = e, { t: l } = qt("en-us", br), s = t.notify || Ls(kr, () => {
|
|
444
|
+
}), n = O(() => t.idTooltip ? {
|
|
445
445
|
label: t.idTooltip,
|
|
446
446
|
positionFixed: !0,
|
|
447
447
|
placement: "bottomStart"
|
|
448
448
|
} : {
|
|
449
449
|
title: t.uuid
|
|
450
|
-
}), o =
|
|
450
|
+
}), o = O(() => !!(t.tooltip && t.successTooltip)), d = B(t.tooltip), i = O(() => t.tooltip ? {
|
|
451
451
|
label: d.value,
|
|
452
452
|
positionFixed: !0,
|
|
453
453
|
maxWidth: "500px",
|
|
454
454
|
placement: "bottomStart"
|
|
455
|
-
} : {}), u =
|
|
456
|
-
d.value =
|
|
455
|
+
} : {}), u = O(() => t.format === "redacted" ? "*****" : t.format === "deleted" ? `*${t.uuid.substring(0, 5)}` : t.uuid), f = (r) => {
|
|
456
|
+
d.value = r, setTimeout(() => {
|
|
457
457
|
d.value = t.tooltip;
|
|
458
458
|
}, 1800);
|
|
459
|
-
}, h = (
|
|
460
|
-
if (!
|
|
459
|
+
}, h = (r) => {
|
|
460
|
+
if (!r(t.uuid)) {
|
|
461
461
|
typeof s == "function" && s({
|
|
462
462
|
type: "error",
|
|
463
463
|
message: l("message.fail")
|
|
@@ -470,10 +470,10 @@ const de = {
|
|
|
470
470
|
message: `${S}${l("message.success.content")}`
|
|
471
471
|
}), o.value ? f(t.successTooltip) : a("success", t.uuid);
|
|
472
472
|
};
|
|
473
|
-
return (
|
|
473
|
+
return (r, k) => {
|
|
474
474
|
const S = U("KIcon"), g = U("KClipboardProvider");
|
|
475
|
-
return b(), K("div",
|
|
476
|
-
e.format !== "hidden" ? (b(), D(Je(e.idTooltip ? "KTooltip" : "div"), _t({ key: 0 },
|
|
475
|
+
return b(), K("div", _r, [
|
|
476
|
+
e.format !== "hidden" ? (b(), D(Je(e.idTooltip ? "KTooltip" : "div"), _t({ key: 0 }, n.value, { "data-testid": "copy-id" }), {
|
|
477
477
|
default: p(() => [
|
|
478
478
|
x("div", {
|
|
479
479
|
class: Ae([
|
|
@@ -485,7 +485,7 @@ const de = {
|
|
|
485
485
|
]),
|
|
486
486
|
_: 1
|
|
487
487
|
}, 16)) : Y("", !0),
|
|
488
|
-
(b(), D(Je(e.tooltip ? "KTooltip" : "div"), _t(
|
|
488
|
+
(b(), D(Je(e.tooltip ? "KTooltip" : "div"), _t(i.value, { class: "uuid-icon-wrapper" }), {
|
|
489
489
|
default: p(() => [
|
|
490
490
|
y(g, null, {
|
|
491
491
|
default: p(({ copyToClipboard: m }) => [
|
|
@@ -503,7 +503,7 @@ const de = {
|
|
|
503
503
|
size: "16",
|
|
504
504
|
title: c(l)("iconTitle")
|
|
505
505
|
}, null, 8, ["color", "hide-title", "title"])
|
|
506
|
-
], 8,
|
|
506
|
+
], 8, Cr)
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
509
|
})
|
|
@@ -513,15 +513,15 @@ const de = {
|
|
|
513
513
|
]);
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
|
-
}),
|
|
516
|
+
}), Sr = (e, a) => {
|
|
517
517
|
const t = e.__vccOpts || e;
|
|
518
518
|
for (const [l, s] of a)
|
|
519
519
|
t[l] = s;
|
|
520
520
|
return t;
|
|
521
|
-
}, jl = /* @__PURE__ */
|
|
521
|
+
}, jl = /* @__PURE__ */ Sr(wr, [["__scopeId", "data-v-bfdaf6f7"]]), Ir = {
|
|
522
522
|
key: 0,
|
|
523
523
|
class: "config-card-fieldset-title"
|
|
524
|
-
},
|
|
524
|
+
}, xr = /* @__PURE__ */ le({
|
|
525
525
|
__name: "JsonCardItem",
|
|
526
526
|
props: {
|
|
527
527
|
item: {
|
|
@@ -538,18 +538,18 @@ const de = {
|
|
|
538
538
|
}
|
|
539
539
|
},
|
|
540
540
|
setup(e) {
|
|
541
|
-
const a = e, { i18n: { t } } = de.useI18n(), { convertKeyToTitle: l } = de.useStringHelpers(), s =
|
|
542
|
-
const
|
|
543
|
-
return a.isArrayItem && delete
|
|
544
|
-
}), d =
|
|
545
|
-
var
|
|
546
|
-
return a.isArrayItem ? (
|
|
541
|
+
const a = e, { i18n: { t } } = de.useI18n(), { convertKeyToTitle: l } = de.useStringHelpers(), s = O(() => a.item.key ?? "json-array-item"), n = O(() => a.item.value ?? a.item), o = O(() => {
|
|
542
|
+
const i = JSON.parse(JSON.stringify(n.value));
|
|
543
|
+
return a.isArrayItem && delete i.name, i;
|
|
544
|
+
}), d = O(() => {
|
|
545
|
+
var i;
|
|
546
|
+
return a.isArrayItem ? (i = n.value) != null && i.name ? l(n.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: a.index }) : "";
|
|
547
547
|
});
|
|
548
|
-
return (
|
|
548
|
+
return (i, u) => (b(), D(Je(e.isArrayItem ? "fieldset" : "div"), {
|
|
549
549
|
class: Ae(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
550
550
|
}, {
|
|
551
551
|
default: p(() => [
|
|
552
|
-
e.isArrayItem ? (b(), K("legend",
|
|
552
|
+
e.isArrayItem ? (b(), K("legend", Ir, [
|
|
553
553
|
x("b", null, C(d.value), 1)
|
|
554
554
|
])) : Y("", !0),
|
|
555
555
|
(b(!0), K(ce, null, me(Object.keys(o.value), (f, h) => (b(), D(Pt, {
|
|
@@ -569,7 +569,7 @@ const de = {
|
|
|
569
569
|
for (const [l, s] of a)
|
|
570
570
|
t[l] = s;
|
|
571
571
|
return t;
|
|
572
|
-
}, Bl = /* @__PURE__ */ be(
|
|
572
|
+
}, Bl = /* @__PURE__ */ be(xr, [["__scopeId", "data-v-68ca83ec"]]), Hr = /* @__PURE__ */ le({
|
|
573
573
|
__name: "InternalLinkItem",
|
|
574
574
|
props: {
|
|
575
575
|
item: {
|
|
@@ -586,7 +586,7 @@ const de = {
|
|
|
586
586
|
y(s, {
|
|
587
587
|
appearance: "btn-link",
|
|
588
588
|
class: "navigation-button",
|
|
589
|
-
onClick: l[0] || (l[0] = (
|
|
589
|
+
onClick: l[0] || (l[0] = (n) => t.$emit("navigation-click", e.item))
|
|
590
590
|
}, {
|
|
591
591
|
default: p(() => [
|
|
592
592
|
G(C(e.item.value || c(a)("baseConfigCard.commonFields.link")), 1)
|
|
@@ -596,7 +596,7 @@ const de = {
|
|
|
596
596
|
]);
|
|
597
597
|
};
|
|
598
598
|
}
|
|
599
|
-
}),
|
|
599
|
+
}), Tr = /* @__PURE__ */ be(Hr, [["__scopeId", "data-v-7410504d"]]), Ar = /* @__PURE__ */ le({
|
|
600
600
|
__name: "StatusBadge",
|
|
601
601
|
props: {
|
|
602
602
|
status: {
|
|
@@ -618,11 +618,11 @@ const de = {
|
|
|
618
618
|
}, 8, ["appearance"]);
|
|
619
619
|
};
|
|
620
620
|
}
|
|
621
|
-
}),
|
|
621
|
+
}), Fr = "#0044f4", Or = "#e0e4ea", Ur = "#3a3f51", qr = "1px", $r = "20px", Mr = { class: "config-card-details-row" }, Kr = ["data-testid"], Nr = ["data-testid"], Pr = ["data-testid"], jr = ["data-testid"], Br = { key: 1 }, Er = ["data-testid"], Lr = ["data-testid"], Vr = ["data-testid"], Rr = ["data-testid"], Dr = ["title"], Jr = {
|
|
622
622
|
name: "ConfigCardItem",
|
|
623
|
-
components: { CopyUuid: jl, JsonCardItem: Bl, StatusBadge:
|
|
624
|
-
},
|
|
625
|
-
...
|
|
623
|
+
components: { CopyUuid: jl, JsonCardItem: Bl, StatusBadge: Ar, InternalLinkItem: Tr }
|
|
624
|
+
}, zr = /* @__PURE__ */ le({
|
|
625
|
+
...Jr,
|
|
626
626
|
props: {
|
|
627
627
|
item: {
|
|
628
628
|
type: Object,
|
|
@@ -643,12 +643,12 @@ const de = {
|
|
|
643
643
|
setup(e, { emit: a }) {
|
|
644
644
|
const t = e;
|
|
645
645
|
$l((h) => ({
|
|
646
|
-
"2c6ac268": u.value ? "none" : `solid ${c(
|
|
647
|
-
c7a65802:
|
|
648
|
-
"778426fe":
|
|
649
|
-
"777f9b48":
|
|
646
|
+
"2c6ac268": u.value ? "none" : `solid ${c(qr)} ${c(Or)}`,
|
|
647
|
+
c7a65802: i.value && o.value ? "block" : "flex",
|
|
648
|
+
"778426fe": i.value && o.value ? "100%" : t.slim ? "50%" : "25%",
|
|
649
|
+
"777f9b48": i.value && o.value ? "100%" : t.slim ? "50%" : "75%"
|
|
650
650
|
}));
|
|
651
|
-
const l = ct(), { i18n: { t: s, formatUnixTimeStamp:
|
|
651
|
+
const l = ct(), { i18n: { t: s, formatUnixTimeStamp: n } } = de.useI18n(), o = O(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), d = O(() => !!(t.item.tooltip || l["label-tooltip"])), i = O(() => t.item.type === se.Json || t.item.type === se.JsonArray), u = O(() => t.item.type === se.JsonArray), f = O(() => {
|
|
652
652
|
switch (t.item.type) {
|
|
653
653
|
case se.ID:
|
|
654
654
|
return {
|
|
@@ -708,7 +708,7 @@ const de = {
|
|
|
708
708
|
attrs: {
|
|
709
709
|
"data-testid": `${t.item.key}-date`
|
|
710
710
|
},
|
|
711
|
-
text:
|
|
711
|
+
text: n(t.item.value)
|
|
712
712
|
};
|
|
713
713
|
case se.BadgeStatus:
|
|
714
714
|
return {
|
|
@@ -775,9 +775,9 @@ const de = {
|
|
|
775
775
|
};
|
|
776
776
|
}
|
|
777
777
|
});
|
|
778
|
-
return (h,
|
|
778
|
+
return (h, r) => {
|
|
779
779
|
const k = U("KLabel"), S = U("KBadge"), g = U("KMethodBadge");
|
|
780
|
-
return b(), K("div",
|
|
780
|
+
return b(), K("div", Mr, [
|
|
781
781
|
x("div", {
|
|
782
782
|
class: "config-card-details-label",
|
|
783
783
|
"data-testid": `${e.item.key}-label`
|
|
@@ -798,13 +798,13 @@ const de = {
|
|
|
798
798
|
ae(h.$slots, "label-tooltip", {}, () => [
|
|
799
799
|
G(C(e.item.tooltip), 1)
|
|
800
800
|
], !0)
|
|
801
|
-
], 8,
|
|
801
|
+
], 8, Nr)
|
|
802
802
|
]),
|
|
803
803
|
key: "0"
|
|
804
804
|
} : void 0
|
|
805
805
|
]), 1024)
|
|
806
806
|
], !0)
|
|
807
|
-
], 8,
|
|
807
|
+
], 8, Kr),
|
|
808
808
|
x("div", {
|
|
809
809
|
class: "config-card-details-value",
|
|
810
810
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -812,7 +812,7 @@ const de = {
|
|
|
812
812
|
ae(h.$slots, e.item.key, {
|
|
813
813
|
rowValue: e.item.value
|
|
814
814
|
}, () => [
|
|
815
|
-
o.value ? (b(), K("div",
|
|
815
|
+
o.value ? (b(), K("div", Br, [
|
|
816
816
|
(b(), D(Je(f.value.tag), Ns(Ps(f.value.attrs)), {
|
|
817
817
|
default: p(() => [
|
|
818
818
|
f.value.additionalComponent === "KBadge" ? (b(), K("div", {
|
|
@@ -830,7 +830,7 @@ const de = {
|
|
|
830
830
|
]),
|
|
831
831
|
_: 2
|
|
832
832
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
833
|
-
], 8,
|
|
833
|
+
], 8, Er)) : Y("", !0),
|
|
834
834
|
f.value.additionalComponent === "CopyUuid" ? (b(), K("div", {
|
|
835
835
|
key: 1,
|
|
836
836
|
class: "copy-uuid-array",
|
|
@@ -841,7 +841,7 @@ const de = {
|
|
|
841
841
|
"data-testid": `${e.item.key}-copy-uuid-${H}`,
|
|
842
842
|
uuid: m
|
|
843
843
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
844
|
-
], 8,
|
|
844
|
+
], 8, Lr)) : f.value.additionalComponent === "KMethodBadge" ? (b(), K("div", {
|
|
845
845
|
key: 2,
|
|
846
846
|
class: "method-badge-array",
|
|
847
847
|
"data-testid": `${e.item.key}-badge-methods`
|
|
@@ -859,7 +859,7 @@ const de = {
|
|
|
859
859
|
]),
|
|
860
860
|
_: 2
|
|
861
861
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
862
|
-
], 8,
|
|
862
|
+
], 8, Vr)) : Y("", !0),
|
|
863
863
|
f.value.additionalComponent === "JsonCardItem" ? (b(), K("div", {
|
|
864
864
|
key: 3,
|
|
865
865
|
"data-testid": `${t.item.key}-json-array-content`
|
|
@@ -870,57 +870,57 @@ const de = {
|
|
|
870
870
|
"is-array-item": "",
|
|
871
871
|
item: m
|
|
872
872
|
}, null, 8, ["index", "item"]))), 128))
|
|
873
|
-
], 8,
|
|
873
|
+
], 8, Rr)) : (b(), K("span", {
|
|
874
874
|
key: 4,
|
|
875
875
|
class: Ae(["attrs-data-text", { truncated: e.truncated }]),
|
|
876
876
|
title: e.truncated ? e.item.value : void 0
|
|
877
|
-
}, C(f.value.text), 11,
|
|
877
|
+
}, C(f.value.text), 11, Dr))
|
|
878
878
|
]),
|
|
879
879
|
_: 1
|
|
880
880
|
}, 16))
|
|
881
881
|
])) : (b(), K("div", {
|
|
882
882
|
key: 0,
|
|
883
883
|
"data-testid": `${e.item.key}-no-value`
|
|
884
|
-
}, " – ", 8,
|
|
884
|
+
}, " – ", 8, jr))
|
|
885
885
|
], !0)
|
|
886
|
-
], 8,
|
|
886
|
+
], 8, Pr)
|
|
887
887
|
]);
|
|
888
888
|
};
|
|
889
889
|
}
|
|
890
|
-
}), Pt = /* @__PURE__ */ be(
|
|
890
|
+
}), Pt = /* @__PURE__ */ be(zr, [["__scopeId", "data-v-a3c5ab01"]]);
|
|
891
891
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
892
892
|
function El(e) {
|
|
893
893
|
return typeof e > "u" || e === null;
|
|
894
894
|
}
|
|
895
|
-
function
|
|
895
|
+
function Wr(e) {
|
|
896
896
|
return typeof e == "object" && e !== null;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Qr(e) {
|
|
899
899
|
return Array.isArray(e) ? e : El(e) ? [] : [e];
|
|
900
900
|
}
|
|
901
|
-
function
|
|
902
|
-
var t, l, s,
|
|
901
|
+
function Yr(e, a) {
|
|
902
|
+
var t, l, s, n;
|
|
903
903
|
if (a)
|
|
904
|
-
for (
|
|
905
|
-
s =
|
|
904
|
+
for (n = Object.keys(a), t = 0, l = n.length; t < l; t += 1)
|
|
905
|
+
s = n[t], e[s] = a[s];
|
|
906
906
|
return e;
|
|
907
907
|
}
|
|
908
|
-
function
|
|
908
|
+
function Gr(e, a) {
|
|
909
909
|
var t = "", l;
|
|
910
910
|
for (l = 0; l < a; l += 1)
|
|
911
911
|
t += e;
|
|
912
912
|
return t;
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Zr(e) {
|
|
915
915
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
916
916
|
}
|
|
917
|
-
var
|
|
918
|
-
isNothing:
|
|
919
|
-
isObject:
|
|
920
|
-
toArray:
|
|
921
|
-
repeat:
|
|
922
|
-
isNegativeZero:
|
|
923
|
-
extend:
|
|
917
|
+
var Xr = El, ei = Wr, ti = Qr, ai = Gr, li = Zr, si = Yr, ue = {
|
|
918
|
+
isNothing: Xr,
|
|
919
|
+
isObject: ei,
|
|
920
|
+
toArray: ti,
|
|
921
|
+
repeat: ai,
|
|
922
|
+
isNegativeZero: li,
|
|
923
|
+
extend: si
|
|
924
924
|
};
|
|
925
925
|
function Ll(e, a) {
|
|
926
926
|
var t = "", l = e.reason || "(unknown reason)";
|
|
@@ -938,47 +938,47 @@ ze.prototype.toString = function(e) {
|
|
|
938
938
|
};
|
|
939
939
|
var fe = ze;
|
|
940
940
|
function yt(e, a, t, l, s) {
|
|
941
|
-
var
|
|
942
|
-
return l - a > d && (
|
|
943
|
-
str:
|
|
944
|
-
pos: l - a +
|
|
941
|
+
var n = "", o = "", d = Math.floor(s / 2) - 1;
|
|
942
|
+
return l - a > d && (n = " ... ", a = l - d + n.length), t - l > d && (o = " ...", t = l + d - o.length), {
|
|
943
|
+
str: n + e.slice(a, t).replace(/\t/g, "→") + o,
|
|
944
|
+
pos: l - a + n.length
|
|
945
945
|
// relative position
|
|
946
946
|
};
|
|
947
947
|
}
|
|
948
948
|
function vt(e, a) {
|
|
949
949
|
return ue.repeat(" ", a - e.length) + e;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function ri(e, a) {
|
|
952
952
|
if (a = Object.create(a || null), !e.buffer)
|
|
953
953
|
return null;
|
|
954
954
|
a.maxLength || (a.maxLength = 79), typeof a.indent != "number" && (a.indent = 1), typeof a.linesBefore != "number" && (a.linesBefore = 3), typeof a.linesAfter != "number" && (a.linesAfter = 2);
|
|
955
|
-
for (var t = /\r?\n|\r|\0/g, l = [0], s = [],
|
|
956
|
-
s.push(
|
|
955
|
+
for (var t = /\r?\n|\r|\0/g, l = [0], s = [], n, o = -1; n = t.exec(e.buffer); )
|
|
956
|
+
s.push(n.index), l.push(n.index + n[0].length), e.position <= n.index && o < 0 && (o = l.length - 2);
|
|
957
957
|
o < 0 && (o = l.length - 1);
|
|
958
|
-
var d = "",
|
|
959
|
-
for (
|
|
958
|
+
var d = "", i, u, f = Math.min(e.line + a.linesAfter, s.length).toString().length, h = a.maxLength - (a.indent + f + 3);
|
|
959
|
+
for (i = 1; i <= a.linesBefore && !(o - i < 0); i++)
|
|
960
960
|
u = yt(
|
|
961
961
|
e.buffer,
|
|
962
|
-
l[o -
|
|
963
|
-
s[o -
|
|
964
|
-
e.position - (l[o] - l[o -
|
|
962
|
+
l[o - i],
|
|
963
|
+
s[o - i],
|
|
964
|
+
e.position - (l[o] - l[o - i]),
|
|
965
965
|
h
|
|
966
|
-
), d = ue.repeat(" ", a.indent) + vt((e.line -
|
|
966
|
+
), d = ue.repeat(" ", a.indent) + vt((e.line - i + 1).toString(), f) + " | " + u.str + `
|
|
967
967
|
` + d;
|
|
968
968
|
for (u = yt(e.buffer, l[o], s[o], e.position, h), d += ue.repeat(" ", a.indent) + vt((e.line + 1).toString(), f) + " | " + u.str + `
|
|
969
969
|
`, d += ue.repeat("-", a.indent + f + 3 + u.pos) + `^
|
|
970
|
-
`,
|
|
970
|
+
`, i = 1; i <= a.linesAfter && !(o + i >= s.length); i++)
|
|
971
971
|
u = yt(
|
|
972
972
|
e.buffer,
|
|
973
|
-
l[o +
|
|
974
|
-
s[o +
|
|
975
|
-
e.position - (l[o] - l[o +
|
|
973
|
+
l[o + i],
|
|
974
|
+
s[o + i],
|
|
975
|
+
e.position - (l[o] - l[o + i]),
|
|
976
976
|
h
|
|
977
|
-
), d += ue.repeat(" ", a.indent) + vt((e.line +
|
|
977
|
+
), d += ue.repeat(" ", a.indent) + vt((e.line + i + 1).toString(), f) + " | " + u.str + `
|
|
978
978
|
`;
|
|
979
979
|
return d.replace(/\n$/, "");
|
|
980
980
|
}
|
|
981
|
-
var
|
|
981
|
+
var ii = ri, ni = [
|
|
982
982
|
"kind",
|
|
983
983
|
"multi",
|
|
984
984
|
"resolve",
|
|
@@ -989,12 +989,12 @@ var ir = rr, or = [
|
|
|
989
989
|
"representName",
|
|
990
990
|
"defaultStyle",
|
|
991
991
|
"styleAliases"
|
|
992
|
-
],
|
|
992
|
+
], oi = [
|
|
993
993
|
"scalar",
|
|
994
994
|
"sequence",
|
|
995
995
|
"mapping"
|
|
996
996
|
];
|
|
997
|
-
function
|
|
997
|
+
function ui(e) {
|
|
998
998
|
var a = {};
|
|
999
999
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1000
1000
|
e[t].forEach(function(l) {
|
|
@@ -1002,28 +1002,28 @@ function cr(e) {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
}), a;
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function ci(e, a) {
|
|
1006
1006
|
if (a = a || {}, Object.keys(a).forEach(function(t) {
|
|
1007
|
-
if (
|
|
1007
|
+
if (ni.indexOf(t) === -1)
|
|
1008
1008
|
throw new fe('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1009
1009
|
}), this.options = a, this.tag = e, this.kind = a.kind || null, this.resolve = a.resolve || function() {
|
|
1010
1010
|
return !0;
|
|
1011
1011
|
}, this.construct = a.construct || function(t) {
|
|
1012
1012
|
return t;
|
|
1013
|
-
}, this.instanceOf = a.instanceOf || null, this.predicate = a.predicate || null, this.represent = a.represent || null, this.representName = a.representName || null, this.defaultStyle = a.defaultStyle || null, this.multi = a.multi || !1, this.styleAliases =
|
|
1013
|
+
}, this.instanceOf = a.instanceOf || null, this.predicate = a.predicate || null, this.represent = a.represent || null, this.representName = a.representName || null, this.defaultStyle = a.defaultStyle || null, this.multi = a.multi || !1, this.styleAliases = ui(a.styleAliases || null), oi.indexOf(this.kind) === -1)
|
|
1014
1014
|
throw new fe('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1015
1015
|
}
|
|
1016
|
-
var he =
|
|
1016
|
+
var he = ci;
|
|
1017
1017
|
function ml(e, a) {
|
|
1018
1018
|
var t = [];
|
|
1019
1019
|
return e[a].forEach(function(l) {
|
|
1020
1020
|
var s = t.length;
|
|
1021
|
-
t.forEach(function(
|
|
1022
|
-
|
|
1021
|
+
t.forEach(function(n, o) {
|
|
1022
|
+
n.tag === l.tag && n.kind === l.kind && n.multi === l.multi && (s = o);
|
|
1023
1023
|
}), t[s] = l;
|
|
1024
1024
|
}), t;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1026
|
+
function di() {
|
|
1027
1027
|
var e = {
|
|
1028
1028
|
scalar: {},
|
|
1029
1029
|
sequence: {},
|
|
@@ -1068,7 +1068,7 @@ Ct.prototype.extend = function(e) {
|
|
|
1068
1068
|
throw new fe("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1069
1069
|
});
|
|
1070
1070
|
var l = Object.create(Ct.prototype);
|
|
1071
|
-
return l.implicit = (this.implicit || []).concat(a), l.explicit = (this.explicit || []).concat(t), l.compiledImplicit = ml(l, "implicit"), l.compiledExplicit = ml(l, "explicit"), l.compiledTypeMap =
|
|
1071
|
+
return l.implicit = (this.implicit || []).concat(a), l.explicit = (this.explicit || []).concat(t), l.compiledImplicit = ml(l, "implicit"), l.compiledExplicit = ml(l, "explicit"), l.compiledTypeMap = di(l.compiledImplicit, l.compiledExplicit), l;
|
|
1072
1072
|
};
|
|
1073
1073
|
var Vl = Ct, Rl = new he("tag:yaml.org,2002:str", {
|
|
1074
1074
|
kind: "scalar",
|
|
@@ -1092,23 +1092,23 @@ var Vl = Ct, Rl = new he("tag:yaml.org,2002:str", {
|
|
|
1092
1092
|
Jl
|
|
1093
1093
|
]
|
|
1094
1094
|
});
|
|
1095
|
-
function
|
|
1095
|
+
function hi(e) {
|
|
1096
1096
|
if (e === null)
|
|
1097
1097
|
return !0;
|
|
1098
1098
|
var a = e.length;
|
|
1099
1099
|
return a === 1 && e === "~" || a === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function pi() {
|
|
1102
1102
|
return null;
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1104
|
+
function fi(e) {
|
|
1105
1105
|
return e === null;
|
|
1106
1106
|
}
|
|
1107
1107
|
var Wl = new he("tag:yaml.org,2002:null", {
|
|
1108
1108
|
kind: "scalar",
|
|
1109
|
-
resolve:
|
|
1110
|
-
construct:
|
|
1111
|
-
predicate:
|
|
1109
|
+
resolve: hi,
|
|
1110
|
+
construct: pi,
|
|
1111
|
+
predicate: fi,
|
|
1112
1112
|
represent: {
|
|
1113
1113
|
canonical: function() {
|
|
1114
1114
|
return "~";
|
|
@@ -1128,23 +1128,23 @@ var Wl = new he("tag:yaml.org,2002:null", {
|
|
|
1128
1128
|
},
|
|
1129
1129
|
defaultStyle: "lowercase"
|
|
1130
1130
|
});
|
|
1131
|
-
function
|
|
1131
|
+
function mi(e) {
|
|
1132
1132
|
if (e === null)
|
|
1133
1133
|
return !1;
|
|
1134
1134
|
var a = e.length;
|
|
1135
1135
|
return a === 4 && (e === "true" || e === "True" || e === "TRUE") || a === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1136
1136
|
}
|
|
1137
|
-
function
|
|
1137
|
+
function gi(e) {
|
|
1138
1138
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1139
1139
|
}
|
|
1140
|
-
function
|
|
1140
|
+
function yi(e) {
|
|
1141
1141
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1142
1142
|
}
|
|
1143
1143
|
var Ql = new he("tag:yaml.org,2002:bool", {
|
|
1144
1144
|
kind: "scalar",
|
|
1145
|
-
resolve:
|
|
1146
|
-
construct:
|
|
1147
|
-
predicate:
|
|
1145
|
+
resolve: mi,
|
|
1146
|
+
construct: gi,
|
|
1147
|
+
predicate: yi,
|
|
1148
1148
|
represent: {
|
|
1149
1149
|
lowercase: function(e) {
|
|
1150
1150
|
return e ? "true" : "false";
|
|
@@ -1158,16 +1158,16 @@ var Ql = new he("tag:yaml.org,2002:bool", {
|
|
|
1158
1158
|
},
|
|
1159
1159
|
defaultStyle: "lowercase"
|
|
1160
1160
|
});
|
|
1161
|
-
function
|
|
1161
|
+
function vi(e) {
|
|
1162
1162
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function bi(e) {
|
|
1165
1165
|
return 48 <= e && e <= 55;
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function ki(e) {
|
|
1168
1168
|
return 48 <= e && e <= 57;
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function _i(e) {
|
|
1171
1171
|
if (e === null)
|
|
1172
1172
|
return !1;
|
|
1173
1173
|
var a = e.length, t = 0, l = !1, s;
|
|
@@ -1188,7 +1188,7 @@ function Cr(e) {
|
|
|
1188
1188
|
if (s === "x") {
|
|
1189
1189
|
for (t++; t < a; t++)
|
|
1190
1190
|
if (s = e[t], s !== "_") {
|
|
1191
|
-
if (!
|
|
1191
|
+
if (!vi(e.charCodeAt(t)))
|
|
1192
1192
|
return !1;
|
|
1193
1193
|
l = !0;
|
|
1194
1194
|
}
|
|
@@ -1197,7 +1197,7 @@ function Cr(e) {
|
|
|
1197
1197
|
if (s === "o") {
|
|
1198
1198
|
for (t++; t < a; t++)
|
|
1199
1199
|
if (s = e[t], s !== "_") {
|
|
1200
|
-
if (!
|
|
1200
|
+
if (!bi(e.charCodeAt(t)))
|
|
1201
1201
|
return !1;
|
|
1202
1202
|
l = !0;
|
|
1203
1203
|
}
|
|
@@ -1208,13 +1208,13 @@ function Cr(e) {
|
|
|
1208
1208
|
return !1;
|
|
1209
1209
|
for (; t < a; t++)
|
|
1210
1210
|
if (s = e[t], s !== "_") {
|
|
1211
|
-
if (!
|
|
1211
|
+
if (!ki(e.charCodeAt(t)))
|
|
1212
1212
|
return !1;
|
|
1213
1213
|
l = !0;
|
|
1214
1214
|
}
|
|
1215
1215
|
return !(!l || s === "_");
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Ci(e) {
|
|
1218
1218
|
var a = e, t = 1, l;
|
|
1219
1219
|
if (a.indexOf("_") !== -1 && (a = a.replace(/_/g, "")), l = a[0], (l === "-" || l === "+") && (l === "-" && (t = -1), a = a.slice(1), l = a[0]), a === "0")
|
|
1220
1220
|
return 0;
|
|
@@ -1228,14 +1228,14 @@ function wr(e) {
|
|
|
1228
1228
|
}
|
|
1229
1229
|
return t * parseInt(a, 10);
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function wi(e) {
|
|
1232
1232
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ue.isNegativeZero(e);
|
|
1233
1233
|
}
|
|
1234
1234
|
var Yl = new he("tag:yaml.org,2002:int", {
|
|
1235
1235
|
kind: "scalar",
|
|
1236
|
-
resolve:
|
|
1237
|
-
construct:
|
|
1238
|
-
predicate:
|
|
1236
|
+
resolve: _i,
|
|
1237
|
+
construct: Ci,
|
|
1238
|
+
predicate: wi,
|
|
1239
1239
|
represent: {
|
|
1240
1240
|
binary: function(e) {
|
|
1241
1241
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1258,21 +1258,21 @@ var Yl = new he("tag:yaml.org,2002:int", {
|
|
|
1258
1258
|
decimal: [10, "dec"],
|
|
1259
1259
|
hexadecimal: [16, "hex"]
|
|
1260
1260
|
}
|
|
1261
|
-
}),
|
|
1261
|
+
}), Si = new RegExp(
|
|
1262
1262
|
// 2.5e4, 2.5 and integers
|
|
1263
1263
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1264
1264
|
);
|
|
1265
|
-
function
|
|
1266
|
-
return !(e === null || !
|
|
1265
|
+
function Ii(e) {
|
|
1266
|
+
return !(e === null || !Si.test(e) || // Quick hack to not allow integers end with `_`
|
|
1267
1267
|
// Probably should update regexp & check speed
|
|
1268
1268
|
e[e.length - 1] === "_");
|
|
1269
1269
|
}
|
|
1270
|
-
function
|
|
1270
|
+
function xi(e) {
|
|
1271
1271
|
var a, t;
|
|
1272
1272
|
return a = e.replace(/_/g, "").toLowerCase(), t = a[0] === "-" ? -1 : 1, "+-".indexOf(a[0]) >= 0 && (a = a.slice(1)), a === ".inf" ? t === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : a === ".nan" ? NaN : t * parseFloat(a, 10);
|
|
1273
1273
|
}
|
|
1274
|
-
var
|
|
1275
|
-
function
|
|
1274
|
+
var Hi = /^[-+]?[0-9]+e/;
|
|
1275
|
+
function Ti(e, a) {
|
|
1276
1276
|
var t;
|
|
1277
1277
|
if (isNaN(e))
|
|
1278
1278
|
switch (a) {
|
|
@@ -1303,17 +1303,17 @@ function Ar(e, a) {
|
|
|
1303
1303
|
}
|
|
1304
1304
|
else if (ue.isNegativeZero(e))
|
|
1305
1305
|
return "-0.0";
|
|
1306
|
-
return t = e.toString(10),
|
|
1306
|
+
return t = e.toString(10), Hi.test(t) ? t.replace("e", ".e") : t;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Ai(e) {
|
|
1309
1309
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ue.isNegativeZero(e));
|
|
1310
1310
|
}
|
|
1311
1311
|
var Gl = new he("tag:yaml.org,2002:float", {
|
|
1312
1312
|
kind: "scalar",
|
|
1313
|
-
resolve:
|
|
1314
|
-
construct:
|
|
1315
|
-
predicate:
|
|
1316
|
-
represent:
|
|
1313
|
+
resolve: Ii,
|
|
1314
|
+
construct: xi,
|
|
1315
|
+
predicate: Ai,
|
|
1316
|
+
represent: Ti,
|
|
1317
1317
|
defaultStyle: "lowercase"
|
|
1318
1318
|
}), Zl = zl.extend({
|
|
1319
1319
|
implicit: [
|
|
@@ -1327,144 +1327,144 @@ var Gl = new he("tag:yaml.org,2002:float", {
|
|
|
1327
1327
|
), ts = new RegExp(
|
|
1328
1328
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$"
|
|
1329
1329
|
);
|
|
1330
|
-
function
|
|
1330
|
+
function Fi(e) {
|
|
1331
1331
|
return e === null ? !1 : es.exec(e) !== null || ts.exec(e) !== null;
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
var a, t, l, s,
|
|
1333
|
+
function Oi(e) {
|
|
1334
|
+
var a, t, l, s, n, o, d, i = 0, u = null, f, h, r;
|
|
1335
1335
|
if (a = es.exec(e), a === null && (a = ts.exec(e)), a === null)
|
|
1336
1336
|
throw new Error("Date resolve error");
|
|
1337
1337
|
if (t = +a[1], l = +a[2] - 1, s = +a[3], !a[4])
|
|
1338
1338
|
return new Date(Date.UTC(t, l, s));
|
|
1339
|
-
if (
|
|
1340
|
-
for (
|
|
1341
|
-
|
|
1342
|
-
|
|
1339
|
+
if (n = +a[4], o = +a[5], d = +a[6], a[7]) {
|
|
1340
|
+
for (i = a[7].slice(0, 3); i.length < 3; )
|
|
1341
|
+
i += "0";
|
|
1342
|
+
i = +i;
|
|
1343
1343
|
}
|
|
1344
|
-
return a[9] && (f = +a[10], h = +(a[11] || 0), u = (f * 60 + h) * 6e4, a[9] === "-" && (u = -u)),
|
|
1344
|
+
return a[9] && (f = +a[10], h = +(a[11] || 0), u = (f * 60 + h) * 6e4, a[9] === "-" && (u = -u)), r = new Date(Date.UTC(t, l, s, n, o, d, i)), u && r.setTime(r.getTime() - u), r;
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function Ui(e) {
|
|
1347
1347
|
return e.toISOString();
|
|
1348
1348
|
}
|
|
1349
1349
|
var as = new he("tag:yaml.org,2002:timestamp", {
|
|
1350
1350
|
kind: "scalar",
|
|
1351
|
-
resolve:
|
|
1352
|
-
construct:
|
|
1351
|
+
resolve: Fi,
|
|
1352
|
+
construct: Oi,
|
|
1353
1353
|
instanceOf: Date,
|
|
1354
|
-
represent:
|
|
1354
|
+
represent: Ui
|
|
1355
1355
|
});
|
|
1356
|
-
function
|
|
1356
|
+
function qi(e) {
|
|
1357
1357
|
return e === "<<" || e === null;
|
|
1358
1358
|
}
|
|
1359
1359
|
var ls = new he("tag:yaml.org,2002:merge", {
|
|
1360
1360
|
kind: "scalar",
|
|
1361
|
-
resolve:
|
|
1361
|
+
resolve: qi
|
|
1362
1362
|
}), jt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1363
1363
|
\r`;
|
|
1364
|
-
function
|
|
1364
|
+
function $i(e) {
|
|
1365
1365
|
if (e === null)
|
|
1366
1366
|
return !1;
|
|
1367
|
-
var a, t, l = 0, s = e.length,
|
|
1367
|
+
var a, t, l = 0, s = e.length, n = jt;
|
|
1368
1368
|
for (t = 0; t < s; t++)
|
|
1369
|
-
if (a =
|
|
1369
|
+
if (a = n.indexOf(e.charAt(t)), !(a > 64)) {
|
|
1370
1370
|
if (a < 0)
|
|
1371
1371
|
return !1;
|
|
1372
1372
|
l += 6;
|
|
1373
1373
|
}
|
|
1374
1374
|
return l % 8 === 0;
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1377
|
-
var a, t, l = e.replace(/[\r\n=]/g, ""), s = l.length,
|
|
1376
|
+
function Mi(e) {
|
|
1377
|
+
var a, t, l = e.replace(/[\r\n=]/g, ""), s = l.length, n = jt, o = 0, d = [];
|
|
1378
1378
|
for (a = 0; a < s; a++)
|
|
1379
|
-
a % 4 === 0 && a && (d.push(o >> 16 & 255), d.push(o >> 8 & 255), d.push(o & 255)), o = o << 6 |
|
|
1379
|
+
a % 4 === 0 && a && (d.push(o >> 16 & 255), d.push(o >> 8 & 255), d.push(o & 255)), o = o << 6 | n.indexOf(l.charAt(a));
|
|
1380
1380
|
return t = s % 4 * 6, t === 0 ? (d.push(o >> 16 & 255), d.push(o >> 8 & 255), d.push(o & 255)) : t === 18 ? (d.push(o >> 10 & 255), d.push(o >> 2 & 255)) : t === 12 && d.push(o >> 4 & 255), new Uint8Array(d);
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1383
|
-
var a = "", t = 0, l, s,
|
|
1384
|
-
for (l = 0; l <
|
|
1382
|
+
function Ki(e) {
|
|
1383
|
+
var a = "", t = 0, l, s, n = e.length, o = jt;
|
|
1384
|
+
for (l = 0; l < n; l++)
|
|
1385
1385
|
l % 3 === 0 && l && (a += o[t >> 18 & 63], a += o[t >> 12 & 63], a += o[t >> 6 & 63], a += o[t & 63]), t = (t << 8) + e[l];
|
|
1386
|
-
return s =
|
|
1386
|
+
return s = n % 3, s === 0 ? (a += o[t >> 18 & 63], a += o[t >> 12 & 63], a += o[t >> 6 & 63], a += o[t & 63]) : s === 2 ? (a += o[t >> 10 & 63], a += o[t >> 4 & 63], a += o[t << 2 & 63], a += o[64]) : s === 1 && (a += o[t >> 2 & 63], a += o[t << 4 & 63], a += o[64], a += o[64]), a;
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function Ni(e) {
|
|
1389
1389
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1390
1390
|
}
|
|
1391
1391
|
var ss = new he("tag:yaml.org,2002:binary", {
|
|
1392
1392
|
kind: "scalar",
|
|
1393
|
-
resolve:
|
|
1394
|
-
construct:
|
|
1395
|
-
predicate:
|
|
1396
|
-
represent:
|
|
1397
|
-
}),
|
|
1398
|
-
function
|
|
1393
|
+
resolve: $i,
|
|
1394
|
+
construct: Mi,
|
|
1395
|
+
predicate: Ni,
|
|
1396
|
+
represent: Ki
|
|
1397
|
+
}), Pi = Object.prototype.hasOwnProperty, ji = Object.prototype.toString;
|
|
1398
|
+
function Bi(e) {
|
|
1399
1399
|
if (e === null)
|
|
1400
1400
|
return !0;
|
|
1401
|
-
var a = [], t, l, s,
|
|
1401
|
+
var a = [], t, l, s, n, o, d = e;
|
|
1402
1402
|
for (t = 0, l = d.length; t < l; t += 1) {
|
|
1403
|
-
if (s = d[t], o = !1,
|
|
1403
|
+
if (s = d[t], o = !1, ji.call(s) !== "[object Object]")
|
|
1404
1404
|
return !1;
|
|
1405
|
-
for (
|
|
1406
|
-
if (
|
|
1405
|
+
for (n in s)
|
|
1406
|
+
if (Pi.call(s, n))
|
|
1407
1407
|
if (!o)
|
|
1408
1408
|
o = !0;
|
|
1409
1409
|
else
|
|
1410
1410
|
return !1;
|
|
1411
1411
|
if (!o)
|
|
1412
1412
|
return !1;
|
|
1413
|
-
if (a.indexOf(
|
|
1414
|
-
a.push(
|
|
1413
|
+
if (a.indexOf(n) === -1)
|
|
1414
|
+
a.push(n);
|
|
1415
1415
|
else
|
|
1416
1416
|
return !1;
|
|
1417
1417
|
}
|
|
1418
1418
|
return !0;
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function Ei(e) {
|
|
1421
1421
|
return e !== null ? e : [];
|
|
1422
1422
|
}
|
|
1423
|
-
var
|
|
1423
|
+
var rs = new he("tag:yaml.org,2002:omap", {
|
|
1424
1424
|
kind: "sequence",
|
|
1425
|
-
resolve:
|
|
1426
|
-
construct:
|
|
1427
|
-
}),
|
|
1428
|
-
function
|
|
1425
|
+
resolve: Bi,
|
|
1426
|
+
construct: Ei
|
|
1427
|
+
}), Li = Object.prototype.toString;
|
|
1428
|
+
function Vi(e) {
|
|
1429
1429
|
if (e === null)
|
|
1430
1430
|
return !0;
|
|
1431
|
-
var a, t, l, s,
|
|
1432
|
-
for (
|
|
1433
|
-
if (l = o[a],
|
|
1431
|
+
var a, t, l, s, n, o = e;
|
|
1432
|
+
for (n = new Array(o.length), a = 0, t = o.length; a < t; a += 1) {
|
|
1433
|
+
if (l = o[a], Li.call(l) !== "[object Object]" || (s = Object.keys(l), s.length !== 1))
|
|
1434
1434
|
return !1;
|
|
1435
|
-
|
|
1435
|
+
n[a] = [s[0], l[s[0]]];
|
|
1436
1436
|
}
|
|
1437
1437
|
return !0;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function Ri(e) {
|
|
1440
1440
|
if (e === null)
|
|
1441
1441
|
return [];
|
|
1442
|
-
var a, t, l, s,
|
|
1443
|
-
for (
|
|
1444
|
-
l = o[a], s = Object.keys(l),
|
|
1445
|
-
return
|
|
1442
|
+
var a, t, l, s, n, o = e;
|
|
1443
|
+
for (n = new Array(o.length), a = 0, t = o.length; a < t; a += 1)
|
|
1444
|
+
l = o[a], s = Object.keys(l), n[a] = [s[0], l[s[0]]];
|
|
1445
|
+
return n;
|
|
1446
1446
|
}
|
|
1447
|
-
var
|
|
1447
|
+
var is = new he("tag:yaml.org,2002:pairs", {
|
|
1448
1448
|
kind: "sequence",
|
|
1449
|
-
resolve:
|
|
1450
|
-
construct:
|
|
1451
|
-
}),
|
|
1452
|
-
function
|
|
1449
|
+
resolve: Vi,
|
|
1450
|
+
construct: Ri
|
|
1451
|
+
}), Di = Object.prototype.hasOwnProperty;
|
|
1452
|
+
function Ji(e) {
|
|
1453
1453
|
if (e === null)
|
|
1454
1454
|
return !0;
|
|
1455
1455
|
var a, t = e;
|
|
1456
1456
|
for (a in t)
|
|
1457
|
-
if (
|
|
1457
|
+
if (Di.call(t, a) && t[a] !== null)
|
|
1458
1458
|
return !1;
|
|
1459
1459
|
return !0;
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1461
|
+
function zi(e) {
|
|
1462
1462
|
return e !== null ? e : {};
|
|
1463
1463
|
}
|
|
1464
|
-
var
|
|
1464
|
+
var ns = new he("tag:yaml.org,2002:set", {
|
|
1465
1465
|
kind: "mapping",
|
|
1466
|
-
resolve:
|
|
1467
|
-
construct:
|
|
1466
|
+
resolve: Ji,
|
|
1467
|
+
construct: zi
|
|
1468
1468
|
}), Bt = Xl.extend({
|
|
1469
1469
|
implicit: [
|
|
1470
1470
|
as,
|
|
@@ -1472,11 +1472,11 @@ var is = new he("tag:yaml.org,2002:set", {
|
|
|
1472
1472
|
],
|
|
1473
1473
|
explicit: [
|
|
1474
1474
|
ss,
|
|
1475
|
-
ns,
|
|
1476
1475
|
rs,
|
|
1477
|
-
is
|
|
1476
|
+
is,
|
|
1477
|
+
ns
|
|
1478
1478
|
]
|
|
1479
|
-
}),
|
|
1479
|
+
}), Fe = Object.prototype.hasOwnProperty, st = 1, os = 2, us = 3, rt = 4, bt = 1, Wi = 2, gl = 3, Qi = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Yi = /[\x85\u2028\u2029]/, Gi = /[,\[\]\{\}]/, cs = /^(?:!|!!|![a-z\-]+!)$/i, ds = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1480
1480
|
function yl(e) {
|
|
1481
1481
|
return Object.prototype.toString.call(e);
|
|
1482
1482
|
}
|
|
@@ -1492,21 +1492,21 @@ function ge(e) {
|
|
|
1492
1492
|
function Pe(e) {
|
|
1493
1493
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function Zi(e) {
|
|
1496
1496
|
var a;
|
|
1497
1497
|
return 48 <= e && e <= 57 ? e - 48 : (a = e | 32, 97 <= a && a <= 102 ? a - 97 + 10 : -1);
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function Xi(e) {
|
|
1500
1500
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function en(e) {
|
|
1503
1503
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1504
1504
|
}
|
|
1505
1505
|
function vl(e) {
|
|
1506
1506
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1507
1507
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function tn(e) {
|
|
1510
1510
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1511
1511
|
(e - 65536 >> 10) + 55296,
|
|
1512
1512
|
(e - 65536 & 1023) + 56320
|
|
@@ -1515,7 +1515,7 @@ function ai(e) {
|
|
|
1515
1515
|
var hs = new Array(256), ps = new Array(256);
|
|
1516
1516
|
for (var $e = 0; $e < 256; $e++)
|
|
1517
1517
|
hs[$e] = vl($e) ? 1 : 0, ps[$e] = vl($e);
|
|
1518
|
-
function
|
|
1518
|
+
function an(e, a) {
|
|
1519
1519
|
this.input = e, this.filename = a.filename || null, this.schema = a.schema || Bt, this.onWarning = a.onWarning || null, this.legacy = a.legacy || !1, this.json = a.json || !1, this.listener = a.listener || null, this.implicitTypes = this.schema.compiledImplicit, this.typeMap = this.schema.compiledTypeMap, this.length = e.length, this.position = 0, this.line = 0, this.lineStart = 0, this.lineIndent = 0, this.firstTabInLine = -1, this.documents = [];
|
|
1520
1520
|
}
|
|
1521
1521
|
function fs(e, a) {
|
|
@@ -1527,22 +1527,22 @@ function fs(e, a) {
|
|
|
1527
1527
|
line: e.line,
|
|
1528
1528
|
column: e.position - e.lineStart
|
|
1529
1529
|
};
|
|
1530
|
-
return t.snippet =
|
|
1530
|
+
return t.snippet = ii(t), new fe(a, t);
|
|
1531
1531
|
}
|
|
1532
1532
|
function E(e, a) {
|
|
1533
1533
|
throw fs(e, a);
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function it(e, a) {
|
|
1536
1536
|
e.onWarning && e.onWarning.call(null, fs(e, a));
|
|
1537
1537
|
}
|
|
1538
1538
|
var bl = {
|
|
1539
1539
|
YAML: function(e, a, t) {
|
|
1540
|
-
var l, s,
|
|
1541
|
-
e.version !== null && E(e, "duplication of %YAML directive"), t.length !== 1 && E(e, "YAML directive accepts exactly one argument"), l = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), l === null && E(e, "ill-formed argument of the YAML directive"), s = parseInt(l[1], 10),
|
|
1540
|
+
var l, s, n;
|
|
1541
|
+
e.version !== null && E(e, "duplication of %YAML directive"), t.length !== 1 && E(e, "YAML directive accepts exactly one argument"), l = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), l === null && E(e, "ill-formed argument of the YAML directive"), s = parseInt(l[1], 10), n = parseInt(l[2], 10), s !== 1 && E(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = n < 2, n !== 1 && n !== 2 && it(e, "unsupported YAML version of the document");
|
|
1542
1542
|
},
|
|
1543
1543
|
TAG: function(e, a, t) {
|
|
1544
1544
|
var l, s;
|
|
1545
|
-
t.length !== 2 && E(e, "TAG directive accepts exactly two arguments"), l = t[0], s = t[1], cs.test(l) || E(e, "ill-formed tag handle (first argument) of the TAG directive"),
|
|
1545
|
+
t.length !== 2 && E(e, "TAG directive accepts exactly two arguments"), l = t[0], s = t[1], cs.test(l) || E(e, "ill-formed tag handle (first argument) of the TAG directive"), Fe.call(e.tagMap, l) && E(e, 'there is a previously declared suffix for "' + l + '" tag handle'), ds.test(s) || E(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1546
1546
|
try {
|
|
1547
1547
|
s = decodeURIComponent(s);
|
|
1548
1548
|
} catch {
|
|
@@ -1552,39 +1552,39 @@ var bl = {
|
|
|
1552
1552
|
}
|
|
1553
1553
|
};
|
|
1554
1554
|
function Te(e, a, t, l) {
|
|
1555
|
-
var s,
|
|
1555
|
+
var s, n, o, d;
|
|
1556
1556
|
if (a < t) {
|
|
1557
1557
|
if (d = e.input.slice(a, t), l)
|
|
1558
|
-
for (s = 0,
|
|
1558
|
+
for (s = 0, n = d.length; s < n; s += 1)
|
|
1559
1559
|
o = d.charCodeAt(s), o === 9 || 32 <= o && o <= 1114111 || E(e, "expected valid JSON character");
|
|
1560
1560
|
else
|
|
1561
|
-
|
|
1561
|
+
Qi.test(d) && E(e, "the stream contains non-printable characters");
|
|
1562
1562
|
e.result += d;
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
1565
|
function kl(e, a, t, l) {
|
|
1566
|
-
var s,
|
|
1566
|
+
var s, n, o, d;
|
|
1567
1567
|
for (ue.isObject(t) || E(e, "cannot merge mappings; the provided source object is unacceptable"), s = Object.keys(t), o = 0, d = s.length; o < d; o += 1)
|
|
1568
|
-
|
|
1568
|
+
n = s[o], Fe.call(a, n) || (a[n] = t[n], l[n] = !0);
|
|
1569
1569
|
}
|
|
1570
|
-
function je(e, a, t, l, s,
|
|
1570
|
+
function je(e, a, t, l, s, n, o, d, i) {
|
|
1571
1571
|
var u, f;
|
|
1572
1572
|
if (Array.isArray(s))
|
|
1573
1573
|
for (s = Array.prototype.slice.call(s), u = 0, f = s.length; u < f; u += 1)
|
|
1574
1574
|
Array.isArray(s[u]) && E(e, "nested arrays are not supported inside keys"), typeof s == "object" && yl(s[u]) === "[object Object]" && (s[u] = "[object Object]");
|
|
1575
1575
|
if (typeof s == "object" && yl(s) === "[object Object]" && (s = "[object Object]"), s = String(s), a === null && (a = {}), l === "tag:yaml.org,2002:merge")
|
|
1576
|
-
if (Array.isArray(
|
|
1577
|
-
for (u = 0, f =
|
|
1578
|
-
kl(e, a,
|
|
1576
|
+
if (Array.isArray(n))
|
|
1577
|
+
for (u = 0, f = n.length; u < f; u += 1)
|
|
1578
|
+
kl(e, a, n[u], t);
|
|
1579
1579
|
else
|
|
1580
|
-
kl(e, a,
|
|
1580
|
+
kl(e, a, n, t);
|
|
1581
1581
|
else
|
|
1582
|
-
!e.json && !
|
|
1582
|
+
!e.json && !Fe.call(t, s) && Fe.call(a, s) && (e.line = o || e.line, e.lineStart = d || e.lineStart, e.position = i || e.position, E(e, "duplicated mapping key")), s === "__proto__" ? Object.defineProperty(a, s, {
|
|
1583
1583
|
configurable: !0,
|
|
1584
1584
|
enumerable: !0,
|
|
1585
1585
|
writable: !0,
|
|
1586
|
-
value:
|
|
1587
|
-
}) : a[s] =
|
|
1586
|
+
value: n
|
|
1587
|
+
}) : a[s] = n, delete t[s];
|
|
1588
1588
|
return a;
|
|
1589
1589
|
}
|
|
1590
1590
|
function Et(e) {
|
|
@@ -1605,7 +1605,7 @@ function oe(e, a, t) {
|
|
|
1605
1605
|
else
|
|
1606
1606
|
break;
|
|
1607
1607
|
}
|
|
1608
|
-
return t !== -1 && l !== 0 && e.lineIndent < t &&
|
|
1608
|
+
return t !== -1 && l !== 0 && e.lineIndent < t && it(e, "deficient indentation"), l;
|
|
1609
1609
|
}
|
|
1610
1610
|
function dt(e) {
|
|
1611
1611
|
var a = e.position, t;
|
|
@@ -1615,11 +1615,11 @@ function Lt(e, a) {
|
|
|
1615
1615
|
a === 1 ? e.result += " " : a > 1 && (e.result += ue.repeat(`
|
|
1616
1616
|
`, a - 1));
|
|
1617
1617
|
}
|
|
1618
|
-
function
|
|
1619
|
-
var l, s,
|
|
1618
|
+
function ln(e, a, t) {
|
|
1619
|
+
var l, s, n, o, d, i, u, f, h = e.kind, r = e.result, k;
|
|
1620
1620
|
if (k = e.input.charCodeAt(e.position), ge(k) || Pe(k) || k === 35 || k === 38 || k === 42 || k === 33 || k === 124 || k === 62 || k === 39 || k === 34 || k === 37 || k === 64 || k === 96 || (k === 63 || k === 45) && (s = e.input.charCodeAt(e.position + 1), ge(s) || t && Pe(s)))
|
|
1621
1621
|
return !1;
|
|
1622
|
-
for (e.kind = "scalar", e.result = "",
|
|
1622
|
+
for (e.kind = "scalar", e.result = "", n = o = e.position, d = !1; k !== 0; ) {
|
|
1623
1623
|
if (k === 58) {
|
|
1624
1624
|
if (s = e.input.charCodeAt(e.position + 1), ge(s) || t && Pe(s))
|
|
1625
1625
|
break;
|
|
@@ -1630,19 +1630,19 @@ function si(e, a, t) {
|
|
|
1630
1630
|
if (e.position === e.lineStart && dt(e) || t && Pe(k))
|
|
1631
1631
|
break;
|
|
1632
1632
|
if (_e(k))
|
|
1633
|
-
if (
|
|
1633
|
+
if (i = e.line, u = e.lineStart, f = e.lineIndent, oe(e, !1, -1), e.lineIndent >= a) {
|
|
1634
1634
|
d = !0, k = e.input.charCodeAt(e.position);
|
|
1635
1635
|
continue;
|
|
1636
1636
|
} else {
|
|
1637
|
-
e.position = o, e.line =
|
|
1637
|
+
e.position = o, e.line = i, e.lineStart = u, e.lineIndent = f;
|
|
1638
1638
|
break;
|
|
1639
1639
|
}
|
|
1640
1640
|
}
|
|
1641
|
-
d && (Te(e,
|
|
1641
|
+
d && (Te(e, n, o, !1), Lt(e, e.line - i), n = o = e.position, d = !1), Ue(k) || (o = e.position + 1), k = e.input.charCodeAt(++e.position);
|
|
1642
1642
|
}
|
|
1643
|
-
return Te(e,
|
|
1643
|
+
return Te(e, n, o, !1), e.result ? !0 : (e.kind = h, e.result = r, !1);
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1645
|
+
function sn(e, a) {
|
|
1646
1646
|
var t, l, s;
|
|
1647
1647
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
1648
1648
|
return !1;
|
|
@@ -1656,8 +1656,8 @@ function ni(e, a) {
|
|
|
1656
1656
|
_e(t) ? (Te(e, l, s, !0), Lt(e, oe(e, !1, a)), l = s = e.position) : e.position === e.lineStart && dt(e) ? E(e, "unexpected end of the document within a single quoted scalar") : (e.position++, s = e.position);
|
|
1657
1657
|
E(e, "unexpected end of the stream within a single quoted scalar");
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1660
|
-
var t, l, s,
|
|
1659
|
+
function rn(e, a) {
|
|
1660
|
+
var t, l, s, n, o, d;
|
|
1661
1661
|
if (d = e.input.charCodeAt(e.position), d !== 34)
|
|
1662
1662
|
return !1;
|
|
1663
1663
|
for (e.kind = "scalar", e.result = "", e.position++, t = l = e.position; (d = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
@@ -1668,10 +1668,10 @@ function ri(e, a) {
|
|
|
1668
1668
|
oe(e, !1, a);
|
|
1669
1669
|
else if (d < 256 && hs[d])
|
|
1670
1670
|
e.result += ps[d], e.position++;
|
|
1671
|
-
else if ((o =
|
|
1672
|
-
for (s = o,
|
|
1673
|
-
d = e.input.charCodeAt(++e.position), (o =
|
|
1674
|
-
e.result +=
|
|
1671
|
+
else if ((o = Xi(d)) > 0) {
|
|
1672
|
+
for (s = o, n = 0; s > 0; s--)
|
|
1673
|
+
d = e.input.charCodeAt(++e.position), (o = Zi(d)) >= 0 ? n = (n << 4) + o : E(e, "expected hexadecimal character");
|
|
1674
|
+
e.result += tn(n), e.position++;
|
|
1675
1675
|
} else
|
|
1676
1676
|
E(e, "unknown escape sequence");
|
|
1677
1677
|
t = l = e.position;
|
|
@@ -1680,8 +1680,8 @@ function ri(e, a) {
|
|
|
1680
1680
|
}
|
|
1681
1681
|
E(e, "unexpected end of the stream within a double quoted scalar");
|
|
1682
1682
|
}
|
|
1683
|
-
function
|
|
1684
|
-
var t = !0, l, s,
|
|
1683
|
+
function nn(e, a) {
|
|
1684
|
+
var t = !0, l, s, n, o = e.tag, d, i = e.anchor, u, f, h, r, k, S = /* @__PURE__ */ Object.create(null), g, m, H, _;
|
|
1685
1685
|
if (_ = e.input.charCodeAt(e.position), _ === 91)
|
|
1686
1686
|
f = 93, k = !1, d = [];
|
|
1687
1687
|
else if (_ === 123)
|
|
@@ -1690,13 +1690,13 @@ function ii(e, a) {
|
|
|
1690
1690
|
return !1;
|
|
1691
1691
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = d), _ = e.input.charCodeAt(++e.position); _ !== 0; ) {
|
|
1692
1692
|
if (oe(e, !0, a), _ = e.input.charCodeAt(e.position), _ === f)
|
|
1693
|
-
return e.position++, e.tag = o, e.anchor =
|
|
1694
|
-
t ? _ === 44 && E(e, "expected the node content, but found ','") : E(e, "missed comma between flow collection entries"), m = g = H = null, h =
|
|
1693
|
+
return e.position++, e.tag = o, e.anchor = i, e.kind = k ? "mapping" : "sequence", e.result = d, !0;
|
|
1694
|
+
t ? _ === 44 && E(e, "expected the node content, but found ','") : E(e, "missed comma between flow collection entries"), m = g = H = null, h = r = !1, _ === 63 && (u = e.input.charCodeAt(e.position + 1), ge(u) && (h = r = !0, e.position++, oe(e, !0, a))), l = e.line, s = e.lineStart, n = e.position, Le(e, a, st, !1, !0), m = e.tag, g = e.result, oe(e, !0, a), _ = e.input.charCodeAt(e.position), (r || e.line === l) && _ === 58 && (h = !0, _ = e.input.charCodeAt(++e.position), oe(e, !0, a), Le(e, a, st, !1, !0), H = e.result), k ? je(e, d, S, m, g, H, l, s, n) : h ? d.push(je(e, null, S, m, g, H, l, s, n)) : d.push(g), oe(e, !0, a), _ = e.input.charCodeAt(e.position), _ === 44 ? (t = !0, _ = e.input.charCodeAt(++e.position)) : t = !1;
|
|
1695
1695
|
}
|
|
1696
1696
|
E(e, "unexpected end of the stream within a flow collection");
|
|
1697
1697
|
}
|
|
1698
|
-
function
|
|
1699
|
-
var t, l, s = bt,
|
|
1698
|
+
function on(e, a) {
|
|
1699
|
+
var t, l, s = bt, n = !1, o = !1, d = a, i = 0, u = !1, f, h;
|
|
1700
1700
|
if (h = e.input.charCodeAt(e.position), h === 124)
|
|
1701
1701
|
l = !1;
|
|
1702
1702
|
else if (h === 62)
|
|
@@ -1705,8 +1705,8 @@ function oi(e, a) {
|
|
|
1705
1705
|
return !1;
|
|
1706
1706
|
for (e.kind = "scalar", e.result = ""; h !== 0; )
|
|
1707
1707
|
if (h = e.input.charCodeAt(++e.position), h === 43 || h === 45)
|
|
1708
|
-
bt === s ? s = h === 43 ? gl :
|
|
1709
|
-
else if ((f =
|
|
1708
|
+
bt === s ? s = h === 43 ? gl : Wi : E(e, "repeat of a chomping mode identifier");
|
|
1709
|
+
else if ((f = en(h)) >= 0)
|
|
1710
1710
|
f === 0 ? E(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? E(e, "repeat of an indentation width identifier") : (d = a + f - 1, o = !0);
|
|
1711
1711
|
else
|
|
1712
1712
|
break;
|
|
@@ -1723,56 +1723,56 @@ function oi(e, a) {
|
|
|
1723
1723
|
for (Et(e), e.lineIndent = 0, h = e.input.charCodeAt(e.position); (!o || e.lineIndent < d) && h === 32; )
|
|
1724
1724
|
e.lineIndent++, h = e.input.charCodeAt(++e.position);
|
|
1725
1725
|
if (!o && e.lineIndent > d && (d = e.lineIndent), _e(h)) {
|
|
1726
|
-
|
|
1726
|
+
i++;
|
|
1727
1727
|
continue;
|
|
1728
1728
|
}
|
|
1729
1729
|
if (e.lineIndent < d) {
|
|
1730
1730
|
s === gl ? e.result += ue.repeat(`
|
|
1731
|
-
`,
|
|
1731
|
+
`, n ? 1 + i : i) : s === bt && n && (e.result += `
|
|
1732
1732
|
`);
|
|
1733
1733
|
break;
|
|
1734
1734
|
}
|
|
1735
1735
|
for (l ? Ue(h) ? (u = !0, e.result += ue.repeat(`
|
|
1736
|
-
`,
|
|
1737
|
-
`,
|
|
1738
|
-
`,
|
|
1739
|
-
`,
|
|
1736
|
+
`, n ? 1 + i : i)) : u ? (u = !1, e.result += ue.repeat(`
|
|
1737
|
+
`, i + 1)) : i === 0 ? n && (e.result += " ") : e.result += ue.repeat(`
|
|
1738
|
+
`, i) : e.result += ue.repeat(`
|
|
1739
|
+
`, n ? 1 + i : i), n = !0, o = !0, i = 0, t = e.position; !_e(h) && h !== 0; )
|
|
1740
1740
|
h = e.input.charCodeAt(++e.position);
|
|
1741
1741
|
Te(e, t, e.position, !1);
|
|
1742
1742
|
}
|
|
1743
1743
|
return !0;
|
|
1744
1744
|
}
|
|
1745
1745
|
function _l(e, a) {
|
|
1746
|
-
var t, l = e.tag, s = e.anchor,
|
|
1746
|
+
var t, l = e.tag, s = e.anchor, n = [], o, d = !1, i;
|
|
1747
1747
|
if (e.firstTabInLine !== -1)
|
|
1748
1748
|
return !1;
|
|
1749
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1749
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), i = e.input.charCodeAt(e.position); i !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), !(i !== 45 || (o = e.input.charCodeAt(e.position + 1), !ge(o)))); ) {
|
|
1750
1750
|
if (d = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= a) {
|
|
1751
|
-
|
|
1751
|
+
n.push(null), i = e.input.charCodeAt(e.position);
|
|
1752
1752
|
continue;
|
|
1753
1753
|
}
|
|
1754
|
-
if (t = e.line, Le(e, a, us, !1, !0),
|
|
1754
|
+
if (t = e.line, Le(e, a, us, !1, !0), n.push(e.result), oe(e, !0, -1), i = e.input.charCodeAt(e.position), (e.line === t || e.lineIndent > a) && i !== 0)
|
|
1755
1755
|
E(e, "bad indentation of a sequence entry");
|
|
1756
1756
|
else if (e.lineIndent < a)
|
|
1757
1757
|
break;
|
|
1758
1758
|
}
|
|
1759
|
-
return d ? (e.tag = l, e.anchor = s, e.kind = "sequence", e.result =
|
|
1759
|
+
return d ? (e.tag = l, e.anchor = s, e.kind = "sequence", e.result = n, !0) : !1;
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1762
|
-
var l, s,
|
|
1761
|
+
function un(e, a, t) {
|
|
1762
|
+
var l, s, n, o, d, i, u = e.tag, f = e.anchor, h = {}, r = /* @__PURE__ */ Object.create(null), k = null, S = null, g = null, m = !1, H = !1, _;
|
|
1763
1763
|
if (e.firstTabInLine !== -1)
|
|
1764
1764
|
return !1;
|
|
1765
1765
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = h), _ = e.input.charCodeAt(e.position); _ !== 0; ) {
|
|
1766
|
-
if (!m && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), l = e.input.charCodeAt(e.position + 1),
|
|
1767
|
-
_ === 63 ? (m && (je(e, h,
|
|
1766
|
+
if (!m && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, E(e, "tab characters must not be used in indentation")), l = e.input.charCodeAt(e.position + 1), n = e.line, (_ === 63 || _ === 58) && ge(l))
|
|
1767
|
+
_ === 63 ? (m && (je(e, h, r, k, S, null, o, d, i), k = S = g = null), H = !0, m = !0, s = !0) : m ? (m = !1, s = !0) : E(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, _ = l;
|
|
1768
1768
|
else {
|
|
1769
|
-
if (o = e.line, d = e.lineStart,
|
|
1769
|
+
if (o = e.line, d = e.lineStart, i = e.position, !Le(e, t, os, !1, !0))
|
|
1770
1770
|
break;
|
|
1771
|
-
if (e.line ===
|
|
1771
|
+
if (e.line === n) {
|
|
1772
1772
|
for (_ = e.input.charCodeAt(e.position); Ue(_); )
|
|
1773
1773
|
_ = e.input.charCodeAt(++e.position);
|
|
1774
1774
|
if (_ === 58)
|
|
1775
|
-
_ = e.input.charCodeAt(++e.position), ge(_) || E(e, "a whitespace character is expected after the key-value separator within a block mapping"), m && (je(e, h,
|
|
1775
|
+
_ = e.input.charCodeAt(++e.position), ge(_) || E(e, "a whitespace character is expected after the key-value separator within a block mapping"), m && (je(e, h, r, k, S, null, o, d, i), k = S = g = null), H = !0, m = !1, s = !1, k = e.tag, S = e.result;
|
|
1776
1776
|
else if (H)
|
|
1777
1777
|
E(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1778
1778
|
else
|
|
@@ -1782,36 +1782,36 @@ function ui(e, a, t) {
|
|
|
1782
1782
|
else
|
|
1783
1783
|
return e.tag = u, e.anchor = f, !0;
|
|
1784
1784
|
}
|
|
1785
|
-
if ((e.line ===
|
|
1785
|
+
if ((e.line === n || e.lineIndent > a) && (m && (o = e.line, d = e.lineStart, i = e.position), Le(e, a, rt, !0, s) && (m ? S = e.result : g = e.result), m || (je(e, h, r, k, S, g, o, d, i), k = S = g = null), oe(e, !0, -1), _ = e.input.charCodeAt(e.position)), (e.line === n || e.lineIndent > a) && _ !== 0)
|
|
1786
1786
|
E(e, "bad indentation of a mapping entry");
|
|
1787
1787
|
else if (e.lineIndent < a)
|
|
1788
1788
|
break;
|
|
1789
1789
|
}
|
|
1790
|
-
return m && je(e, h,
|
|
1790
|
+
return m && je(e, h, r, k, S, null, o, d, i), H && (e.tag = u, e.anchor = f, e.kind = "mapping", e.result = h), H;
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1793
|
-
var a, t = !1, l = !1, s,
|
|
1792
|
+
function cn(e) {
|
|
1793
|
+
var a, t = !1, l = !1, s, n, o;
|
|
1794
1794
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
1795
1795
|
return !1;
|
|
1796
1796
|
if (e.tag !== null && E(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (t = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (l = !0, s = "!!", o = e.input.charCodeAt(++e.position)) : s = "!", a = e.position, t) {
|
|
1797
1797
|
do
|
|
1798
1798
|
o = e.input.charCodeAt(++e.position);
|
|
1799
1799
|
while (o !== 0 && o !== 62);
|
|
1800
|
-
e.position < e.length ? (
|
|
1800
|
+
e.position < e.length ? (n = e.input.slice(a, e.position), o = e.input.charCodeAt(++e.position)) : E(e, "unexpected end of the stream within a verbatim tag");
|
|
1801
1801
|
} else {
|
|
1802
1802
|
for (; o !== 0 && !ge(o); )
|
|
1803
1803
|
o === 33 && (l ? E(e, "tag suffix cannot contain exclamation marks") : (s = e.input.slice(a - 1, e.position + 1), cs.test(s) || E(e, "named tag handle cannot contain such characters"), l = !0, a = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
1804
|
-
|
|
1804
|
+
n = e.input.slice(a, e.position), Gi.test(n) && E(e, "tag suffix cannot contain flow indicator characters");
|
|
1805
1805
|
}
|
|
1806
|
-
|
|
1806
|
+
n && !ds.test(n) && E(e, "tag name cannot contain such characters: " + n);
|
|
1807
1807
|
try {
|
|
1808
|
-
|
|
1808
|
+
n = decodeURIComponent(n);
|
|
1809
1809
|
} catch {
|
|
1810
|
-
E(e, "tag name is malformed: " +
|
|
1810
|
+
E(e, "tag name is malformed: " + n);
|
|
1811
1811
|
}
|
|
1812
|
-
return t ? e.tag =
|
|
1812
|
+
return t ? e.tag = n : Fe.call(e.tagMap, s) ? e.tag = e.tagMap[s] + n : s === "!" ? e.tag = "!" + n : s === "!!" ? e.tag = "tag:yaml.org,2002:" + n : E(e, 'undeclared tag handle "' + s + '"'), !0;
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function dn(e) {
|
|
1815
1815
|
var a, t;
|
|
1816
1816
|
if (t = e.input.charCodeAt(e.position), t !== 38)
|
|
1817
1817
|
return !1;
|
|
@@ -1819,32 +1819,32 @@ function di(e) {
|
|
|
1819
1819
|
t = e.input.charCodeAt(++e.position);
|
|
1820
1820
|
return e.position === a && E(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(a, e.position), !0;
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1822
|
+
function hn(e) {
|
|
1823
1823
|
var a, t, l;
|
|
1824
1824
|
if (l = e.input.charCodeAt(e.position), l !== 42)
|
|
1825
1825
|
return !1;
|
|
1826
1826
|
for (l = e.input.charCodeAt(++e.position), a = e.position; l !== 0 && !ge(l) && !Pe(l); )
|
|
1827
1827
|
l = e.input.charCodeAt(++e.position);
|
|
1828
|
-
return e.position === a && E(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position),
|
|
1828
|
+
return e.position === a && E(e, "name of an alias node must contain at least one character"), t = e.input.slice(a, e.position), Fe.call(e.anchorMap, t) || E(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], oe(e, !0, -1), !0;
|
|
1829
1829
|
}
|
|
1830
1830
|
function Le(e, a, t, l, s) {
|
|
1831
|
-
var
|
|
1832
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null,
|
|
1833
|
-
for (;
|
|
1834
|
-
oe(e, !0, -1) ? (u = !0, d =
|
|
1835
|
-
if (d && (d = u || s), (
|
|
1831
|
+
var n, o, d, i = 1, u = !1, f = !1, h, r, k, S, g, m;
|
|
1832
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, n = o = d = rt === t || us === t, l && oe(e, !0, -1) && (u = !0, e.lineIndent > a ? i = 1 : e.lineIndent === a ? i = 0 : e.lineIndent < a && (i = -1)), i === 1)
|
|
1833
|
+
for (; cn(e) || dn(e); )
|
|
1834
|
+
oe(e, !0, -1) ? (u = !0, d = n, e.lineIndent > a ? i = 1 : e.lineIndent === a ? i = 0 : e.lineIndent < a && (i = -1)) : d = !1;
|
|
1835
|
+
if (d && (d = u || s), (i === 1 || rt === t) && (st === t || os === t ? g = a : g = a + 1, m = e.position - e.lineStart, i === 1 ? d && (_l(e, m) || un(e, m, g)) || nn(e, g) ? f = !0 : (o && on(e, g) || sn(e, g) || rn(e, g) ? f = !0 : hn(e) ? (f = !0, (e.tag !== null || e.anchor !== null) && E(e, "alias node should not have any properties")) : ln(e, g, st === t) && (f = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : i === 0 && (f = d && _l(e, m))), e.tag === null)
|
|
1836
1836
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1837
1837
|
else if (e.tag === "?") {
|
|
1838
|
-
for (e.result !== null && e.kind !== "scalar" && E(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), h = 0,
|
|
1838
|
+
for (e.result !== null && e.kind !== "scalar" && E(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), h = 0, r = e.implicitTypes.length; h < r; h += 1)
|
|
1839
1839
|
if (S = e.implicitTypes[h], S.resolve(e.result)) {
|
|
1840
1840
|
e.result = S.construct(e.result), e.tag = S.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1841
1841
|
break;
|
|
1842
1842
|
}
|
|
1843
1843
|
} else if (e.tag !== "!") {
|
|
1844
|
-
if (
|
|
1844
|
+
if (Fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1845
1845
|
S = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1846
1846
|
else
|
|
1847
|
-
for (S = null, k = e.typeMap.multi[e.kind || "fallback"], h = 0,
|
|
1847
|
+
for (S = null, k = e.typeMap.multi[e.kind || "fallback"], h = 0, r = k.length; h < r; h += 1)
|
|
1848
1848
|
if (e.tag.slice(0, k[h].tag.length) === k[h].tag) {
|
|
1849
1849
|
S = k[h];
|
|
1850
1850
|
break;
|
|
@@ -1853,10 +1853,10 @@ function Le(e, a, t, l, s) {
|
|
|
1853
1853
|
}
|
|
1854
1854
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || f;
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1857
|
-
var a = e.position, t, l, s,
|
|
1856
|
+
function pn(e) {
|
|
1857
|
+
var a = e.position, t, l, s, n = !1, o;
|
|
1858
1858
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (o = e.input.charCodeAt(e.position)) !== 0 && (oe(e, !0, -1), o = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || o !== 37)); ) {
|
|
1859
|
-
for (
|
|
1859
|
+
for (n = !0, o = e.input.charCodeAt(++e.position), t = e.position; o !== 0 && !ge(o); )
|
|
1860
1860
|
o = e.input.charCodeAt(++e.position);
|
|
1861
1861
|
for (l = e.input.slice(t, e.position), s = [], l.length < 1 && E(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
1862
1862
|
for (; Ue(o); )
|
|
@@ -1873,9 +1873,9 @@ function pi(e) {
|
|
|
1873
1873
|
o = e.input.charCodeAt(++e.position);
|
|
1874
1874
|
s.push(e.input.slice(t, e.position));
|
|
1875
1875
|
}
|
|
1876
|
-
o !== 0 && Et(e),
|
|
1876
|
+
o !== 0 && Et(e), Fe.call(bl, l) ? bl[l](e, l, s) : it(e, 'unknown document directive "' + l + '"');
|
|
1877
1877
|
}
|
|
1878
|
-
if (oe(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, oe(e, !0, -1)) :
|
|
1878
|
+
if (oe(e, !0, -1), e.lineIndent === 0 && e.input.charCodeAt(e.position) === 45 && e.input.charCodeAt(e.position + 1) === 45 && e.input.charCodeAt(e.position + 2) === 45 ? (e.position += 3, oe(e, !0, -1)) : n && E(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, rt, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Yi.test(e.input.slice(a, e.position)) && it(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && dt(e)) {
|
|
1879
1879
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
1880
1880
|
return;
|
|
1881
1881
|
}
|
|
@@ -1887,22 +1887,22 @@ function pi(e) {
|
|
|
1887
1887
|
function ms(e, a) {
|
|
1888
1888
|
e = String(e), a = a || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1889
1889
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1890
|
-
var t = new
|
|
1890
|
+
var t = new an(e, a), l = e.indexOf("\0");
|
|
1891
1891
|
for (l !== -1 && (t.position = l, E(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
1892
1892
|
t.lineIndent += 1, t.position += 1;
|
|
1893
1893
|
for (; t.position < t.length - 1; )
|
|
1894
|
-
|
|
1894
|
+
pn(t);
|
|
1895
1895
|
return t.documents;
|
|
1896
1896
|
}
|
|
1897
|
-
function
|
|
1897
|
+
function fn(e, a, t) {
|
|
1898
1898
|
a !== null && typeof a == "object" && typeof t > "u" && (t = a, a = null);
|
|
1899
1899
|
var l = ms(e, t);
|
|
1900
1900
|
if (typeof a != "function")
|
|
1901
1901
|
return l;
|
|
1902
|
-
for (var s = 0,
|
|
1902
|
+
for (var s = 0, n = l.length; s < n; s += 1)
|
|
1903
1903
|
a(l[s]);
|
|
1904
1904
|
}
|
|
1905
|
-
function
|
|
1905
|
+
function mn(e, a) {
|
|
1906
1906
|
var t = ms(e, a);
|
|
1907
1907
|
if (t.length !== 0) {
|
|
1908
1908
|
if (t.length === 1)
|
|
@@ -1910,10 +1910,10 @@ function mi(e, a) {
|
|
|
1910
1910
|
throw new fe("expected a single document in the stream, but found more");
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
var
|
|
1914
|
-
loadAll:
|
|
1915
|
-
load:
|
|
1916
|
-
}, ys = Object.prototype.toString, vs = Object.prototype.hasOwnProperty, Vt = 65279,
|
|
1913
|
+
var gn = fn, yn = mn, gs = {
|
|
1914
|
+
loadAll: gn,
|
|
1915
|
+
load: yn
|
|
1916
|
+
}, ys = Object.prototype.toString, vs = Object.prototype.hasOwnProperty, Vt = 65279, vn = 9, We = 10, bn = 13, kn = 32, _n = 33, Cn = 34, wt = 35, wn = 37, Sn = 38, In = 39, xn = 42, bs = 44, Hn = 45, nt = 58, Tn = 61, An = 62, Fn = 63, On = 64, ks = 91, _s = 93, Un = 96, Cs = 123, qn = 124, ws = 125, pe = {};
|
|
1917
1917
|
pe[0] = "\\0";
|
|
1918
1918
|
pe[7] = "\\a";
|
|
1919
1919
|
pe[8] = "\\b";
|
|
@@ -1929,7 +1929,7 @@ pe[133] = "\\N";
|
|
|
1929
1929
|
pe[160] = "\\_";
|
|
1930
1930
|
pe[8232] = "\\L";
|
|
1931
1931
|
pe[8233] = "\\P";
|
|
1932
|
-
var $
|
|
1932
|
+
var $n = [
|
|
1933
1933
|
"y",
|
|
1934
1934
|
"Y",
|
|
1935
1935
|
"yes",
|
|
@@ -1946,16 +1946,16 @@ var $i = [
|
|
|
1946
1946
|
"off",
|
|
1947
1947
|
"Off",
|
|
1948
1948
|
"OFF"
|
|
1949
|
-
],
|
|
1950
|
-
function
|
|
1951
|
-
var t, l, s,
|
|
1949
|
+
], Mn = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
1950
|
+
function Kn(e, a) {
|
|
1951
|
+
var t, l, s, n, o, d, i;
|
|
1952
1952
|
if (a === null)
|
|
1953
1953
|
return {};
|
|
1954
|
-
for (t = {}, l = Object.keys(a), s = 0,
|
|
1955
|
-
o = l[s], d = String(a[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)),
|
|
1954
|
+
for (t = {}, l = Object.keys(a), s = 0, n = l.length; s < n; s += 1)
|
|
1955
|
+
o = l[s], d = String(a[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), i = e.compiledTypeMap.fallback[o], i && vs.call(i.styleAliases, d) && (d = i.styleAliases[d]), t[o] = d;
|
|
1956
1956
|
return t;
|
|
1957
1957
|
}
|
|
1958
|
-
function
|
|
1958
|
+
function Nn(e) {
|
|
1959
1959
|
var a, t, l;
|
|
1960
1960
|
if (a = e.toString(16).toUpperCase(), e <= 255)
|
|
1961
1961
|
t = "x", l = 2;
|
|
@@ -1967,22 +1967,22 @@ function Ni(e) {
|
|
|
1967
1967
|
throw new fe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1968
1968
|
return "\\" + t + ue.repeat("0", l - a.length) + a;
|
|
1969
1969
|
}
|
|
1970
|
-
var
|
|
1971
|
-
function
|
|
1972
|
-
this.schema = e.schema || Bt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ue.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
1970
|
+
var Pn = 1, Qe = 2;
|
|
1971
|
+
function jn(e) {
|
|
1972
|
+
this.schema = e.schema || Bt, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ue.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Kn(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Qe : Pn, this.forceQuotes = e.forceQuotes || !1, this.replacer = typeof e.replacer == "function" ? e.replacer : null, this.implicitTypes = this.schema.compiledImplicit, this.explicitTypes = this.schema.compiledExplicit, this.tag = null, this.result = "", this.duplicates = [], this.usedDuplicates = null;
|
|
1973
1973
|
}
|
|
1974
1974
|
function Cl(e, a) {
|
|
1975
|
-
for (var t = ue.repeat(" ", a), l = 0, s = -1,
|
|
1975
|
+
for (var t = ue.repeat(" ", a), l = 0, s = -1, n = "", o, d = e.length; l < d; )
|
|
1976
1976
|
s = e.indexOf(`
|
|
1977
1977
|
`, l), s === -1 ? (o = e.slice(l), l = d) : (o = e.slice(l, s + 1), l = s + 1), o.length && o !== `
|
|
1978
|
-
` && (
|
|
1979
|
-
return
|
|
1978
|
+
` && (n += t), n += o;
|
|
1979
|
+
return n;
|
|
1980
1980
|
}
|
|
1981
1981
|
function St(e, a) {
|
|
1982
1982
|
return `
|
|
1983
1983
|
` + ue.repeat(" ", e.indent * a);
|
|
1984
1984
|
}
|
|
1985
|
-
function
|
|
1985
|
+
function Bn(e, a) {
|
|
1986
1986
|
var t, l, s;
|
|
1987
1987
|
for (t = 0, l = e.implicitTypes.length; t < l; t += 1)
|
|
1988
1988
|
if (s = e.implicitTypes[t], s.resolve(a))
|
|
@@ -1990,13 +1990,13 @@ function Bi(e, a) {
|
|
|
1990
1990
|
return !1;
|
|
1991
1991
|
}
|
|
1992
1992
|
function ot(e) {
|
|
1993
|
-
return e ===
|
|
1993
|
+
return e === kn || e === vn;
|
|
1994
1994
|
}
|
|
1995
1995
|
function Ye(e) {
|
|
1996
1996
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== Vt || 65536 <= e && e <= 1114111;
|
|
1997
1997
|
}
|
|
1998
1998
|
function wl(e) {
|
|
1999
|
-
return Ye(e) && e !== Vt && e !==
|
|
1999
|
+
return Ye(e) && e !== Vt && e !== bn && e !== We;
|
|
2000
2000
|
}
|
|
2001
2001
|
function Sl(e, a, t) {
|
|
2002
2002
|
var l = wl(e), s = l && !ot(e);
|
|
@@ -2005,14 +2005,14 @@ function Sl(e, a, t) {
|
|
|
2005
2005
|
(t ? (
|
|
2006
2006
|
// c = flow-in
|
|
2007
2007
|
l
|
|
2008
|
-
) : l && e !== bs && e !== ks && e !== _s && e !== Cs && e !== ws) && e !== wt && !(a ===
|
|
2008
|
+
) : l && e !== bs && e !== ks && e !== _s && e !== Cs && e !== ws) && e !== wt && !(a === nt && !s) || wl(a) && !ot(a) && e === wt || a === nt && s
|
|
2009
2009
|
);
|
|
2010
2010
|
}
|
|
2011
|
-
function
|
|
2012
|
-
return Ye(e) && e !== Vt && !ot(e) && e !==
|
|
2011
|
+
function En(e) {
|
|
2012
|
+
return Ye(e) && e !== Vt && !ot(e) && e !== Hn && e !== Fn && e !== nt && e !== bs && e !== ks && e !== _s && e !== Cs && e !== ws && e !== wt && e !== Sn && e !== xn && e !== _n && e !== qn && e !== Tn && e !== An && e !== In && e !== Cn && e !== wn && e !== On && e !== Un;
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return !ot(e) && e !==
|
|
2014
|
+
function Ln(e) {
|
|
2015
|
+
return !ot(e) && e !== nt;
|
|
2016
2016
|
}
|
|
2017
2017
|
function De(e, a) {
|
|
2018
2018
|
var t = e.charCodeAt(a), l;
|
|
@@ -2023,43 +2023,43 @@ function Ss(e) {
|
|
|
2023
2023
|
return a.test(e);
|
|
2024
2024
|
}
|
|
2025
2025
|
var Is = 1, It = 2, xs = 3, Hs = 4, Ne = 5;
|
|
2026
|
-
function
|
|
2027
|
-
var
|
|
2026
|
+
function Vn(e, a, t, l, s, n, o, d) {
|
|
2027
|
+
var i, u = 0, f = null, h = !1, r = !1, k = l !== -1, S = -1, g = En(De(e, 0)) && Ln(De(e, e.length - 1));
|
|
2028
2028
|
if (a || o)
|
|
2029
|
-
for (
|
|
2030
|
-
if (u = De(e,
|
|
2029
|
+
for (i = 0; i < e.length; u >= 65536 ? i += 2 : i++) {
|
|
2030
|
+
if (u = De(e, i), !Ye(u))
|
|
2031
2031
|
return Ne;
|
|
2032
2032
|
g = g && Sl(u, f, d), f = u;
|
|
2033
2033
|
}
|
|
2034
2034
|
else {
|
|
2035
|
-
for (
|
|
2036
|
-
if (u = De(e,
|
|
2037
|
-
h = !0, k && (
|
|
2038
|
-
|
|
2035
|
+
for (i = 0; i < e.length; u >= 65536 ? i += 2 : i++) {
|
|
2036
|
+
if (u = De(e, i), u === We)
|
|
2037
|
+
h = !0, k && (r = r || // Foldable line = too long, and not more-indented.
|
|
2038
|
+
i - S - 1 > l && e[S + 1] !== " ", S = i);
|
|
2039
2039
|
else if (!Ye(u))
|
|
2040
2040
|
return Ne;
|
|
2041
2041
|
g = g && Sl(u, f, d), f = u;
|
|
2042
2042
|
}
|
|
2043
|
-
|
|
2043
|
+
r = r || k && i - S - 1 > l && e[S + 1] !== " ";
|
|
2044
2044
|
}
|
|
2045
|
-
return !h && !
|
|
2045
|
+
return !h && !r ? g && !o && !s(e) ? Is : n === Qe ? Ne : It : t > 9 && Ss(e) ? Ne : o ? n === Qe ? Ne : It : r ? Hs : xs;
|
|
2046
2046
|
}
|
|
2047
|
-
function
|
|
2047
|
+
function Rn(e, a, t, l, s) {
|
|
2048
2048
|
e.dump = function() {
|
|
2049
2049
|
if (a.length === 0)
|
|
2050
2050
|
return e.quotingType === Qe ? '""' : "''";
|
|
2051
|
-
if (!e.noCompatMode && ($
|
|
2051
|
+
if (!e.noCompatMode && ($n.indexOf(a) !== -1 || Mn.test(a)))
|
|
2052
2052
|
return e.quotingType === Qe ? '"' + a + '"' : "'" + a + "'";
|
|
2053
|
-
var
|
|
2054
|
-
function
|
|
2055
|
-
return
|
|
2053
|
+
var n = e.indent * Math.max(1, t), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - n), d = l || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2054
|
+
function i(u) {
|
|
2055
|
+
return Bn(e, u);
|
|
2056
2056
|
}
|
|
2057
|
-
switch (
|
|
2057
|
+
switch (Vn(
|
|
2058
2058
|
a,
|
|
2059
2059
|
d,
|
|
2060
2060
|
e.indent,
|
|
2061
2061
|
o,
|
|
2062
|
-
|
|
2062
|
+
i,
|
|
2063
2063
|
e.quotingType,
|
|
2064
2064
|
e.forceQuotes && !l,
|
|
2065
2065
|
s
|
|
@@ -2069,11 +2069,11 @@ function Ri(e, a, t, l, s) {
|
|
|
2069
2069
|
case It:
|
|
2070
2070
|
return "'" + a.replace(/'/g, "''") + "'";
|
|
2071
2071
|
case xs:
|
|
2072
|
-
return "|" + Il(a, e.indent) + xl(Cl(a,
|
|
2072
|
+
return "|" + Il(a, e.indent) + xl(Cl(a, n));
|
|
2073
2073
|
case Hs:
|
|
2074
|
-
return ">" + Il(a, e.indent) + xl(Cl(
|
|
2074
|
+
return ">" + Il(a, e.indent) + xl(Cl(Dn(a, o), n));
|
|
2075
2075
|
case Ne:
|
|
2076
|
-
return '"' +
|
|
2076
|
+
return '"' + Jn(a) + '"';
|
|
2077
2077
|
default:
|
|
2078
2078
|
throw new fe("impossible error: invalid scalar style");
|
|
2079
2079
|
}
|
|
@@ -2083,103 +2083,103 @@ function Il(e, a) {
|
|
|
2083
2083
|
var t = Ss(e) ? String(a) : "", l = e[e.length - 1] === `
|
|
2084
2084
|
`, s = l && (e[e.length - 2] === `
|
|
2085
2085
|
` || e === `
|
|
2086
|
-
`),
|
|
2087
|
-
return t +
|
|
2086
|
+
`), n = s ? "+" : l ? "" : "-";
|
|
2087
|
+
return t + n + `
|
|
2088
2088
|
`;
|
|
2089
2089
|
}
|
|
2090
2090
|
function xl(e) {
|
|
2091
2091
|
return e[e.length - 1] === `
|
|
2092
2092
|
` ? e.slice(0, -1) : e;
|
|
2093
2093
|
}
|
|
2094
|
-
function
|
|
2094
|
+
function Dn(e, a) {
|
|
2095
2095
|
for (var t = /(\n+)([^\n]*)/g, l = function() {
|
|
2096
2096
|
var u = e.indexOf(`
|
|
2097
2097
|
`);
|
|
2098
2098
|
return u = u !== -1 ? u : e.length, t.lastIndex = u, Hl(e.slice(0, u), a);
|
|
2099
2099
|
}(), s = e[0] === `
|
|
2100
|
-
` || e[0] === " ",
|
|
2101
|
-
var d = o[1],
|
|
2102
|
-
|
|
2103
|
-
` : "") + Hl(
|
|
2100
|
+
` || e[0] === " ", n, o; o = t.exec(e); ) {
|
|
2101
|
+
var d = o[1], i = o[2];
|
|
2102
|
+
n = i[0] === " ", l += d + (!s && !n && i !== "" ? `
|
|
2103
|
+
` : "") + Hl(i, a), s = n;
|
|
2104
2104
|
}
|
|
2105
2105
|
return l;
|
|
2106
2106
|
}
|
|
2107
2107
|
function Hl(e, a) {
|
|
2108
2108
|
if (e === "" || e[0] === " ")
|
|
2109
2109
|
return e;
|
|
2110
|
-
for (var t = / [^ ]/g, l, s = 0,
|
|
2111
|
-
d = l.index, d - s > a && (
|
|
2112
|
-
` + e.slice(s,
|
|
2113
|
-
return
|
|
2114
|
-
`, e.length - s > a && o > s ?
|
|
2115
|
-
` + e.slice(o + 1) :
|
|
2116
|
-
}
|
|
2117
|
-
function
|
|
2110
|
+
for (var t = / [^ ]/g, l, s = 0, n, o = 0, d = 0, i = ""; l = t.exec(e); )
|
|
2111
|
+
d = l.index, d - s > a && (n = o > s ? o : d, i += `
|
|
2112
|
+
` + e.slice(s, n), s = n + 1), o = d;
|
|
2113
|
+
return i += `
|
|
2114
|
+
`, e.length - s > a && o > s ? i += e.slice(s, o) + `
|
|
2115
|
+
` + e.slice(o + 1) : i += e.slice(s), i.slice(1);
|
|
2116
|
+
}
|
|
2117
|
+
function Jn(e) {
|
|
2118
2118
|
for (var a = "", t = 0, l, s = 0; s < e.length; t >= 65536 ? s += 2 : s++)
|
|
2119
|
-
t = De(e, s), l = pe[t], !l && Ye(t) ? (a += e[s], t >= 65536 && (a += e[s + 1])) : a += l ||
|
|
2119
|
+
t = De(e, s), l = pe[t], !l && Ye(t) ? (a += e[s], t >= 65536 && (a += e[s + 1])) : a += l || Nn(t);
|
|
2120
2120
|
return a;
|
|
2121
2121
|
}
|
|
2122
|
-
function
|
|
2123
|
-
var l = "", s = e.tag,
|
|
2124
|
-
for (
|
|
2125
|
-
d = t[
|
|
2122
|
+
function zn(e, a, t) {
|
|
2123
|
+
var l = "", s = e.tag, n, o, d;
|
|
2124
|
+
for (n = 0, o = t.length; n < o; n += 1)
|
|
2125
|
+
d = t[n], e.replacer && (d = e.replacer.call(t, String(n), d)), (we(e, a, d, !1, !1) || typeof d > "u" && we(e, a, null, !1, !1)) && (l !== "" && (l += "," + (e.condenseFlow ? "" : " ")), l += e.dump);
|
|
2126
2126
|
e.tag = s, e.dump = "[" + l + "]";
|
|
2127
2127
|
}
|
|
2128
2128
|
function Tl(e, a, t, l) {
|
|
2129
|
-
var s = "",
|
|
2129
|
+
var s = "", n = e.tag, o, d, i;
|
|
2130
2130
|
for (o = 0, d = t.length; o < d; o += 1)
|
|
2131
|
-
|
|
2132
|
-
e.tag =
|
|
2131
|
+
i = t[o], e.replacer && (i = e.replacer.call(t, String(o), i)), (we(e, a + 1, i, !0, !0, !1, !0) || typeof i > "u" && we(e, a + 1, null, !0, !0, !1, !0)) && ((!l || s !== "") && (s += St(e, a)), e.dump && We === e.dump.charCodeAt(0) ? s += "-" : s += "- ", s += e.dump);
|
|
2132
|
+
e.tag = n, e.dump = s || "[]";
|
|
2133
2133
|
}
|
|
2134
|
-
function
|
|
2135
|
-
var l = "", s = e.tag,
|
|
2136
|
-
for (o = 0, d =
|
|
2137
|
-
f = "", l !== "" && (f += ", "), e.condenseFlow && (f += '"'),
|
|
2134
|
+
function Wn(e, a, t) {
|
|
2135
|
+
var l = "", s = e.tag, n = Object.keys(t), o, d, i, u, f;
|
|
2136
|
+
for (o = 0, d = n.length; o < d; o += 1)
|
|
2137
|
+
f = "", l !== "" && (f += ", "), e.condenseFlow && (f += '"'), i = n[o], u = t[i], e.replacer && (u = e.replacer.call(t, i, u)), we(e, a, i, !1, !1) && (e.dump.length > 1024 && (f += "? "), f += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), we(e, a, u, !1, !1) && (f += e.dump, l += f));
|
|
2138
2138
|
e.tag = s, e.dump = "{" + l + "}";
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2141
|
-
var s = "",
|
|
2140
|
+
function Qn(e, a, t, l) {
|
|
2141
|
+
var s = "", n = e.tag, o = Object.keys(t), d, i, u, f, h, r;
|
|
2142
2142
|
if (e.sortKeys === !0)
|
|
2143
2143
|
o.sort();
|
|
2144
2144
|
else if (typeof e.sortKeys == "function")
|
|
2145
2145
|
o.sort(e.sortKeys);
|
|
2146
2146
|
else if (e.sortKeys)
|
|
2147
2147
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2148
|
-
for (d = 0,
|
|
2149
|
-
|
|
2150
|
-
e.tag =
|
|
2148
|
+
for (d = 0, i = o.length; d < i; d += 1)
|
|
2149
|
+
r = "", (!l || s !== "") && (r += St(e, a)), u = o[d], f = t[u], e.replacer && (f = e.replacer.call(t, u, f)), we(e, a + 1, u, !0, !0, !0) && (h = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, h && (e.dump && We === e.dump.charCodeAt(0) ? r += "?" : r += "? "), r += e.dump, h && (r += St(e, a)), we(e, a + 1, f, !0, h) && (e.dump && We === e.dump.charCodeAt(0) ? r += ":" : r += ": ", r += e.dump, s += r));
|
|
2150
|
+
e.tag = n, e.dump = s || "{}";
|
|
2151
2151
|
}
|
|
2152
2152
|
function Al(e, a, t) {
|
|
2153
|
-
var l, s,
|
|
2154
|
-
for (s = t ? e.explicitTypes : e.implicitTypes,
|
|
2155
|
-
if (d = s[
|
|
2153
|
+
var l, s, n, o, d, i;
|
|
2154
|
+
for (s = t ? e.explicitTypes : e.implicitTypes, n = 0, o = s.length; n < o; n += 1)
|
|
2155
|
+
if (d = s[n], (d.instanceOf || d.predicate) && (!d.instanceOf || typeof a == "object" && a instanceof d.instanceOf) && (!d.predicate || d.predicate(a))) {
|
|
2156
2156
|
if (t ? d.multi && d.representName ? e.tag = d.representName(a) : e.tag = d.tag : e.tag = "?", d.represent) {
|
|
2157
|
-
if (
|
|
2158
|
-
l = d.represent(a,
|
|
2159
|
-
else if (vs.call(d.represent,
|
|
2160
|
-
l = d.represent[
|
|
2157
|
+
if (i = e.styleMap[d.tag] || d.defaultStyle, ys.call(d.represent) === "[object Function]")
|
|
2158
|
+
l = d.represent(a, i);
|
|
2159
|
+
else if (vs.call(d.represent, i))
|
|
2160
|
+
l = d.represent[i](a, i);
|
|
2161
2161
|
else
|
|
2162
|
-
throw new fe("!<" + d.tag + '> tag resolver accepts not "' +
|
|
2162
|
+
throw new fe("!<" + d.tag + '> tag resolver accepts not "' + i + '" style');
|
|
2163
2163
|
e.dump = l;
|
|
2164
2164
|
}
|
|
2165
2165
|
return !0;
|
|
2166
2166
|
}
|
|
2167
2167
|
return !1;
|
|
2168
2168
|
}
|
|
2169
|
-
function we(e, a, t, l, s,
|
|
2169
|
+
function we(e, a, t, l, s, n, o) {
|
|
2170
2170
|
e.tag = null, e.dump = t, Al(e, t, !1) || Al(e, t, !0);
|
|
2171
|
-
var d = ys.call(e.dump),
|
|
2171
|
+
var d = ys.call(e.dump), i = l, u;
|
|
2172
2172
|
l && (l = e.flowLevel < 0 || e.flowLevel > a);
|
|
2173
|
-
var f = d === "[object Object]" || d === "[object Array]", h,
|
|
2174
|
-
if (f && (h = e.duplicates.indexOf(t),
|
|
2173
|
+
var f = d === "[object Object]" || d === "[object Array]", h, r;
|
|
2174
|
+
if (f && (h = e.duplicates.indexOf(t), r = h !== -1), (e.tag !== null && e.tag !== "?" || r || e.indent !== 2 && a > 0) && (s = !1), r && e.usedDuplicates[h])
|
|
2175
2175
|
e.dump = "*ref_" + h;
|
|
2176
2176
|
else {
|
|
2177
|
-
if (f &&
|
|
2178
|
-
l && Object.keys(e.dump).length !== 0 ? (
|
|
2177
|
+
if (f && r && !e.usedDuplicates[h] && (e.usedDuplicates[h] = !0), d === "[object Object]")
|
|
2178
|
+
l && Object.keys(e.dump).length !== 0 ? (Qn(e, a, e.dump, s), r && (e.dump = "&ref_" + h + e.dump)) : (Wn(e, a, e.dump), r && (e.dump = "&ref_" + h + " " + e.dump));
|
|
2179
2179
|
else if (d === "[object Array]")
|
|
2180
|
-
l && e.dump.length !== 0 ? (e.noArrayIndent && !o && a > 0 ? Tl(e, a - 1, e.dump, s) : Tl(e, a, e.dump, s),
|
|
2180
|
+
l && e.dump.length !== 0 ? (e.noArrayIndent && !o && a > 0 ? Tl(e, a - 1, e.dump, s) : Tl(e, a, e.dump, s), r && (e.dump = "&ref_" + h + e.dump)) : (zn(e, a, e.dump), r && (e.dump = "&ref_" + h + " " + e.dump));
|
|
2181
2181
|
else if (d === "[object String]")
|
|
2182
|
-
e.tag !== "?" &&
|
|
2182
|
+
e.tag !== "?" && Rn(e, e.dump, a, n, i);
|
|
2183
2183
|
else {
|
|
2184
2184
|
if (d === "[object Undefined]" || e.skipInvalid)
|
|
2185
2185
|
return !1;
|
|
@@ -2191,52 +2191,52 @@ function we(e, a, t, l, s, i, o) {
|
|
|
2191
2191
|
}
|
|
2192
2192
|
return !0;
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
var t = [], l = [], s,
|
|
2196
|
-
for (xt(e, t, l), s = 0,
|
|
2194
|
+
function Yn(e, a) {
|
|
2195
|
+
var t = [], l = [], s, n;
|
|
2196
|
+
for (xt(e, t, l), s = 0, n = l.length; s < n; s += 1)
|
|
2197
2197
|
a.duplicates.push(t[l[s]]);
|
|
2198
|
-
a.usedDuplicates = new Array(
|
|
2198
|
+
a.usedDuplicates = new Array(n);
|
|
2199
2199
|
}
|
|
2200
2200
|
function xt(e, a, t) {
|
|
2201
|
-
var l, s,
|
|
2201
|
+
var l, s, n;
|
|
2202
2202
|
if (e !== null && typeof e == "object")
|
|
2203
2203
|
if (s = a.indexOf(e), s !== -1)
|
|
2204
2204
|
t.indexOf(s) === -1 && t.push(s);
|
|
2205
2205
|
else if (a.push(e), Array.isArray(e))
|
|
2206
|
-
for (s = 0,
|
|
2206
|
+
for (s = 0, n = e.length; s < n; s += 1)
|
|
2207
2207
|
xt(e[s], a, t);
|
|
2208
2208
|
else
|
|
2209
|
-
for (l = Object.keys(e), s = 0,
|
|
2209
|
+
for (l = Object.keys(e), s = 0, n = l.length; s < n; s += 1)
|
|
2210
2210
|
xt(e[l[s]], a, t);
|
|
2211
2211
|
}
|
|
2212
|
-
function
|
|
2212
|
+
function Gn(e, a) {
|
|
2213
2213
|
a = a || {};
|
|
2214
|
-
var t = new
|
|
2215
|
-
t.noRefs ||
|
|
2214
|
+
var t = new jn(a);
|
|
2215
|
+
t.noRefs || Yn(e, t);
|
|
2216
2216
|
var l = e;
|
|
2217
2217
|
return t.replacer && (l = t.replacer.call({ "": l }, "", l)), we(t, 0, l, !0, !0) ? t.dump + `
|
|
2218
2218
|
` : "";
|
|
2219
2219
|
}
|
|
2220
|
-
var
|
|
2221
|
-
dump:
|
|
2220
|
+
var Zn = Gn, Xn = {
|
|
2221
|
+
dump: Zn
|
|
2222
2222
|
};
|
|
2223
2223
|
function Rt(e, a) {
|
|
2224
2224
|
return function() {
|
|
2225
2225
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + a + " instead, which is now safe by default.");
|
|
2226
2226
|
};
|
|
2227
2227
|
}
|
|
2228
|
-
var eo = he, to = Vl, ao = zl, lo = Zl, so = Xl,
|
|
2228
|
+
var eo = he, to = Vl, ao = zl, lo = Zl, so = Xl, ro = Bt, io = gs.load, no = gs.loadAll, oo = Xn.dump, uo = fe, co = {
|
|
2229
2229
|
binary: ss,
|
|
2230
2230
|
float: Gl,
|
|
2231
2231
|
map: Jl,
|
|
2232
2232
|
null: Wl,
|
|
2233
|
-
pairs:
|
|
2234
|
-
set:
|
|
2233
|
+
pairs: is,
|
|
2234
|
+
set: ns,
|
|
2235
2235
|
timestamp: as,
|
|
2236
2236
|
bool: Ql,
|
|
2237
2237
|
int: Yl,
|
|
2238
2238
|
merge: ls,
|
|
2239
|
-
omap:
|
|
2239
|
+
omap: rs,
|
|
2240
2240
|
seq: Dl,
|
|
2241
2241
|
str: Rl
|
|
2242
2242
|
}, ho = Rt("safeLoad", "load"), po = Rt("safeLoadAll", "loadAll"), fo = Rt("safeDump", "dump"), mo = {
|
|
@@ -2245,9 +2245,9 @@ var eo = he, to = Vl, ao = zl, lo = Zl, so = Xl, no = Bt, ro = gs.load, io = gs.
|
|
|
2245
2245
|
FAILSAFE_SCHEMA: ao,
|
|
2246
2246
|
JSON_SCHEMA: lo,
|
|
2247
2247
|
CORE_SCHEMA: so,
|
|
2248
|
-
DEFAULT_SCHEMA:
|
|
2249
|
-
load:
|
|
2250
|
-
loadAll:
|
|
2248
|
+
DEFAULT_SCHEMA: ro,
|
|
2249
|
+
load: io,
|
|
2250
|
+
loadAll: no,
|
|
2251
2251
|
dump: oo,
|
|
2252
2252
|
YAMLException: uo,
|
|
2253
2253
|
types: co,
|
|
@@ -2293,10 +2293,10 @@ const go = {
|
|
|
2293
2293
|
}
|
|
2294
2294
|
},
|
|
2295
2295
|
setup(e) {
|
|
2296
|
-
const a = e, t = ct(), { i18n: { t: l } } = de.useI18n(), s = (d) => !!(d.tooltip || t[`${d.key}-label-tooltip`]),
|
|
2296
|
+
const a = e, t = ct(), { i18n: { t: l } } = de.useI18n(), s = (d) => !!(d.tooltip || t[`${d.key}-label-tooltip`]), n = B(""), o = B("");
|
|
2297
2297
|
return ye(() => a.format, (d) => {
|
|
2298
|
-
d === "json" ?
|
|
2299
|
-
}, { immediate: !0 }), (d,
|
|
2298
|
+
d === "json" ? n.value = JSON.stringify(a.record, null, 2) : d === "yaml" && (o.value = mo.dump(a.record));
|
|
2299
|
+
}, { immediate: !0 }), (d, i) => {
|
|
2300
2300
|
const u = U("KCodeBlock");
|
|
2301
2301
|
return b(), K(ce, null, [
|
|
2302
2302
|
e.format === "structured" ? (b(), K("div", go, [
|
|
@@ -2313,10 +2313,10 @@ const go = {
|
|
|
2313
2313
|
label: p(() => [
|
|
2314
2314
|
ae(d.$slots, `${h.key}-label`, { row: h }, void 0, !0)
|
|
2315
2315
|
]),
|
|
2316
|
-
[h.key]: p(({ rowValue:
|
|
2316
|
+
[h.key]: p(({ rowValue: r }) => [
|
|
2317
2317
|
ae(d.$slots, h.key, {
|
|
2318
2318
|
row: h,
|
|
2319
|
-
rowValue:
|
|
2319
|
+
rowValue: r
|
|
2320
2320
|
}, void 0, !0)
|
|
2321
2321
|
]),
|
|
2322
2322
|
_: 2
|
|
@@ -2334,7 +2334,7 @@ const go = {
|
|
|
2334
2334
|
e.format === "json" ? (b(), K("div", bo, [
|
|
2335
2335
|
y(u, {
|
|
2336
2336
|
id: "config-card-codeblock",
|
|
2337
|
-
code:
|
|
2337
|
+
code: n.value,
|
|
2338
2338
|
language: "json",
|
|
2339
2339
|
theme: "dark"
|
|
2340
2340
|
}, null, 8, ["code"])
|
|
@@ -2344,14 +2344,13 @@ const go = {
|
|
|
2344
2344
|
id: "config-card-codeblock",
|
|
2345
2345
|
code: o.value,
|
|
2346
2346
|
language: "yaml",
|
|
2347
|
-
"show-line-number-links": !0,
|
|
2348
2347
|
theme: "dark"
|
|
2349
2348
|
}, null, 8, ["code"])
|
|
2350
2349
|
])) : Y("", !0)
|
|
2351
2350
|
], 64);
|
|
2352
2351
|
};
|
|
2353
2352
|
}
|
|
2354
|
-
}), Co = /* @__PURE__ */ be(_o, [["__scopeId", "data-v-
|
|
2353
|
+
}), Co = /* @__PURE__ */ be(_o, [["__scopeId", "data-v-6c45e9e4"]]), Fl = "24px", wo = (e, a) => {
|
|
2355
2354
|
const t = e.__vccOpts || e;
|
|
2356
2355
|
for (const [l, s] of a)
|
|
2357
2356
|
t[l] = s;
|
|
@@ -2393,7 +2392,7 @@ const go = {
|
|
|
2393
2392
|
size: {
|
|
2394
2393
|
type: [Number, String],
|
|
2395
2394
|
required: !1,
|
|
2396
|
-
default:
|
|
2395
|
+
default: Fl,
|
|
2397
2396
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2398
2397
|
validator: (e) => {
|
|
2399
2398
|
if (typeof e == "number" && e > 0)
|
|
@@ -2414,16 +2413,16 @@ const go = {
|
|
|
2414
2413
|
}
|
|
2415
2414
|
},
|
|
2416
2415
|
setup(e) {
|
|
2417
|
-
const a = e, t =
|
|
2416
|
+
const a = e, t = O(() => {
|
|
2418
2417
|
if (typeof a.size == "number" && a.size > 0)
|
|
2419
2418
|
return `${a.size}px`;
|
|
2420
2419
|
if (typeof a.size == "string") {
|
|
2421
|
-
const s = String(a.size).replace(/px/gi, ""),
|
|
2422
|
-
if (
|
|
2423
|
-
return `${
|
|
2420
|
+
const s = String(a.size).replace(/px/gi, ""), n = Number(s);
|
|
2421
|
+
if (n && !isNaN(n) && Number.isInteger(n) && n > 0)
|
|
2422
|
+
return `${n}px`;
|
|
2424
2423
|
}
|
|
2425
|
-
return
|
|
2426
|
-
}), l =
|
|
2424
|
+
return Fl;
|
|
2425
|
+
}), l = O(() => ({
|
|
2427
2426
|
boxSizing: "border-box",
|
|
2428
2427
|
color: a.color,
|
|
2429
2428
|
display: a.display,
|
|
@@ -2431,7 +2430,7 @@ const go = {
|
|
|
2431
2430
|
lineHeight: "0",
|
|
2432
2431
|
width: t.value
|
|
2433
2432
|
}));
|
|
2434
|
-
return (s,
|
|
2433
|
+
return (s, n) => (b(), D(Je(e.as), {
|
|
2435
2434
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2436
2435
|
class: "kui-icon book-icon",
|
|
2437
2436
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
@@ -2455,7 +2454,7 @@ const go = {
|
|
|
2455
2454
|
_: 1
|
|
2456
2455
|
}, 8, ["aria-hidden", "style"]));
|
|
2457
2456
|
}
|
|
2458
|
-
}), Ao = /* @__PURE__ */ wo(To, [["__scopeId", "data-v-de77c523"]]),
|
|
2457
|
+
}), Ao = /* @__PURE__ */ wo(To, [["__scopeId", "data-v-de77c523"]]), Fo = { "data-testid": "config-card-title" }, Oo = { class: "config-card-actions" }, Uo = ["href"], qo = {
|
|
2459
2458
|
key: 2,
|
|
2460
2459
|
class: "config-card-details-section"
|
|
2461
2460
|
}, $o = {
|
|
@@ -2539,11 +2538,11 @@ const go = {
|
|
|
2539
2538
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2540
2539
|
setup(e, { emit: a }) {
|
|
2541
2540
|
var t;
|
|
2542
|
-
const l = e, s = ct(), { i18n: { t:
|
|
2541
|
+
const l = e, s = ct(), { i18n: { t: n } } = de.useI18n(), { getMessageFromError: o } = de.useErrors(), { convertKeyToTitle: d } = de.useStringHelpers(), { axiosInstance: i } = de.useAxios({
|
|
2543
2542
|
headers: (t = l.config) == null ? void 0 : t.requestHeaders
|
|
2544
2543
|
}), u = [
|
|
2545
2544
|
{
|
|
2546
|
-
label:
|
|
2545
|
+
label: n("baseConfigCard.general.structuredFormat"),
|
|
2547
2546
|
value: "structured",
|
|
2548
2547
|
selected: !0
|
|
2549
2548
|
},
|
|
@@ -2555,49 +2554,49 @@ const go = {
|
|
|
2555
2554
|
label: "YAML",
|
|
2556
2555
|
value: "yaml"
|
|
2557
2556
|
}
|
|
2558
|
-
], f = B("structured"), h = (
|
|
2559
|
-
f.value =
|
|
2560
|
-
},
|
|
2557
|
+
], f = B("structured"), h = (F) => {
|
|
2558
|
+
f.value = F == null ? void 0 : F.value;
|
|
2559
|
+
}, r = {
|
|
2561
2560
|
id: {
|
|
2562
2561
|
type: se.ID,
|
|
2563
|
-
label:
|
|
2562
|
+
label: n("baseConfigCard.commonFields.id_label"),
|
|
2564
2563
|
order: 0,
|
|
2565
|
-
section:
|
|
2564
|
+
section: ie.Basic
|
|
2566
2565
|
},
|
|
2567
2566
|
name: {
|
|
2568
2567
|
order: 1,
|
|
2569
|
-
section:
|
|
2568
|
+
section: ie.Basic
|
|
2570
2569
|
},
|
|
2571
2570
|
enabled: {
|
|
2572
2571
|
type: se.BadgeStatus,
|
|
2573
2572
|
order: 2,
|
|
2574
|
-
section:
|
|
2573
|
+
section: ie.Basic
|
|
2575
2574
|
},
|
|
2576
2575
|
updated_at: {
|
|
2577
2576
|
type: se.Date,
|
|
2578
|
-
label:
|
|
2577
|
+
label: n("baseConfigCard.commonFields.updated_at_label"),
|
|
2579
2578
|
order: 3,
|
|
2580
|
-
section:
|
|
2579
|
+
section: ie.Basic
|
|
2581
2580
|
},
|
|
2582
2581
|
created_at: {
|
|
2583
2582
|
type: se.Date,
|
|
2584
|
-
label:
|
|
2583
|
+
label: n("baseConfigCard.commonFields.created_at_label"),
|
|
2585
2584
|
order: 4,
|
|
2586
|
-
section:
|
|
2585
|
+
section: ie.Basic
|
|
2587
2586
|
},
|
|
2588
2587
|
tags: {
|
|
2589
2588
|
type: se.BadgeTag,
|
|
2590
2589
|
order: -1,
|
|
2591
2590
|
// the last property displayed
|
|
2592
|
-
section:
|
|
2591
|
+
section: ie.Basic
|
|
2593
2592
|
}
|
|
2594
|
-
}, k = B(!1), S = B(!1), g = B(""), m = B(), H =
|
|
2595
|
-
var
|
|
2593
|
+
}, k = B(!1), S = B(!1), g = B(""), m = B(), H = O(() => {
|
|
2594
|
+
var F, M, I;
|
|
2596
2595
|
if (!m.value)
|
|
2597
2596
|
return [];
|
|
2598
2597
|
const L = [], V = Object.keys(m.value).length;
|
|
2599
2598
|
for (const Z in m.value) {
|
|
2600
|
-
const j = (M = (
|
|
2599
|
+
const j = (M = (F = l.configSchema) == null ? void 0 : F[Z]) == null ? void 0 : M.order, J = (I = r[Z]) == null ? void 0 : I.order;
|
|
2601
2600
|
let X = V;
|
|
2602
2601
|
(J || J === 0) && (X = J === -1 ? V + 1 : J), j && (X = j === -1 ? V + 1 : j), L.push([Z, X]);
|
|
2603
2602
|
}
|
|
@@ -2605,7 +2604,7 @@ const go = {
|
|
|
2605
2604
|
return Z[1] - j[1];
|
|
2606
2605
|
}), L.map((Z) => {
|
|
2607
2606
|
var j, J;
|
|
2608
|
-
const X = Z[0], $ = (j = m.value) == null ? void 0 : j[X], R = ((J = l.configSchema) == null ? void 0 : J[X]) || {}, W =
|
|
2607
|
+
const X = Z[0], $ = (j = m.value) == null ? void 0 : j[X], R = ((J = l.configSchema) == null ? void 0 : J[X]) || {}, W = r[X];
|
|
2609
2608
|
return {
|
|
2610
2609
|
key: X,
|
|
2611
2610
|
value: $,
|
|
@@ -2613,16 +2612,16 @@ const go = {
|
|
|
2613
2612
|
type: R.type ?? ((W == null ? void 0 : W.type) || se.Text),
|
|
2614
2613
|
label: R.label ?? ((W == null ? void 0 : W.label) || d(X)),
|
|
2615
2614
|
tooltip: R.tooltip ?? ((W == null ? void 0 : W.tooltip) || void 0),
|
|
2616
|
-
section: R.section ?? ((W == null ? void 0 : W.section) ||
|
|
2615
|
+
section: R.section ?? ((W == null ? void 0 : W.section) || ie.Advanced)
|
|
2617
2616
|
};
|
|
2618
2617
|
}).filter((Z) => !Z.hidden && Z.key !== l.pluginConfigKey);
|
|
2619
|
-
}), _ =
|
|
2620
|
-
var
|
|
2618
|
+
}), _ = O(() => {
|
|
2619
|
+
var F, M;
|
|
2621
2620
|
if (!m.value || !l.pluginConfigKey)
|
|
2622
2621
|
return [];
|
|
2623
2622
|
const I = m.value[l.pluginConfigKey] || {}, L = Object.keys(I).length, V = [];
|
|
2624
2623
|
for (const Z in I) {
|
|
2625
|
-
const j = (M = (
|
|
2624
|
+
const j = (M = (F = l.pluginConfigSchema) == null ? void 0 : F[Z]) == null ? void 0 : M.order, J = I[Z];
|
|
2626
2625
|
let X = J != null && J !== "" ? L - 1 : L;
|
|
2627
2626
|
j && (X = j === -1 ? L + 1 : j), V.push([Z, X]);
|
|
2628
2627
|
}
|
|
@@ -2638,54 +2637,54 @@ const go = {
|
|
|
2638
2637
|
type: $.type ?? se.Text,
|
|
2639
2638
|
label: $.label ?? d(J),
|
|
2640
2639
|
tooltip: $.tooltip ?? void 0,
|
|
2641
|
-
section:
|
|
2640
|
+
section: ie.Plugin
|
|
2642
2641
|
};
|
|
2643
2642
|
}).filter((Z) => !Z.hidden);
|
|
2644
|
-
}), q =
|
|
2645
|
-
var
|
|
2643
|
+
}), q = O(() => {
|
|
2644
|
+
var F, M, I, L;
|
|
2646
2645
|
return {
|
|
2647
|
-
basic: (
|
|
2648
|
-
advanced: (M = H.value) == null ? void 0 : M.filter((V) => V.section ===
|
|
2649
|
-
plugin: (L = _.value) == null ? void 0 : L.concat((I = H.value) == null ? void 0 : I.filter((V) => V.section ===
|
|
2646
|
+
basic: (F = H.value) == null ? void 0 : F.filter((V) => V.section === ie.Basic),
|
|
2647
|
+
advanced: (M = H.value) == null ? void 0 : M.filter((V) => V.section === ie.Advanced),
|
|
2648
|
+
plugin: (L = _.value) == null ? void 0 : L.concat((I = H.value) == null ? void 0 : I.filter((V) => V.section === ie.Plugin))
|
|
2650
2649
|
};
|
|
2651
|
-
}), Q =
|
|
2652
|
-
const
|
|
2653
|
-
return q.value.basic.length &&
|
|
2654
|
-
}), A = (
|
|
2655
|
-
var
|
|
2650
|
+
}), Q = O(() => {
|
|
2651
|
+
const F = [];
|
|
2652
|
+
return q.value.basic.length && F.push("basic"), q.value.advanced.length && F.push("advanced"), q.value.plugin.length && F.push("plugin"), F;
|
|
2653
|
+
}), A = (F) => !!(F.tooltip || s[`${F.key}-label-tooltip`]), N = O(() => {
|
|
2654
|
+
var F, M;
|
|
2656
2655
|
let I = `${l.config.apiBaseUrl}${l.fetchUrl}`;
|
|
2657
|
-
return l.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((
|
|
2658
|
-
}), P = (
|
|
2659
|
-
m.value &&
|
|
2656
|
+
return l.config.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, ((F = l.config) == null ? void 0 : F.controlPlaneId) || "") : l.config.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, (M = l.config) != null && M.workspace ? `/${l.config.workspace}` : "")), I = I.replace(/{id}/gi, l.config.entityId), I;
|
|
2657
|
+
}), P = (F) => {
|
|
2658
|
+
m.value && F(JSON.stringify(m.value)) ? a("copy:success", m.value) : a("copy:error");
|
|
2660
2659
|
};
|
|
2661
|
-
return ye(k, (
|
|
2662
|
-
a("loading",
|
|
2660
|
+
return ye(k, (F) => {
|
|
2661
|
+
a("loading", F);
|
|
2663
2662
|
}, { immediate: !0 }), Ze(async () => {
|
|
2664
2663
|
S.value = !1, k.value = !0;
|
|
2665
2664
|
try {
|
|
2666
|
-
const { data:
|
|
2665
|
+
const { data: F } = await i.get(N.value);
|
|
2667
2666
|
if (l.dataKey)
|
|
2668
|
-
if (typeof
|
|
2669
|
-
m.value = { ...
|
|
2667
|
+
if (typeof F[l.dataKey] < "u")
|
|
2668
|
+
m.value = { ...F[l.dataKey] };
|
|
2670
2669
|
else
|
|
2671
|
-
throw new Error(
|
|
2670
|
+
throw new Error(n("errors.dataKeyUndefined", { dataKey: l.dataKey }));
|
|
2672
2671
|
else
|
|
2673
|
-
m.value = { ...
|
|
2672
|
+
m.value = { ...F };
|
|
2674
2673
|
Object.keys(l.configSchema).filter((M) => l.configSchema[M].forceShow).forEach((M) => {
|
|
2675
2674
|
m.value && typeof m.value[M] > "u" && (m.value[M] = null);
|
|
2676
|
-
}), a("fetch:success",
|
|
2677
|
-
} catch (
|
|
2678
|
-
const M = o(
|
|
2679
|
-
g.value = M.startsWith("code") ?
|
|
2675
|
+
}), a("fetch:success", F);
|
|
2676
|
+
} catch (F) {
|
|
2677
|
+
const M = o(F);
|
|
2678
|
+
g.value = M.startsWith("code") ? n("baseConfigCard.errors.load") : M, S.value = !0, a("fetch:error", F);
|
|
2680
2679
|
} finally {
|
|
2681
2680
|
k.value = !1;
|
|
2682
2681
|
}
|
|
2683
|
-
}), (
|
|
2682
|
+
}), (F, M) => {
|
|
2684
2683
|
const I = U("KLabel"), L = U("KSelect"), V = U("KButton"), Z = U("KClipboardProvider"), j = U("KSkeleton"), J = U("KEmptyState"), X = U("KCard");
|
|
2685
2684
|
return b(), D(X, { class: "kong-ui-entity-base-config-card" }, He({
|
|
2686
2685
|
actions: p(() => [
|
|
2687
|
-
x("div",
|
|
2688
|
-
ae(
|
|
2686
|
+
x("div", Oo, [
|
|
2687
|
+
ae(F.$slots, "actions", {}, void 0, !0),
|
|
2689
2688
|
e.config.jsonYamlEnabled ? (b(), D(I, {
|
|
2690
2689
|
key: 0,
|
|
2691
2690
|
class: "config-format-select-label",
|
|
@@ -2715,7 +2714,7 @@ const go = {
|
|
|
2715
2714
|
rel: "noopener",
|
|
2716
2715
|
target: "_blank"
|
|
2717
2716
|
}, [
|
|
2718
|
-
y(c(Ao), { size: c(
|
|
2717
|
+
y(c(Ao), { size: c($r) }, null, 8, ["size"])
|
|
2719
2718
|
], 8, Uo)
|
|
2720
2719
|
]),
|
|
2721
2720
|
_: 1
|
|
@@ -2729,7 +2728,7 @@ const go = {
|
|
|
2729
2728
|
onClick: (R) => P($)
|
|
2730
2729
|
}, {
|
|
2731
2730
|
default: p(() => [
|
|
2732
|
-
G(C(c(
|
|
2731
|
+
G(C(c(n)("baseConfigCard.actions.copy")), 1)
|
|
2733
2732
|
]),
|
|
2734
2733
|
_: 2
|
|
2735
2734
|
}, 1032, ["onClick"])) : Y("", !0)
|
|
@@ -2761,10 +2760,10 @@ const go = {
|
|
|
2761
2760
|
"property-collections": q.value,
|
|
2762
2761
|
record: m.value
|
|
2763
2762
|
}, He({ _: 2 }, [
|
|
2764
|
-
me(Object.keys(
|
|
2763
|
+
me(Object.keys(F.$slots), ($) => ({
|
|
2765
2764
|
name: $,
|
|
2766
2765
|
fn: p(({ row: R, rowValue: W }) => [
|
|
2767
|
-
ae(
|
|
2766
|
+
ae(F.$slots, $, {
|
|
2768
2767
|
row: R,
|
|
2769
2768
|
rowValue: W
|
|
2770
2769
|
}, void 0, !0)
|
|
@@ -2777,16 +2776,16 @@ const go = {
|
|
|
2777
2776
|
class: Ae(`config-card-details-${$}-props`),
|
|
2778
2777
|
"data-testid": `config-card-details-${$}-props`
|
|
2779
2778
|
}, [
|
|
2780
|
-
$ !== "basic" ? (b(), K("div", Ko, C($ === "advanced" ? c(
|
|
2779
|
+
$ !== "basic" ? (b(), K("div", Ko, C($ === "advanced" ? c(n)("baseConfigCard.sections.advanced") : c(n)("baseConfigCard.sections.plugin")), 1)) : Y("", !0),
|
|
2781
2780
|
(b(!0), K(ce, null, me(q.value[$], (R) => (b(), D(Pt, {
|
|
2782
2781
|
key: R.key,
|
|
2783
2782
|
item: R
|
|
2784
2783
|
}, He({
|
|
2785
2784
|
label: p(() => [
|
|
2786
|
-
ae(
|
|
2785
|
+
ae(F.$slots, `${R.key}-label`, { row: R }, void 0, !0)
|
|
2787
2786
|
]),
|
|
2788
2787
|
[R.key]: p(({ rowValue: W }) => [
|
|
2789
|
-
ae(
|
|
2788
|
+
ae(F.$slots, R.key, {
|
|
2790
2789
|
row: R,
|
|
2791
2790
|
rowValue: W
|
|
2792
2791
|
}, void 0, !0)
|
|
@@ -2796,7 +2795,7 @@ const go = {
|
|
|
2796
2795
|
A(R) ? {
|
|
2797
2796
|
name: "label-tooltip",
|
|
2798
2797
|
fn: p(() => [
|
|
2799
|
-
ae(
|
|
2798
|
+
ae(F.$slots, `${R.key}-label-tooltip`, { row: R }, void 0, !0)
|
|
2800
2799
|
]),
|
|
2801
2800
|
key: "0"
|
|
2802
2801
|
} : void 0
|
|
@@ -2809,9 +2808,9 @@ const go = {
|
|
|
2809
2808
|
e.hideTitle ? void 0 : {
|
|
2810
2809
|
name: "title",
|
|
2811
2810
|
fn: p(() => [
|
|
2812
|
-
x("div",
|
|
2813
|
-
ae(
|
|
2814
|
-
G(C(c(
|
|
2811
|
+
x("div", Fo, [
|
|
2812
|
+
ae(F.$slots, "title", {}, () => [
|
|
2813
|
+
G(C(c(n)("baseConfigCard.title")), 1)
|
|
2815
2814
|
], !0)
|
|
2816
2815
|
])
|
|
2817
2816
|
]),
|
|
@@ -2873,9 +2872,9 @@ const go = {
|
|
|
2873
2872
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
2874
2873
|
setup(e, { emit: a }) {
|
|
2875
2874
|
var t;
|
|
2876
|
-
const l = e, s = $t(), { i18n: { t:
|
|
2875
|
+
const l = e, s = $t(), { i18n: { t: n } } = de.useI18n(), { getMessageFromError: o } = de.useErrors(), { axiosInstance: d } = de.useAxios({
|
|
2877
2876
|
headers: (t = l.config) == null ? void 0 : t.requestHeaders
|
|
2878
|
-
}),
|
|
2877
|
+
}), i = B(!1), u = B(!1), f = B(""), h = O(() => l.canSubmit === !1 || l.isReadonly), r = O(() => {
|
|
2879
2878
|
var m, H;
|
|
2880
2879
|
if (!l.editId)
|
|
2881
2880
|
return "";
|
|
@@ -2888,30 +2887,30 @@ const go = {
|
|
|
2888
2887
|
}, g = () => {
|
|
2889
2888
|
h.value || a("submit");
|
|
2890
2889
|
};
|
|
2891
|
-
return ye(() =>
|
|
2890
|
+
return ye(() => i.value, (m) => {
|
|
2892
2891
|
a("loading", m);
|
|
2893
2892
|
}, { immediate: !0 }), Ze(async () => {
|
|
2894
2893
|
if (l.editId)
|
|
2895
2894
|
try {
|
|
2896
|
-
u.value = !1,
|
|
2897
|
-
const { data: m } = await d.get(
|
|
2895
|
+
u.value = !1, i.value = !0;
|
|
2896
|
+
const { data: m } = await d.get(r.value);
|
|
2898
2897
|
a("fetch:success", m);
|
|
2899
2898
|
} catch (m) {
|
|
2900
2899
|
const H = o(m);
|
|
2901
|
-
f.value = H.startsWith("code") ?
|
|
2900
|
+
f.value = H.startsWith("code") ? n("baseForm.errors.edit") : H, u.value = !0, a("fetch:error", m);
|
|
2902
2901
|
} finally {
|
|
2903
|
-
|
|
2902
|
+
i.value = !1;
|
|
2904
2903
|
}
|
|
2905
2904
|
}), (m, H) => {
|
|
2906
2905
|
const _ = U("KSkeleton"), q = U("KEmptyState"), Q = U("KAlert"), A = U("KButton"), N = U("KCard");
|
|
2907
2906
|
return b(), D(N, { class: "kong-ui-entity-base-form" }, {
|
|
2908
2907
|
body: p(() => [
|
|
2909
|
-
|
|
2908
|
+
i.value ? (b(), D(_, {
|
|
2910
2909
|
key: 0,
|
|
2911
2910
|
type: "form"
|
|
2912
2911
|
})) : u.value ? (b(), D(q, {
|
|
2913
2912
|
key: 1,
|
|
2914
|
-
"cta-text": c(
|
|
2913
|
+
"cta-text": c(n)("baseForm.actions.back"),
|
|
2915
2914
|
"data-testid": "form-fetch-error",
|
|
2916
2915
|
"handle-click": k,
|
|
2917
2916
|
"is-error": !0
|
|
@@ -2942,7 +2941,7 @@ const go = {
|
|
|
2942
2941
|
type: "reset"
|
|
2943
2942
|
}, {
|
|
2944
2943
|
default: p(() => [
|
|
2945
|
-
G(C(c(
|
|
2944
|
+
G(C(c(n)("baseForm.actions.cancel")), 1)
|
|
2946
2945
|
]),
|
|
2947
2946
|
_: 1
|
|
2948
2947
|
}, 8, ["disabled"]),
|
|
@@ -2953,7 +2952,7 @@ const go = {
|
|
|
2953
2952
|
type: "submit"
|
|
2954
2953
|
}, {
|
|
2955
2954
|
default: p(() => [
|
|
2956
|
-
G(C(c(
|
|
2955
|
+
G(C(c(n)("baseForm.actions.save")), 1)
|
|
2957
2956
|
]),
|
|
2958
2957
|
_: 1
|
|
2959
2958
|
}, 8, ["disabled"])
|
|
@@ -2978,38 +2977,38 @@ const go = {
|
|
|
2978
2977
|
}
|
|
2979
2978
|
},
|
|
2980
2979
|
setup(e) {
|
|
2981
|
-
const a = e, t =
|
|
2980
|
+
const a = e, t = O(() => {
|
|
2982
2981
|
var g;
|
|
2983
2982
|
return ((g = a.rowEl) == null ? void 0 : g.querySelector(`[data-testid="${a.keyName}"]`)) || null;
|
|
2984
|
-
}), l =
|
|
2983
|
+
}), l = O(() => {
|
|
2985
2984
|
var g;
|
|
2986
2985
|
return ((g = t.value) == null ? void 0 : g.querySelector('[role="button"]')) || null;
|
|
2987
|
-
}), s =
|
|
2986
|
+
}), s = O(() => {
|
|
2988
2987
|
var g, m;
|
|
2989
2988
|
const H = (g = a.rowEl) == null ? void 0 : g.querySelectorAll("td");
|
|
2990
2989
|
return H ? ((m = H[0]) == null ? void 0 : m.getAttribute("data-testid")) === a.keyName : !1;
|
|
2991
2990
|
});
|
|
2992
|
-
let
|
|
2991
|
+
let n;
|
|
2993
2992
|
const o = () => {
|
|
2994
|
-
|
|
2993
|
+
n && (n.disconnect(), n = void 0);
|
|
2995
2994
|
}, d = () => {
|
|
2996
2995
|
var g, m, H;
|
|
2997
|
-
u.value = ((g = l.value) == null ? void 0 : g.getBoundingClientRect().width) || 0, f.value = ((m = t.value) == null ? void 0 : m.clientWidth) || 0, h.value = ((H =
|
|
2998
|
-
},
|
|
2999
|
-
|
|
2996
|
+
u.value = ((g = l.value) == null ? void 0 : g.getBoundingClientRect().width) || 0, f.value = ((m = t.value) == null ? void 0 : m.clientWidth) || 0, h.value = ((H = i.value) == null ? void 0 : H.innerText) || "";
|
|
2997
|
+
}, i = B({}), u = B(0), f = B(0), h = B(""), r = O(() => [l.value, t.value]), k = ye(
|
|
2998
|
+
r,
|
|
3000
2999
|
(g) => {
|
|
3001
3000
|
if (s.value && (o(), "ResizeObserver" in window && window)) {
|
|
3002
|
-
|
|
3001
|
+
n = new ResizeObserver((m) => {
|
|
3003
3002
|
window.requestAnimationFrame(() => {
|
|
3004
3003
|
!Array.isArray(m) || !m.length || d();
|
|
3005
3004
|
});
|
|
3006
3005
|
});
|
|
3007
3006
|
for (const m of g)
|
|
3008
|
-
m &&
|
|
3007
|
+
m && n.observe(m);
|
|
3009
3008
|
}
|
|
3010
3009
|
},
|
|
3011
3010
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3012
|
-
), S =
|
|
3011
|
+
), S = O(() => s.value ? u.value > f.value : !1);
|
|
3013
3012
|
return js(() => {
|
|
3014
3013
|
d();
|
|
3015
3014
|
}), Bs(() => {
|
|
@@ -3018,7 +3017,7 @@ const go = {
|
|
|
3018
3017
|
const H = U("KTooltip");
|
|
3019
3018
|
return b(), K("span", {
|
|
3020
3019
|
ref_key: "contentRef",
|
|
3021
|
-
ref:
|
|
3020
|
+
ref: i,
|
|
3022
3021
|
class: "content-wrapper"
|
|
3023
3022
|
}, [
|
|
3024
3023
|
s.value ? (b(), K("span", Lo, [
|
|
@@ -3149,7 +3148,7 @@ const go = {
|
|
|
3149
3148
|
},
|
|
3150
3149
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3151
3150
|
setup(e, { emit: a }) {
|
|
3152
|
-
const t = e, { i18n: { t: l } } = de.useI18n(), s =
|
|
3151
|
+
const t = e, { i18n: { t: l } } = de.useI18n(), s = O(() => t.cacheIdentifier || t.preferencesStorageKey), n = (q) => q.hasData || !!t.query, o = O(() => {
|
|
3153
3152
|
const q = [];
|
|
3154
3153
|
return Object.keys(t.tableHeaders).forEach((Q) => {
|
|
3155
3154
|
const A = t.tableHeaders[Q];
|
|
@@ -3166,9 +3165,9 @@ const go = {
|
|
|
3166
3165
|
"data-rowid": q.id,
|
|
3167
3166
|
"data-testid": q.name,
|
|
3168
3167
|
...t.rowAttributes(q)
|
|
3169
|
-
}),
|
|
3168
|
+
}), i = B({}), u = (q) => {
|
|
3170
3169
|
var Q;
|
|
3171
|
-
return (Q =
|
|
3170
|
+
return (Q = i.value) == null ? void 0 : Q.$el.querySelector(`[data-rowid="${q.id}"]`);
|
|
3172
3171
|
}, f = (q) => {
|
|
3173
3172
|
const Q = {
|
|
3174
3173
|
"data-testid": q.headerKey,
|
|
@@ -3180,14 +3179,14 @@ const go = {
|
|
|
3180
3179
|
textOverflow: "ellipsis"
|
|
3181
3180
|
}), Q;
|
|
3182
3181
|
}, h = () => {
|
|
3183
|
-
a("empty-state-cta-clicked"),
|
|
3184
|
-
},
|
|
3182
|
+
a("empty-state-cta-clicked"), r();
|
|
3183
|
+
}, r = () => {
|
|
3185
3184
|
a("clear-search-input");
|
|
3186
|
-
}, k =
|
|
3185
|
+
}, k = O(() => t.disableRowClick ? void 0 : (q, Q) => {
|
|
3187
3186
|
a("click:row", Q);
|
|
3188
3187
|
}), S = (q) => {
|
|
3189
3188
|
a("sort", q);
|
|
3190
|
-
}, { setTablePreferences: g, getTablePreferences: m } = Qs(), H =
|
|
3189
|
+
}, { setTablePreferences: g, getTablePreferences: m } = Qs(), H = O(() => {
|
|
3191
3190
|
const q = m(t.preferencesStorageKey);
|
|
3192
3191
|
return {
|
|
3193
3192
|
...t.initialFetcherParams,
|
|
@@ -3197,15 +3196,15 @@ const go = {
|
|
|
3197
3196
|
t.preferencesStorageKey && g(t.preferencesStorageKey, q);
|
|
3198
3197
|
};
|
|
3199
3198
|
return (q, Q) => {
|
|
3200
|
-
const A = U("KIcon"), N = U("KButton"), P = U("KDropdownMenu"),
|
|
3199
|
+
const A = U("KIcon"), N = U("KButton"), P = U("KDropdownMenu"), F = U("KTable"), M = U("KCard");
|
|
3201
3200
|
return b(), D(M, {
|
|
3202
3201
|
class: "kong-ui-entity-base-table",
|
|
3203
3202
|
title: e.title
|
|
3204
3203
|
}, {
|
|
3205
3204
|
body: p(() => [
|
|
3206
|
-
y(
|
|
3205
|
+
y(F, {
|
|
3207
3206
|
ref_key: "tableRefs",
|
|
3208
|
-
ref:
|
|
3207
|
+
ref: i,
|
|
3209
3208
|
"cache-identifier": s.value,
|
|
3210
3209
|
"cell-attrs": f,
|
|
3211
3210
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
@@ -3241,7 +3240,7 @@ const go = {
|
|
|
3241
3240
|
ae(q.$slots, "toolbar-button", {}, void 0, !0)
|
|
3242
3241
|
])) : Y("", !0)
|
|
3243
3242
|
], 512), [
|
|
3244
|
-
[tt,
|
|
3243
|
+
[tt, n(I)]
|
|
3245
3244
|
])
|
|
3246
3245
|
]),
|
|
3247
3246
|
actions: p(({ row: I, rowKey: L, rowValue: V }) => [
|
|
@@ -3268,7 +3267,7 @@ const go = {
|
|
|
3268
3267
|
}, {
|
|
3269
3268
|
icon: p(() => [
|
|
3270
3269
|
y(A, {
|
|
3271
|
-
color: c(
|
|
3270
|
+
color: c(Ur),
|
|
3272
3271
|
icon: "more",
|
|
3273
3272
|
size: "16"
|
|
3274
3273
|
}, null, 8, ["color"])
|
|
@@ -3353,12 +3352,12 @@ const go = {
|
|
|
3353
3352
|
},
|
|
3354
3353
|
emits: ["cancel", "proceed"],
|
|
3355
3354
|
setup(e, { emit: a }) {
|
|
3356
|
-
const t = e, { i18nT: l } = de.useI18n(), s =
|
|
3355
|
+
const t = e, { i18nT: l } = de.useI18n(), s = O(() => t.needConfirm ? t.entityName : ""), n = () => {
|
|
3357
3356
|
a("cancel");
|
|
3358
3357
|
}, o = () => {
|
|
3359
3358
|
a("proceed");
|
|
3360
3359
|
};
|
|
3361
|
-
return (d,
|
|
3360
|
+
return (d, i) => {
|
|
3362
3361
|
const u = U("KAlert"), f = U("KPrompt");
|
|
3363
3362
|
return b(), D(f, {
|
|
3364
3363
|
"action-button-text": "Yes, delete",
|
|
@@ -3368,7 +3367,7 @@ const go = {
|
|
|
3368
3367
|
"is-visible": e.visible,
|
|
3369
3368
|
title: e.title,
|
|
3370
3369
|
type: "danger",
|
|
3371
|
-
onCanceled:
|
|
3370
|
+
onCanceled: n,
|
|
3372
3371
|
onProceed: o
|
|
3373
3372
|
}, {
|
|
3374
3373
|
"body-content": p(() => [
|
|
@@ -3408,7 +3407,7 @@ const go = {
|
|
|
3408
3407
|
}, 8, ["action-pending", "confirmation-text", "is-visible", "title"]);
|
|
3409
3408
|
};
|
|
3410
3409
|
}
|
|
3411
|
-
}),
|
|
3410
|
+
}), Fs = /* @__PURE__ */ be(Go, [["__scopeId", "data-v-1c9a2a07"]]), Zo = {
|
|
3412
3411
|
fill: "none",
|
|
3413
3412
|
height: "20",
|
|
3414
3413
|
viewBox: "0 0 20 20",
|
|
@@ -3427,7 +3426,7 @@ const go = {
|
|
|
3427
3426
|
props: {
|
|
3428
3427
|
color: {
|
|
3429
3428
|
type: String,
|
|
3430
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3429
|
+
default: `var(--kong-ui-entity-filter-color, ${Fr})`
|
|
3431
3430
|
}
|
|
3432
3431
|
},
|
|
3433
3432
|
setup(e) {
|
|
@@ -3450,7 +3449,7 @@ const go = {
|
|
|
3450
3449
|
}), su = {
|
|
3451
3450
|
key: 1,
|
|
3452
3451
|
class: "kong-ui-entity-filter"
|
|
3453
|
-
},
|
|
3452
|
+
}, ru = { class: "menu-item-title" }, iu = { class: "menu-item-indicator" }, nu = { class: "menu-item-body" }, ou = ["for"], uu = { class: "menu-item-buttons" }, cu = /* @__PURE__ */ le({
|
|
3454
3453
|
__name: "EntityFilter",
|
|
3455
3454
|
props: {
|
|
3456
3455
|
// filter config, either exact match or fuzzy match
|
|
@@ -3470,12 +3469,12 @@ const go = {
|
|
|
3470
3469
|
},
|
|
3471
3470
|
emits: ["update:modelValue"],
|
|
3472
3471
|
setup(e, { emit: a }) {
|
|
3473
|
-
const t = e, { i18n: { t: l } } = de.useI18n(), s = B(!1),
|
|
3472
|
+
const t = e, { i18n: { t: l } } = de.useI18n(), s = B(!1), n = B({}), o = O(() => {
|
|
3474
3473
|
const m = [];
|
|
3475
3474
|
return new URLSearchParams(t.modelValue).forEach((H, _) => {
|
|
3476
3475
|
H !== "" && m.push(_);
|
|
3477
3476
|
}), m;
|
|
3478
|
-
}), d =
|
|
3477
|
+
}), d = O(() => {
|
|
3479
3478
|
const m = t.config.fields;
|
|
3480
3479
|
return Object.keys(m).filter((H) => m[H].searchable).map((H) => ({
|
|
3481
3480
|
label: m[H].label || H,
|
|
@@ -3483,11 +3482,11 @@ const go = {
|
|
|
3483
3482
|
}));
|
|
3484
3483
|
});
|
|
3485
3484
|
ye(() => t.modelValue, (m) => {
|
|
3486
|
-
|
|
3487
|
-
|
|
3485
|
+
n.value = {}, new URLSearchParams(m).forEach((H, _) => {
|
|
3486
|
+
n.value[_] = H;
|
|
3488
3487
|
});
|
|
3489
3488
|
});
|
|
3490
|
-
const
|
|
3489
|
+
const i = () => {
|
|
3491
3490
|
s.value = !s.value;
|
|
3492
3491
|
}, u = (m) => {
|
|
3493
3492
|
a("update:modelValue", m);
|
|
@@ -3497,18 +3496,18 @@ const go = {
|
|
|
3497
3496
|
value: q,
|
|
3498
3497
|
label: q
|
|
3499
3498
|
}));
|
|
3500
|
-
},
|
|
3499
|
+
}, r = (m) => {
|
|
3501
3500
|
var H, _;
|
|
3502
3501
|
return ((_ = (H = t.config.schema) == null ? void 0 : H[m]) == null ? void 0 : _.type) ?? "text";
|
|
3503
3502
|
}, k = (m) => {
|
|
3504
|
-
|
|
3505
|
-
...
|
|
3503
|
+
n.value = {
|
|
3504
|
+
...n.value,
|
|
3506
3505
|
[m]: ""
|
|
3507
3506
|
}, g();
|
|
3508
3507
|
}, S = () => {
|
|
3509
|
-
|
|
3508
|
+
n.value = {}, g(!0);
|
|
3510
3509
|
}, g = (m = !1) => {
|
|
3511
|
-
const H = Object.keys(
|
|
3510
|
+
const H = Object.keys(n.value).reduce((_, q) => (n.value[q] && (_[q] = `${n.value[q]}`), _), {});
|
|
3512
3511
|
m && (s.value = !1), a("update:modelValue", new URLSearchParams(H).toString());
|
|
3513
3512
|
};
|
|
3514
3513
|
return (m, H) => {
|
|
@@ -3531,7 +3530,7 @@ const go = {
|
|
|
3531
3530
|
appearance: "btn-link",
|
|
3532
3531
|
"data-testid": "filter-button",
|
|
3533
3532
|
icon: "filter",
|
|
3534
|
-
onClick:
|
|
3533
|
+
onClick: i
|
|
3535
3534
|
}, {
|
|
3536
3535
|
default: p(() => [
|
|
3537
3536
|
G(C(c(l)("filter.filterButtonText")) + " " + C(o.value.length > 0 ? `(${o.value.length})` : ""), 1)
|
|
@@ -3540,22 +3539,22 @@ const go = {
|
|
|
3540
3539
|
}),
|
|
3541
3540
|
et(x("div", {
|
|
3542
3541
|
class: "kong-ui-entity-filter-backdrop",
|
|
3543
|
-
onClick:
|
|
3542
|
+
onClick: i
|
|
3544
3543
|
}, null, 512), [
|
|
3545
3544
|
[tt, s.value]
|
|
3546
3545
|
]),
|
|
3547
3546
|
et(y(N, { class: "kong-ui-entity-filter-menu" }, {
|
|
3548
3547
|
body: p(() => [
|
|
3549
|
-
(b(!0), K(ce, null, me(d.value, (P,
|
|
3548
|
+
(b(!0), K(ce, null, me(d.value, (P, F) => (b(), D(A, {
|
|
3550
3549
|
key: P.value,
|
|
3551
3550
|
"data-testid": P.value,
|
|
3552
3551
|
expandable: "",
|
|
3553
|
-
"last-menu-item":
|
|
3552
|
+
"last-menu-item": F === d.value.length - 1
|
|
3554
3553
|
}, {
|
|
3555
3554
|
itemTitle: p(() => [
|
|
3556
|
-
x("span",
|
|
3555
|
+
x("span", ru, [
|
|
3557
3556
|
G(C(P.label) + " ", 1),
|
|
3558
|
-
et(x("span",
|
|
3557
|
+
et(x("span", iu, null, 512), [
|
|
3559
3558
|
[tt, o.value.includes(P.value)]
|
|
3560
3559
|
])
|
|
3561
3560
|
])
|
|
@@ -3563,7 +3562,7 @@ const go = {
|
|
|
3563
3562
|
itemBody: p(() => {
|
|
3564
3563
|
var M, I;
|
|
3565
3564
|
return [
|
|
3566
|
-
x("div",
|
|
3565
|
+
x("div", nu, [
|
|
3567
3566
|
x("label", {
|
|
3568
3567
|
class: "menu-item-label",
|
|
3569
3568
|
for: f(P.value)
|
|
@@ -3571,20 +3570,20 @@ const go = {
|
|
|
3571
3570
|
((I = (M = e.config.schema) == null ? void 0 : M[P.value]) == null ? void 0 : I.type) === "select" ? (b(), D(Q, {
|
|
3572
3571
|
key: 0,
|
|
3573
3572
|
id: f(P.value),
|
|
3574
|
-
modelValue:
|
|
3575
|
-
"onUpdate:modelValue": (L) =>
|
|
3573
|
+
modelValue: n.value[P.value],
|
|
3574
|
+
"onUpdate:modelValue": (L) => n.value[P.value] = L,
|
|
3576
3575
|
appearance: "select",
|
|
3577
3576
|
items: h(P.value),
|
|
3578
3577
|
placeholder: c(l)("filter.selectPlaceholder")
|
|
3579
3578
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (b(), D(_, {
|
|
3580
3579
|
key: 1,
|
|
3581
3580
|
id: f(P.value),
|
|
3582
|
-
modelValue:
|
|
3583
|
-
"onUpdate:modelValue": (L) =>
|
|
3581
|
+
modelValue: n.value[P.value],
|
|
3582
|
+
"onUpdate:modelValue": (L) => n.value[P.value] = L,
|
|
3584
3583
|
autocomplete: "off",
|
|
3585
3584
|
placeholder: c(l)("filter.inputPlaceholder"),
|
|
3586
3585
|
size: "small",
|
|
3587
|
-
type:
|
|
3586
|
+
type: r(P.value)
|
|
3588
3587
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
3589
3588
|
]),
|
|
3590
3589
|
x("div", uu, [
|
|
@@ -3653,10 +3652,10 @@ const go = {
|
|
|
3653
3652
|
}
|
|
3654
3653
|
},
|
|
3655
3654
|
setup(e) {
|
|
3656
|
-
const a = e, t = B(void 0), l =
|
|
3655
|
+
const a = e, t = B(void 0), l = O(() => t.value === !0 || t.value !== void 0 && a.forceShow === !0);
|
|
3657
3656
|
return ye(() => a.authFunction, async () => {
|
|
3658
3657
|
t.value = await a.authFunction();
|
|
3659
|
-
}, { immediate: !0 }), (s,
|
|
3658
|
+
}, { immediate: !0 }), (s, n) => l.value ? ae(s.$slots, "default", {
|
|
3660
3659
|
key: 0,
|
|
3661
3660
|
isAllowed: t.value
|
|
3662
3661
|
}) : Y("", !0);
|
|
@@ -3720,7 +3719,7 @@ const go = {
|
|
|
3720
3719
|
])
|
|
3721
3720
|
], 2));
|
|
3722
3721
|
}
|
|
3723
|
-
}), Xe = /* @__PURE__ */ be(yu, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: ht, useDeleteUrlBuilder:
|
|
3722
|
+
}), Xe = /* @__PURE__ */ be(yu, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: ht, useDeleteUrlBuilder: Os, useErrors: Us, useFetchUrlBuilder: Sc, useFetcher: qs, useDebouncedFilter: Ol, useStringHelpers: Ic, useHelpers: vu, useGatewayFeatureSupported: xc } = de, bu = {
|
|
3724
3723
|
list: {
|
|
3725
3724
|
table_headers: {
|
|
3726
3725
|
id: "ID",
|
|
@@ -4090,8 +4089,8 @@ function Ge(e) {
|
|
|
4090
4089
|
const { replaceId: a = !1 } = e, t = B([]);
|
|
4091
4090
|
return {
|
|
4092
4091
|
addedItems: t,
|
|
4093
|
-
trackNewItems: (s,
|
|
4094
|
-
if (
|
|
4092
|
+
trackNewItems: (s, n) => {
|
|
4093
|
+
if (n) {
|
|
4095
4094
|
const o = { ...s };
|
|
4096
4095
|
a && (o.value = s.label), t.value.push(o);
|
|
4097
4096
|
} else
|
|
@@ -4468,15 +4467,15 @@ const ut = [
|
|
|
4468
4467
|
label: "599",
|
|
4469
4468
|
value: "599"
|
|
4470
4469
|
}
|
|
4471
|
-
], Ht = 10, Tt = 65536, wu = 0, Su = 65535, Be = 0, Ee = 255, $s = 0, Ms = 255, Iu = 0, xu = 65535, Ul = 0, ql = 65535, Hu = 0, Tu = 2 ** 31, At = ["200", "302"],
|
|
4470
|
+
], Ht = 10, Tt = 65536, wu = 0, Su = 65535, Be = 0, Ee = 255, $s = 0, Ms = 255, Iu = 0, xu = 65535, Ul = 0, ql = 65535, Hu = 0, Tu = 2 ** 31, At = ["200", "302"], Ft = ["200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "306", "307", "308"], Ot = ["429", "404", "500", "501", "502", "503", "504", "505"], Ut = ["429", "500", "503"];
|
|
4472
4471
|
function pt() {
|
|
4473
|
-
const e = (
|
|
4474
|
-
if (e(
|
|
4475
|
-
const h = Number(
|
|
4472
|
+
const e = (i) => /^\d+$/.test(i), a = (i, u, f) => {
|
|
4473
|
+
if (e(i)) {
|
|
4474
|
+
const h = Number(i);
|
|
4476
4475
|
return h >= u && h <= f;
|
|
4477
4476
|
} else
|
|
4478
4477
|
return !1;
|
|
4479
|
-
}, t = (
|
|
4478
|
+
}, t = (i) => i.map((u) => Number(u)), l = (i) => i.map((u) => u.toString()), s = () => ({
|
|
4480
4479
|
name: "",
|
|
4481
4480
|
hostHeader: "",
|
|
4482
4481
|
clientCertificate: "",
|
|
@@ -4510,13 +4509,13 @@ function pt() {
|
|
|
4510
4509
|
unhealthyInterval: "0",
|
|
4511
4510
|
httpFailures: "5",
|
|
4512
4511
|
tcpFailures: "5",
|
|
4513
|
-
unhealthyHttpStatuses:
|
|
4512
|
+
unhealthyHttpStatuses: Ot,
|
|
4514
4513
|
unhealthyTimeouts: "0"
|
|
4515
4514
|
},
|
|
4516
4515
|
passiveHealthCheck: {
|
|
4517
4516
|
type: "http",
|
|
4518
4517
|
successes: "0",
|
|
4519
|
-
httpStatuses:
|
|
4518
|
+
httpStatuses: Ft,
|
|
4520
4519
|
timeouts: "0",
|
|
4521
4520
|
httpFailures: "5",
|
|
4522
4521
|
unhealthyHttpStatuses: Ut,
|
|
@@ -4528,20 +4527,20 @@ function pt() {
|
|
|
4528
4527
|
inRange: a,
|
|
4529
4528
|
stringToNumberArray: t,
|
|
4530
4529
|
numberToStringArray: l,
|
|
4531
|
-
upstreamsResponseToFields: (
|
|
4532
|
-
var f, h,
|
|
4530
|
+
upstreamsResponseToFields: (i) => {
|
|
4531
|
+
var f, h, r, k, S, g, m, H, _, q, Q, A, N, P, F, M, I, L, V, Z, j, J, X, $, R, W, z, T, v, w, ee, re, ve, te, ne, Oe, Re, qe, Dt, Jt, zt, Wt, Qt, Yt, Gt, Zt, Xt, ea, ta, aa, la, sa, ra, ia, na, oa, ua, ca, da, ha, pa, fa, ma, ga, ya, va, ba, ka, _a, Ca, wa, Sa, Ia, xa, Ha, Ta, Aa, Fa, Oa, Ua, qa, $a, Ma, Ka, Na, Pa, ja, Ba, Ea, La, Va, Ra, Da, Ja, za, Wa, Qa, Ya, Ga, Za, Xa, el, tl, al, ll, sl, rl, il, nl;
|
|
4533
4532
|
const u = s();
|
|
4534
|
-
return u.name =
|
|
4533
|
+
return u.name = i.name || "", u.algorithm = i.algorithm || "round-robin", u.hostHeader = i.host_header || "", u.clientCertificate = i.client_certificate ? (f = i.client_certificate) == null ? void 0 : f.id : "", u.tags = ((h = i.tags) == null ? void 0 : h.join(", ")) || "", u.slots = i.slots !== null && i.slots !== void 0 ? i.slots.toString() : "10000", u.hashOn = i.hash_on || "none", u.hashFallback = i.hash_fallback || "none", u.hashOnHeader = i.hash_on_header || "", u.hashOnCookie = i.hash_on_cookie || "", u.hashOnCookiePath = i.hash_on_cookie_path || "/", u.hashOnQueryArgument = i.hash_on_query_arg || "", u.hashOnUriCapture = i.hash_on_uri_capture || "", u.hashFallbackHeader = i.hash_fallback_header || "", u.hashFallbackQueryArgument = i.hash_fallback_query_arg || "", u.hashFallbackUriCapture = i.hash_fallback_uri_capture || "", u.healthchecksThreshold = i.healthchecks.threshold !== null && i.healthchecks.threshold !== void 0 ? i.healthchecks.threshold.toString() : "", u.activeHealthSwitch = ((k = (r = i.healthchecks.active) == null ? void 0 : r.healthy) == null ? void 0 : k.interval) !== 0 || ((g = (S = i.healthchecks.active) == null ? void 0 : S.unhealthy) == null ? void 0 : g.interval) !== 0, u.activeHealthCheck.type = ((m = i.healthchecks.active) == null ? void 0 : m.type) || "http", u.activeHealthCheck.httpPath = ((H = i.healthchecks.active) == null ? void 0 : H.http_path) || "/", u.activeHealthCheck.timeout = ((_ = i.healthchecks.active) == null ? void 0 : _.timeout) !== null && ((q = i.healthchecks.active) == null ? void 0 : q.timeout) !== void 0 ? (A = (Q = i.healthchecks.active) == null ? void 0 : Q.timeout) == null ? void 0 : A.toString() : "", u.activeHealthCheck.concurrency = ((N = i.healthchecks.active) == null ? void 0 : N.concurrency) !== null && ((P = i.healthchecks.active) == null ? void 0 : P.concurrency) !== void 0 ? (M = (F = i.healthchecks.active) == null ? void 0 : F.concurrency) == null ? void 0 : M.toString() : "", u.activeHealthCheck.httpsSni = ((I = i.healthchecks.active) == null ? void 0 : I.https_sni) || "", u.activeHealthCheck.verifySsl = ((L = i.healthchecks.active) == null ? void 0 : L.https_verify_certificate) || !1, u.activeHealthCheck.headers = (V = i.healthchecks.active) != null && V.headers && Object.entries((Z = i.healthchecks.active) == null ? void 0 : Z.headers).length > 0 ? Object.entries((j = i.healthchecks.active) == null ? void 0 : j.headers).map(([Ks, mt]) => ({ key: Ks, values: mt == null ? void 0 : mt.join(", ") })) : [{ key: "", values: "" }], u.activeHealthCheck.interval = ((X = (J = i.healthchecks.active) == null ? void 0 : J.healthy) == null ? void 0 : X.interval) !== null && ((R = ($ = i.healthchecks.active) == null ? void 0 : $.healthy) == null ? void 0 : R.interval) !== void 0 ? (T = (z = (W = i.healthchecks.active) == null ? void 0 : W.healthy) == null ? void 0 : z.interval) == null ? void 0 : T.toString() : "0", u.activeHealthCheck.interval = ((w = (v = i.healthchecks.active) == null ? void 0 : v.healthy) == null ? void 0 : w.interval) !== null && ((re = (ee = i.healthchecks.active) == null ? void 0 : ee.healthy) == null ? void 0 : re.interval) !== void 0 ? (ne = (te = (ve = i.healthchecks.active) == null ? void 0 : ve.healthy) == null ? void 0 : te.interval) == null ? void 0 : ne.toString() : "0", u.activeHealthCheck.successes = ((Re = (Oe = i.healthchecks.active) == null ? void 0 : Oe.healthy) == null ? void 0 : Re.successes) !== null && ((Dt = (qe = i.healthchecks.active) == null ? void 0 : qe.healthy) == null ? void 0 : Dt.successes) !== void 0 ? (Wt = (zt = (Jt = i.healthchecks.active) == null ? void 0 : Jt.healthy) == null ? void 0 : zt.successes) == null ? void 0 : Wt.toString() : "0", u.activeHealthCheck.httpStatuses = (Yt = (Qt = i.healthchecks.active) == null ? void 0 : Qt.healthy) != null && Yt.http_statuses ? l(((Zt = (Gt = i.healthchecks.active) == null ? void 0 : Gt.healthy) == null ? void 0 : Zt.http_statuses) || []) : At, u.activeHealthCheck.unhealthyInterval = ((ea = (Xt = i.healthchecks.active) == null ? void 0 : Xt.unhealthy) == null ? void 0 : ea.interval) !== null && ((aa = (ta = i.healthchecks.active) == null ? void 0 : ta.unhealthy) == null ? void 0 : aa.interval) !== void 0 ? (ra = (sa = (la = i.healthchecks.active) == null ? void 0 : la.unhealthy) == null ? void 0 : sa.interval) == null ? void 0 : ra.toString() : "0", u.activeHealthCheck.httpFailures = ((na = (ia = i.healthchecks.active) == null ? void 0 : ia.unhealthy) == null ? void 0 : na.http_failures) !== null && ((ua = (oa = i.healthchecks.active) == null ? void 0 : oa.unhealthy) == null ? void 0 : ua.http_failures) !== void 0 ? (ha = (da = (ca = i.healthchecks.active) == null ? void 0 : ca.unhealthy) == null ? void 0 : da.http_failures) == null ? void 0 : ha.toString() : "0", u.activeHealthCheck.unhealthyTimeouts = ((fa = (pa = i.healthchecks.active) == null ? void 0 : pa.unhealthy) == null ? void 0 : fa.timeouts) !== null && ((ga = (ma = i.healthchecks.active) == null ? void 0 : ma.unhealthy) == null ? void 0 : ga.timeouts) !== void 0 ? (ba = (va = (ya = i.healthchecks.active) == null ? void 0 : ya.unhealthy) == null ? void 0 : va.timeouts) == null ? void 0 : ba.toString() : "0", u.activeHealthCheck.unhealthyHttpStatuses = (_a = (ka = i.healthchecks.active) == null ? void 0 : ka.unhealthy) != null && _a.http_statuses ? l(((wa = (Ca = i.healthchecks.active) == null ? void 0 : Ca.unhealthy) == null ? void 0 : wa.http_statuses) || []) : Ot, u.passiveHealthSwitch = ((Ia = (Sa = i.healthchecks.passive) == null ? void 0 : Sa.healthy) == null ? void 0 : Ia.successes) !== 0 || ((Ha = (xa = i.healthchecks.passive) == null ? void 0 : xa.unhealthy) == null ? void 0 : Ha.timeouts) !== 0 || ((Aa = (Ta = i.healthchecks.passive) == null ? void 0 : Ta.unhealthy) == null ? void 0 : Aa.tcp_failures) !== 0 || ((Oa = (Fa = i.healthchecks.passive) == null ? void 0 : Fa.unhealthy) == null ? void 0 : Oa.http_failures) !== 0, u.passiveHealthCheck.type = ((Ua = i.healthchecks.passive) == null ? void 0 : Ua.type) || "http", u.passiveHealthCheck.successes = (($a = (qa = i.healthchecks.passive) == null ? void 0 : qa.healthy) == null ? void 0 : $a.successes) !== null && ((Ka = (Ma = i.healthchecks.passive) == null ? void 0 : Ma.healthy) == null ? void 0 : Ka.successes) !== void 0 ? (ja = (Pa = (Na = i.healthchecks.passive) == null ? void 0 : Na.healthy) == null ? void 0 : Pa.successes) == null ? void 0 : ja.toString() : "0", u.passiveHealthCheck.httpStatuses = (Ea = (Ba = i.healthchecks.passive) == null ? void 0 : Ba.healthy) != null && Ea.http_statuses ? l(((Va = (La = i.healthchecks.passive) == null ? void 0 : La.healthy) == null ? void 0 : Va.http_statuses) || []) : Ft, u.passiveHealthCheck.timeouts = ((Da = (Ra = i.healthchecks.passive) == null ? void 0 : Ra.unhealthy) == null ? void 0 : Da.timeouts) !== null && ((za = (Ja = i.healthchecks.passive) == null ? void 0 : Ja.unhealthy) == null ? void 0 : za.timeouts) !== void 0 ? (Ya = (Qa = (Wa = i.healthchecks.passive) == null ? void 0 : Wa.unhealthy) == null ? void 0 : Qa.timeouts) == null ? void 0 : Ya.toString() : "0", u.passiveHealthCheck.tcpFailures = ((Za = (Ga = i.healthchecks.passive) == null ? void 0 : Ga.unhealthy) == null ? void 0 : Za.tcp_failures) !== null && ((el = (Xa = i.healthchecks.passive) == null ? void 0 : Xa.unhealthy) == null ? void 0 : el.tcp_failures) !== void 0 ? (ll = (al = (tl = i.healthchecks.passive) == null ? void 0 : tl.unhealthy) == null ? void 0 : al.tcp_failures) == null ? void 0 : ll.toString() : "", u.passiveHealthCheck.unhealthyHttpStatuses = (rl = (sl = i.healthchecks.passive) == null ? void 0 : sl.unhealthy) != null && rl.http_statuses ? l(((nl = (il = i.healthchecks.passive) == null ? void 0 : il.unhealthy) == null ? void 0 : nl.http_statuses) || []) : Ut, u;
|
|
4535
4534
|
},
|
|
4536
4535
|
getDefaultUpstreamFields: s,
|
|
4537
|
-
objectsAreEqual: (
|
|
4536
|
+
objectsAreEqual: (i, u) => {
|
|
4538
4537
|
try {
|
|
4539
|
-
return JSON.stringify(
|
|
4538
|
+
return JSON.stringify(i) === JSON.stringify(u);
|
|
4540
4539
|
} catch {
|
|
4541
4540
|
return !1;
|
|
4542
4541
|
}
|
|
4543
4542
|
},
|
|
4544
|
-
cloneDeep: (
|
|
4543
|
+
cloneDeep: (i) => JSON.parse(JSON.stringify(i))
|
|
4545
4544
|
};
|
|
4546
4545
|
}
|
|
4547
4546
|
const Se = {
|
|
@@ -4570,7 +4569,7 @@ const Se = {
|
|
|
4570
4569
|
}
|
|
4571
4570
|
}
|
|
4572
4571
|
};
|
|
4573
|
-
const Au = { class: "kong-ui-entities-upstreams-list" },
|
|
4572
|
+
const Au = { class: "kong-ui-entities-upstreams-list" }, Fu = { class: "upstream-name" }, Ou = /* @__PURE__ */ le({
|
|
4574
4573
|
__name: "UpstreamsList",
|
|
4575
4574
|
props: {
|
|
4576
4575
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4612,24 +4611,24 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4612
4611
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
4613
4612
|
setup(e, { emit: a }) {
|
|
4614
4613
|
var X;
|
|
4615
|
-
const t = e, { i18n: { t: l } } = Se.useI18n(), s = $t(), { axiosInstance:
|
|
4614
|
+
const t = e, { i18n: { t: l } } = Se.useI18n(), s = $t(), { axiosInstance: n } = ht({
|
|
4616
4615
|
headers: (X = t.config) == null ? void 0 : X.requestHeaders
|
|
4617
|
-
}), o = B(1), d =
|
|
4616
|
+
}), o = B(1), d = O(() => t.config.app !== "kongManager" || !!t.config.disableSorting), i = {
|
|
4618
4617
|
name: { label: l("upstreams.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4619
4618
|
slots: { label: l("upstreams.list.table_headers.slots"), searchable: !0, sortable: !0 },
|
|
4620
4619
|
tags: { label: l("upstreams.list.table_headers.tags"), sortable: !1 }
|
|
4621
|
-
}, u =
|
|
4620
|
+
}, u = i, f = O(() => {
|
|
4622
4621
|
var R, W;
|
|
4623
4622
|
let $ = `${t.config.apiBaseUrl}${Ve.list[t.config.app]}`;
|
|
4624
4623
|
return t.config.app === "konnect" ? $ = $.replace(/{controlPlaneId}/gi, ((R = t.config) == null ? void 0 : R.controlPlaneId) || "") : t.config.app === "kongManager" && ($ = $.replace(/\/{workspace}/gi, (W = t.config) != null && W.workspace ? `/${t.config.workspace}` : "")), $;
|
|
4625
|
-
}), h = B(""),
|
|
4624
|
+
}), h = B(""), r = O(() => {
|
|
4626
4625
|
const $ = t.config.app === "konnect" || t.config.isExactMatch;
|
|
4627
4626
|
if ($)
|
|
4628
4627
|
return {
|
|
4629
4628
|
isExactMatch: $,
|
|
4630
4629
|
placeholder: l("upstreams.search.placeholder")
|
|
4631
4630
|
};
|
|
4632
|
-
const { name: R, slots: W } =
|
|
4631
|
+
const { name: R, slots: W } = i;
|
|
4633
4632
|
return {
|
|
4634
4633
|
isExactMatch: $,
|
|
4635
4634
|
fields: { name: R, slots: W },
|
|
@@ -4676,16 +4675,16 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4676
4675
|
}), N = ($) => ({
|
|
4677
4676
|
label: l("upstreams.actions.edit"),
|
|
4678
4677
|
to: t.config.getEditRoute($)
|
|
4679
|
-
}), P = B(void 0),
|
|
4680
|
-
P.value = $,
|
|
4678
|
+
}), P = B(void 0), F = B(!1), M = B(!1), I = B(""), L = Os(t.config, f.value), V = ($) => {
|
|
4679
|
+
P.value = $, F.value = !0;
|
|
4681
4680
|
}, Z = () => {
|
|
4682
|
-
|
|
4681
|
+
F.value = !1;
|
|
4683
4682
|
}, j = async () => {
|
|
4684
4683
|
var $, R, W;
|
|
4685
4684
|
if (($ = P.value) != null && $.id) {
|
|
4686
4685
|
M.value = !0;
|
|
4687
4686
|
try {
|
|
4688
|
-
await
|
|
4687
|
+
await n.delete(L(P.value.id)), M.value = !1, F.value = !1, o.value++, a("delete:success", P.value);
|
|
4689
4688
|
} catch (z) {
|
|
4690
4689
|
I.value = ((W = (R = z.response) == null ? void 0 : R.data) == null ? void 0 : W.message) || z.message || l("upstreams.errors.delete"), a("error", z);
|
|
4691
4690
|
} finally {
|
|
@@ -4732,7 +4731,7 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4732
4731
|
y(c(du), {
|
|
4733
4732
|
modelValue: h.value,
|
|
4734
4733
|
"onUpdate:modelValue": R[0] || (R[0] = (ee) => h.value = ee),
|
|
4735
|
-
config:
|
|
4734
|
+
config: r.value
|
|
4736
4735
|
}, null, 8, ["modelValue", "config"])
|
|
4737
4736
|
]),
|
|
4738
4737
|
"toolbar-button": p(() => [
|
|
@@ -4756,17 +4755,17 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4756
4755
|
}, 8, ["auth-function"])
|
|
4757
4756
|
]),
|
|
4758
4757
|
name: p(({ rowValue: ee }) => [
|
|
4759
|
-
x("span",
|
|
4758
|
+
x("span", Fu, C(ee), 1)
|
|
4760
4759
|
]),
|
|
4761
4760
|
tags: p(({ rowValue: ee }) => [
|
|
4762
4761
|
y(T, null, {
|
|
4763
4762
|
default: p(() => [
|
|
4764
|
-
(b(!0), K(ce, null, me(ee, (
|
|
4765
|
-
key:
|
|
4763
|
+
(b(!0), K(ce, null, me(ee, (re) => (b(), D(z, {
|
|
4764
|
+
key: re,
|
|
4766
4765
|
"max-width": "auto"
|
|
4767
4766
|
}, {
|
|
4768
4767
|
default: p(() => [
|
|
4769
|
-
G(C(
|
|
4768
|
+
G(C(re), 1)
|
|
4770
4769
|
]),
|
|
4771
4770
|
_: 2
|
|
4772
4771
|
}, 1024))), 128))
|
|
@@ -4776,10 +4775,10 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4776
4775
|
]),
|
|
4777
4776
|
actions: p(({ row: ee }) => [
|
|
4778
4777
|
y(w, null, {
|
|
4779
|
-
default: p(({ copyToClipboard:
|
|
4778
|
+
default: p(({ copyToClipboard: re }) => [
|
|
4780
4779
|
y(v, {
|
|
4781
4780
|
"data-testid": "action-entity-copy-id",
|
|
4782
|
-
onClick: (ve) => _(ee,
|
|
4781
|
+
onClick: (ve) => _(ee, re)
|
|
4783
4782
|
}, {
|
|
4784
4783
|
default: p(() => [
|
|
4785
4784
|
G(C(c(l)("upstreams.actions.copy_id")), 1)
|
|
@@ -4790,10 +4789,10 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4790
4789
|
_: 2
|
|
4791
4790
|
}, 1024),
|
|
4792
4791
|
y(w, null, {
|
|
4793
|
-
default: p(({ copyToClipboard:
|
|
4792
|
+
default: p(({ copyToClipboard: re }) => [
|
|
4794
4793
|
y(v, {
|
|
4795
4794
|
"data-testid": "action-entity-copy-json",
|
|
4796
|
-
onClick: (ve) => q(ee,
|
|
4795
|
+
onClick: (ve) => q(ee, re)
|
|
4797
4796
|
}, {
|
|
4798
4797
|
default: p(() => [
|
|
4799
4798
|
G(C(c(l)("upstreams.actions.copy_json")), 1)
|
|
@@ -4834,7 +4833,7 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4834
4833
|
"data-testid": "action-entity-delete",
|
|
4835
4834
|
"has-divider": "",
|
|
4836
4835
|
"is-dangerous": "",
|
|
4837
|
-
onClick: (
|
|
4836
|
+
onClick: (re) => V(ee)
|
|
4838
4837
|
}, {
|
|
4839
4838
|
default: p(() => [
|
|
4840
4839
|
G(C(c(l)("upstreams.actions.delete")), 1)
|
|
@@ -4847,14 +4846,14 @@ const Au = { class: "kong-ui-entities-upstreams-list" }, Ou = { class: "upstream
|
|
|
4847
4846
|
]),
|
|
4848
4847
|
_: 1
|
|
4849
4848
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers"]),
|
|
4850
|
-
y(c(
|
|
4849
|
+
y(c(Fs), {
|
|
4851
4850
|
"action-pending": M.value,
|
|
4852
4851
|
description: c(l)("upstreams.delete.description"),
|
|
4853
4852
|
"entity-name": P.value && (P.value.name || P.value.id),
|
|
4854
4853
|
"entity-type": c(Mt).Upstream,
|
|
4855
4854
|
error: I.value,
|
|
4856
4855
|
title: c(l)("upstreams.delete.title"),
|
|
4857
|
-
visible:
|
|
4856
|
+
visible: F.value,
|
|
4858
4857
|
onCancel: Z,
|
|
4859
4858
|
onProceed: j
|
|
4860
4859
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
@@ -4867,7 +4866,7 @@ const Ie = (e, a) => {
|
|
|
4867
4866
|
for (const [l, s] of a)
|
|
4868
4867
|
t[l] = s;
|
|
4869
4868
|
return t;
|
|
4870
|
-
}, Hc = /* @__PURE__ */ Ie(
|
|
4869
|
+
}, Hc = /* @__PURE__ */ Ie(Ou, [["__scopeId", "data-v-033bd1ef"]]), at = {
|
|
4871
4870
|
list: {
|
|
4872
4871
|
konnect: "/api/runtime_groups/{controlPlaneId}/upstreams/{upstreamId}/targets",
|
|
4873
4872
|
kongManager: "/{workspace}/upstreams/{upstreamId}/targets"
|
|
@@ -4916,12 +4915,12 @@ const Ie = (e, a) => {
|
|
|
4916
4915
|
$l((A) => ({
|
|
4917
4916
|
"2cc5362c": q.value
|
|
4918
4917
|
}));
|
|
4919
|
-
const { i18n: { t: l } } = Se.useI18n(), { getMessageFromError: s } = Us(), { axiosInstance:
|
|
4918
|
+
const { i18n: { t: l } } = Se.useI18n(), { getMessageFromError: s } = Us(), { axiosInstance: n } = ht({
|
|
4920
4919
|
headers: (Q = t.config) == null ? void 0 : Q.requestHeaders
|
|
4921
|
-
}), o =
|
|
4920
|
+
}), o = O(() => {
|
|
4922
4921
|
var A;
|
|
4923
4922
|
return at.form[t.config.app].edit.replace(/{upstreamId}/gi, ((A = t.config) == null ? void 0 : A.upstreamId) || "");
|
|
4924
|
-
}), d =
|
|
4923
|
+
}), d = O(() => t.targetId ? ke.Edit : ke.Create), i = O(() => d.value === ke.Edit ? l("targets.form.edit.title") : l("targets.form.create.title")), u = lt({
|
|
4925
4924
|
fields: {
|
|
4926
4925
|
target: "",
|
|
4927
4926
|
weight: 100,
|
|
@@ -4937,26 +4936,26 @@ const Ie = (e, a) => {
|
|
|
4937
4936
|
target: "",
|
|
4938
4937
|
weight: 100,
|
|
4939
4938
|
tags: ""
|
|
4940
|
-
},
|
|
4939
|
+
}, r = O(() => {
|
|
4941
4940
|
const A = parseInt(u.fields.weight.toString(), 10);
|
|
4942
4941
|
return A < 0 || A > 65535;
|
|
4943
|
-
}), k =
|
|
4944
|
-
() => JSON.stringify(u.fields) !== JSON.stringify(f) && !!u.fields.target && !!u.fields.weight && !
|
|
4942
|
+
}), k = O(
|
|
4943
|
+
() => JSON.stringify(u.fields) !== JSON.stringify(f) && !!u.fields.target && !!u.fields.weight && !r.value
|
|
4945
4944
|
), S = (A) => {
|
|
4946
4945
|
var N;
|
|
4947
4946
|
u.fields.target = (A == null ? void 0 : A.target) || "", u.fields.weight = (A == null ? void 0 : A.weight) ?? "", u.fields.tags = ((N = A == null ? void 0 : A.tags) == null ? void 0 : N.join(", ")) || "", Object.assign(f, u.fields);
|
|
4948
4947
|
}, g = () => {
|
|
4949
4948
|
u.errorMessage = "", a("cancel");
|
|
4950
|
-
}, m =
|
|
4949
|
+
}, m = O(() => {
|
|
4951
4950
|
var N, P;
|
|
4952
4951
|
let A = `${t.config.apiBaseUrl}${at.form[t.config.app].validate}`;
|
|
4953
4952
|
return t.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((N = t.config) == null ? void 0 : N.controlPlaneId) || "") : t.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (P = t.config) != null && P.workspace ? `/${t.config.workspace}` : "")), A = A.replace(/{id}/gi, t.targetId), A;
|
|
4954
|
-
}), H =
|
|
4955
|
-
var N, P,
|
|
4953
|
+
}), H = O(() => {
|
|
4954
|
+
var N, P, F, M;
|
|
4956
4955
|
let A = `${t.config.apiBaseUrl}${at.form[t.config.app][d.value]}`;
|
|
4957
|
-
return t.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((N = t.config) == null ? void 0 : N.controlPlaneId) || "").replace(/{upstreamId}/gi, ((P = t.config) == null ? void 0 : P.upstreamId) || "") : t.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (
|
|
4956
|
+
return t.config.app === "konnect" ? A = A.replace(/{controlPlaneId}/gi, ((N = t.config) == null ? void 0 : N.controlPlaneId) || "").replace(/{upstreamId}/gi, ((P = t.config) == null ? void 0 : P.upstreamId) || "") : t.config.app === "kongManager" && (A = A.replace(/\/{workspace}/gi, (F = t.config) != null && F.workspace ? `/${t.config.workspace}` : "").replace(/{upstreamId}/gi, ((M = t.config) == null ? void 0 : M.upstreamId) || "")), A = A.replace(/{id}/gi, t.targetId), A;
|
|
4958
4957
|
}), _ = async () => {
|
|
4959
|
-
var A, N, P,
|
|
4958
|
+
var A, N, P, F, M;
|
|
4960
4959
|
try {
|
|
4961
4960
|
u.isReadonly = !0, u.errorMessage = "";
|
|
4962
4961
|
const I = {
|
|
@@ -4966,7 +4965,7 @@ const Ie = (e, a) => {
|
|
|
4966
4965
|
upstream: { id: t.config.upstreamId }
|
|
4967
4966
|
};
|
|
4968
4967
|
let L;
|
|
4969
|
-
if (await
|
|
4968
|
+
if (await n.post(m.value, I), d.value === "create" ? L = await n.post(H.value, I) : d.value === "edit" && (L = ((F = t.config) == null ? void 0 : F.app) === "konnect" ? await n.put(H.value, I) : await n.patch(H.value, I)), L) {
|
|
4970
4969
|
const { data: V } = L;
|
|
4971
4970
|
u.fields.target = (V == null ? void 0 : V.name) || "", u.fields.weight = (V == null ? void 0 : V.weight) ?? 100, u.fields.tags = ((M = V == null ? void 0 : V.tags) == null ? void 0 : M.join(", ")) || "", a("update", V), Object.assign(u.fields, h);
|
|
4972
4971
|
}
|
|
@@ -4975,17 +4974,17 @@ const Ie = (e, a) => {
|
|
|
4975
4974
|
} finally {
|
|
4976
4975
|
u.isReadonly = !1;
|
|
4977
4976
|
}
|
|
4978
|
-
}, q =
|
|
4977
|
+
}, q = O(() => u.isReadonly ? "inline-flex" : "none");
|
|
4979
4978
|
return ye(() => t.targetId, () => {
|
|
4980
4979
|
Object.assign(u.fields, h);
|
|
4981
4980
|
}), (A, N) => {
|
|
4982
|
-
const P = U("KInput"),
|
|
4983
|
-
return b(), D(
|
|
4981
|
+
const P = U("KInput"), F = U("KPrompt");
|
|
4982
|
+
return b(), D(F, {
|
|
4984
4983
|
"action-button-text": c(l)("targets.form.buttons.save"),
|
|
4985
4984
|
"action-pending": !k.value || u.isReadonly,
|
|
4986
4985
|
"cancel-button-text": c(l)("targets.form.buttons.cancel"),
|
|
4987
4986
|
"is-visible": e.isVisible,
|
|
4988
|
-
title:
|
|
4987
|
+
title: i.value,
|
|
4989
4988
|
onCanceled: g,
|
|
4990
4989
|
onProceed: _
|
|
4991
4990
|
}, {
|
|
@@ -5028,7 +5027,7 @@ const Ie = (e, a) => {
|
|
|
5028
5027
|
class: "target-form-input",
|
|
5029
5028
|
"data-testid": "target-form-weight",
|
|
5030
5029
|
"error-message": c(l)("targets.errors.weight"),
|
|
5031
|
-
"has-error":
|
|
5030
|
+
"has-error": r.value,
|
|
5032
5031
|
label: c(l)("targets.form.fields.weight.label"),
|
|
5033
5032
|
"label-attributes": { info: c(l)("targets.form.fields.weight.tooltip") },
|
|
5034
5033
|
max: "65535",
|
|
@@ -5099,16 +5098,16 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5099
5098
|
var W;
|
|
5100
5099
|
const t = e, { i18n: { t: l } } = Se.useI18n(), { axiosInstance: s } = ht({
|
|
5101
5100
|
headers: (W = t.config) == null ? void 0 : W.requestHeaders
|
|
5102
|
-
}),
|
|
5101
|
+
}), n = B(1), o = O(() => t.config.app !== "kongManager" || !!t.config.disableSorting), i = {
|
|
5103
5102
|
target: { label: l("targets.list.table_headers.target_address"), sortable: !0 },
|
|
5104
5103
|
weight: { label: l("targets.list.table_headers.weight"), sortable: !0 },
|
|
5105
5104
|
tags: { label: l("targets.list.table_headers.tags"), sortable: !1 }
|
|
5106
|
-
}, u =
|
|
5105
|
+
}, u = O(() => {
|
|
5107
5106
|
var T, v, w, ee;
|
|
5108
5107
|
let z = `${t.config.apiBaseUrl}${at.list[t.config.app]}`;
|
|
5109
5108
|
return t.config.app === "konnect" ? z = z.replace(/{controlPlaneId}/gi, ((T = t.config) == null ? void 0 : T.controlPlaneId) || "").replace(/{upstreamId}/gi, ((v = t.config) == null ? void 0 : v.upstreamId) || "") : t.config.app === "kongManager" && (z = z.replace(/\/{workspace}/gi, (w = t.config) != null && w.workspace ? `/${t.config.workspace}` : "").replace(/{upstreamId}/gi, ((ee = t.config) == null ? void 0 : ee.upstreamId) || "")), z;
|
|
5110
|
-
}), { fetcher: f, fetcherState: h } = qs(t.config, u.value),
|
|
5111
|
-
|
|
5109
|
+
}), { fetcher: f, fetcherState: h } = qs(t.config, u.value), r = () => {
|
|
5110
|
+
n.value++;
|
|
5112
5111
|
}, k = B(""), S = () => {
|
|
5113
5112
|
J.value = !0;
|
|
5114
5113
|
}, g = (z, T) => {
|
|
@@ -5141,7 +5140,7 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5141
5140
|
});
|
|
5142
5141
|
}, H = (z) => {
|
|
5143
5142
|
j.value = z, J.value = !0;
|
|
5144
|
-
}, _ = (z) => t.config.app === "konnect" ? !1 : t.config.canMarkHealthy(z), q = (z) => t.config.app === "konnect" ? !1 : t.config.canMarkUnhealthy(z), Q = B(void 0), A = B(!1), N = B(!1), P = B(""),
|
|
5143
|
+
}, _ = (z) => t.config.app === "konnect" ? !1 : t.config.canMarkHealthy(z), q = (z) => t.config.app === "konnect" ? !1 : t.config.canMarkUnhealthy(z), Q = B(void 0), A = B(!1), N = B(!1), P = B(""), F = Os(t.config, u.value), M = (z) => {
|
|
5145
5144
|
Q.value = z, A.value = !0;
|
|
5146
5145
|
}, I = () => {
|
|
5147
5146
|
A.value = !1;
|
|
@@ -5150,7 +5149,7 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5150
5149
|
if ((z = Q.value) != null && z.id) {
|
|
5151
5150
|
N.value = !0;
|
|
5152
5151
|
try {
|
|
5153
|
-
await s.delete(
|
|
5152
|
+
await s.delete(F(Q.value.id)), N.value = !1, A.value = !1, n.value++, a("delete:success", Q.value);
|
|
5154
5153
|
} catch (w) {
|
|
5155
5154
|
P.value = ((v = (T = w.response) == null ? void 0 : T.data) == null ? void 0 : v.message) || w.message || l("targets.errors.delete"), a("error", w);
|
|
5156
5155
|
} finally {
|
|
@@ -5177,7 +5176,7 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5177
5176
|
Ze(async () => {
|
|
5178
5177
|
await t.canCreate() && (V.value.title = l("targets.list.empty_state.title"), V.value.ctaText = l("targets.actions.create"));
|
|
5179
5178
|
});
|
|
5180
|
-
const Z =
|
|
5179
|
+
const Z = O(() => ({
|
|
5181
5180
|
app: t.config.app,
|
|
5182
5181
|
apiBaseUrl: t.config.apiBaseUrl,
|
|
5183
5182
|
upstreamId: t.config.upstreamId,
|
|
@@ -5193,12 +5192,12 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5193
5192
|
})), j = B(""), J = B(!1), X = (z) => {
|
|
5194
5193
|
j.value ? a("update:target", z) : a("create:target", z), $();
|
|
5195
5194
|
}, $ = () => {
|
|
5196
|
-
R(),
|
|
5195
|
+
R(), n.value++;
|
|
5197
5196
|
}, R = () => {
|
|
5198
5197
|
J.value = !1, j.value = "";
|
|
5199
5198
|
};
|
|
5200
5199
|
return (z, T) => {
|
|
5201
|
-
const v = U("KButton"), w = U("KBadge"), ee = U("KTruncate"),
|
|
5200
|
+
const v = U("KButton"), w = U("KBadge"), ee = U("KTruncate"), re = U("KDropdownItem"), ve = U("KClipboardProvider");
|
|
5202
5201
|
return b(), K("div", Nu, [
|
|
5203
5202
|
y(c(As), {
|
|
5204
5203
|
"cache-identifier": e.cacheIdentifier,
|
|
@@ -5208,12 +5207,12 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5208
5207
|
"enable-entity-actions": "",
|
|
5209
5208
|
"error-message": k.value,
|
|
5210
5209
|
fetcher: c(f),
|
|
5211
|
-
"fetcher-cache-key":
|
|
5210
|
+
"fetcher-cache-key": n.value,
|
|
5212
5211
|
"pagination-type": "offset",
|
|
5213
5212
|
"preferences-storage-key": "kong-ui-entities-targets-list",
|
|
5214
|
-
"table-headers": c(
|
|
5213
|
+
"table-headers": c(i),
|
|
5215
5214
|
onEmptyStateCtaClicked: T[1] || (T[1] = () => t.config.createRoute ? void 0 : S()),
|
|
5216
|
-
onSort:
|
|
5215
|
+
onSort: r
|
|
5217
5216
|
}, {
|
|
5218
5217
|
"toolbar-button": p(() => [
|
|
5219
5218
|
y(c(Ce), {
|
|
@@ -5242,12 +5241,12 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5242
5241
|
tags: p(({ rowValue: te }) => [
|
|
5243
5242
|
y(ee, null, {
|
|
5244
5243
|
default: p(() => [
|
|
5245
|
-
(b(!0), K(ce, null, me(te, (
|
|
5246
|
-
key:
|
|
5244
|
+
(b(!0), K(ce, null, me(te, (ne) => (b(), D(w, {
|
|
5245
|
+
key: ne,
|
|
5247
5246
|
"max-width": "auto"
|
|
5248
5247
|
}, {
|
|
5249
5248
|
default: p(() => [
|
|
5250
|
-
G(C(
|
|
5249
|
+
G(C(ne), 1)
|
|
5251
5250
|
]),
|
|
5252
5251
|
_: 2
|
|
5253
5252
|
}, 1024))), 128))
|
|
@@ -5257,10 +5256,10 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5257
5256
|
]),
|
|
5258
5257
|
actions: p(({ row: te }) => [
|
|
5259
5258
|
y(ve, null, {
|
|
5260
|
-
default: p(({ copyToClipboard:
|
|
5261
|
-
y(
|
|
5259
|
+
default: p(({ copyToClipboard: ne }) => [
|
|
5260
|
+
y(re, {
|
|
5262
5261
|
"data-testid": "action-entity-copy-id",
|
|
5263
|
-
onClick: (
|
|
5262
|
+
onClick: (Oe) => g(te, ne)
|
|
5264
5263
|
}, {
|
|
5265
5264
|
default: p(() => [
|
|
5266
5265
|
G(C(c(l)("targets.actions.copy_id")), 1)
|
|
@@ -5271,10 +5270,10 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5271
5270
|
_: 2
|
|
5272
5271
|
}, 1024),
|
|
5273
5272
|
y(ve, null, {
|
|
5274
|
-
default: p(({ copyToClipboard:
|
|
5275
|
-
y(
|
|
5273
|
+
default: p(({ copyToClipboard: ne }) => [
|
|
5274
|
+
y(re, {
|
|
5276
5275
|
"data-testid": "action-entity-copy-json",
|
|
5277
|
-
onClick: (
|
|
5276
|
+
onClick: (Oe) => m(te, ne)
|
|
5278
5277
|
}, {
|
|
5279
5278
|
default: p(() => [
|
|
5280
5279
|
G(C(c(l)("targets.actions.copy_json")), 1)
|
|
@@ -5288,10 +5287,10 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5288
5287
|
"auth-function": () => e.canEdit(te)
|
|
5289
5288
|
}, {
|
|
5290
5289
|
default: p(() => [
|
|
5291
|
-
y(
|
|
5290
|
+
y(re, {
|
|
5292
5291
|
"data-testid": "action-entity-edit",
|
|
5293
5292
|
"has-divider": "",
|
|
5294
|
-
onClick: (
|
|
5293
|
+
onClick: (ne) => H(te.id)
|
|
5295
5294
|
}, {
|
|
5296
5295
|
default: p(() => [
|
|
5297
5296
|
G(C(c(l)("targets.actions.edit")), 1)
|
|
@@ -5305,9 +5304,9 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5305
5304
|
"auth-function": () => _(te)
|
|
5306
5305
|
}, {
|
|
5307
5306
|
default: p(() => [
|
|
5308
|
-
y(
|
|
5307
|
+
y(re, {
|
|
5309
5308
|
"data-testid": "action-target-mark-healthy",
|
|
5310
|
-
onClick: (
|
|
5309
|
+
onClick: (ne) => a("health-actions:healthy", te)
|
|
5311
5310
|
}, {
|
|
5312
5311
|
default: p(() => [
|
|
5313
5312
|
G(C(c(l)("targets.actions.mark_healthy")), 1)
|
|
@@ -5321,9 +5320,9 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5321
5320
|
"auth-function": () => q(te)
|
|
5322
5321
|
}, {
|
|
5323
5322
|
default: p(() => [
|
|
5324
|
-
y(
|
|
5323
|
+
y(re, {
|
|
5325
5324
|
"data-testid": "action-target-mark-unhealthy",
|
|
5326
|
-
onClick: (
|
|
5325
|
+
onClick: (ne) => a("health-actions:unhealthy", te)
|
|
5327
5326
|
}, {
|
|
5328
5327
|
default: p(() => [
|
|
5329
5328
|
G(C(c(l)("targets.actions.mark_unhealthy")), 1)
|
|
@@ -5337,11 +5336,11 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5337
5336
|
"auth-function": () => e.canDelete(te)
|
|
5338
5337
|
}, {
|
|
5339
5338
|
default: p(() => [
|
|
5340
|
-
y(
|
|
5339
|
+
y(re, {
|
|
5341
5340
|
"data-testid": "action-entity-delete",
|
|
5342
5341
|
"has-divider": "",
|
|
5343
5342
|
"is-dangerous": "",
|
|
5344
|
-
onClick: (
|
|
5343
|
+
onClick: (ne) => M(te)
|
|
5345
5344
|
}, {
|
|
5346
5345
|
default: p(() => [
|
|
5347
5346
|
G(C(c(l)("targets.actions.delete")), 1)
|
|
@@ -5354,7 +5353,7 @@ const Ku = /* @__PURE__ */ Ie(Mu, [["__scopeId", "data-v-77134304"]]), Nu = { cl
|
|
|
5354
5353
|
]),
|
|
5355
5354
|
_: 1
|
|
5356
5355
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "table-headers"]),
|
|
5357
|
-
y(c(
|
|
5356
|
+
y(c(Fs), {
|
|
5358
5357
|
"action-pending": N.value,
|
|
5359
5358
|
description: c(l)("targets.delete.description"),
|
|
5360
5359
|
"entity-type": c(Mt).Target,
|
|
@@ -5417,47 +5416,47 @@ const Tc = /* @__PURE__ */ Ie(ju, [["__scopeId", "data-v-aba40390"]]), Bu = { ke
|
|
|
5417
5416
|
setup(e, { emit: a }) {
|
|
5418
5417
|
var I, L, V, Z;
|
|
5419
5418
|
const t = e, { i18nT: l, i18n: { t: s } } = Se.useI18n(), {
|
|
5420
|
-
debouncedQueryChange:
|
|
5419
|
+
debouncedQueryChange: n,
|
|
5421
5420
|
loading: o,
|
|
5422
5421
|
loadItems: d,
|
|
5423
|
-
results:
|
|
5422
|
+
results: i,
|
|
5424
5423
|
allRecords: u
|
|
5425
|
-
} =
|
|
5424
|
+
} = Ol(t.config, (L = Ve.form[(I = t.config) == null ? void 0 : I.app]) == null ? void 0 : L.getServices, "", {
|
|
5426
5425
|
fetchedItemsKey: "data",
|
|
5427
5426
|
searchKeys: ["host"]
|
|
5428
5427
|
}), {
|
|
5429
5428
|
debouncedQueryChange: f,
|
|
5430
5429
|
loading: h,
|
|
5431
|
-
loadItems:
|
|
5430
|
+
loadItems: r,
|
|
5432
5431
|
results: k
|
|
5433
|
-
} =
|
|
5432
|
+
} = Ol(t.config, (Z = Ve.form[(V = t.config) == null ? void 0 : V.app]) == null ? void 0 : Z.getCertificates), S = B(""), g = O(() => {
|
|
5434
5433
|
var j;
|
|
5435
5434
|
return !!t.name && !((j = u.value) != null && j.some((J) => J.host === t.name));
|
|
5436
|
-
}), m =
|
|
5435
|
+
}), m = O(() => {
|
|
5437
5436
|
var J, X, $;
|
|
5438
5437
|
const j = g.value && t.name.includes((J = S.value) == null ? void 0 : J.toLowerCase());
|
|
5439
|
-
return ($ =
|
|
5438
|
+
return ($ = i.value) == null ? void 0 : $.map((R) => ({ label: R.host, value: R.id })).concat(
|
|
5440
5439
|
j ? [{ label: t.name, value: ((X = q.value) == null ? void 0 : X.value) || t.name }] : []
|
|
5441
5440
|
);
|
|
5442
|
-
}), H =
|
|
5441
|
+
}), H = O(() => {
|
|
5443
5442
|
var j;
|
|
5444
5443
|
return (j = k.value) == null ? void 0 : j.map((J) => ({ label: J.id, value: J.id }));
|
|
5445
|
-
}), _ = B(""), q = B({ value: "", label: "" }), Q =
|
|
5444
|
+
}), _ = B(""), q = B({ value: "", label: "" }), Q = O(() => {
|
|
5446
5445
|
var j, J;
|
|
5447
5446
|
return ((j = m.value.find((X) => X.value === _.value)) == null ? void 0 : j.label) || ((J = q.value) == null ? void 0 : J.label);
|
|
5448
5447
|
}), A = (j) => {
|
|
5449
|
-
S.value = j,
|
|
5448
|
+
S.value = j, n(j);
|
|
5450
5449
|
}, N = (j) => {
|
|
5451
5450
|
q.value = j;
|
|
5452
5451
|
}, P = () => {
|
|
5453
5452
|
q.value = { value: "", label: "" };
|
|
5454
|
-
},
|
|
5453
|
+
}, F = (j) => {
|
|
5455
5454
|
_.value = j, a("update:name", Q.value);
|
|
5456
5455
|
}, M = B(!1);
|
|
5457
5456
|
return Ze(async () => {
|
|
5458
5457
|
var j, J;
|
|
5459
5458
|
try {
|
|
5460
|
-
M.value = !0, await d(), t.name && (_.value = ((J = (j = m.value.find((X) => X.label === t.name)) == null ? void 0 : j.value) == null ? void 0 : J.toString()) || t.name), await
|
|
5459
|
+
M.value = !0, await d(), t.name && (_.value = ((J = (j = m.value.find((X) => X.label === t.name)) == null ? void 0 : j.value) == null ? void 0 : J.toString()) || t.name), await r();
|
|
5461
5460
|
} finally {
|
|
5462
5461
|
M.value = !1;
|
|
5463
5462
|
}
|
|
@@ -5493,7 +5492,7 @@ const Tc = /* @__PURE__ */ Ie(ju, [["__scopeId", "data-v-aba40390"]]), Bu = { ke
|
|
|
5493
5492
|
"onItem:added": N,
|
|
5494
5493
|
"onItem:removed": P,
|
|
5495
5494
|
onQueryChange: A,
|
|
5496
|
-
"onUpdate:modelValue":
|
|
5495
|
+
"onUpdate:modelValue": F
|
|
5497
5496
|
}, {
|
|
5498
5497
|
"label-tooltip": p(() => [
|
|
5499
5498
|
y(c(l), {
|
|
@@ -5617,7 +5616,7 @@ const Lu = /* @__PURE__ */ Ie(Eu, [["__scopeId", "data-v-02065a3d"]]), ft = {
|
|
|
5617
5616
|
},
|
|
5618
5617
|
emits: ["update:algorithm", "update:slots", "update:hash-on", "update:hash-fallback", "update:hash-on-header", "update:hash-on-cookie", "update:hash-on-cookie-path", "update:hash-on-query-argument", "update:hash-on-uri-capture", "update:hash-fallback-header", "update:hash-fallback-query-argument", "update:hash-fallback-uri-capture"],
|
|
5619
5618
|
setup(e, { emit: a }) {
|
|
5620
|
-
const t = e, { i18nT: l, i18n: { t: s } } = Se.useI18n(), { inRange:
|
|
5619
|
+
const t = e, { i18nT: l, i18n: { t: s } } = Se.useI18n(), { inRange: n } = pt(), o = B([
|
|
5621
5620
|
{
|
|
5622
5621
|
label: s("upstreams.form.algorithms.round_robin_label"),
|
|
5623
5622
|
value: "round-robin",
|
|
@@ -5685,9 +5684,9 @@ const Lu = /* @__PURE__ */ Ie(Eu, [["__scopeId", "data-v-02065a3d"]]), ft = {
|
|
|
5685
5684
|
}), ye(() => t.hashFallback, (f, h) => {
|
|
5686
5685
|
h === "header" && f !== h && a("update:hash-fallback-header", ""), h === "cookie" && f !== h && (a("update:hash-on-cookie", ""), a("update:hash-on-cookie-path", "/")), h === "query_arg" && f !== h && a("update:hash-fallback-query-argument", ""), h === "uri_capture" && f !== h && a("update:hash-fallback-uri-capture", "");
|
|
5687
5686
|
});
|
|
5688
|
-
const
|
|
5687
|
+
const i = O(() => t.hashOn === "cookie" || t.hashOn === "none"), u = O(() => t.slots ? n(t.slots, Ht, Tt) ? "" : s("upstreams.form.errors.in_range") : "");
|
|
5689
5688
|
return (f, h) => {
|
|
5690
|
-
const
|
|
5689
|
+
const r = U("KExternalLink"), k = U("KSelect"), S = U("KInput"), g = U("KCard");
|
|
5691
5690
|
return b(), D(c(Xe), {
|
|
5692
5691
|
class: "kong-ui-entities-upstreams-load-balancing",
|
|
5693
5692
|
title: c(s)("upstreams.form.load_balancing.title")
|
|
@@ -5695,7 +5694,7 @@ const Lu = /* @__PURE__ */ Ie(Eu, [["__scopeId", "data-v-02065a3d"]]), ft = {
|
|
|
5695
5694
|
description: p(() => [
|
|
5696
5695
|
x("p", null, [
|
|
5697
5696
|
G(C(c(s)("upstreams.form.load_balancing.help")) + " ", 1),
|
|
5698
|
-
y(
|
|
5697
|
+
y(r, {
|
|
5699
5698
|
"hide-icon": "",
|
|
5700
5699
|
href: c(ft).upstreamObject
|
|
5701
5700
|
}, {
|
|
@@ -5815,7 +5814,7 @@ const Lu = /* @__PURE__ */ Ie(Eu, [["__scopeId", "data-v-02065a3d"]]), ft = {
|
|
|
5815
5814
|
y(k, {
|
|
5816
5815
|
appearance: "select",
|
|
5817
5816
|
class: "hash-fallback-select",
|
|
5818
|
-
disabled:
|
|
5817
|
+
disabled: i.value,
|
|
5819
5818
|
items: d.value,
|
|
5820
5819
|
label: c(s)("upstreams.form.fields.hash_fallback.label"),
|
|
5821
5820
|
"label-attributes": { tooltipAttributes: { "max-width": "250px" } },
|
|
@@ -5934,7 +5933,7 @@ const Wu = /* @__PURE__ */ Ie(zu, [["__scopeId", "data-v-522adce0"]]), Qu = { cl
|
|
|
5934
5933
|
setup(e, { emit: a }) {
|
|
5935
5934
|
const { i18n: { t } } = Se.useI18n();
|
|
5936
5935
|
return (l, s) => {
|
|
5937
|
-
const
|
|
5936
|
+
const n = U("KExternalLink"), o = U("KInputSwitch"), d = U("KCard"), i = U("KInput");
|
|
5938
5937
|
return b(), D(c(Xe), {
|
|
5939
5938
|
class: "kong-ui-entities-upstreams-healthchecks",
|
|
5940
5939
|
title: c(t)("upstreams.form.health_check.title")
|
|
@@ -5942,7 +5941,7 @@ const Wu = /* @__PURE__ */ Ie(zu, [["__scopeId", "data-v-522adce0"]]), Qu = { cl
|
|
|
5942
5941
|
description: p(() => [
|
|
5943
5942
|
x("p", null, [
|
|
5944
5943
|
G(C(c(t)("upstreams.form.health_check.help")) + " ", 1),
|
|
5945
|
-
y(
|
|
5944
|
+
y(n, {
|
|
5946
5945
|
"hide-icon": "",
|
|
5947
5946
|
href: c(ft).loadBalancing
|
|
5948
5947
|
}, {
|
|
@@ -5982,7 +5981,7 @@ const Wu = /* @__PURE__ */ Ie(zu, [["__scopeId", "data-v-522adce0"]]), Qu = { cl
|
|
|
5982
5981
|
]),
|
|
5983
5982
|
_: 1
|
|
5984
5983
|
}),
|
|
5985
|
-
y(
|
|
5984
|
+
y(i, {
|
|
5986
5985
|
autocomplete: "off",
|
|
5987
5986
|
"data-testid": "upstreams-form-healthchecks-threshold",
|
|
5988
5987
|
label: c(t)("upstreams.form.fields.healthchecks_threshold.label"),
|
|
@@ -5999,7 +5998,7 @@ const Wu = /* @__PURE__ */ Ie(zu, [["__scopeId", "data-v-522adce0"]]), Qu = { cl
|
|
|
5999
5998
|
};
|
|
6000
5999
|
}
|
|
6001
6000
|
});
|
|
6002
|
-
const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { key: 2 }, ac = { class: "fields-group-title" }, lc = { class: "fields-group-text" }, sc = { class: "fields-group-title" },
|
|
6001
|
+
const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { key: 2 }, ac = { class: "fields-group-title" }, lc = { class: "fields-group-text" }, sc = { class: "fields-group-title" }, rc = { class: "fields-group-text" }, ic = /* @__PURE__ */ le({
|
|
6003
6002
|
__name: "UpstreamsFormActiveHealthCheck",
|
|
6004
6003
|
props: {
|
|
6005
6004
|
config: {
|
|
@@ -6074,7 +6073,7 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6074
6073
|
},
|
|
6075
6074
|
emits: ["update:type", "update:http-path", "update:timeout", "update:concurrency", "update:https-sni", "update:verify-ssl", "update:headers", "update:interval", "update:successes", "update:http-statuses", "update:unhealthy-interval", "update:http-failures", "update:tcp-failures", "update:unhealthy-http-statuses", "update:unhealthy-timeouts"],
|
|
6076
6075
|
setup(e, { emit: a }) {
|
|
6077
|
-
const t = e, { i18n: { t: l } } = Se.useI18n(), { objectsAreEqual: s } = pt(),
|
|
6076
|
+
const t = e, { i18n: { t: l } } = Se.useI18n(), { objectsAreEqual: s } = pt(), n = B([
|
|
6078
6077
|
{
|
|
6079
6078
|
label: l("upstreams.form.healthcheck_type_labels.http"),
|
|
6080
6079
|
value: "http",
|
|
@@ -6100,13 +6099,13 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6100
6099
|
value: "grpcs",
|
|
6101
6100
|
selected: !1
|
|
6102
6101
|
}
|
|
6103
|
-
]), o =
|
|
6104
|
-
trackNewItems:
|
|
6102
|
+
]), o = O(() => t.type === "https" || t.type === "grpcs"), d = O(() => t.type === "tcp"), {
|
|
6103
|
+
trackNewItems: i
|
|
6105
6104
|
} = Ge({ replaceId: !0 }), {
|
|
6106
6105
|
trackNewItems: u
|
|
6107
6106
|
} = Ge({ replaceId: !0 });
|
|
6108
6107
|
ye(() => t.type, (S, g) => {
|
|
6109
|
-
g === "tcp" && S !== g && a("update:tcp-failures", "5"), (g === "https" || g === "grpcs") && S !== g && (a("update:https-sni", ""), a("update:verify-ssl", !1)), g !== "tcp" && S === "tcp" && (a("update:http-path", "/"), a("update:http-statuses", At), a("update:unhealthy-http-statuses",
|
|
6108
|
+
g === "tcp" && S !== g && a("update:tcp-failures", "5"), (g === "https" || g === "grpcs") && S !== g && (a("update:https-sni", ""), a("update:verify-ssl", !1)), g !== "tcp" && S === "tcp" && (a("update:http-path", "/"), a("update:http-statuses", At), a("update:unhealthy-http-statuses", Ot));
|
|
6110
6109
|
});
|
|
6111
6110
|
const f = B([{ key: "", values: "" }]);
|
|
6112
6111
|
ye(() => t.headers, (S) => {
|
|
@@ -6117,13 +6116,13 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6117
6116
|
});
|
|
6118
6117
|
const h = () => {
|
|
6119
6118
|
a("update:headers", f.value);
|
|
6120
|
-
},
|
|
6119
|
+
}, r = () => {
|
|
6121
6120
|
f.value.push({ key: "", values: "" }), h();
|
|
6122
6121
|
}, k = (S) => {
|
|
6123
6122
|
S === 0 && f.value.length === 1 ? f.value[0] = { key: "", values: "" } : f.value.splice(S, 1), h();
|
|
6124
6123
|
};
|
|
6125
6124
|
return (S, g) => {
|
|
6126
|
-
const m = U("KExternalLink"), H = U("KSelect"), _ = U("KInput"), q = U("KCheckbox"), Q = U("KLabel"), A = U("KIcon"), N = U("KButton"), P = U("KMultiselect"),
|
|
6125
|
+
const m = U("KExternalLink"), H = U("KSelect"), _ = U("KInput"), q = U("KCheckbox"), Q = U("KLabel"), A = U("KIcon"), N = U("KButton"), P = U("KMultiselect"), F = U("KCard");
|
|
6127
6126
|
return b(), D(c(Xe), {
|
|
6128
6127
|
class: "kong-ui-entities-upstreams-active-healthcheck",
|
|
6129
6128
|
title: c(l)("upstreams.form.active_health_check.title")
|
|
@@ -6148,7 +6147,7 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6148
6147
|
y(H, {
|
|
6149
6148
|
appearance: "select",
|
|
6150
6149
|
class: "active-healthcheck-type-select",
|
|
6151
|
-
items:
|
|
6150
|
+
items: n.value,
|
|
6152
6151
|
label: c(l)("upstreams.form.fields.active_healthcheck_type.label"),
|
|
6153
6152
|
"model-value": e.type,
|
|
6154
6153
|
readonly: e.readonly,
|
|
@@ -6258,7 +6257,7 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6258
6257
|
appearance: "btn-link",
|
|
6259
6258
|
class: "btn-add-header",
|
|
6260
6259
|
"data-testid": "btn-add-header",
|
|
6261
|
-
onClick:
|
|
6260
|
+
onClick: r
|
|
6262
6261
|
}, {
|
|
6263
6262
|
icon: p(() => [
|
|
6264
6263
|
y(A, {
|
|
@@ -6272,7 +6271,7 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6272
6271
|
], 2))), 128))
|
|
6273
6272
|
])
|
|
6274
6273
|
])) : Y("", !0),
|
|
6275
|
-
y(
|
|
6274
|
+
y(F, null, {
|
|
6276
6275
|
body: p(() => [
|
|
6277
6276
|
x("h5", ac, C(c(l)("upstreams.form.healthy.label")), 1),
|
|
6278
6277
|
x("p", lc, C(c(l)("upstreams.form.healthy.help")), 1),
|
|
@@ -6310,17 +6309,17 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6310
6309
|
"model-value": e.httpStatuses,
|
|
6311
6310
|
readonly: e.readonly,
|
|
6312
6311
|
width: "100%",
|
|
6313
|
-
"onItem:added": g[8] || (g[8] = (I) => c(
|
|
6314
|
-
"onItem:removed": g[9] || (g[9] = (I) => c(
|
|
6312
|
+
"onItem:added": g[8] || (g[8] = (I) => c(i)(I, !0)),
|
|
6313
|
+
"onItem:removed": g[9] || (g[9] = (I) => c(i)(I, !1)),
|
|
6315
6314
|
"onUpdate:modelValue": g[10] || (g[10] = (I) => a("update:http-statuses", I))
|
|
6316
6315
|
}, null, 8, ["items", "label", "model-value", "readonly"]))
|
|
6317
6316
|
]),
|
|
6318
6317
|
_: 1
|
|
6319
6318
|
}),
|
|
6320
|
-
y(
|
|
6319
|
+
y(F, null, {
|
|
6321
6320
|
body: p(() => [
|
|
6322
6321
|
x("h5", sc, C(c(l)("upstreams.form.unhealthy.label")), 1),
|
|
6323
|
-
x("p",
|
|
6322
|
+
x("p", rc, C(c(l)("upstreams.form.unhealthy.help")), 1),
|
|
6324
6323
|
y(_, {
|
|
6325
6324
|
autocomplete: "off",
|
|
6326
6325
|
class: "margin-bottom-6",
|
|
@@ -6394,7 +6393,7 @@ const ec = /* @__PURE__ */ Ie(Xu, [["__scopeId", "data-v-7fda4841"]]), tc = { ke
|
|
|
6394
6393
|
};
|
|
6395
6394
|
}
|
|
6396
6395
|
});
|
|
6397
|
-
const
|
|
6396
|
+
const nc = /* @__PURE__ */ Ie(ic, [["__scopeId", "data-v-18b80e62"]]), oc = { class: "fields-group-title" }, uc = { class: "fields-group-text" }, cc = { class: "fields-group-title" }, dc = { class: "fields-group-text" }, hc = /* @__PURE__ */ le({
|
|
6398
6397
|
__name: "UpstreamsFormPassiveHealthCheck",
|
|
6399
6398
|
props: {
|
|
6400
6399
|
type: {
|
|
@@ -6459,15 +6458,15 @@ const ic = /* @__PURE__ */ Ie(rc, [["__scopeId", "data-v-18b80e62"]]), oc = { cl
|
|
|
6459
6458
|
value: "grpcs",
|
|
6460
6459
|
selected: !1
|
|
6461
6460
|
}
|
|
6462
|
-
]),
|
|
6461
|
+
]), n = O(() => t.type === "tcp"), {
|
|
6463
6462
|
trackNewItems: o
|
|
6464
6463
|
} = Ge({ replaceId: !0 }), {
|
|
6465
6464
|
trackNewItems: d
|
|
6466
6465
|
} = Ge({ replaceId: !0 });
|
|
6467
|
-
return ye(() => t.type, (
|
|
6468
|
-
u === "tcp" &&
|
|
6469
|
-
}), (
|
|
6470
|
-
const f = U("KExternalLink"), h = U("KSelect"),
|
|
6466
|
+
return ye(() => t.type, (i, u) => {
|
|
6467
|
+
u === "tcp" && i !== u && a("update:tcp-failures", "5"), u !== "tcp" && i === "tcp" && (a("update:http-statuses", Ft), a("update:unhealthy-http-statuses", Ut));
|
|
6468
|
+
}), (i, u) => {
|
|
6469
|
+
const f = U("KExternalLink"), h = U("KSelect"), r = U("KInput"), k = U("KMultiselect"), S = U("KCard");
|
|
6471
6470
|
return b(), D(c(Xe), {
|
|
6472
6471
|
class: "kong-ui-entities-upstreams-passive-healthcheck",
|
|
6473
6472
|
title: c(l)("upstreams.form.passive_health_check.title")
|
|
@@ -6501,7 +6500,7 @@ const ic = /* @__PURE__ */ Ie(rc, [["__scopeId", "data-v-18b80e62"]]), oc = { cl
|
|
|
6501
6500
|
body: p(() => [
|
|
6502
6501
|
x("h5", oc, C(c(l)("upstreams.form.passive_healthy.label")), 1),
|
|
6503
6502
|
x("p", uc, C(c(l)("upstreams.form.passive_healthy.help")), 1),
|
|
6504
|
-
y(
|
|
6503
|
+
y(r, {
|
|
6505
6504
|
autocomplete: "off",
|
|
6506
6505
|
"data-testid": "passive-healthcheck-successes",
|
|
6507
6506
|
label: c(l)("upstreams.form.fields.successes.label"),
|
|
@@ -6512,7 +6511,7 @@ const ic = /* @__PURE__ */ Ie(rc, [["__scopeId", "data-v-18b80e62"]]), oc = { cl
|
|
|
6512
6511
|
type: "number",
|
|
6513
6512
|
"onUpdate:modelValue": u[1] || (u[1] = (g) => a("update:successes", g))
|
|
6514
6513
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6515
|
-
|
|
6514
|
+
n.value ? Y("", !0) : (b(), D(k, {
|
|
6516
6515
|
key: 0,
|
|
6517
6516
|
class: "margin-top-6 passive-healthcheck-http-statuses",
|
|
6518
6517
|
"enable-item-creation": "",
|
|
@@ -6532,7 +6531,7 @@ const ic = /* @__PURE__ */ Ie(rc, [["__scopeId", "data-v-18b80e62"]]), oc = { cl
|
|
|
6532
6531
|
body: p(() => [
|
|
6533
6532
|
x("h5", cc, C(c(l)("upstreams.form.passive_unhealthy.label")), 1),
|
|
6534
6533
|
x("p", dc, C(c(l)("upstreams.form.passive_unhealthy.help")), 1),
|
|
6535
|
-
y(
|
|
6534
|
+
y(r, {
|
|
6536
6535
|
autocomplete: "off",
|
|
6537
6536
|
"data-testid": "passive-healthcheck-timeouts",
|
|
6538
6537
|
label: c(l)("upstreams.form.fields.timeouts.label"),
|
|
@@ -6543,7 +6542,7 @@ const ic = /* @__PURE__ */ Ie(rc, [["__scopeId", "data-v-18b80e62"]]), oc = { cl
|
|
|
6543
6542
|
type: "number",
|
|
6544
6543
|
"onUpdate:modelValue": u[5] || (u[5] = (g) => a("update:timeouts", g))
|
|
6545
6544
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"]),
|
|
6546
|
-
|
|
6545
|
+
n.value ? (b(), D(r, {
|
|
6547
6546
|
key: 0,
|
|
6548
6547
|
autocomplete: "off",
|
|
6549
6548
|
class: "margin-top-6",
|
|
@@ -6556,7 +6555,7 @@ const ic = /* @__PURE__ */ Ie(rc, [["__scopeId", "data-v-18b80e62"]]), oc = { cl
|
|
|
6556
6555
|
type: "number",
|
|
6557
6556
|
"onUpdate:modelValue": u[6] || (u[6] = (g) => a("update:tcp-failures", g))
|
|
6558
6557
|
}, null, 8, ["label", "max", "min", "model-value", "readonly"])) : (b(), K(ce, { key: 1 }, [
|
|
6559
|
-
y(
|
|
6558
|
+
y(r, {
|
|
6560
6559
|
autocomplete: "off",
|
|
6561
6560
|
class: "margin-top-6",
|
|
6562
6561
|
"data-testid": "passive-healthcheck-http-failures",
|
|
@@ -6610,21 +6609,21 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6610
6609
|
emits: ["update", "error", "loading"],
|
|
6611
6610
|
setup(e, { emit: a }) {
|
|
6612
6611
|
var z;
|
|
6613
|
-
const t = e, { inRange: l, stringToNumberArray: s, upstreamsResponseToFields:
|
|
6612
|
+
const t = e, { inRange: l, stringToNumberArray: s, upstreamsResponseToFields: n, getDefaultUpstreamFields: o, objectsAreEqual: d, cloneDeep: i } = pt(), { axiosInstance: u } = ht({
|
|
6614
6613
|
headers: (z = t.config) == null ? void 0 : z.requestHeaders
|
|
6615
|
-
}), { getMessageFromError: f } = Us(), h = $t(),
|
|
6614
|
+
}), { getMessageFromError: f } = Us(), h = $t(), r = lt({
|
|
6616
6615
|
fields: o(),
|
|
6617
6616
|
readonly: !1,
|
|
6618
6617
|
errorMessage: ""
|
|
6619
|
-
}), k = lt(o()), S =
|
|
6620
|
-
|
|
6618
|
+
}), k = lt(o()), S = O(() => !d(r.fields, k)), g = (T) => {
|
|
6619
|
+
r.fields.activeHealthCheck.interval = T ? "5" : "0", r.fields.activeHealthCheck.successes = T ? "5" : "0", r.fields.activeHealthCheck.httpFailures = T ? "5" : "0", r.fields.activeHealthCheck.unhealthyInterval = T ? "5" : "0";
|
|
6621
6620
|
}, m = (T) => {
|
|
6622
|
-
|
|
6623
|
-
}, H =
|
|
6621
|
+
r.fields.passiveHealthCheck.timeouts = T ? "5" : "0", r.fields.passiveHealthCheck.successes = T ? "80" : "0";
|
|
6622
|
+
}, H = O(() => r.fields.slots ? l(r.fields.slots, Ht, Tt) : !0), _ = O(() => r.fields.hashOn === "header" ? !!r.fields.hashOnHeader : !0), q = O(() => r.fields.hashOn === "cookie" || r.fields.hashFallback === "cookie" ? !!r.fields.hashOnCookie : !0), Q = O(() => r.fields.hashOn === "cookie" || r.fields.hashFallback === "cookie" ? !!r.fields.hashOnCookiePath : !0), A = O(() => r.fields.hashOn === "query_arg" ? !!r.fields.hashOnQueryArgument : !0), N = O(() => r.fields.hashOn === "uri_capture" ? !!r.fields.hashOnUriCapture : !0), P = O(() => r.fields.hashFallback === "header" ? !!r.fields.hashFallbackHeader : !0), F = O(() => r.fields.hashFallback === "query_arg" ? !!r.fields.hashFallbackQueryArgument : !0), M = O(() => r.fields.hashFallback === "uri_capture" ? !!r.fields.hashFallbackUriCapture : !0), I = O(() => !!r.fields.name && H.value && _.value && q.value && Q.value && A.value && N.value && P.value && F.value && M.value), L = O(() => t.upstreamId ? ke.Edit : ke.Create), V = O(() => {
|
|
6624
6623
|
var T, v;
|
|
6625
6624
|
return (v = Ve.form[(T = t.config) == null ? void 0 : T.app]) == null ? void 0 : v.edit;
|
|
6626
6625
|
}), Z = (T) => {
|
|
6627
|
-
Object.assign(
|
|
6626
|
+
Object.assign(r.fields, n(T)), Object.assign(k, i(r.fields));
|
|
6628
6627
|
}, j = () => {
|
|
6629
6628
|
var T;
|
|
6630
6629
|
h.push(((T = t.config) == null ? void 0 : T.cancelRoute) || { name: "upstreams-list" });
|
|
@@ -6633,29 +6632,29 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6633
6632
|
}, X = (T) => {
|
|
6634
6633
|
a("error", T);
|
|
6635
6634
|
}, $ = () => {
|
|
6636
|
-
var v, w, ee,
|
|
6635
|
+
var v, w, ee, re, ve;
|
|
6637
6636
|
const T = {
|
|
6638
|
-
name:
|
|
6639
|
-
slots: Number(
|
|
6640
|
-
algorithm:
|
|
6641
|
-
hash_on:
|
|
6642
|
-
hash_fallback:
|
|
6637
|
+
name: r.fields.name,
|
|
6638
|
+
slots: Number(r.fields.slots),
|
|
6639
|
+
algorithm: r.fields.algorithm,
|
|
6640
|
+
hash_on: r.fields.hashOn,
|
|
6641
|
+
hash_fallback: r.fields.hashFallback,
|
|
6643
6642
|
healthchecks: {}
|
|
6644
6643
|
};
|
|
6645
|
-
return
|
|
6646
|
-
type:
|
|
6644
|
+
return r.fields.hostHeader && (T.host_header = r.fields.hostHeader), r.fields.clientCertificate && (T.client_certificate = { id: r.fields.clientCertificate }), r.fields.healthchecksThreshold && (T.healthchecks.threshold = Number(r.fields.healthchecksThreshold)), r.fields.tags && (T.tags = (w = (v = r.fields.tags.split(",")) == null ? void 0 : v.map((te) => String(te || "").trim())) == null ? void 0 : w.filter((te) => te !== "")), r.fields.hashOn === "header" && (T.hash_on_header = r.fields.hashOnHeader), (r.fields.hashOn === "cookie" || r.fields.hashFallback === "cookie") && (T.hash_on_cookie = r.fields.hashOnCookie, T.hash_on_cookie_path = r.fields.hashOnCookiePath), r.fields.hashOn === "query_arg" && (T.hash_on_query_arg = r.fields.hashOnQueryArgument), r.fields.hashOn === "uri_capture" && (T.hash_on_uri_capture = r.fields.hashOnUriCapture), r.fields.hashFallback === "header" && (T.hash_fallback_header = r.fields.hashFallbackHeader), r.fields.hashFallback === "query_arg" && (T.hash_fallback_query_arg = r.fields.hashFallbackQueryArgument), r.fields.hashFallback === "uri_capture" && (T.hash_fallback_uri_capture = r.fields.hashFallbackUriCapture), r.fields.activeHealthSwitch ? (T.healthchecks.active = {
|
|
6645
|
+
type: r.fields.activeHealthCheck.type,
|
|
6647
6646
|
healthy: {},
|
|
6648
6647
|
unhealthy: {}
|
|
6649
|
-
},
|
|
6650
|
-
var
|
|
6651
|
-
return
|
|
6648
|
+
}, r.fields.activeHealthCheck.timeout && (T.healthchecks.active.timeout = Number(r.fields.activeHealthCheck.timeout)), r.fields.activeHealthCheck.concurrency && (T.healthchecks.active.concurrency = Number(r.fields.activeHealthCheck.concurrency)), r.fields.activeHealthCheck.type !== "tcp" && r.fields.activeHealthCheck.httpPath && (T.healthchecks.active.http_path = r.fields.activeHealthCheck.httpPath), ((ee = t.config) == null ? void 0 : ee.app) === "kongManager" && (r.fields.activeHealthCheck.headers.length === 0 ? T.healthchecks.active.headers = [] : T.healthchecks.active.headers = r.fields.activeHealthCheck.headers.reduce((te, ne) => {
|
|
6649
|
+
var Oe, Re;
|
|
6650
|
+
return ne.key ? {
|
|
6652
6651
|
...te,
|
|
6653
|
-
[
|
|
6652
|
+
[ne.key]: (Re = (Oe = ne.values.split(",")) == null ? void 0 : Oe.map((qe) => String(qe || "").trim())) == null ? void 0 : Re.filter((qe) => qe !== "")
|
|
6654
6653
|
} : {
|
|
6655
6654
|
...te
|
|
6656
6655
|
};
|
|
6657
|
-
}, {})), (
|
|
6658
|
-
type:
|
|
6656
|
+
}, {})), (r.fields.activeHealthCheck.type === "https" || r.fields.activeHealthCheck.type === "grpcs") && r.fields.activeHealthCheck.httpsSni && (T.healthchecks.active.https_sni = r.fields.activeHealthCheck.httpsSni), (r.fields.activeHealthCheck.type === "https" || r.fields.activeHealthCheck.type === "grpcs") && (T.healthchecks.active.https_verify_certificate = r.fields.activeHealthCheck.verifySsl), r.fields.activeHealthCheck.interval && (T.healthchecks.active.healthy.interval = Number(r.fields.activeHealthCheck.interval)), r.fields.activeHealthCheck.successes && (T.healthchecks.active.healthy.successes = Number(r.fields.activeHealthCheck.successes)), r.fields.activeHealthCheck.type !== "tcp" && r.fields.activeHealthCheck.httpStatuses && (T.healthchecks.active.healthy.http_statuses = s(r.fields.activeHealthCheck.httpStatuses)), r.fields.activeHealthCheck.unhealthyInterval && (T.healthchecks.active.unhealthy.interval = Number(r.fields.activeHealthCheck.unhealthyInterval)), r.fields.activeHealthCheck.unhealthyTimeouts && (T.healthchecks.active.unhealthy.timeouts = Number(r.fields.activeHealthCheck.unhealthyTimeouts)), r.fields.activeHealthCheck.type !== "tcp" && r.fields.activeHealthCheck.unhealthyHttpStatuses && (T.healthchecks.active.unhealthy.http_statuses = s(r.fields.activeHealthCheck.unhealthyHttpStatuses)), r.fields.activeHealthCheck.type !== "tcp" && r.fields.activeHealthCheck.httpFailures && (T.healthchecks.active.unhealthy.http_failures = Number(r.fields.activeHealthCheck.httpFailures)), r.fields.activeHealthCheck.type === "tcp" && r.fields.activeHealthCheck.tcpFailures && (T.healthchecks.active.unhealthy.tcp_failures = Number(r.fields.activeHealthCheck.tcpFailures))) : ((re = t.config) == null ? void 0 : re.app) === "kongManager" && L.value === ke.Edit && (T.healthchecks.active = {
|
|
6657
|
+
type: r.fields.activeHealthCheck.type,
|
|
6659
6658
|
headers: {},
|
|
6660
6659
|
healthy: {
|
|
6661
6660
|
interval: 0
|
|
@@ -6663,12 +6662,12 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6663
6662
|
unhealthy: {
|
|
6664
6663
|
interval: 0
|
|
6665
6664
|
}
|
|
6666
|
-
}),
|
|
6667
|
-
type:
|
|
6665
|
+
}), r.fields.passiveHealthSwitch ? (T.healthchecks.passive = {
|
|
6666
|
+
type: r.fields.passiveHealthCheck.type,
|
|
6668
6667
|
healthy: {},
|
|
6669
6668
|
unhealthy: {}
|
|
6670
|
-
},
|
|
6671
|
-
type:
|
|
6669
|
+
}, r.fields.passiveHealthCheck.successes && (T.healthchecks.passive.healthy.successes = Number(r.fields.passiveHealthCheck.successes)), r.fields.passiveHealthCheck.type !== "tcp" && r.fields.passiveHealthCheck.httpStatuses && (T.healthchecks.passive.healthy.http_statuses = s(r.fields.passiveHealthCheck.httpStatuses)), r.fields.passiveHealthCheck.timeouts && (T.healthchecks.passive.unhealthy.timeouts = Number(r.fields.passiveHealthCheck.timeouts)), r.fields.passiveHealthCheck.type !== "tcp" && r.fields.passiveHealthCheck.unhealthyHttpStatuses && (T.healthchecks.passive.unhealthy.http_statuses = s(r.fields.passiveHealthCheck.unhealthyHttpStatuses)), r.fields.passiveHealthCheck.type !== "tcp" && r.fields.passiveHealthCheck.httpFailures && (T.healthchecks.passive.unhealthy.http_failures = Number(r.fields.passiveHealthCheck.httpFailures)), r.fields.passiveHealthCheck.type === "tcp" && r.fields.passiveHealthCheck.tcpFailures && (T.healthchecks.passive.unhealthy.tcp_failures = Number(r.fields.passiveHealthCheck.tcpFailures))) : ((ve = t.config) == null ? void 0 : ve.app) === "kongManager" && L.value === ke.Edit && (T.healthchecks.passive = {
|
|
6670
|
+
type: r.fields.passiveHealthCheck.type,
|
|
6672
6671
|
healthy: {
|
|
6673
6672
|
successes: 0
|
|
6674
6673
|
},
|
|
@@ -6679,19 +6678,19 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6679
6678
|
}
|
|
6680
6679
|
}), T;
|
|
6681
6680
|
}, R = (T) => {
|
|
6682
|
-
var w, ee,
|
|
6681
|
+
var w, ee, re, ve, te, ne;
|
|
6683
6682
|
let v = `${(w = t.config) == null ? void 0 : w.apiBaseUrl}${Ve.form[(ee = t.config) == null ? void 0 : ee.app][T]}`;
|
|
6684
|
-
return ((
|
|
6683
|
+
return ((re = t.config) == null ? void 0 : re.app) === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((ve = t.config) == null ? void 0 : ve.controlPlaneId) || "") : ((te = t.config) == null ? void 0 : te.app) === "kongManager" && (v = v.replace(/\/{workspace}/gi, (ne = t.config) != null && ne.workspace ? `/${t.config.workspace}` : "")), v = v.replace(/{id}/gi, t.upstreamId), v;
|
|
6685
6684
|
}, W = async () => {
|
|
6686
6685
|
var T;
|
|
6687
6686
|
try {
|
|
6688
|
-
|
|
6687
|
+
r.readonly = !0, await u.post(R("validate"), $());
|
|
6689
6688
|
let v;
|
|
6690
6689
|
L.value === ke.Create ? v = await u.post(R("create"), $()) : L.value === ke.Edit && (v = ((T = t.config) == null ? void 0 : T.app) === "konnect" ? await u.put(R("edit"), $()) : await u.patch(R("edit"), $())), a("update", v == null ? void 0 : v.data);
|
|
6691
6690
|
} catch (v) {
|
|
6692
|
-
|
|
6691
|
+
r.errorMessage = f(v), a("error", v);
|
|
6693
6692
|
} finally {
|
|
6694
|
-
|
|
6693
|
+
r.readonly = !1;
|
|
6695
6694
|
}
|
|
6696
6695
|
};
|
|
6697
6696
|
return (T, v) => (b(), K("div", fc, [
|
|
@@ -6699,9 +6698,9 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6699
6698
|
"can-submit": I.value && S.value,
|
|
6700
6699
|
config: e.config,
|
|
6701
6700
|
"edit-id": e.upstreamId,
|
|
6702
|
-
"error-message":
|
|
6701
|
+
"error-message": r.errorMessage,
|
|
6703
6702
|
"fetch-url": V.value,
|
|
6704
|
-
"is-readonly":
|
|
6703
|
+
"is-readonly": r.readonly,
|
|
6705
6704
|
onCancel: j,
|
|
6706
6705
|
"onFetch:error": X,
|
|
6707
6706
|
"onFetch:success": Z,
|
|
@@ -6710,111 +6709,111 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6710
6709
|
}, {
|
|
6711
6710
|
default: p(() => [
|
|
6712
6711
|
y(Lu, {
|
|
6713
|
-
"client-certificate":
|
|
6714
|
-
"onUpdate:clientCertificate": v[0] || (v[0] = (w) =>
|
|
6715
|
-
"host-header":
|
|
6716
|
-
"onUpdate:hostHeader": v[1] || (v[1] = (w) =>
|
|
6717
|
-
name:
|
|
6718
|
-
"onUpdate:name": v[2] || (v[2] = (w) =>
|
|
6719
|
-
tags:
|
|
6720
|
-
"onUpdate:tags": v[3] || (v[3] = (w) =>
|
|
6712
|
+
"client-certificate": r.fields.clientCertificate,
|
|
6713
|
+
"onUpdate:clientCertificate": v[0] || (v[0] = (w) => r.fields.clientCertificate = w),
|
|
6714
|
+
"host-header": r.fields.hostHeader,
|
|
6715
|
+
"onUpdate:hostHeader": v[1] || (v[1] = (w) => r.fields.hostHeader = w),
|
|
6716
|
+
name: r.fields.name,
|
|
6717
|
+
"onUpdate:name": v[2] || (v[2] = (w) => r.fields.name = w),
|
|
6718
|
+
tags: r.fields.tags,
|
|
6719
|
+
"onUpdate:tags": v[3] || (v[3] = (w) => r.fields.tags = w),
|
|
6721
6720
|
config: e.config,
|
|
6722
|
-
readonly:
|
|
6721
|
+
readonly: r.readonly
|
|
6723
6722
|
}, null, 8, ["client-certificate", "host-header", "name", "tags", "config", "readonly"]),
|
|
6724
6723
|
y(Wu, {
|
|
6725
|
-
algorithm:
|
|
6726
|
-
"onUpdate:algorithm": v[4] || (v[4] = (w) =>
|
|
6727
|
-
"hash-fallback":
|
|
6728
|
-
"onUpdate:hashFallback": v[5] || (v[5] = (w) =>
|
|
6729
|
-
"hash-fallback-header":
|
|
6730
|
-
"onUpdate:hashFallbackHeader": v[6] || (v[6] = (w) =>
|
|
6731
|
-
"hash-fallback-query-argument":
|
|
6732
|
-
"onUpdate:hashFallbackQueryArgument": v[7] || (v[7] = (w) =>
|
|
6733
|
-
"hash-fallback-uri-capture":
|
|
6734
|
-
"onUpdate:hashFallbackUriCapture": v[8] || (v[8] = (w) =>
|
|
6735
|
-
"hash-on":
|
|
6736
|
-
"onUpdate:hashOn": v[9] || (v[9] = (w) =>
|
|
6737
|
-
"hash-on-cookie":
|
|
6738
|
-
"onUpdate:hashOnCookie": v[10] || (v[10] = (w) =>
|
|
6739
|
-
"hash-on-cookie-path":
|
|
6740
|
-
"onUpdate:hashOnCookiePath": v[11] || (v[11] = (w) =>
|
|
6741
|
-
"hash-on-header":
|
|
6742
|
-
"onUpdate:hashOnHeader": v[12] || (v[12] = (w) =>
|
|
6743
|
-
"hash-on-query-argument":
|
|
6744
|
-
"onUpdate:hashOnQueryArgument": v[13] || (v[13] = (w) =>
|
|
6745
|
-
"hash-on-uri-capture":
|
|
6746
|
-
"onUpdate:hashOnUriCapture": v[14] || (v[14] = (w) =>
|
|
6747
|
-
slots:
|
|
6748
|
-
"onUpdate:slots": v[15] || (v[15] = (w) =>
|
|
6749
|
-
readonly:
|
|
6724
|
+
algorithm: r.fields.algorithm,
|
|
6725
|
+
"onUpdate:algorithm": v[4] || (v[4] = (w) => r.fields.algorithm = w),
|
|
6726
|
+
"hash-fallback": r.fields.hashFallback,
|
|
6727
|
+
"onUpdate:hashFallback": v[5] || (v[5] = (w) => r.fields.hashFallback = w),
|
|
6728
|
+
"hash-fallback-header": r.fields.hashFallbackHeader,
|
|
6729
|
+
"onUpdate:hashFallbackHeader": v[6] || (v[6] = (w) => r.fields.hashFallbackHeader = w),
|
|
6730
|
+
"hash-fallback-query-argument": r.fields.hashFallbackQueryArgument,
|
|
6731
|
+
"onUpdate:hashFallbackQueryArgument": v[7] || (v[7] = (w) => r.fields.hashFallbackQueryArgument = w),
|
|
6732
|
+
"hash-fallback-uri-capture": r.fields.hashFallbackUriCapture,
|
|
6733
|
+
"onUpdate:hashFallbackUriCapture": v[8] || (v[8] = (w) => r.fields.hashFallbackUriCapture = w),
|
|
6734
|
+
"hash-on": r.fields.hashOn,
|
|
6735
|
+
"onUpdate:hashOn": v[9] || (v[9] = (w) => r.fields.hashOn = w),
|
|
6736
|
+
"hash-on-cookie": r.fields.hashOnCookie,
|
|
6737
|
+
"onUpdate:hashOnCookie": v[10] || (v[10] = (w) => r.fields.hashOnCookie = w),
|
|
6738
|
+
"hash-on-cookie-path": r.fields.hashOnCookiePath,
|
|
6739
|
+
"onUpdate:hashOnCookiePath": v[11] || (v[11] = (w) => r.fields.hashOnCookiePath = w),
|
|
6740
|
+
"hash-on-header": r.fields.hashOnHeader,
|
|
6741
|
+
"onUpdate:hashOnHeader": v[12] || (v[12] = (w) => r.fields.hashOnHeader = w),
|
|
6742
|
+
"hash-on-query-argument": r.fields.hashOnQueryArgument,
|
|
6743
|
+
"onUpdate:hashOnQueryArgument": v[13] || (v[13] = (w) => r.fields.hashOnQueryArgument = w),
|
|
6744
|
+
"hash-on-uri-capture": r.fields.hashOnUriCapture,
|
|
6745
|
+
"onUpdate:hashOnUriCapture": v[14] || (v[14] = (w) => r.fields.hashOnUriCapture = w),
|
|
6746
|
+
slots: r.fields.slots,
|
|
6747
|
+
"onUpdate:slots": v[15] || (v[15] = (w) => r.fields.slots = w),
|
|
6748
|
+
readonly: r.readonly
|
|
6750
6749
|
}, null, 8, ["algorithm", "hash-fallback", "hash-fallback-header", "hash-fallback-query-argument", "hash-fallback-uri-capture", "hash-on", "hash-on-cookie", "hash-on-cookie-path", "hash-on-header", "hash-on-query-argument", "hash-on-uri-capture", "slots", "readonly"]),
|
|
6751
6750
|
y(ec, {
|
|
6752
|
-
"active-health-switch":
|
|
6751
|
+
"active-health-switch": r.fields.activeHealthSwitch,
|
|
6753
6752
|
"onUpdate:activeHealthSwitch": [
|
|
6754
|
-
v[16] || (v[16] = (w) =>
|
|
6753
|
+
v[16] || (v[16] = (w) => r.fields.activeHealthSwitch = w),
|
|
6755
6754
|
g
|
|
6756
6755
|
],
|
|
6757
|
-
"healthchecks-threshold":
|
|
6758
|
-
"onUpdate:healthchecksThreshold": v[17] || (v[17] = (w) =>
|
|
6759
|
-
"passive-health-switch":
|
|
6756
|
+
"healthchecks-threshold": r.fields.healthchecksThreshold,
|
|
6757
|
+
"onUpdate:healthchecksThreshold": v[17] || (v[17] = (w) => r.fields.healthchecksThreshold = w),
|
|
6758
|
+
"passive-health-switch": r.fields.passiveHealthSwitch,
|
|
6760
6759
|
"onUpdate:passiveHealthSwitch": [
|
|
6761
|
-
v[18] || (v[18] = (w) =>
|
|
6760
|
+
v[18] || (v[18] = (w) => r.fields.passiveHealthSwitch = w),
|
|
6762
6761
|
m
|
|
6763
6762
|
],
|
|
6764
|
-
readonly:
|
|
6763
|
+
readonly: r.readonly
|
|
6765
6764
|
}, null, 8, ["active-health-switch", "healthchecks-threshold", "passive-health-switch", "readonly"]),
|
|
6766
|
-
|
|
6765
|
+
r.fields.activeHealthSwitch ? (b(), D(nc, {
|
|
6767
6766
|
key: 0,
|
|
6768
|
-
concurrency:
|
|
6769
|
-
"onUpdate:concurrency": v[19] || (v[19] = (w) =>
|
|
6770
|
-
headers:
|
|
6771
|
-
"onUpdate:headers": v[20] || (v[20] = (w) =>
|
|
6772
|
-
"http-failures":
|
|
6773
|
-
"onUpdate:httpFailures": v[21] || (v[21] = (w) =>
|
|
6774
|
-
"http-path":
|
|
6775
|
-
"onUpdate:httpPath": v[22] || (v[22] = (w) =>
|
|
6776
|
-
"http-statuses":
|
|
6777
|
-
"onUpdate:httpStatuses": v[23] || (v[23] = (w) =>
|
|
6778
|
-
"https-sni":
|
|
6779
|
-
"onUpdate:httpsSni": v[24] || (v[24] = (w) =>
|
|
6780
|
-
interval:
|
|
6781
|
-
"onUpdate:interval": v[25] || (v[25] = (w) =>
|
|
6782
|
-
successes:
|
|
6783
|
-
"onUpdate:successes": v[26] || (v[26] = (w) =>
|
|
6784
|
-
"tcp-failures":
|
|
6785
|
-
"onUpdate:tcpFailures": v[27] || (v[27] = (w) =>
|
|
6786
|
-
timeout:
|
|
6787
|
-
"onUpdate:timeout": v[28] || (v[28] = (w) =>
|
|
6788
|
-
type:
|
|
6789
|
-
"onUpdate:type": v[29] || (v[29] = (w) =>
|
|
6790
|
-
"unhealthy-http-statuses":
|
|
6791
|
-
"onUpdate:unhealthyHttpStatuses": v[30] || (v[30] = (w) =>
|
|
6792
|
-
"unhealthy-interval":
|
|
6793
|
-
"onUpdate:unhealthyInterval": v[31] || (v[31] = (w) =>
|
|
6794
|
-
"unhealthy-timeouts":
|
|
6795
|
-
"onUpdate:unhealthyTimeouts": v[32] || (v[32] = (w) =>
|
|
6796
|
-
"verify-ssl":
|
|
6797
|
-
"onUpdate:verifySsl": v[33] || (v[33] = (w) =>
|
|
6767
|
+
concurrency: r.fields.activeHealthCheck.concurrency,
|
|
6768
|
+
"onUpdate:concurrency": v[19] || (v[19] = (w) => r.fields.activeHealthCheck.concurrency = w),
|
|
6769
|
+
headers: r.fields.activeHealthCheck.headers,
|
|
6770
|
+
"onUpdate:headers": v[20] || (v[20] = (w) => r.fields.activeHealthCheck.headers = w),
|
|
6771
|
+
"http-failures": r.fields.activeHealthCheck.httpFailures,
|
|
6772
|
+
"onUpdate:httpFailures": v[21] || (v[21] = (w) => r.fields.activeHealthCheck.httpFailures = w),
|
|
6773
|
+
"http-path": r.fields.activeHealthCheck.httpPath,
|
|
6774
|
+
"onUpdate:httpPath": v[22] || (v[22] = (w) => r.fields.activeHealthCheck.httpPath = w),
|
|
6775
|
+
"http-statuses": r.fields.activeHealthCheck.httpStatuses,
|
|
6776
|
+
"onUpdate:httpStatuses": v[23] || (v[23] = (w) => r.fields.activeHealthCheck.httpStatuses = w),
|
|
6777
|
+
"https-sni": r.fields.activeHealthCheck.httpsSni,
|
|
6778
|
+
"onUpdate:httpsSni": v[24] || (v[24] = (w) => r.fields.activeHealthCheck.httpsSni = w),
|
|
6779
|
+
interval: r.fields.activeHealthCheck.interval,
|
|
6780
|
+
"onUpdate:interval": v[25] || (v[25] = (w) => r.fields.activeHealthCheck.interval = w),
|
|
6781
|
+
successes: r.fields.activeHealthCheck.successes,
|
|
6782
|
+
"onUpdate:successes": v[26] || (v[26] = (w) => r.fields.activeHealthCheck.successes = w),
|
|
6783
|
+
"tcp-failures": r.fields.activeHealthCheck.tcpFailures,
|
|
6784
|
+
"onUpdate:tcpFailures": v[27] || (v[27] = (w) => r.fields.activeHealthCheck.tcpFailures = w),
|
|
6785
|
+
timeout: r.fields.activeHealthCheck.timeout,
|
|
6786
|
+
"onUpdate:timeout": v[28] || (v[28] = (w) => r.fields.activeHealthCheck.timeout = w),
|
|
6787
|
+
type: r.fields.activeHealthCheck.type,
|
|
6788
|
+
"onUpdate:type": v[29] || (v[29] = (w) => r.fields.activeHealthCheck.type = w),
|
|
6789
|
+
"unhealthy-http-statuses": r.fields.activeHealthCheck.unhealthyHttpStatuses,
|
|
6790
|
+
"onUpdate:unhealthyHttpStatuses": v[30] || (v[30] = (w) => r.fields.activeHealthCheck.unhealthyHttpStatuses = w),
|
|
6791
|
+
"unhealthy-interval": r.fields.activeHealthCheck.unhealthyInterval,
|
|
6792
|
+
"onUpdate:unhealthyInterval": v[31] || (v[31] = (w) => r.fields.activeHealthCheck.unhealthyInterval = w),
|
|
6793
|
+
"unhealthy-timeouts": r.fields.activeHealthCheck.unhealthyTimeouts,
|
|
6794
|
+
"onUpdate:unhealthyTimeouts": v[32] || (v[32] = (w) => r.fields.activeHealthCheck.unhealthyTimeouts = w),
|
|
6795
|
+
"verify-ssl": r.fields.activeHealthCheck.verifySsl,
|
|
6796
|
+
"onUpdate:verifySsl": v[33] || (v[33] = (w) => r.fields.activeHealthCheck.verifySsl = w),
|
|
6798
6797
|
config: e.config,
|
|
6799
|
-
readonly:
|
|
6798
|
+
readonly: r.readonly
|
|
6800
6799
|
}, null, 8, ["concurrency", "headers", "http-failures", "http-path", "http-statuses", "https-sni", "interval", "successes", "tcp-failures", "timeout", "type", "unhealthy-http-statuses", "unhealthy-interval", "unhealthy-timeouts", "verify-ssl", "config", "readonly"])) : Y("", !0),
|
|
6801
|
-
|
|
6800
|
+
r.fields.passiveHealthSwitch ? (b(), D(pc, {
|
|
6802
6801
|
key: 1,
|
|
6803
|
-
"http-failures":
|
|
6804
|
-
"onUpdate:httpFailures": v[34] || (v[34] = (w) =>
|
|
6805
|
-
"http-statuses":
|
|
6806
|
-
"onUpdate:httpStatuses": v[35] || (v[35] = (w) =>
|
|
6807
|
-
successes:
|
|
6808
|
-
"onUpdate:successes": v[36] || (v[36] = (w) =>
|
|
6809
|
-
"tcp-failures":
|
|
6810
|
-
"onUpdate:tcpFailures": v[37] || (v[37] = (w) =>
|
|
6811
|
-
timeouts:
|
|
6812
|
-
"onUpdate:timeouts": v[38] || (v[38] = (w) =>
|
|
6813
|
-
type:
|
|
6814
|
-
"onUpdate:type": v[39] || (v[39] = (w) =>
|
|
6815
|
-
"unhealthy-http-statuses":
|
|
6816
|
-
"onUpdate:unhealthyHttpStatuses": v[40] || (v[40] = (w) =>
|
|
6817
|
-
readonly:
|
|
6802
|
+
"http-failures": r.fields.passiveHealthCheck.httpFailures,
|
|
6803
|
+
"onUpdate:httpFailures": v[34] || (v[34] = (w) => r.fields.passiveHealthCheck.httpFailures = w),
|
|
6804
|
+
"http-statuses": r.fields.passiveHealthCheck.httpStatuses,
|
|
6805
|
+
"onUpdate:httpStatuses": v[35] || (v[35] = (w) => r.fields.passiveHealthCheck.httpStatuses = w),
|
|
6806
|
+
successes: r.fields.passiveHealthCheck.successes,
|
|
6807
|
+
"onUpdate:successes": v[36] || (v[36] = (w) => r.fields.passiveHealthCheck.successes = w),
|
|
6808
|
+
"tcp-failures": r.fields.passiveHealthCheck.tcpFailures,
|
|
6809
|
+
"onUpdate:tcpFailures": v[37] || (v[37] = (w) => r.fields.passiveHealthCheck.tcpFailures = w),
|
|
6810
|
+
timeouts: r.fields.passiveHealthCheck.timeouts,
|
|
6811
|
+
"onUpdate:timeouts": v[38] || (v[38] = (w) => r.fields.passiveHealthCheck.timeouts = w),
|
|
6812
|
+
type: r.fields.passiveHealthCheck.type,
|
|
6813
|
+
"onUpdate:type": v[39] || (v[39] = (w) => r.fields.passiveHealthCheck.type = w),
|
|
6814
|
+
"unhealthy-http-statuses": r.fields.passiveHealthCheck.unhealthyHttpStatuses,
|
|
6815
|
+
"onUpdate:unhealthyHttpStatuses": v[40] || (v[40] = (w) => r.fields.passiveHealthCheck.unhealthyHttpStatuses = w),
|
|
6816
|
+
readonly: r.readonly
|
|
6818
6817
|
}, null, 8, ["http-failures", "http-statuses", "successes", "tcp-failures", "timeouts", "type", "unhealthy-http-statuses", "readonly"])) : Y("", !0)
|
|
6819
6818
|
]),
|
|
6820
6819
|
_: 1
|
|
@@ -6822,7 +6821,7 @@ const pc = /* @__PURE__ */ Ie(hc, [["__scopeId", "data-v-6d6854e3"]]), fc = { cl
|
|
|
6822
6821
|
]));
|
|
6823
6822
|
}
|
|
6824
6823
|
});
|
|
6825
|
-
const Ac = /* @__PURE__ */ Ie(mc, [["__scopeId", "data-v-810fb7b7"]]), gc = /* @__PURE__ */ x("code", null, "10", -1), yc = /* @__PURE__ */ x("code", null, "65536", -1), vc = { "data-testid": "client_certificate-plain-text" },
|
|
6824
|
+
const Ac = /* @__PURE__ */ Ie(mc, [["__scopeId", "data-v-810fb7b7"]]), gc = /* @__PURE__ */ x("code", null, "10", -1), yc = /* @__PURE__ */ x("code", null, "65536", -1), vc = { "data-testid": "client_certificate-plain-text" }, Fc = /* @__PURE__ */ le({
|
|
6826
6825
|
__name: "UpstreamsConfigCard",
|
|
6827
6826
|
props: {
|
|
6828
6827
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -6849,48 +6848,48 @@ const Ac = /* @__PURE__ */ Ie(mc, [["__scopeId", "data-v-810fb7b7"]]), gc = /* @
|
|
|
6849
6848
|
},
|
|
6850
6849
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
6851
6850
|
setup(e) {
|
|
6852
|
-
const a = e, { i18n: { t }, i18nT: l } = Se.useI18n(), { getPropValue: s } = vu(),
|
|
6851
|
+
const a = e, { i18n: { t }, i18nT: l } = Se.useI18n(), { getPropValue: s } = vu(), n = O(() => Ve.form[a.config.app].edit), o = B({
|
|
6853
6852
|
id: {},
|
|
6854
6853
|
name: {},
|
|
6855
6854
|
created_at: {},
|
|
6856
6855
|
updated_at: {},
|
|
6857
6856
|
algorithm: {
|
|
6858
6857
|
order: 5,
|
|
6859
|
-
section:
|
|
6858
|
+
section: ie.Basic,
|
|
6860
6859
|
tooltip: t("upstreams.form.fields.algorithm.tooltip")
|
|
6861
6860
|
},
|
|
6862
6861
|
slots: {
|
|
6863
6862
|
order: 6,
|
|
6864
|
-
section:
|
|
6863
|
+
section: ie.Basic
|
|
6865
6864
|
},
|
|
6866
6865
|
hash_on: {
|
|
6867
6866
|
order: 7,
|
|
6868
|
-
section:
|
|
6867
|
+
section: ie.Basic
|
|
6869
6868
|
},
|
|
6870
6869
|
hash_on_header: {
|
|
6871
6870
|
order: 8,
|
|
6872
|
-
section:
|
|
6871
|
+
section: ie.Basic
|
|
6873
6872
|
},
|
|
6874
6873
|
hash_on_uri_capture: {
|
|
6875
6874
|
order: 9,
|
|
6876
|
-
section:
|
|
6875
|
+
section: ie.Basic
|
|
6877
6876
|
},
|
|
6878
6877
|
hash_on_query_arg: {
|
|
6879
6878
|
order: 10,
|
|
6880
|
-
section:
|
|
6879
|
+
section: ie.Basic,
|
|
6881
6880
|
label: `${t("upstreams.form.fields.hash_on.label")} ${t("upstreams.form.hash_labels.query_argument")}`
|
|
6882
6881
|
},
|
|
6883
6882
|
hash_on_cookie: {
|
|
6884
6883
|
order: 11,
|
|
6885
|
-
section:
|
|
6884
|
+
section: ie.Basic
|
|
6886
6885
|
},
|
|
6887
6886
|
hash_on_cookie_path: {
|
|
6888
6887
|
order: 12,
|
|
6889
|
-
section:
|
|
6888
|
+
section: ie.Basic
|
|
6890
6889
|
},
|
|
6891
6890
|
healthchecks: {
|
|
6892
6891
|
order: 13,
|
|
6893
|
-
section:
|
|
6892
|
+
section: ie.Basic,
|
|
6894
6893
|
// TODO: change to JsonArray
|
|
6895
6894
|
type: se.Json
|
|
6896
6895
|
},
|
|
@@ -6923,17 +6922,17 @@ const Ac = /* @__PURE__ */ Ie(mc, [["__scopeId", "data-v-810fb7b7"]]), gc = /* @
|
|
|
6923
6922
|
tooltip: t("upstreams.form.hash_tooltips.client_certificate")
|
|
6924
6923
|
}
|
|
6925
6924
|
});
|
|
6926
|
-
return (d,
|
|
6925
|
+
return (d, i) => (b(), K("div", null, [
|
|
6927
6926
|
y(c(Po), {
|
|
6928
6927
|
config: e.config,
|
|
6929
6928
|
"config-card-doc": e.configCardDoc,
|
|
6930
6929
|
"config-schema": o.value,
|
|
6931
|
-
"fetch-url":
|
|
6930
|
+
"fetch-url": n.value,
|
|
6932
6931
|
"hide-title": e.hideTitle,
|
|
6933
|
-
"onCopy:success":
|
|
6934
|
-
"onFetch:error":
|
|
6935
|
-
"onFetch:success":
|
|
6936
|
-
onLoading:
|
|
6932
|
+
"onCopy:success": i[0] || (i[0] = (u) => d.$emit("copy:success", u)),
|
|
6933
|
+
"onFetch:error": i[1] || (i[1] = (u) => d.$emit("fetch:error", u)),
|
|
6934
|
+
"onFetch:success": i[2] || (i[2] = (u) => d.$emit("fetch:success", u)),
|
|
6935
|
+
onLoading: i[3] || (i[3] = (u) => d.$emit("loading", u))
|
|
6937
6936
|
}, {
|
|
6938
6937
|
"name-label-tooltip": p(() => [
|
|
6939
6938
|
y(c(l), {
|
|
@@ -7141,7 +7140,7 @@ const Ac = /* @__PURE__ */ Ie(mc, [["__scopeId", "data-v-810fb7b7"]]), gc = /* @
|
|
|
7141
7140
|
export {
|
|
7142
7141
|
Ku as TargetForm,
|
|
7143
7142
|
Tc as TargetsList,
|
|
7144
|
-
|
|
7143
|
+
Fc as UpstreamsConfigCard,
|
|
7145
7144
|
Ac as UpstreamsForm,
|
|
7146
7145
|
Hc as UpstreamsList
|
|
7147
7146
|
};
|