@kong-ui-public/entities-consumer-groups 3.2.1 → 3.2.2-pr.1446.3827ee81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-consumer-groups.es.js +865 -870
- package/dist/entities-consumer-groups.umd.js +12 -12
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { defineComponent as X, computed as
|
|
1
|
+
import { defineComponent as X, computed as _, openBlock as m, createBlock as V, resolveDynamicComponent as Se, normalizeStyle as He, withCtx as v, createElementBlock as $, toDisplayString as F, createCommentVNode as J, pushScopeId as Je, popScopeId as Ze, createElementVNode as L, ref as M, watch as Te, renderSlot as ne, unref as g, onBeforeMount as gt, resolveComponent as R, createSlots as Be, createVNode as j, createTextVNode as Y, renderList as ve, withModifiers as St, withDirectives as je, vShow as Ne, Fragment as be, normalizeClass as Ee, withKeys as wr, useSlots as Nt, useCssVars as bn, inject as _r, onMounted as Ir, onUnmounted as Sr, normalizeProps as xr, guardReactiveProps as Ar, mergeProps as Tr, Teleport as $r, reactive as zt } from "vue";
|
|
2
2
|
import { useRouter as Ot } from "vue-router";
|
|
3
3
|
import { createI18n as Cn, i18nTComponent as kn } from "@kong-ui-public/i18n";
|
|
4
4
|
import Gt from "axios";
|
|
5
|
-
import { BadgeMethodAppearances as
|
|
6
|
-
const Ht = "24px",
|
|
5
|
+
import { BadgeMethodAppearances as jr } from "@kong/kongponents";
|
|
6
|
+
const Ht = "24px", Nr = (e, t) => {
|
|
7
7
|
const n = e.__vccOpts || e;
|
|
8
8
|
for (const [r, a] of t)
|
|
9
9
|
n[r] = a;
|
|
10
10
|
return n;
|
|
11
|
-
}, Or = (e) => (Je("data-v-
|
|
11
|
+
}, Or = (e) => (Je("data-v-f68c7837"), e = e(), Ze(), e), Mr = ["aria-hidden"], Er = {
|
|
12
12
|
key: 0,
|
|
13
13
|
"data-testid": "kui-icon-svg-title"
|
|
14
|
-
},
|
|
14
|
+
}, Fr = /* @__PURE__ */ Or(() => /* @__PURE__ */ L("path", {
|
|
15
15
|
d: "M11 19V13H5V11H11V5H13V11H19V13H13V19H11Z",
|
|
16
16
|
fill: "currentColor"
|
|
17
|
-
}, null, -1)),
|
|
17
|
+
}, null, -1)), qr = /* @__PURE__ */ X({
|
|
18
18
|
__name: "AddIcon",
|
|
19
19
|
props: {
|
|
20
20
|
/** The accessibility text provided to screen readers */
|
|
@@ -66,7 +66,7 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
68
|
setup(e) {
|
|
69
|
-
const t = e, n =
|
|
69
|
+
const t = e, n = _(() => {
|
|
70
70
|
if (typeof t.size == "number" && t.size > 0)
|
|
71
71
|
return `${t.size}px`;
|
|
72
72
|
if (typeof t.size == "string") {
|
|
@@ -75,7 +75,7 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
75
75
|
return `${i}px`;
|
|
76
76
|
}
|
|
77
77
|
return Ht;
|
|
78
|
-
}), r =
|
|
78
|
+
}), r = _(() => ({
|
|
79
79
|
boxSizing: "border-box",
|
|
80
80
|
color: t.color,
|
|
81
81
|
display: t.display,
|
|
@@ -83,7 +83,7 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
83
83
|
lineHeight: "0",
|
|
84
84
|
width: n.value
|
|
85
85
|
}));
|
|
86
|
-
return (a, i) => (m(),
|
|
86
|
+
return (a, i) => (m(), V(Se(e.as), {
|
|
87
87
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
88
88
|
class: "kui-icon add-icon",
|
|
89
89
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
@@ -100,14 +100,14 @@ const Ht = "24px", jr = (e, t) => {
|
|
|
100
100
|
width: "100%",
|
|
101
101
|
xmlns: "http://www.w3.org/2000/svg"
|
|
102
102
|
}, [
|
|
103
|
-
e.title ? (m(), $("title",
|
|
104
|
-
|
|
105
|
-
], 8,
|
|
103
|
+
e.title ? (m(), $("title", Er, F(e.title), 1)) : J("", !0),
|
|
104
|
+
Fr
|
|
105
|
+
], 8, Mr))
|
|
106
106
|
]),
|
|
107
107
|
_: 1
|
|
108
108
|
}, 8, ["aria-hidden", "style"]));
|
|
109
109
|
}
|
|
110
|
-
}), Kr = /* @__PURE__ */
|
|
110
|
+
}), Kr = /* @__PURE__ */ Nr(qr, [["__scopeId", "data-v-f68c7837"]]), Br = {
|
|
111
111
|
list: {
|
|
112
112
|
table_headers: {
|
|
113
113
|
name: "Name",
|
|
@@ -209,39 +209,39 @@ function Ur() {
|
|
|
209
209
|
}
|
|
210
210
|
const yt = {
|
|
211
211
|
useI18n: Ur
|
|
212
|
-
},
|
|
212
|
+
}, xe = "/v2/control-planes/{controlPlaneId}/core-entities", Ae = "/{workspace}", Oe = {
|
|
213
213
|
list: {
|
|
214
214
|
konnect: {
|
|
215
|
-
all: `${
|
|
216
|
-
forConsumer: `${
|
|
217
|
-
oneForConsumer: `${
|
|
215
|
+
all: `${xe}/consumer_groups`,
|
|
216
|
+
forConsumer: `${xe}/consumers/{consumerId}/consumer_groups`,
|
|
217
|
+
oneForConsumer: `${xe}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
218
218
|
},
|
|
219
219
|
kongManager: {
|
|
220
|
-
all: `${
|
|
221
|
-
forConsumer: `${
|
|
222
|
-
oneForConsumer: `${
|
|
220
|
+
all: `${Ae}/consumer_groups?counter=true`,
|
|
221
|
+
forConsumer: `${Ae}/consumers/{consumerId}/consumer_groups`,
|
|
222
|
+
oneForConsumer: `${Ae}/consumers/{consumerId}/consumer_groups/{consumerGroupId}`
|
|
223
223
|
}
|
|
224
224
|
},
|
|
225
225
|
form: {
|
|
226
226
|
konnect: {
|
|
227
|
+
consumersList: `${xe}/consumers`,
|
|
228
|
+
create: `${xe}/consumer_groups`,
|
|
229
|
+
edit: `${xe}/consumer_groups/{id}`,
|
|
230
|
+
addConsumer: `${xe}/consumer_groups/{id}/consumers`,
|
|
231
|
+
removeConsumer: `${xe}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
232
|
+
getConsumers: `${xe}/consumer_groups/{id}/consumers`
|
|
233
|
+
},
|
|
234
|
+
kongManager: {
|
|
227
235
|
consumersList: `${Ae}/consumers`,
|
|
228
236
|
create: `${Ae}/consumer_groups`,
|
|
229
237
|
edit: `${Ae}/consumer_groups/{id}`,
|
|
230
238
|
addConsumer: `${Ae}/consumer_groups/{id}/consumers`,
|
|
231
239
|
removeConsumer: `${Ae}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
232
240
|
getConsumers: `${Ae}/consumer_groups/{id}/consumers`
|
|
233
|
-
},
|
|
234
|
-
kongManager: {
|
|
235
|
-
consumersList: `${Ie}/consumers`,
|
|
236
|
-
create: `${Ie}/consumer_groups`,
|
|
237
|
-
edit: `${Ie}/consumer_groups/{id}`,
|
|
238
|
-
addConsumer: `${Ie}/consumer_groups/{id}/consumers`,
|
|
239
|
-
removeConsumer: `${Ie}/consumer_groups/{id}/consumers/{consumerId}`,
|
|
240
|
-
getConsumers: `${Ie}/consumer_groups/{id}/consumers`
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
243
|
};
|
|
244
|
-
var wn = /* @__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))(wn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}),
|
|
244
|
+
var wn = /* @__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))(wn || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), qe = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(qe || {}), ee = /* @__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))(ee || {}), he = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(he || {});
|
|
245
245
|
function Pr() {
|
|
246
246
|
return {
|
|
247
247
|
getAxiosInstance: (e = {}) => {
|
|
@@ -266,7 +266,7 @@ function Pr() {
|
|
|
266
266
|
}
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function Vr() {
|
|
270
270
|
return {
|
|
271
271
|
debounce: (e, t) => {
|
|
272
272
|
let n;
|
|
@@ -278,7 +278,7 @@ function Rr() {
|
|
|
278
278
|
}
|
|
279
279
|
};
|
|
280
280
|
}
|
|
281
|
-
const kt = "khcp-user-table-preferences",
|
|
281
|
+
const kt = "khcp-user-table-preferences", Rr = {
|
|
282
282
|
pageSize: 30,
|
|
283
283
|
sortColumnKey: void 0,
|
|
284
284
|
sortColumnOrder: void 0,
|
|
@@ -309,14 +309,14 @@ function Dr() {
|
|
|
309
309
|
},
|
|
310
310
|
getTablePreferences: (n) => {
|
|
311
311
|
const r = t();
|
|
312
|
-
return (r == null ? void 0 : r.get(n)) || void 0 ||
|
|
312
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || Rr;
|
|
313
313
|
},
|
|
314
314
|
deleteAllTablePreferences: () => {
|
|
315
315
|
localStorage.removeItem(kt);
|
|
316
316
|
}
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function Mt(e = {}) {
|
|
320
320
|
const { getAxiosInstance: t } = Pr();
|
|
321
321
|
return {
|
|
322
322
|
axiosInstance: t(e)
|
|
@@ -487,46 +487,46 @@ function na(e, t, n, r = {
|
|
|
487
487
|
searchKeys: ["id"]
|
|
488
488
|
}) {
|
|
489
489
|
n || (n = "1000");
|
|
490
|
-
const { axiosInstance: a } =
|
|
490
|
+
const { axiosInstance: a } = Mt(e.axiosRequestConfig), { i18n: { t: i } } = ht(), { debounce: o } = Vr(), s = o(async (h) => {
|
|
491
491
|
await Z(h);
|
|
492
|
-
}, 200), l =
|
|
493
|
-
let
|
|
494
|
-
e.app === "konnect" ?
|
|
495
|
-
const { isValidUuid:
|
|
492
|
+
}, 200), l = M(!1), u = M(""), p = M(""), c = M([]), y = M([]), f = M(void 0), b = g(t);
|
|
493
|
+
let I = `${e.apiBaseUrl}${b}`;
|
|
494
|
+
e.app === "konnect" ? I = I.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (I = I.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
495
|
+
const { isValidUuid: A } = _n(), D = async () => {
|
|
496
496
|
try {
|
|
497
497
|
l.value = !0;
|
|
498
|
-
const { data: h } = await a.get(`${
|
|
498
|
+
const { data: h } = await a.get(`${I}?size=${n}`);
|
|
499
499
|
h != null && h.next || (f.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : []), y.value = r.fetchedItemsKey in h ? h[r.fetchedItemsKey] : [], c.value = y.value;
|
|
500
500
|
} catch {
|
|
501
501
|
c.value = [], u.value = i("debouncedFilter.errors.fetch");
|
|
502
502
|
} finally {
|
|
503
503
|
l.value = !1;
|
|
504
504
|
}
|
|
505
|
-
},
|
|
506
|
-
var
|
|
507
|
-
if (
|
|
508
|
-
if (
|
|
505
|
+
}, q = M(""), Z = async (h) => {
|
|
506
|
+
var w, d, x;
|
|
507
|
+
if (q.value !== h)
|
|
508
|
+
if (q.value = h || "", f.value === void 0)
|
|
509
509
|
try {
|
|
510
510
|
if (l.value = !0, u.value = "", p.value = "", e.app === "konnect") {
|
|
511
|
-
let B =
|
|
511
|
+
let B = I + "";
|
|
512
512
|
h && (B += `/${h}`);
|
|
513
|
-
const { data:
|
|
514
|
-
r.fetchedItemsKey in
|
|
513
|
+
const { data: S } = await a.get(`${B}?size=${n}`);
|
|
514
|
+
r.fetchedItemsKey in S ? c.value = S[r.fetchedItemsKey] : S != null && S.id ? c.value = [S] : c.value = [];
|
|
515
515
|
} else if (h) {
|
|
516
516
|
const B = [];
|
|
517
|
-
|
|
518
|
-
const { data:
|
|
519
|
-
return [
|
|
517
|
+
A(h) && r.searchKeys.includes("id") ? B.push((async () => {
|
|
518
|
+
const { data: E } = await a.get(`${I}/${h}`);
|
|
519
|
+
return [E[r.fetchedItemsKey] ?? E];
|
|
520
520
|
})()) : B.push(
|
|
521
|
-
...r.searchKeys.filter((
|
|
522
|
-
const { data:
|
|
523
|
-
return
|
|
521
|
+
...r.searchKeys.filter((E) => E !== "id").map(async (E) => {
|
|
522
|
+
const { data: C } = await a.get(`${I}?${E}=${h}`);
|
|
523
|
+
return C[r.fetchedItemsKey];
|
|
524
524
|
})
|
|
525
525
|
);
|
|
526
|
-
const
|
|
527
|
-
c.value = [], (
|
|
528
|
-
var
|
|
529
|
-
(
|
|
526
|
+
const S = await Promise.all(B), G = /* @__PURE__ */ new Set();
|
|
527
|
+
c.value = [], (w = S == null ? void 0 : S.forEach) == null || w.call(S, (E) => {
|
|
528
|
+
var C;
|
|
529
|
+
(C = E == null ? void 0 : E.forEach) == null || C.call(E, (K) => {
|
|
530
530
|
G.has(K.id) || (G.add(K.id), c.value.push(K));
|
|
531
531
|
});
|
|
532
532
|
});
|
|
@@ -538,12 +538,12 @@ function na(e, t, n, r = {
|
|
|
538
538
|
l.value = !1;
|
|
539
539
|
}
|
|
540
540
|
else
|
|
541
|
-
l.value = !0, p.value = "", h ? (c.value = (
|
|
542
|
-
var
|
|
541
|
+
l.value = !0, p.value = "", h ? (c.value = (x = f.value) == null ? void 0 : x.filter((B) => {
|
|
542
|
+
var S;
|
|
543
543
|
let G = !1;
|
|
544
|
-
for (const
|
|
545
|
-
const
|
|
546
|
-
|
|
544
|
+
for (const E of r.searchKeys) {
|
|
545
|
+
const C = typeof B[E] == "string" ? (S = B[E]) == null ? void 0 : S.toLowerCase() : B[E];
|
|
546
|
+
C != null && C.includes(h.toLowerCase()) && (G = !0);
|
|
547
547
|
}
|
|
548
548
|
return G;
|
|
549
549
|
}), (!c.value || !c.value.length) && (p.value = i("debouncedFilter.errors.invalid"))) : c.value = f.value, l.value = !1;
|
|
@@ -554,12 +554,12 @@ function na(e, t, n, r = {
|
|
|
554
554
|
validationError: p,
|
|
555
555
|
results: c,
|
|
556
556
|
allRecords: f,
|
|
557
|
-
loadItems:
|
|
557
|
+
loadItems: D,
|
|
558
558
|
debouncedQueryChange: s
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
561
|
function ra(e, t) {
|
|
562
|
-
const n = g(t), r =
|
|
562
|
+
const n = g(t), r = _(
|
|
563
563
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
564
564
|
);
|
|
565
565
|
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
@@ -605,18 +605,18 @@ function oa(e) {
|
|
|
605
605
|
return console.warn("Failed to build valid URL:", r), "";
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
const n =
|
|
608
|
+
function In(e, t) {
|
|
609
|
+
const n = M(g(e)), r = M(g(t)), a = _(
|
|
610
610
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
611
|
-
), i =
|
|
611
|
+
), i = _(
|
|
612
612
|
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
613
613
|
);
|
|
614
614
|
return (o) => {
|
|
615
615
|
const { page: s, pageSize: l, offset: u, sortColumnKey: p, sortColumnOrder: c, query: y } = o;
|
|
616
616
|
try {
|
|
617
617
|
let f = new URL(i.value.href);
|
|
618
|
-
return a.value && y ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${y}/`) : new URL(`${f.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((
|
|
619
|
-
f.searchParams.append(
|
|
618
|
+
return a.value && y ? (f.search = "", f = n.value.isExactMatch ? new URL(`${f.href}/${y}/`) : new URL(`${f.href}?filter[name][contains]=${y}`)) : (a.value || new URLSearchParams(y).forEach((b, I) => {
|
|
619
|
+
f.searchParams.append(I, b);
|
|
620
620
|
}), p && f.searchParams.append("sort_by", p), c === "desc" && f.searchParams.append("sort_desc", "1"), f.searchParams.append("size", String(l))), u && s !== 1 && f.searchParams.append("offset", String(u)), f.href;
|
|
621
621
|
} catch (f) {
|
|
622
622
|
return console.error("RouteList(fetcher)", f), r.value;
|
|
@@ -624,13 +624,13 @@ function Sn(e, t) {
|
|
|
624
624
|
};
|
|
625
625
|
}
|
|
626
626
|
function ia(e, t, n = "data") {
|
|
627
|
-
const r = g(t), { axiosInstance: a } =
|
|
628
|
-
status:
|
|
627
|
+
const r = g(t), { axiosInstance: a } = Mt(e.axiosRequestConfig), i = In(e, r), o = M({
|
|
628
|
+
status: qe.Idle
|
|
629
629
|
});
|
|
630
630
|
return { fetcher: async (s) => {
|
|
631
631
|
var l;
|
|
632
632
|
try {
|
|
633
|
-
o.value = { status:
|
|
633
|
+
o.value = { status: qe.Loading };
|
|
634
634
|
let u = i(s);
|
|
635
635
|
u.includes("filter[name]") && (u = `${u}&page[size]=${s.pageSize}&page[number]=${s.page}`);
|
|
636
636
|
const p = await a.get(u);
|
|
@@ -639,7 +639,7 @@ function ia(e, t, n = "data") {
|
|
|
639
639
|
const c = p.data, y = n && n.replace(/[^\w-_]/gi, "");
|
|
640
640
|
let f;
|
|
641
641
|
c[y] && Array.isArray(c[y]) ? f = c[y] : Array.isArray(c) ? f = c : f = Object.keys(c).length ? [c] : [];
|
|
642
|
-
const
|
|
642
|
+
const b = {
|
|
643
643
|
data: f,
|
|
644
644
|
total: f.length,
|
|
645
645
|
...c.offset ? {
|
|
@@ -649,20 +649,20 @@ function ia(e, t, n = "data") {
|
|
|
649
649
|
} : null
|
|
650
650
|
};
|
|
651
651
|
return o.value = {
|
|
652
|
-
status:
|
|
653
|
-
response:
|
|
654
|
-
},
|
|
652
|
+
status: qe.Idle,
|
|
653
|
+
response: b
|
|
654
|
+
}, b;
|
|
655
655
|
} catch (u) {
|
|
656
656
|
const p = {
|
|
657
657
|
data: [],
|
|
658
658
|
total: 0
|
|
659
659
|
};
|
|
660
660
|
return s.query && (((l = u.response) == null ? void 0 : l.status) === 404 || u.status === 404) ? (o.value = {
|
|
661
|
-
status:
|
|
661
|
+
status: qe.NoResults,
|
|
662
662
|
response: p,
|
|
663
663
|
error: u.response ? u : { response: u }
|
|
664
664
|
}, p) : (o.value = {
|
|
665
|
-
status:
|
|
665
|
+
status: qe.Error,
|
|
666
666
|
response: p,
|
|
667
667
|
error: u.response ? u : { response: u }
|
|
668
668
|
}, p);
|
|
@@ -676,10 +676,10 @@ function sa() {
|
|
|
676
676
|
convertKeyToTitle: e
|
|
677
677
|
};
|
|
678
678
|
}
|
|
679
|
-
const
|
|
679
|
+
const Sn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, Jt = (e) => {
|
|
680
680
|
if (typeof e != "string")
|
|
681
681
|
throw new TypeError("Invalid argument expected string");
|
|
682
|
-
const t = e.match(
|
|
682
|
+
const t = e.match(Sn);
|
|
683
683
|
if (!t)
|
|
684
684
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
685
685
|
return t.shift(), t;
|
|
@@ -704,20 +704,20 @@ const xn = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
704
704
|
}, Qt = (e, t, n) => {
|
|
705
705
|
da(n);
|
|
706
706
|
const r = ca(e, t);
|
|
707
|
-
return
|
|
708
|
-
},
|
|
707
|
+
return xn[n].includes(r);
|
|
708
|
+
}, xn = {
|
|
709
709
|
">": [1],
|
|
710
710
|
">=": [0, 1],
|
|
711
711
|
"=": [0],
|
|
712
712
|
"<=": [-1, 0],
|
|
713
713
|
"<": [-1],
|
|
714
714
|
"!=": [-1, 1]
|
|
715
|
-
}, Xt = Object.keys(
|
|
715
|
+
}, Xt = Object.keys(xn), da = (e) => {
|
|
716
716
|
if (typeof e != "string")
|
|
717
717
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
718
718
|
if (Xt.indexOf(e) === -1)
|
|
719
719
|
throw new Error(`Invalid operator, expected one of ${Xt.join("|")}`);
|
|
720
|
-
}, pa = (e) => typeof e == "string" && /^[v\d]/.test(e) &&
|
|
720
|
+
}, pa = (e) => typeof e == "string" && /^[v\d]/.test(e) && Sn.test(e);
|
|
721
721
|
function fa(e) {
|
|
722
722
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
723
723
|
if (!t)
|
|
@@ -732,11 +732,11 @@ function fa(e) {
|
|
|
732
732
|
return !(o && Qt(a, o, "<") || s && Qt(a, s, ">"));
|
|
733
733
|
}
|
|
734
734
|
function ma(e) {
|
|
735
|
-
const t =
|
|
736
|
-
return
|
|
735
|
+
const t = M(0), n = M(0), r = M(!1);
|
|
736
|
+
return Te(e, (a) => {
|
|
737
737
|
a && !r.value && (t.value = a.offsetWidth, n.value = a.scrollWidth, r.value = !0);
|
|
738
738
|
}), {
|
|
739
|
-
isTruncated:
|
|
739
|
+
isTruncated: _(() => t.value < n.value)
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
742
|
function ga() {
|
|
@@ -746,13 +746,13 @@ function ga() {
|
|
|
746
746
|
};
|
|
747
747
|
}
|
|
748
748
|
const se = {
|
|
749
|
-
useAxios:
|
|
749
|
+
useAxios: Mt,
|
|
750
750
|
useDebouncedFilter: na,
|
|
751
751
|
useDeleteUrlBuilder: ra,
|
|
752
752
|
useErrors: aa,
|
|
753
753
|
useExternalLinkCreator: oa,
|
|
754
754
|
useFetcher: ia,
|
|
755
|
-
useFetchUrlBuilder:
|
|
755
|
+
useFetchUrlBuilder: In,
|
|
756
756
|
useHelpers: _n,
|
|
757
757
|
useStringHelpers: sa,
|
|
758
758
|
useI18n: ht,
|
|
@@ -779,21 +779,21 @@ const se = {
|
|
|
779
779
|
}
|
|
780
780
|
},
|
|
781
781
|
setup(e) {
|
|
782
|
-
const t = e, { i18n: { t: n } } = se.useI18n(), { convertKeyToTitle: r } = se.useStringHelpers(), a =
|
|
782
|
+
const t = e, { i18n: { t: n } } = se.useI18n(), { convertKeyToTitle: r } = se.useStringHelpers(), a = _(() => t.item.key ?? "json-array-item"), i = _(() => t.item.value ?? t.item), o = _(() => {
|
|
783
783
|
const l = JSON.parse(JSON.stringify(i.value));
|
|
784
784
|
return t.isArrayItem && delete l.name, l;
|
|
785
|
-
}), s =
|
|
785
|
+
}), s = _(() => {
|
|
786
786
|
var l;
|
|
787
787
|
return t.isArrayItem ? (l = i.value) != null && l.name ? r(i.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
788
788
|
});
|
|
789
|
-
return (l, u) => (m(),
|
|
790
|
-
class:
|
|
789
|
+
return (l, u) => (m(), V(Se(e.isArrayItem ? "fieldset" : "div"), {
|
|
790
|
+
class: Ee(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
791
791
|
}, {
|
|
792
792
|
default: v(() => [
|
|
793
793
|
e.isArrayItem ? (m(), $("legend", ya, [
|
|
794
794
|
L("b", null, F(s.value), 1)
|
|
795
795
|
])) : J("", !0),
|
|
796
|
-
(m(!0), $(be, null, ve(Object.keys(o.value), (p, c) => (m(),
|
|
796
|
+
(m(!0), $(be, null, ve(Object.keys(o.value), (p, c) => (m(), V(Tn, {
|
|
797
797
|
key: `${a.value}-property-${c}`,
|
|
798
798
|
item: {
|
|
799
799
|
key: p,
|
|
@@ -810,7 +810,7 @@ const se = {
|
|
|
810
810
|
for (const [r, a] of t)
|
|
811
811
|
n[r] = a;
|
|
812
812
|
return n;
|
|
813
|
-
},
|
|
813
|
+
}, An = /* @__PURE__ */ Ce(ha, [["__scopeId", "data-v-68ca83ec"]]), va = /* @__PURE__ */ X({
|
|
814
814
|
__name: "InternalLinkItem",
|
|
815
815
|
props: {
|
|
816
816
|
item: {
|
|
@@ -822,7 +822,7 @@ const se = {
|
|
|
822
822
|
setup(e) {
|
|
823
823
|
const { i18n: { t } } = se.useI18n();
|
|
824
824
|
return (n, r) => {
|
|
825
|
-
const a =
|
|
825
|
+
const a = R("KButton");
|
|
826
826
|
return m(), $("div", null, [
|
|
827
827
|
j(a, {
|
|
828
828
|
appearance: "tertiary",
|
|
@@ -848,8 +848,8 @@ const se = {
|
|
|
848
848
|
setup(e) {
|
|
849
849
|
const { i18n: { t } } = se.useI18n();
|
|
850
850
|
return (n, r) => {
|
|
851
|
-
const a =
|
|
852
|
-
return m(),
|
|
851
|
+
const a = R("KBadge");
|
|
852
|
+
return m(), V(a, {
|
|
853
853
|
appearance: e.status ? "success" : "neutral"
|
|
854
854
|
}, {
|
|
855
855
|
default: v(() => [
|
|
@@ -859,11 +859,11 @@ const se = {
|
|
|
859
859
|
}, 8, ["appearance"]);
|
|
860
860
|
};
|
|
861
861
|
}
|
|
862
|
-
}), ka = "#0044f4", wa = "#e0e4ea", _a = "#afb7c5",
|
|
862
|
+
}), ka = "#0044f4", wa = "#e0e4ea", _a = "#afb7c5", Ia = "1px", Sa = "20px", xa = { class: "config-card-details-row" }, Aa = ["data-testid"], Ta = ["data-testid"], $a = ["data-testid"], ja = ["data-testid"], Na = { key: 1 }, Oa = ["data-testid"], Ma = ["data-testid"], Ea = ["data-testid"], Fa = ["data-testid"], qa = {
|
|
863
863
|
name: "ConfigCardItem",
|
|
864
|
-
components: { JsonCardItem:
|
|
864
|
+
components: { JsonCardItem: An, StatusBadge: Ca, InternalLinkItem: ba }
|
|
865
865
|
}, Ka = /* @__PURE__ */ X({
|
|
866
|
-
...
|
|
866
|
+
...qa,
|
|
867
867
|
props: {
|
|
868
868
|
item: {
|
|
869
869
|
type: Object,
|
|
@@ -882,13 +882,13 @@ const se = {
|
|
|
882
882
|
},
|
|
883
883
|
emits: ["navigation-click"],
|
|
884
884
|
setup(e, { emit: t }) {
|
|
885
|
-
bn((
|
|
886
|
-
dc1d91a8: p.value ? "none" : `solid ${g(
|
|
885
|
+
bn((b) => ({
|
|
886
|
+
dc1d91a8: p.value ? "none" : `solid ${g(Ia)} ${g(wa)}`,
|
|
887
887
|
"59ccec5f": u.value && s.value ? "block" : "flex",
|
|
888
888
|
"29318fbe": u.value && s.value ? "100%" : n.slim ? "50%" : "25%",
|
|
889
889
|
"292d0408": u.value && s.value ? "100%" : n.slim ? "50%" : "75%"
|
|
890
890
|
}));
|
|
891
|
-
const n = e, r = t, a =
|
|
891
|
+
const n = e, r = t, a = Nt(), { i18n: { t: i, formatUnixTimeStamp: o } } = se.useI18n(), s = _(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), l = _(() => !!(n.item.tooltip || a["label-tooltip"])), u = _(() => n.item.type === ee.Json || n.item.type === ee.JsonArray), p = _(() => n.item.type === ee.JsonArray), c = _(() => {
|
|
892
892
|
switch (n.item.type) {
|
|
893
893
|
case ee.ID:
|
|
894
894
|
return {
|
|
@@ -958,8 +958,8 @@ const se = {
|
|
|
958
958
|
attrs: {
|
|
959
959
|
"data-testid": `${n.item.key}-internal-link`,
|
|
960
960
|
item: n.item,
|
|
961
|
-
onNavigationClick: (
|
|
962
|
-
r("navigation-click",
|
|
961
|
+
onNavigationClick: (b) => {
|
|
962
|
+
r("navigation-click", b);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
};
|
|
@@ -998,16 +998,16 @@ const se = {
|
|
|
998
998
|
text: n.item.value
|
|
999
999
|
};
|
|
1000
1000
|
}
|
|
1001
|
-
}), y =
|
|
1002
|
-
return (
|
|
1003
|
-
const
|
|
1004
|
-
return m(), $("div",
|
|
1001
|
+
}), y = M(), { isTruncated: f } = se.useTruncationDetector(y);
|
|
1002
|
+
return (b, I) => {
|
|
1003
|
+
const A = R("KLabel"), D = R("KBadge"), q = R("KCopy"), Z = R("KTooltip");
|
|
1004
|
+
return m(), $("div", xa, [
|
|
1005
1005
|
L("div", {
|
|
1006
1006
|
class: "config-card-details-label",
|
|
1007
1007
|
"data-testid": `${e.item.key}-label`
|
|
1008
1008
|
}, [
|
|
1009
|
-
ne(
|
|
1010
|
-
j(
|
|
1009
|
+
ne(b.$slots, "label", { item: e.item }, () => [
|
|
1010
|
+
j(A, { "tooltip-attributes": { maxWidth: "500px" } }, Be({
|
|
1011
1011
|
default: v(() => [
|
|
1012
1012
|
Y(F(e.item.label) + " ", 1)
|
|
1013
1013
|
]),
|
|
@@ -1019,34 +1019,34 @@ const se = {
|
|
|
1019
1019
|
L("div", {
|
|
1020
1020
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
1021
1021
|
}, [
|
|
1022
|
-
ne(
|
|
1022
|
+
ne(b.$slots, "label-tooltip", {}, () => [
|
|
1023
1023
|
Y(F(e.item.tooltip), 1)
|
|
1024
1024
|
], !0)
|
|
1025
|
-
], 8,
|
|
1025
|
+
], 8, Ta)
|
|
1026
1026
|
]),
|
|
1027
1027
|
key: "0"
|
|
1028
1028
|
} : void 0
|
|
1029
1029
|
]), 1024)
|
|
1030
1030
|
], !0)
|
|
1031
|
-
], 8,
|
|
1031
|
+
], 8, Aa),
|
|
1032
1032
|
L("div", {
|
|
1033
1033
|
class: "config-card-details-value",
|
|
1034
1034
|
"data-testid": `${e.item.key}-property-value`
|
|
1035
1035
|
}, [
|
|
1036
|
-
ne(
|
|
1036
|
+
ne(b.$slots, e.item.key, {
|
|
1037
1037
|
rowValue: e.item.value
|
|
1038
1038
|
}, () => [
|
|
1039
|
-
s.value ? (m(), $("div",
|
|
1040
|
-
(m(),
|
|
1039
|
+
s.value ? (m(), $("div", Na, [
|
|
1040
|
+
(m(), V(Se(c.value.tag), xr(Ar(c.value.attrs)), {
|
|
1041
1041
|
default: v(() => [
|
|
1042
1042
|
c.value.additionalComponent === "KBadge" ? (m(), $("div", {
|
|
1043
1043
|
key: 0,
|
|
1044
1044
|
"data-testid": `${e.item.key}-badge-tags`
|
|
1045
1045
|
}, [
|
|
1046
|
-
(m(!0), $(be, null, ve(e.item.value, (h,
|
|
1047
|
-
key: `${e.item.key}-badge-tag-${
|
|
1046
|
+
(m(!0), $(be, null, ve(e.item.value, (h, w) => (m(), V(D, {
|
|
1047
|
+
key: `${e.item.key}-badge-tag-${w}`,
|
|
1048
1048
|
class: "config-badge",
|
|
1049
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
1049
|
+
"data-testid": `${e.item.key}-badge-tag-${w}`,
|
|
1050
1050
|
tooltip: h,
|
|
1051
1051
|
"truncation-tooltip": ""
|
|
1052
1052
|
}, {
|
|
@@ -1061,39 +1061,39 @@ const se = {
|
|
|
1061
1061
|
class: "copy-uuid-array",
|
|
1062
1062
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
1063
1063
|
}, [
|
|
1064
|
-
(m(!0), $(be, null, ve(e.item.value, (h,
|
|
1065
|
-
key: `${e.item.key}-copy-uuid-${
|
|
1066
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
1064
|
+
(m(!0), $(be, null, ve(e.item.value, (h, w) => (m(), V(q, Tr({ ref_for: !0 }, c.value.childAttrs, {
|
|
1065
|
+
key: `${e.item.key}-copy-uuid-${w}`,
|
|
1066
|
+
"data-testid": `${e.item.key}-copy-uuid-${w}`,
|
|
1067
1067
|
text: h
|
|
1068
1068
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
1069
|
-
], 8,
|
|
1069
|
+
], 8, Ma)) : c.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
1070
1070
|
key: 2,
|
|
1071
1071
|
class: "method-badge-array",
|
|
1072
1072
|
"data-testid": `${e.item.key}-badge-methods`
|
|
1073
1073
|
}, [
|
|
1074
|
-
(m(!0), $(be, null, ve(e.item.value, (h,
|
|
1075
|
-
key: `${e.item.key}-badge-method-${
|
|
1076
|
-
appearance: Object.values(g(
|
|
1074
|
+
(m(!0), $(be, null, ve(e.item.value, (h, w) => (m(), V(D, {
|
|
1075
|
+
key: `${e.item.key}-badge-method-${w}`,
|
|
1076
|
+
appearance: Object.values(g(jr)).includes(h.toLowerCase()) ? h.toLowerCase() : "custom",
|
|
1077
1077
|
class: "config-badge",
|
|
1078
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
1078
|
+
"data-testid": `${e.item.key}-badge-method-${w}`
|
|
1079
1079
|
}, {
|
|
1080
1080
|
default: v(() => [
|
|
1081
1081
|
Y(F(h), 1)
|
|
1082
1082
|
]),
|
|
1083
1083
|
_: 2
|
|
1084
1084
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
1085
|
-
], 8,
|
|
1085
|
+
], 8, Ea)) : J("", !0),
|
|
1086
1086
|
c.value.additionalComponent === "JsonCardItem" ? (m(), $("div", {
|
|
1087
1087
|
key: 3,
|
|
1088
1088
|
"data-testid": `${n.item.key}-json-array-content`
|
|
1089
1089
|
}, [
|
|
1090
|
-
(m(!0), $(be, null, ve(e.item.value, (h,
|
|
1091
|
-
key: `json-array-item-${
|
|
1092
|
-
index:
|
|
1090
|
+
(m(!0), $(be, null, ve(e.item.value, (h, w) => (m(), V(An, {
|
|
1091
|
+
key: `json-array-item-${w}`,
|
|
1092
|
+
index: w,
|
|
1093
1093
|
"is-array-item": "",
|
|
1094
1094
|
item: h
|
|
1095
1095
|
}, null, 8, ["index", "item"]))), 128))
|
|
1096
|
-
], 8,
|
|
1096
|
+
], 8, Fa)) : (m(), V(Z, {
|
|
1097
1097
|
key: 4,
|
|
1098
1098
|
text: g(f) ? e.item.value : ""
|
|
1099
1099
|
}, {
|
|
@@ -1101,7 +1101,7 @@ const se = {
|
|
|
1101
1101
|
L("span", {
|
|
1102
1102
|
ref_key: "textContent",
|
|
1103
1103
|
ref: y,
|
|
1104
|
-
class:
|
|
1104
|
+
class: Ee(["attrs-data-text", { truncated: e.truncated }])
|
|
1105
1105
|
}, F(c.value.text), 3)
|
|
1106
1106
|
]),
|
|
1107
1107
|
_: 1
|
|
@@ -1112,16 +1112,16 @@ const se = {
|
|
|
1112
1112
|
])) : (m(), $("div", {
|
|
1113
1113
|
key: 0,
|
|
1114
1114
|
"data-testid": `${e.item.key}-no-value`
|
|
1115
|
-
}, " – ", 8,
|
|
1115
|
+
}, " – ", 8, ja))
|
|
1116
1116
|
], !0)
|
|
1117
|
-
], 8,
|
|
1117
|
+
], 8, $a)
|
|
1118
1118
|
]);
|
|
1119
1119
|
};
|
|
1120
1120
|
}
|
|
1121
|
-
}),
|
|
1121
|
+
}), Tn = /* @__PURE__ */ Ce(Ka, [["__scopeId", "data-v-d268261c"]]), Ba = { class: "json-config" }, La = {
|
|
1122
1122
|
key: 0,
|
|
1123
1123
|
class: "json-endpoint"
|
|
1124
|
-
},
|
|
1124
|
+
}, $n = /* @__PURE__ */ X({
|
|
1125
1125
|
__name: "JsonCodeBlock",
|
|
1126
1126
|
props: {
|
|
1127
1127
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1152,7 +1152,7 @@ const se = {
|
|
|
1152
1152
|
bn((a) => ({
|
|
1153
1153
|
"4520e3ec": `${r.value}ch`
|
|
1154
1154
|
}));
|
|
1155
|
-
const t = e, n =
|
|
1155
|
+
const t = e, n = _(() => t.jsonRecord), r = _(() => {
|
|
1156
1156
|
var a;
|
|
1157
1157
|
if (!t.fetcherUrl)
|
|
1158
1158
|
return 0;
|
|
@@ -1160,7 +1160,7 @@ const se = {
|
|
|
1160
1160
|
return i.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? i[i.length - 1] : i[i.length - 2]).length;
|
|
1161
1161
|
});
|
|
1162
1162
|
return (a, i) => {
|
|
1163
|
-
const o =
|
|
1163
|
+
const o = R("KBadge"), s = R("KCodeBlock");
|
|
1164
1164
|
return m(), $("div", Ba, [
|
|
1165
1165
|
t.fetcherUrl ? (m(), $("div", La, [
|
|
1166
1166
|
j(o, {
|
|
@@ -1179,10 +1179,10 @@ const se = {
|
|
|
1179
1179
|
theme: "dark"
|
|
1180
1180
|
}, null, 8, ["code"])
|
|
1181
1181
|
])) : J("", !0),
|
|
1182
|
-
t.jsonRecord ? (m(),
|
|
1182
|
+
t.jsonRecord ? (m(), V(s, {
|
|
1183
1183
|
key: 1,
|
|
1184
1184
|
id: "json-codeblock",
|
|
1185
|
-
class:
|
|
1185
|
+
class: Ee({ "json-content": t.fetcherUrl }),
|
|
1186
1186
|
code: JSON.stringify(n.value, null, 2),
|
|
1187
1187
|
language: "json",
|
|
1188
1188
|
theme: "dark"
|
|
@@ -1192,23 +1192,23 @@ const se = {
|
|
|
1192
1192
|
}
|
|
1193
1193
|
});
|
|
1194
1194
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1195
|
-
function
|
|
1195
|
+
function jn(e) {
|
|
1196
1196
|
return typeof e > "u" || e === null;
|
|
1197
1197
|
}
|
|
1198
1198
|
function Ua(e) {
|
|
1199
1199
|
return typeof e == "object" && e !== null;
|
|
1200
1200
|
}
|
|
1201
1201
|
function Pa(e) {
|
|
1202
|
-
return Array.isArray(e) ? e :
|
|
1202
|
+
return Array.isArray(e) ? e : jn(e) ? [] : [e];
|
|
1203
1203
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function Va(e, t) {
|
|
1205
1205
|
var n, r, a, i;
|
|
1206
1206
|
if (t)
|
|
1207
1207
|
for (i = Object.keys(t), n = 0, r = i.length; n < r; n += 1)
|
|
1208
1208
|
a = i[n], e[a] = t[a];
|
|
1209
1209
|
return e;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1211
|
+
function Ra(e, t) {
|
|
1212
1212
|
var n = "", r;
|
|
1213
1213
|
for (r = 0; r < t; r += 1)
|
|
1214
1214
|
n += e;
|
|
@@ -1217,7 +1217,7 @@ function Va(e, t) {
|
|
|
1217
1217
|
function Da(e) {
|
|
1218
1218
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1219
1219
|
}
|
|
1220
|
-
var za =
|
|
1220
|
+
var za = jn, Ga = Ua, Ha = Pa, Ja = Ra, Za = Da, Wa = Va, ie = {
|
|
1221
1221
|
isNothing: za,
|
|
1222
1222
|
isObject: Ga,
|
|
1223
1223
|
toArray: Ha,
|
|
@@ -1225,19 +1225,19 @@ var za = Nn, Ga = Ua, Ha = Pa, Ja = Va, Za = Da, Wa = Ra, ie = {
|
|
|
1225
1225
|
isNegativeZero: Za,
|
|
1226
1226
|
extend: Wa
|
|
1227
1227
|
};
|
|
1228
|
-
function
|
|
1228
|
+
function Nn(e, t) {
|
|
1229
1229
|
var n = "", r = e.reason || "(unknown reason)";
|
|
1230
1230
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1231
1231
|
|
|
1232
1232
|
` + e.mark.snippet), r + " " + n) : r;
|
|
1233
1233
|
}
|
|
1234
1234
|
function tt(e, t) {
|
|
1235
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1235
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = Nn(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1236
1236
|
}
|
|
1237
1237
|
tt.prototype = Object.create(Error.prototype);
|
|
1238
1238
|
tt.prototype.constructor = tt;
|
|
1239
1239
|
tt.prototype.toString = function(e) {
|
|
1240
|
-
return this.name + ": " +
|
|
1240
|
+
return this.name + ": " + Nn(this, e);
|
|
1241
1241
|
};
|
|
1242
1242
|
var fe = tt;
|
|
1243
1243
|
function wt(e, t, n, r, a) {
|
|
@@ -1346,10 +1346,10 @@ function ro() {
|
|
|
1346
1346
|
arguments[t].forEach(r);
|
|
1347
1347
|
return e;
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function xt(e) {
|
|
1350
1350
|
return this.extend(e);
|
|
1351
1351
|
}
|
|
1352
|
-
|
|
1352
|
+
xt.prototype.extend = function(e) {
|
|
1353
1353
|
var t = [], n = [];
|
|
1354
1354
|
if (e instanceof ce)
|
|
1355
1355
|
n.push(e);
|
|
@@ -1370,29 +1370,29 @@ At.prototype.extend = function(e) {
|
|
|
1370
1370
|
if (!(a instanceof ce))
|
|
1371
1371
|
throw new fe("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1372
1372
|
});
|
|
1373
|
-
var r = Object.create(
|
|
1373
|
+
var r = Object.create(xt.prototype);
|
|
1374
1374
|
return r.implicit = (this.implicit || []).concat(t), r.explicit = (this.explicit || []).concat(n), r.compiledImplicit = en(r, "implicit"), r.compiledExplicit = en(r, "explicit"), r.compiledTypeMap = ro(r.compiledImplicit, r.compiledExplicit), r;
|
|
1375
1375
|
};
|
|
1376
|
-
var On =
|
|
1376
|
+
var On = xt, Mn = new ce("tag:yaml.org,2002:str", {
|
|
1377
1377
|
kind: "scalar",
|
|
1378
1378
|
construct: function(e) {
|
|
1379
1379
|
return e !== null ? e : "";
|
|
1380
1380
|
}
|
|
1381
|
-
}),
|
|
1381
|
+
}), En = new ce("tag:yaml.org,2002:seq", {
|
|
1382
1382
|
kind: "sequence",
|
|
1383
1383
|
construct: function(e) {
|
|
1384
1384
|
return e !== null ? e : [];
|
|
1385
1385
|
}
|
|
1386
|
-
}),
|
|
1386
|
+
}), Fn = new ce("tag:yaml.org,2002:map", {
|
|
1387
1387
|
kind: "mapping",
|
|
1388
1388
|
construct: function(e) {
|
|
1389
1389
|
return e !== null ? e : {};
|
|
1390
1390
|
}
|
|
1391
|
-
}),
|
|
1391
|
+
}), qn = new On({
|
|
1392
1392
|
explicit: [
|
|
1393
|
-
En,
|
|
1394
1393
|
Mn,
|
|
1395
|
-
|
|
1394
|
+
En,
|
|
1395
|
+
Fn
|
|
1396
1396
|
]
|
|
1397
1397
|
});
|
|
1398
1398
|
function ao(e) {
|
|
@@ -1618,24 +1618,24 @@ var Un = new ce("tag:yaml.org,2002:float", {
|
|
|
1618
1618
|
predicate: wo,
|
|
1619
1619
|
represent: ko,
|
|
1620
1620
|
defaultStyle: "lowercase"
|
|
1621
|
-
}), Pn =
|
|
1621
|
+
}), Pn = qn.extend({
|
|
1622
1622
|
implicit: [
|
|
1623
1623
|
Kn,
|
|
1624
1624
|
Bn,
|
|
1625
1625
|
Ln,
|
|
1626
1626
|
Un
|
|
1627
1627
|
]
|
|
1628
|
-
}),
|
|
1628
|
+
}), Vn = Pn, Rn = new RegExp(
|
|
1629
1629
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1630
1630
|
), Dn = new RegExp(
|
|
1631
1631
|
"^([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]))?))?$"
|
|
1632
1632
|
);
|
|
1633
1633
|
function _o(e) {
|
|
1634
|
-
return e === null ? !1 :
|
|
1634
|
+
return e === null ? !1 : Rn.exec(e) !== null || Dn.exec(e) !== null;
|
|
1635
1635
|
}
|
|
1636
|
-
function
|
|
1636
|
+
function Io(e) {
|
|
1637
1637
|
var t, n, r, a, i, o, s, l = 0, u = null, p, c, y;
|
|
1638
|
-
if (t =
|
|
1638
|
+
if (t = Rn.exec(e), t === null && (t = Dn.exec(e)), t === null)
|
|
1639
1639
|
throw new Error("Date resolve error");
|
|
1640
1640
|
if (n = +t[1], r = +t[2] - 1, a = +t[3], !t[4])
|
|
1641
1641
|
return new Date(Date.UTC(n, r, a));
|
|
@@ -1646,28 +1646,28 @@ function So(e) {
|
|
|
1646
1646
|
}
|
|
1647
1647
|
return t[9] && (p = +t[10], c = +(t[11] || 0), u = (p * 60 + c) * 6e4, t[9] === "-" && (u = -u)), y = new Date(Date.UTC(n, r, a, i, o, s, l)), u && y.setTime(y.getTime() - u), y;
|
|
1648
1648
|
}
|
|
1649
|
-
function
|
|
1649
|
+
function So(e) {
|
|
1650
1650
|
return e.toISOString();
|
|
1651
1651
|
}
|
|
1652
1652
|
var zn = new ce("tag:yaml.org,2002:timestamp", {
|
|
1653
1653
|
kind: "scalar",
|
|
1654
1654
|
resolve: _o,
|
|
1655
|
-
construct:
|
|
1655
|
+
construct: Io,
|
|
1656
1656
|
instanceOf: Date,
|
|
1657
|
-
represent:
|
|
1657
|
+
represent: So
|
|
1658
1658
|
});
|
|
1659
|
-
function
|
|
1659
|
+
function xo(e) {
|
|
1660
1660
|
return e === "<<" || e === null;
|
|
1661
1661
|
}
|
|
1662
1662
|
var Gn = new ce("tag:yaml.org,2002:merge", {
|
|
1663
1663
|
kind: "scalar",
|
|
1664
|
-
resolve:
|
|
1665
|
-
}),
|
|
1664
|
+
resolve: xo
|
|
1665
|
+
}), Et = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1666
1666
|
\r`;
|
|
1667
|
-
function
|
|
1667
|
+
function Ao(e) {
|
|
1668
1668
|
if (e === null)
|
|
1669
1669
|
return !1;
|
|
1670
|
-
var t, n, r = 0, a = e.length, i =
|
|
1670
|
+
var t, n, r = 0, a = e.length, i = Et;
|
|
1671
1671
|
for (n = 0; n < a; n++)
|
|
1672
1672
|
if (t = i.indexOf(e.charAt(n)), !(t > 64)) {
|
|
1673
1673
|
if (t < 0)
|
|
@@ -1676,29 +1676,29 @@ function Io(e) {
|
|
|
1676
1676
|
}
|
|
1677
1677
|
return r % 8 === 0;
|
|
1678
1678
|
}
|
|
1679
|
-
function
|
|
1680
|
-
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i =
|
|
1679
|
+
function To(e) {
|
|
1680
|
+
var t, n, r = e.replace(/[\r\n=]/g, ""), a = r.length, i = Et, o = 0, s = [];
|
|
1681
1681
|
for (t = 0; t < a; t++)
|
|
1682
1682
|
t % 4 === 0 && t && (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)), o = o << 6 | i.indexOf(r.charAt(t));
|
|
1683
1683
|
return n = a % 4 * 6, n === 0 ? (s.push(o >> 16 & 255), s.push(o >> 8 & 255), s.push(o & 255)) : n === 18 ? (s.push(o >> 10 & 255), s.push(o >> 2 & 255)) : n === 12 && s.push(o >> 4 & 255), new Uint8Array(s);
|
|
1684
1684
|
}
|
|
1685
|
-
function
|
|
1686
|
-
var t = "", n = 0, r, a, i = e.length, o =
|
|
1685
|
+
function $o(e) {
|
|
1686
|
+
var t = "", n = 0, r, a, i = e.length, o = Et;
|
|
1687
1687
|
for (r = 0; r < i; r++)
|
|
1688
1688
|
r % 3 === 0 && r && (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]), n = (n << 8) + e[r];
|
|
1689
1689
|
return a = i % 3, a === 0 ? (t += o[n >> 18 & 63], t += o[n >> 12 & 63], t += o[n >> 6 & 63], t += o[n & 63]) : a === 2 ? (t += o[n >> 10 & 63], t += o[n >> 4 & 63], t += o[n << 2 & 63], t += o[64]) : a === 1 && (t += o[n >> 2 & 63], t += o[n << 4 & 63], t += o[64], t += o[64]), t;
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function jo(e) {
|
|
1692
1692
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1693
1693
|
}
|
|
1694
1694
|
var Hn = new ce("tag:yaml.org,2002:binary", {
|
|
1695
1695
|
kind: "scalar",
|
|
1696
|
-
resolve:
|
|
1697
|
-
construct:
|
|
1698
|
-
predicate:
|
|
1699
|
-
represent:
|
|
1700
|
-
}),
|
|
1701
|
-
function
|
|
1696
|
+
resolve: Ao,
|
|
1697
|
+
construct: To,
|
|
1698
|
+
predicate: jo,
|
|
1699
|
+
represent: $o
|
|
1700
|
+
}), No = Object.prototype.hasOwnProperty, Oo = Object.prototype.toString;
|
|
1701
|
+
function Mo(e) {
|
|
1702
1702
|
if (e === null)
|
|
1703
1703
|
return !0;
|
|
1704
1704
|
var t = [], n, r, a, i, o, s = e;
|
|
@@ -1706,7 +1706,7 @@ function Eo(e) {
|
|
|
1706
1706
|
if (a = s[n], o = !1, Oo.call(a) !== "[object Object]")
|
|
1707
1707
|
return !1;
|
|
1708
1708
|
for (i in a)
|
|
1709
|
-
if (
|
|
1709
|
+
if (No.call(a, i))
|
|
1710
1710
|
if (!o)
|
|
1711
1711
|
o = !0;
|
|
1712
1712
|
else
|
|
@@ -1720,20 +1720,20 @@ function Eo(e) {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return !0;
|
|
1722
1722
|
}
|
|
1723
|
-
function
|
|
1723
|
+
function Eo(e) {
|
|
1724
1724
|
return e !== null ? e : [];
|
|
1725
1725
|
}
|
|
1726
1726
|
var Jn = new ce("tag:yaml.org,2002:omap", {
|
|
1727
1727
|
kind: "sequence",
|
|
1728
|
-
resolve:
|
|
1729
|
-
construct:
|
|
1730
|
-
}),
|
|
1731
|
-
function
|
|
1728
|
+
resolve: Mo,
|
|
1729
|
+
construct: Eo
|
|
1730
|
+
}), Fo = Object.prototype.toString;
|
|
1731
|
+
function qo(e) {
|
|
1732
1732
|
if (e === null)
|
|
1733
1733
|
return !0;
|
|
1734
1734
|
var t, n, r, a, i, o = e;
|
|
1735
1735
|
for (i = new Array(o.length), t = 0, n = o.length; t < n; t += 1) {
|
|
1736
|
-
if (r = o[t],
|
|
1736
|
+
if (r = o[t], Fo.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1))
|
|
1737
1737
|
return !1;
|
|
1738
1738
|
i[t] = [a[0], r[a[0]]];
|
|
1739
1739
|
}
|
|
@@ -1749,7 +1749,7 @@ function Ko(e) {
|
|
|
1749
1749
|
}
|
|
1750
1750
|
var Zn = new ce("tag:yaml.org,2002:pairs", {
|
|
1751
1751
|
kind: "sequence",
|
|
1752
|
-
resolve:
|
|
1752
|
+
resolve: qo,
|
|
1753
1753
|
construct: Ko
|
|
1754
1754
|
}), Bo = Object.prototype.hasOwnProperty;
|
|
1755
1755
|
function Lo(e) {
|
|
@@ -1768,7 +1768,7 @@ var Wn = new ce("tag:yaml.org,2002:set", {
|
|
|
1768
1768
|
kind: "mapping",
|
|
1769
1769
|
resolve: Lo,
|
|
1770
1770
|
construct: Uo
|
|
1771
|
-
}),
|
|
1771
|
+
}), Ft = Vn.extend({
|
|
1772
1772
|
implicit: [
|
|
1773
1773
|
zn,
|
|
1774
1774
|
Gn
|
|
@@ -1779,7 +1779,7 @@ var Wn = new ce("tag:yaml.org,2002:set", {
|
|
|
1779
1779
|
Zn,
|
|
1780
1780
|
Wn
|
|
1781
1781
|
]
|
|
1782
|
-
}),
|
|
1782
|
+
}), Fe = Object.prototype.hasOwnProperty, ct = 1, Yn = 2, Qn = 3, dt = 4, It = 1, Po = 2, tn = 3, Vo = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Ro = /[\x85\u2028\u2029]/, Do = /[,\[\]\{\}]/, Xn = /^(?:!|!!|![a-z\-]+!)$/i, er = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1783
1783
|
function nn(e) {
|
|
1784
1784
|
return Object.prototype.toString.call(e);
|
|
1785
1785
|
}
|
|
@@ -1816,10 +1816,10 @@ function Jo(e) {
|
|
|
1816
1816
|
);
|
|
1817
1817
|
}
|
|
1818
1818
|
var tr = new Array(256), nr = new Array(256);
|
|
1819
|
-
for (var
|
|
1820
|
-
tr[
|
|
1819
|
+
for (var Ve = 0; Ve < 256; Ve++)
|
|
1820
|
+
tr[Ve] = rn(Ve) ? 1 : 0, nr[Ve] = rn(Ve);
|
|
1821
1821
|
function Zo(e, t) {
|
|
1822
|
-
this.input = e, this.filename = t.filename || null, this.schema = t.schema ||
|
|
1822
|
+
this.input = e, this.filename = t.filename || null, this.schema = t.schema || Ft, this.onWarning = t.onWarning || null, this.legacy = t.legacy || !1, this.json = t.json || !1, this.listener = t.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 = [];
|
|
1823
1823
|
}
|
|
1824
1824
|
function rr(e, t) {
|
|
1825
1825
|
var n = {
|
|
@@ -1832,7 +1832,7 @@ function rr(e, t) {
|
|
|
1832
1832
|
};
|
|
1833
1833
|
return n.snippet = Qa(n), new fe(t, n);
|
|
1834
1834
|
}
|
|
1835
|
-
function
|
|
1835
|
+
function N(e, t) {
|
|
1836
1836
|
throw rr(e, t);
|
|
1837
1837
|
}
|
|
1838
1838
|
function pt(e, t) {
|
|
@@ -1841,40 +1841,40 @@ function pt(e, t) {
|
|
|
1841
1841
|
var an = {
|
|
1842
1842
|
YAML: function(e, t, n) {
|
|
1843
1843
|
var r, a, i;
|
|
1844
|
-
e.version !== null &&
|
|
1844
|
+
e.version !== null && N(e, "duplication of %YAML directive"), n.length !== 1 && N(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), r === null && N(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), i = parseInt(r[2], 10), a !== 1 && N(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = i < 2, i !== 1 && i !== 2 && pt(e, "unsupported YAML version of the document");
|
|
1845
1845
|
},
|
|
1846
1846
|
TAG: function(e, t, n) {
|
|
1847
1847
|
var r, a;
|
|
1848
|
-
n.length !== 2 &&
|
|
1848
|
+
n.length !== 2 && N(e, "TAG directive accepts exactly two arguments"), r = n[0], a = n[1], Xn.test(r) || N(e, "ill-formed tag handle (first argument) of the TAG directive"), Fe.call(e.tagMap, r) && N(e, 'there is a previously declared suffix for "' + r + '" tag handle'), er.test(a) || N(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1849
1849
|
try {
|
|
1850
1850
|
a = decodeURIComponent(a);
|
|
1851
1851
|
} catch {
|
|
1852
|
-
|
|
1852
|
+
N(e, "tag prefix is malformed: " + a);
|
|
1853
1853
|
}
|
|
1854
1854
|
e.tagMap[r] = a;
|
|
1855
1855
|
}
|
|
1856
1856
|
};
|
|
1857
|
-
function
|
|
1857
|
+
function Me(e, t, n, r) {
|
|
1858
1858
|
var a, i, o, s;
|
|
1859
1859
|
if (t < n) {
|
|
1860
1860
|
if (s = e.input.slice(t, n), r)
|
|
1861
1861
|
for (a = 0, i = s.length; a < i; a += 1)
|
|
1862
|
-
o = s.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 ||
|
|
1862
|
+
o = s.charCodeAt(a), o === 9 || 32 <= o && o <= 1114111 || N(e, "expected valid JSON character");
|
|
1863
1863
|
else
|
|
1864
|
-
|
|
1864
|
+
Vo.test(s) && N(e, "the stream contains non-printable characters");
|
|
1865
1865
|
e.result += s;
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
function on(e, t, n, r) {
|
|
1869
1869
|
var a, i, o, s;
|
|
1870
|
-
for (ie.isObject(n) ||
|
|
1871
|
-
i = a[o],
|
|
1870
|
+
for (ie.isObject(n) || N(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(n), o = 0, s = a.length; o < s; o += 1)
|
|
1871
|
+
i = a[o], Fe.call(t, i) || (t[i] = n[i], r[i] = !0);
|
|
1872
1872
|
}
|
|
1873
1873
|
function ze(e, t, n, r, a, i, o, s, l) {
|
|
1874
1874
|
var u, p;
|
|
1875
1875
|
if (Array.isArray(a))
|
|
1876
1876
|
for (a = Array.prototype.slice.call(a), u = 0, p = a.length; u < p; u += 1)
|
|
1877
|
-
Array.isArray(a[u]) &&
|
|
1877
|
+
Array.isArray(a[u]) && N(e, "nested arrays are not supported inside keys"), typeof a == "object" && nn(a[u]) === "[object Object]" && (a[u] = "[object Object]");
|
|
1878
1878
|
if (typeof a == "object" && nn(a) === "[object Object]" && (a = "[object Object]"), a = String(a), t === null && (t = {}), r === "tag:yaml.org,2002:merge")
|
|
1879
1879
|
if (Array.isArray(i))
|
|
1880
1880
|
for (u = 0, p = i.length; u < p; u += 1)
|
|
@@ -1882,7 +1882,7 @@ function ze(e, t, n, r, a, i, o, s, l) {
|
|
|
1882
1882
|
else
|
|
1883
1883
|
on(e, t, i, n);
|
|
1884
1884
|
else
|
|
1885
|
-
!e.json && !
|
|
1885
|
+
!e.json && !Fe.call(n, a) && Fe.call(t, a) && (e.line = o || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, N(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(t, a, {
|
|
1886
1886
|
configurable: !0,
|
|
1887
1887
|
enumerable: !0,
|
|
1888
1888
|
writable: !0,
|
|
@@ -1890,9 +1890,9 @@ function ze(e, t, n, r, a, i, o, s, l) {
|
|
|
1890
1890
|
}) : t[a] = i, delete n[a];
|
|
1891
1891
|
return t;
|
|
1892
1892
|
}
|
|
1893
|
-
function
|
|
1893
|
+
function qt(e) {
|
|
1894
1894
|
var t;
|
|
1895
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1895
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : N(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1896
1896
|
}
|
|
1897
1897
|
function oe(e, t, n) {
|
|
1898
1898
|
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
@@ -1903,7 +1903,7 @@ function oe(e, t, n) {
|
|
|
1903
1903
|
a = e.input.charCodeAt(++e.position);
|
|
1904
1904
|
while (a !== 10 && a !== 13 && a !== 0);
|
|
1905
1905
|
if (_e(a))
|
|
1906
|
-
for (
|
|
1906
|
+
for (qt(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
1907
1907
|
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
1908
1908
|
else
|
|
1909
1909
|
break;
|
|
@@ -1941,9 +1941,9 @@ function Wo(e, t, n) {
|
|
|
1941
1941
|
break;
|
|
1942
1942
|
}
|
|
1943
1943
|
}
|
|
1944
|
-
s && (
|
|
1944
|
+
s && (Me(e, i, o, !1), Kt(e, e.line - l), i = o = e.position, s = !1), Ke(f) || (o = e.position + 1), f = e.input.charCodeAt(++e.position);
|
|
1945
1945
|
}
|
|
1946
|
-
return
|
|
1946
|
+
return Me(e, i, o, !1), e.result ? !0 : (e.kind = c, e.result = y, !1);
|
|
1947
1947
|
}
|
|
1948
1948
|
function Yo(e, t) {
|
|
1949
1949
|
var n, r, a;
|
|
@@ -1951,13 +1951,13 @@ function Yo(e, t) {
|
|
|
1951
1951
|
return !1;
|
|
1952
1952
|
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1953
1953
|
if (n === 39)
|
|
1954
|
-
if (
|
|
1954
|
+
if (Me(e, r, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1955
1955
|
r = e.position, e.position++, a = e.position;
|
|
1956
1956
|
else
|
|
1957
1957
|
return !0;
|
|
1958
1958
|
else
|
|
1959
|
-
_e(n) ? (
|
|
1960
|
-
|
|
1959
|
+
_e(n) ? (Me(e, r, a, !0), Kt(e, oe(e, !1, t)), r = a = e.position) : e.position === e.lineStart && vt(e) ? N(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
1960
|
+
N(e, "unexpected end of the stream within a single quoted scalar");
|
|
1961
1961
|
}
|
|
1962
1962
|
function Qo(e, t) {
|
|
1963
1963
|
var n, r, a, i, o, s;
|
|
@@ -1965,41 +1965,41 @@ function Qo(e, t) {
|
|
|
1965
1965
|
return !1;
|
|
1966
1966
|
for (e.kind = "scalar", e.result = "", e.position++, n = r = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1967
1967
|
if (s === 34)
|
|
1968
|
-
return
|
|
1968
|
+
return Me(e, n, e.position, !0), e.position++, !0;
|
|
1969
1969
|
if (s === 92) {
|
|
1970
|
-
if (
|
|
1970
|
+
if (Me(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), _e(s))
|
|
1971
1971
|
oe(e, !1, t);
|
|
1972
1972
|
else if (s < 256 && tr[s])
|
|
1973
1973
|
e.result += nr[s], e.position++;
|
|
1974
1974
|
else if ((o = Go(s)) > 0) {
|
|
1975
1975
|
for (a = o, i = 0; a > 0; a--)
|
|
1976
|
-
s = e.input.charCodeAt(++e.position), (o = zo(s)) >= 0 ? i = (i << 4) + o :
|
|
1976
|
+
s = e.input.charCodeAt(++e.position), (o = zo(s)) >= 0 ? i = (i << 4) + o : N(e, "expected hexadecimal character");
|
|
1977
1977
|
e.result += Jo(i), e.position++;
|
|
1978
1978
|
} else
|
|
1979
|
-
|
|
1979
|
+
N(e, "unknown escape sequence");
|
|
1980
1980
|
n = r = e.position;
|
|
1981
1981
|
} else
|
|
1982
|
-
_e(s) ? (
|
|
1982
|
+
_e(s) ? (Me(e, n, r, !0), Kt(e, oe(e, !1, t)), n = r = e.position) : e.position === e.lineStart && vt(e) ? N(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
1983
1983
|
}
|
|
1984
|
-
|
|
1984
|
+
N(e, "unexpected end of the stream within a double quoted scalar");
|
|
1985
1985
|
}
|
|
1986
1986
|
function Xo(e, t) {
|
|
1987
|
-
var n = !0, r, a, i, o = e.tag, s, l = e.anchor, u, p, c, y, f,
|
|
1988
|
-
if (
|
|
1987
|
+
var n = !0, r, a, i, o = e.tag, s, l = e.anchor, u, p, c, y, f, b = /* @__PURE__ */ Object.create(null), I, A, D, q;
|
|
1988
|
+
if (q = e.input.charCodeAt(e.position), q === 91)
|
|
1989
1989
|
p = 93, f = !1, s = [];
|
|
1990
|
-
else if (
|
|
1990
|
+
else if (q === 123)
|
|
1991
1991
|
p = 125, f = !0, s = {};
|
|
1992
1992
|
else
|
|
1993
1993
|
return !1;
|
|
1994
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
1995
|
-
if (oe(e, !0, t),
|
|
1994
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), q = e.input.charCodeAt(++e.position); q !== 0; ) {
|
|
1995
|
+
if (oe(e, !0, t), q = e.input.charCodeAt(e.position), q === p)
|
|
1996
1996
|
return e.position++, e.tag = o, e.anchor = l, e.kind = f ? "mapping" : "sequence", e.result = s, !0;
|
|
1997
|
-
n ?
|
|
1997
|
+
n ? q === 44 && N(e, "expected the node content, but found ','") : N(e, "missed comma between flow collection entries"), A = I = D = null, c = y = !1, q === 63 && (u = e.input.charCodeAt(e.position + 1), ye(u) && (c = y = !0, e.position++, oe(e, !0, t))), r = e.line, a = e.lineStart, i = e.position, Ge(e, t, ct, !1, !0), A = e.tag, I = e.result, oe(e, !0, t), q = e.input.charCodeAt(e.position), (y || e.line === r) && q === 58 && (c = !0, q = e.input.charCodeAt(++e.position), oe(e, !0, t), Ge(e, t, ct, !1, !0), D = e.result), f ? ze(e, s, b, A, I, D, r, a, i) : c ? s.push(ze(e, null, b, A, I, D, r, a, i)) : s.push(I), oe(e, !0, t), q = e.input.charCodeAt(e.position), q === 44 ? (n = !0, q = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1998
1998
|
}
|
|
1999
|
-
|
|
1999
|
+
N(e, "unexpected end of the stream within a flow collection");
|
|
2000
2000
|
}
|
|
2001
2001
|
function ei(e, t) {
|
|
2002
|
-
var n, r, a =
|
|
2002
|
+
var n, r, a = It, i = !1, o = !1, s = t, l = 0, u = !1, p, c;
|
|
2003
2003
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
2004
2004
|
r = !1;
|
|
2005
2005
|
else if (c === 62)
|
|
@@ -2008,9 +2008,9 @@ function ei(e, t) {
|
|
|
2008
2008
|
return !1;
|
|
2009
2009
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
2010
2010
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
2011
|
-
|
|
2011
|
+
It === a ? a = c === 43 ? tn : Po : N(e, "repeat of a chomping mode identifier");
|
|
2012
2012
|
else if ((p = Ho(c)) >= 0)
|
|
2013
|
-
p === 0 ?
|
|
2013
|
+
p === 0 ? N(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : o ? N(e, "repeat of an indentation width identifier") : (s = t + p - 1, o = !0);
|
|
2014
2014
|
else
|
|
2015
2015
|
break;
|
|
2016
2016
|
if (Ke(c)) {
|
|
@@ -2023,7 +2023,7 @@ function ei(e, t) {
|
|
|
2023
2023
|
while (!_e(c) && c !== 0);
|
|
2024
2024
|
}
|
|
2025
2025
|
for (; c !== 0; ) {
|
|
2026
|
-
for (
|
|
2026
|
+
for (qt(e), e.lineIndent = 0, c = e.input.charCodeAt(e.position); (!o || e.lineIndent < s) && c === 32; )
|
|
2027
2027
|
e.lineIndent++, c = e.input.charCodeAt(++e.position);
|
|
2028
2028
|
if (!o && e.lineIndent > s && (s = e.lineIndent), _e(c)) {
|
|
2029
2029
|
l++;
|
|
@@ -2031,7 +2031,7 @@ function ei(e, t) {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
if (e.lineIndent < s) {
|
|
2033
2033
|
a === tn ? e.result += ie.repeat(`
|
|
2034
|
-
`, i ? 1 + l : l) : a ===
|
|
2034
|
+
`, i ? 1 + l : l) : a === It && i && (e.result += `
|
|
2035
2035
|
`);
|
|
2036
2036
|
break;
|
|
2037
2037
|
}
|
|
@@ -2041,7 +2041,7 @@ function ei(e, t) {
|
|
|
2041
2041
|
`, l) : e.result += ie.repeat(`
|
|
2042
2042
|
`, i ? 1 + l : l), i = !0, o = !0, l = 0, n = e.position; !_e(c) && c !== 0; )
|
|
2043
2043
|
c = e.input.charCodeAt(++e.position);
|
|
2044
|
-
|
|
2044
|
+
Me(e, n, e.position, !1);
|
|
2045
2045
|
}
|
|
2046
2046
|
return !0;
|
|
2047
2047
|
}
|
|
@@ -2049,78 +2049,78 @@ function sn(e, t) {
|
|
|
2049
2049
|
var n, r = e.tag, a = e.anchor, i = [], o, s = !1, l;
|
|
2050
2050
|
if (e.firstTabInLine !== -1)
|
|
2051
2051
|
return !1;
|
|
2052
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
2052
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = i), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, N(e, "tab characters must not be used in indentation")), !(l !== 45 || (o = e.input.charCodeAt(e.position + 1), !ye(o)))); ) {
|
|
2053
2053
|
if (s = !0, e.position++, oe(e, !0, -1) && e.lineIndent <= t) {
|
|
2054
2054
|
i.push(null), l = e.input.charCodeAt(e.position);
|
|
2055
2055
|
continue;
|
|
2056
2056
|
}
|
|
2057
2057
|
if (n = e.line, Ge(e, t, Qn, !1, !0), i.push(e.result), oe(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && l !== 0)
|
|
2058
|
-
|
|
2058
|
+
N(e, "bad indentation of a sequence entry");
|
|
2059
2059
|
else if (e.lineIndent < t)
|
|
2060
2060
|
break;
|
|
2061
2061
|
}
|
|
2062
2062
|
return s ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = i, !0) : !1;
|
|
2063
2063
|
}
|
|
2064
2064
|
function ti(e, t, n) {
|
|
2065
|
-
var r, a, i, o, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null,
|
|
2065
|
+
var r, a, i, o, s, l, u = e.tag, p = e.anchor, c = {}, y = /* @__PURE__ */ Object.create(null), f = null, b = null, I = null, A = !1, D = !1, q;
|
|
2066
2066
|
if (e.firstTabInLine !== -1)
|
|
2067
2067
|
return !1;
|
|
2068
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
2069
|
-
if (!
|
|
2070
|
-
|
|
2068
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), q = e.input.charCodeAt(e.position); q !== 0; ) {
|
|
2069
|
+
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, N(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), i = e.line, (q === 63 || q === 58) && ye(r))
|
|
2070
|
+
q === 63 ? (A && (ze(e, c, y, f, b, null, o, s, l), f = b = I = null), D = !0, A = !0, a = !0) : A ? (A = !1, a = !0) : N(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, q = r;
|
|
2071
2071
|
else {
|
|
2072
2072
|
if (o = e.line, s = e.lineStart, l = e.position, !Ge(e, n, Yn, !1, !0))
|
|
2073
2073
|
break;
|
|
2074
2074
|
if (e.line === i) {
|
|
2075
|
-
for (
|
|
2076
|
-
|
|
2077
|
-
if (
|
|
2078
|
-
|
|
2079
|
-
else if (
|
|
2080
|
-
|
|
2075
|
+
for (q = e.input.charCodeAt(e.position); Ke(q); )
|
|
2076
|
+
q = e.input.charCodeAt(++e.position);
|
|
2077
|
+
if (q === 58)
|
|
2078
|
+
q = e.input.charCodeAt(++e.position), ye(q) || N(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (ze(e, c, y, f, b, null, o, s, l), f = b = I = null), D = !0, A = !1, a = !1, f = e.tag, b = e.result;
|
|
2079
|
+
else if (D)
|
|
2080
|
+
N(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2081
2081
|
else
|
|
2082
2082
|
return e.tag = u, e.anchor = p, !0;
|
|
2083
|
-
} else if (
|
|
2084
|
-
|
|
2083
|
+
} else if (D)
|
|
2084
|
+
N(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
2085
2085
|
else
|
|
2086
2086
|
return e.tag = u, e.anchor = p, !0;
|
|
2087
2087
|
}
|
|
2088
|
-
if ((e.line === i || e.lineIndent > t) && (
|
|
2089
|
-
|
|
2088
|
+
if ((e.line === i || e.lineIndent > t) && (A && (o = e.line, s = e.lineStart, l = e.position), Ge(e, t, dt, !0, a) && (A ? b = e.result : I = e.result), A || (ze(e, c, y, f, b, I, o, s, l), f = b = I = null), oe(e, !0, -1), q = e.input.charCodeAt(e.position)), (e.line === i || e.lineIndent > t) && q !== 0)
|
|
2089
|
+
N(e, "bad indentation of a mapping entry");
|
|
2090
2090
|
else if (e.lineIndent < t)
|
|
2091
2091
|
break;
|
|
2092
2092
|
}
|
|
2093
|
-
return
|
|
2093
|
+
return A && ze(e, c, y, f, b, null, o, s, l), D && (e.tag = u, e.anchor = p, e.kind = "mapping", e.result = c), D;
|
|
2094
2094
|
}
|
|
2095
2095
|
function ni(e) {
|
|
2096
2096
|
var t, n = !1, r = !1, a, i, o;
|
|
2097
2097
|
if (o = e.input.charCodeAt(e.position), o !== 33)
|
|
2098
2098
|
return !1;
|
|
2099
|
-
if (e.tag !== null &&
|
|
2099
|
+
if (e.tag !== null && N(e, "duplication of a tag property"), o = e.input.charCodeAt(++e.position), o === 60 ? (n = !0, o = e.input.charCodeAt(++e.position)) : o === 33 ? (r = !0, a = "!!", o = e.input.charCodeAt(++e.position)) : a = "!", t = e.position, n) {
|
|
2100
2100
|
do
|
|
2101
2101
|
o = e.input.charCodeAt(++e.position);
|
|
2102
2102
|
while (o !== 0 && o !== 62);
|
|
2103
|
-
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) :
|
|
2103
|
+
e.position < e.length ? (i = e.input.slice(t, e.position), o = e.input.charCodeAt(++e.position)) : N(e, "unexpected end of the stream within a verbatim tag");
|
|
2104
2104
|
} else {
|
|
2105
2105
|
for (; o !== 0 && !ye(o); )
|
|
2106
|
-
o === 33 && (r ?
|
|
2107
|
-
i = e.input.slice(t, e.position), Do.test(i) &&
|
|
2106
|
+
o === 33 && (r ? N(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(t - 1, e.position + 1), Xn.test(a) || N(e, "named tag handle cannot contain such characters"), r = !0, t = e.position + 1)), o = e.input.charCodeAt(++e.position);
|
|
2107
|
+
i = e.input.slice(t, e.position), Do.test(i) && N(e, "tag suffix cannot contain flow indicator characters");
|
|
2108
2108
|
}
|
|
2109
|
-
i && !er.test(i) &&
|
|
2109
|
+
i && !er.test(i) && N(e, "tag name cannot contain such characters: " + i);
|
|
2110
2110
|
try {
|
|
2111
2111
|
i = decodeURIComponent(i);
|
|
2112
2112
|
} catch {
|
|
2113
|
-
|
|
2113
|
+
N(e, "tag name is malformed: " + i);
|
|
2114
2114
|
}
|
|
2115
|
-
return n ? e.tag = i :
|
|
2115
|
+
return n ? e.tag = i : Fe.call(e.tagMap, a) ? e.tag = e.tagMap[a] + i : a === "!" ? e.tag = "!" + i : a === "!!" ? e.tag = "tag:yaml.org,2002:" + i : N(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2116
2116
|
}
|
|
2117
2117
|
function ri(e) {
|
|
2118
2118
|
var t, n;
|
|
2119
2119
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
2120
2120
|
return !1;
|
|
2121
|
-
for (e.anchor !== null &&
|
|
2121
|
+
for (e.anchor !== null && N(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !ye(n) && !De(n); )
|
|
2122
2122
|
n = e.input.charCodeAt(++e.position);
|
|
2123
|
-
return e.position === t &&
|
|
2123
|
+
return e.position === t && N(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
2124
2124
|
}
|
|
2125
2125
|
function ai(e) {
|
|
2126
2126
|
var t, n, r;
|
|
@@ -2128,31 +2128,31 @@ function ai(e) {
|
|
|
2128
2128
|
return !1;
|
|
2129
2129
|
for (r = e.input.charCodeAt(++e.position), t = e.position; r !== 0 && !ye(r) && !De(r); )
|
|
2130
2130
|
r = e.input.charCodeAt(++e.position);
|
|
2131
|
-
return e.position === t &&
|
|
2131
|
+
return e.position === t && N(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), Fe.call(e.anchorMap, n) || N(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], oe(e, !0, -1), !0;
|
|
2132
2132
|
}
|
|
2133
2133
|
function Ge(e, t, n, r, a) {
|
|
2134
|
-
var i, o, s, l = 1, u = !1, p = !1, c, y, f,
|
|
2134
|
+
var i, o, s, l = 1, u = !1, p = !1, c, y, f, b, I, A;
|
|
2135
2135
|
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, i = o = s = dt === n || Qn === n, r && oe(e, !0, -1) && (u = !0, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)), l === 1)
|
|
2136
2136
|
for (; ni(e) || ri(e); )
|
|
2137
2137
|
oe(e, !0, -1) ? (u = !0, s = i, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)) : s = !1;
|
|
2138
|
-
if (s && (s = u || a), (l === 1 || dt === n) && (ct === n || Yn === n ?
|
|
2138
|
+
if (s && (s = u || a), (l === 1 || dt === n) && (ct === n || Yn === n ? I = t : I = t + 1, A = e.position - e.lineStart, l === 1 ? s && (sn(e, A) || ti(e, A, I)) || Xo(e, I) ? p = !0 : (o && ei(e, I) || Yo(e, I) || Qo(e, I) ? p = !0 : ai(e) ? (p = !0, (e.tag !== null || e.anchor !== null) && N(e, "alias node should not have any properties")) : Wo(e, I, ct === n) && (p = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (p = s && sn(e, A))), e.tag === null)
|
|
2139
2139
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2140
2140
|
else if (e.tag === "?") {
|
|
2141
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
2142
|
-
if (
|
|
2143
|
-
e.result =
|
|
2141
|
+
for (e.result !== null && e.kind !== "scalar" && N(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, y = e.implicitTypes.length; c < y; c += 1)
|
|
2142
|
+
if (b = e.implicitTypes[c], b.resolve(e.result)) {
|
|
2143
|
+
e.result = b.construct(e.result), e.tag = b.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2144
2144
|
break;
|
|
2145
2145
|
}
|
|
2146
2146
|
} else if (e.tag !== "!") {
|
|
2147
|
-
if (
|
|
2148
|
-
|
|
2147
|
+
if (Fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2148
|
+
b = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2149
2149
|
else
|
|
2150
|
-
for (
|
|
2150
|
+
for (b = null, f = e.typeMap.multi[e.kind || "fallback"], c = 0, y = f.length; c < y; c += 1)
|
|
2151
2151
|
if (e.tag.slice(0, f[c].tag.length) === f[c].tag) {
|
|
2152
|
-
|
|
2152
|
+
b = f[c];
|
|
2153
2153
|
break;
|
|
2154
2154
|
}
|
|
2155
|
-
|
|
2155
|
+
b || N(e, "unknown tag !<" + e.tag + ">"), e.result !== null && b.kind !== e.kind && N(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + b.kind + '", not "' + e.kind + '"'), b.resolve(e.result, e.tag) ? (e.result = b.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : N(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2156
2156
|
}
|
|
2157
2157
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || p;
|
|
2158
2158
|
}
|
|
@@ -2161,7 +2161,7 @@ function oi(e) {
|
|
|
2161
2161
|
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)); ) {
|
|
2162
2162
|
for (i = !0, o = e.input.charCodeAt(++e.position), n = e.position; o !== 0 && !ye(o); )
|
|
2163
2163
|
o = e.input.charCodeAt(++e.position);
|
|
2164
|
-
for (r = e.input.slice(n, e.position), a = [], r.length < 1 &&
|
|
2164
|
+
for (r = e.input.slice(n, e.position), a = [], r.length < 1 && N(e, "directive name must not be less than one character in length"); o !== 0; ) {
|
|
2165
2165
|
for (; Ke(o); )
|
|
2166
2166
|
o = e.input.charCodeAt(++e.position);
|
|
2167
2167
|
if (o === 35) {
|
|
@@ -2176,14 +2176,14 @@ function oi(e) {
|
|
|
2176
2176
|
o = e.input.charCodeAt(++e.position);
|
|
2177
2177
|
a.push(e.input.slice(n, e.position));
|
|
2178
2178
|
}
|
|
2179
|
-
o !== 0 &&
|
|
2179
|
+
o !== 0 && qt(e), Fe.call(an, r) ? an[r](e, r, a) : pt(e, 'unknown document directive "' + r + '"');
|
|
2180
2180
|
}
|
|
2181
|
-
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)) : i &&
|
|
2181
|
+
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)) : i && N(e, "directives end mark is expected"), Ge(e, e.lineIndent - 1, dt, !1, !0), oe(e, !0, -1), e.checkLineBreaks && Ro.test(e.input.slice(t, e.position)) && pt(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && vt(e)) {
|
|
2182
2182
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, oe(e, !0, -1));
|
|
2183
2183
|
return;
|
|
2184
2184
|
}
|
|
2185
2185
|
if (e.position < e.length - 1)
|
|
2186
|
-
|
|
2186
|
+
N(e, "end of the stream or a document separator is expected");
|
|
2187
2187
|
else
|
|
2188
2188
|
return;
|
|
2189
2189
|
}
|
|
@@ -2191,7 +2191,7 @@ function ar(e, t) {
|
|
|
2191
2191
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2192
2192
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2193
2193
|
var n = new Zo(e, t), r = e.indexOf("\0");
|
|
2194
|
-
for (r !== -1 && (n.position = r,
|
|
2194
|
+
for (r !== -1 && (n.position = r, N(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2195
2195
|
n.lineIndent += 1, n.position += 1;
|
|
2196
2196
|
for (; n.position < n.length - 1; )
|
|
2197
2197
|
oi(n);
|
|
@@ -2216,7 +2216,7 @@ function si(e, t) {
|
|
|
2216
2216
|
var li = ii, ui = si, or = {
|
|
2217
2217
|
loadAll: li,
|
|
2218
2218
|
load: ui
|
|
2219
|
-
}, ir = Object.prototype.toString, sr = Object.prototype.hasOwnProperty, Bt = 65279, ci = 9, nt = 10, di = 13, pi = 32, fi = 33, mi = 34,
|
|
2219
|
+
}, ir = Object.prototype.toString, sr = Object.prototype.hasOwnProperty, Bt = 65279, ci = 9, nt = 10, di = 13, pi = 32, fi = 33, mi = 34, At = 35, gi = 37, yi = 38, hi = 39, vi = 42, lr = 44, bi = 45, ft = 58, Ci = 61, ki = 62, wi = 63, _i = 64, ur = 91, cr = 93, Ii = 96, dr = 123, Si = 124, pr = 125, pe = {};
|
|
2220
2220
|
pe[0] = "\\0";
|
|
2221
2221
|
pe[7] = "\\a";
|
|
2222
2222
|
pe[8] = "\\b";
|
|
@@ -2232,7 +2232,7 @@ pe[133] = "\\N";
|
|
|
2232
2232
|
pe[160] = "\\_";
|
|
2233
2233
|
pe[8232] = "\\L";
|
|
2234
2234
|
pe[8233] = "\\P";
|
|
2235
|
-
var
|
|
2235
|
+
var xi = [
|
|
2236
2236
|
"y",
|
|
2237
2237
|
"Y",
|
|
2238
2238
|
"yes",
|
|
@@ -2249,8 +2249,8 @@ var Ai = [
|
|
|
2249
2249
|
"off",
|
|
2250
2250
|
"Off",
|
|
2251
2251
|
"OFF"
|
|
2252
|
-
],
|
|
2253
|
-
function
|
|
2252
|
+
], Ai = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2253
|
+
function Ti(e, t) {
|
|
2254
2254
|
var n, r, a, i, o, s, l;
|
|
2255
2255
|
if (t === null)
|
|
2256
2256
|
return {};
|
|
@@ -2258,7 +2258,7 @@ function $i(e, t) {
|
|
|
2258
2258
|
o = r[a], s = String(t[o]), o.slice(0, 2) === "!!" && (o = "tag:yaml.org,2002:" + o.slice(2)), l = e.compiledTypeMap.fallback[o], l && sr.call(l.styleAliases, s) && (s = l.styleAliases[s]), n[o] = s;
|
|
2259
2259
|
return n;
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2261
|
+
function $i(e) {
|
|
2262
2262
|
var t, n, r;
|
|
2263
2263
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2264
2264
|
n = "x", r = 2;
|
|
@@ -2270,9 +2270,9 @@ function Ti(e) {
|
|
|
2270
2270
|
throw new fe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2271
2271
|
return "\\" + n + ie.repeat("0", r - t.length) + t;
|
|
2272
2272
|
}
|
|
2273
|
-
var
|
|
2274
|
-
function
|
|
2275
|
-
this.schema = e.schema ||
|
|
2273
|
+
var ji = 1, rt = 2;
|
|
2274
|
+
function Ni(e) {
|
|
2275
|
+
this.schema = e.schema || Ft, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ie.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = Ti(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 === '"' ? rt : ji, 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;
|
|
2276
2276
|
}
|
|
2277
2277
|
function ln(e, t) {
|
|
2278
2278
|
for (var n = ie.repeat(" ", t), r = 0, a = -1, i = "", o, s = e.length; r < s; )
|
|
@@ -2281,7 +2281,7 @@ function ln(e, t) {
|
|
|
2281
2281
|
` && (i += n), i += o;
|
|
2282
2282
|
return i;
|
|
2283
2283
|
}
|
|
2284
|
-
function
|
|
2284
|
+
function Tt(e, t) {
|
|
2285
2285
|
return `
|
|
2286
2286
|
` + ie.repeat(" ", e.indent * t);
|
|
2287
2287
|
}
|
|
@@ -2308,13 +2308,13 @@ function cn(e, t, n) {
|
|
|
2308
2308
|
(n ? (
|
|
2309
2309
|
// c = flow-in
|
|
2310
2310
|
r
|
|
2311
|
-
) : r && e !== lr && e !== ur && e !== cr && e !== dr && e !== pr) && e !==
|
|
2311
|
+
) : r && e !== lr && e !== ur && e !== cr && e !== dr && e !== pr) && e !== At && !(t === ft && !a) || un(t) && !mt(t) && e === At || t === ft && a
|
|
2312
2312
|
);
|
|
2313
2313
|
}
|
|
2314
|
-
function Ei(e) {
|
|
2315
|
-
return at(e) && e !== Bt && !mt(e) && e !== bi && e !== wi && e !== ft && e !== lr && e !== ur && e !== cr && e !== dr && e !== pr && e !== It && e !== yi && e !== vi && e !== fi && e !== xi && e !== Ci && e !== ki && e !== hi && e !== mi && e !== gi && e !== _i && e !== Si;
|
|
2316
|
-
}
|
|
2317
2314
|
function Mi(e) {
|
|
2315
|
+
return at(e) && e !== Bt && !mt(e) && e !== bi && e !== wi && e !== ft && e !== lr && e !== ur && e !== cr && e !== dr && e !== pr && e !== At && e !== yi && e !== vi && e !== fi && e !== Si && e !== Ci && e !== ki && e !== hi && e !== mi && e !== gi && e !== _i && e !== Ii;
|
|
2316
|
+
}
|
|
2317
|
+
function Ei(e) {
|
|
2318
2318
|
return !mt(e) && e !== ft;
|
|
2319
2319
|
}
|
|
2320
2320
|
function et(e, t) {
|
|
@@ -2325,39 +2325,39 @@ function fr(e) {
|
|
|
2325
2325
|
var t = /^\n* /;
|
|
2326
2326
|
return t.test(e);
|
|
2327
2327
|
}
|
|
2328
|
-
var mr = 1,
|
|
2329
|
-
function
|
|
2330
|
-
var l, u = 0, p = null, c = !1, y = !1, f = r !== -1,
|
|
2328
|
+
var mr = 1, $t = 2, gr = 3, yr = 4, Re = 5;
|
|
2329
|
+
function Fi(e, t, n, r, a, i, o, s) {
|
|
2330
|
+
var l, u = 0, p = null, c = !1, y = !1, f = r !== -1, b = -1, I = Mi(et(e, 0)) && Ei(et(e, e.length - 1));
|
|
2331
2331
|
if (t || o)
|
|
2332
2332
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2333
2333
|
if (u = et(e, l), !at(u))
|
|
2334
|
-
return
|
|
2335
|
-
|
|
2334
|
+
return Re;
|
|
2335
|
+
I = I && cn(u, p, s), p = u;
|
|
2336
2336
|
}
|
|
2337
2337
|
else {
|
|
2338
2338
|
for (l = 0; l < e.length; u >= 65536 ? l += 2 : l++) {
|
|
2339
2339
|
if (u = et(e, l), u === nt)
|
|
2340
2340
|
c = !0, f && (y = y || // Foldable line = too long, and not more-indented.
|
|
2341
|
-
l -
|
|
2341
|
+
l - b - 1 > r && e[b + 1] !== " ", b = l);
|
|
2342
2342
|
else if (!at(u))
|
|
2343
|
-
return
|
|
2344
|
-
|
|
2343
|
+
return Re;
|
|
2344
|
+
I = I && cn(u, p, s), p = u;
|
|
2345
2345
|
}
|
|
2346
|
-
y = y || f && l -
|
|
2346
|
+
y = y || f && l - b - 1 > r && e[b + 1] !== " ";
|
|
2347
2347
|
}
|
|
2348
|
-
return !c && !y ?
|
|
2348
|
+
return !c && !y ? I && !o && !a(e) ? mr : i === rt ? Re : $t : n > 9 && fr(e) ? Re : o ? i === rt ? Re : $t : y ? yr : gr;
|
|
2349
2349
|
}
|
|
2350
|
-
function
|
|
2350
|
+
function qi(e, t, n, r, a) {
|
|
2351
2351
|
e.dump = function() {
|
|
2352
2352
|
if (t.length === 0)
|
|
2353
2353
|
return e.quotingType === rt ? '""' : "''";
|
|
2354
|
-
if (!e.noCompatMode && (
|
|
2354
|
+
if (!e.noCompatMode && (xi.indexOf(t) !== -1 || Ai.test(t)))
|
|
2355
2355
|
return e.quotingType === rt ? '"' + t + '"' : "'" + t + "'";
|
|
2356
2356
|
var i = e.indent * Math.max(1, n), o = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - i), s = r || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2357
2357
|
function l(u) {
|
|
2358
2358
|
return Oi(e, u);
|
|
2359
2359
|
}
|
|
2360
|
-
switch (
|
|
2360
|
+
switch (Fi(
|
|
2361
2361
|
t,
|
|
2362
2362
|
s,
|
|
2363
2363
|
e.indent,
|
|
@@ -2369,13 +2369,13 @@ function Fi(e, t, n, r, a) {
|
|
|
2369
2369
|
)) {
|
|
2370
2370
|
case mr:
|
|
2371
2371
|
return t;
|
|
2372
|
-
case
|
|
2372
|
+
case $t:
|
|
2373
2373
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2374
2374
|
case gr:
|
|
2375
2375
|
return "|" + dn(t, e.indent) + pn(ln(t, i));
|
|
2376
2376
|
case yr:
|
|
2377
2377
|
return ">" + dn(t, e.indent) + pn(ln(Ki(t, o), i));
|
|
2378
|
-
case
|
|
2378
|
+
case Re:
|
|
2379
2379
|
return '"' + Bi(t) + '"';
|
|
2380
2380
|
default:
|
|
2381
2381
|
throw new fe("impossible error: invalid scalar style");
|
|
@@ -2419,25 +2419,25 @@ function fn(e, t) {
|
|
|
2419
2419
|
}
|
|
2420
2420
|
function Bi(e) {
|
|
2421
2421
|
for (var t = "", n = 0, r, a = 0; a < e.length; n >= 65536 ? a += 2 : a++)
|
|
2422
|
-
n = et(e, a), r = pe[n], !r && at(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r ||
|
|
2422
|
+
n = et(e, a), r = pe[n], !r && at(n) ? (t += e[a], n >= 65536 && (t += e[a + 1])) : t += r || $i(n);
|
|
2423
2423
|
return t;
|
|
2424
2424
|
}
|
|
2425
2425
|
function Li(e, t, n) {
|
|
2426
2426
|
var r = "", a = e.tag, i, o, s;
|
|
2427
2427
|
for (i = 0, o = n.length; i < o; i += 1)
|
|
2428
|
-
s = n[i], e.replacer && (s = e.replacer.call(n, String(i), s)), (
|
|
2428
|
+
s = n[i], e.replacer && (s = e.replacer.call(n, String(i), s)), ($e(e, t, s, !1, !1) || typeof s > "u" && $e(e, t, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2429
2429
|
e.tag = a, e.dump = "[" + r + "]";
|
|
2430
2430
|
}
|
|
2431
2431
|
function mn(e, t, n, r) {
|
|
2432
2432
|
var a = "", i = e.tag, o, s, l;
|
|
2433
2433
|
for (o = 0, s = n.length; o < s; o += 1)
|
|
2434
|
-
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (
|
|
2434
|
+
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), ($e(e, t + 1, l, !0, !0, !1, !0) || typeof l > "u" && $e(e, t + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += Tt(e, t)), e.dump && nt === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2435
2435
|
e.tag = i, e.dump = a || "[]";
|
|
2436
2436
|
}
|
|
2437
2437
|
function Ui(e, t, n) {
|
|
2438
2438
|
var r = "", a = e.tag, i = Object.keys(n), o, s, l, u, p;
|
|
2439
2439
|
for (o = 0, s = i.length; o < s; o += 1)
|
|
2440
|
-
p = "", r !== "" && (p += ", "), e.condenseFlow && (p += '"'), l = i[o], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)),
|
|
2440
|
+
p = "", r !== "" && (p += ", "), e.condenseFlow && (p += '"'), l = i[o], u = n[l], e.replacer && (u = e.replacer.call(n, l, u)), $e(e, t, l, !1, !1) && (e.dump.length > 1024 && (p += "? "), p += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), $e(e, t, u, !1, !1) && (p += e.dump, r += p));
|
|
2441
2441
|
e.tag = a, e.dump = "{" + r + "}";
|
|
2442
2442
|
}
|
|
2443
2443
|
function Pi(e, t, n, r) {
|
|
@@ -2449,7 +2449,7 @@ function Pi(e, t, n, r) {
|
|
|
2449
2449
|
else if (e.sortKeys)
|
|
2450
2450
|
throw new fe("sortKeys must be a boolean or a function");
|
|
2451
2451
|
for (s = 0, l = o.length; s < l; s += 1)
|
|
2452
|
-
y = "", (!r || a !== "") && (y +=
|
|
2452
|
+
y = "", (!r || a !== "") && (y += Tt(e, t)), u = o[s], p = n[u], e.replacer && (p = e.replacer.call(n, u, p)), $e(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && nt === e.dump.charCodeAt(0) ? y += "?" : y += "? "), y += e.dump, c && (y += Tt(e, t)), $e(e, t + 1, p, !0, c) && (e.dump && nt === e.dump.charCodeAt(0) ? y += ":" : y += ": ", y += e.dump, a += y));
|
|
2453
2453
|
e.tag = i, e.dump = a || "{}";
|
|
2454
2454
|
}
|
|
2455
2455
|
function gn(e, t, n) {
|
|
@@ -2469,7 +2469,7 @@ function gn(e, t, n) {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
return !1;
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function $e(e, t, n, r, a, i, o) {
|
|
2473
2473
|
e.tag = null, e.dump = n, gn(e, n, !1) || gn(e, n, !0);
|
|
2474
2474
|
var s = ir.call(e.dump), l = r, u;
|
|
2475
2475
|
r && (r = e.flowLevel < 0 || e.flowLevel > t);
|
|
@@ -2482,7 +2482,7 @@ function Te(e, t, n, r, a, i, o) {
|
|
|
2482
2482
|
else if (s === "[object Array]")
|
|
2483
2483
|
r && e.dump.length !== 0 ? (e.noArrayIndent && !o && t > 0 ? mn(e, t - 1, e.dump, a) : mn(e, t, e.dump, a), y && (e.dump = "&ref_" + c + e.dump)) : (Li(e, t, e.dump), y && (e.dump = "&ref_" + c + " " + e.dump));
|
|
2484
2484
|
else if (s === "[object String]")
|
|
2485
|
-
e.tag !== "?" &&
|
|
2485
|
+
e.tag !== "?" && qi(e, e.dump, t, i, l);
|
|
2486
2486
|
else {
|
|
2487
2487
|
if (s === "[object Undefined]" || e.skipInvalid)
|
|
2488
2488
|
return !1;
|
|
@@ -2494,33 +2494,33 @@ function Te(e, t, n, r, a, i, o) {
|
|
|
2494
2494
|
}
|
|
2495
2495
|
return !0;
|
|
2496
2496
|
}
|
|
2497
|
-
function
|
|
2497
|
+
function Vi(e, t) {
|
|
2498
2498
|
var n = [], r = [], a, i;
|
|
2499
|
-
for (
|
|
2499
|
+
for (jt(e, n, r), a = 0, i = r.length; a < i; a += 1)
|
|
2500
2500
|
t.duplicates.push(n[r[a]]);
|
|
2501
2501
|
t.usedDuplicates = new Array(i);
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function jt(e, t, n) {
|
|
2504
2504
|
var r, a, i;
|
|
2505
2505
|
if (e !== null && typeof e == "object")
|
|
2506
2506
|
if (a = t.indexOf(e), a !== -1)
|
|
2507
2507
|
n.indexOf(a) === -1 && n.push(a);
|
|
2508
2508
|
else if (t.push(e), Array.isArray(e))
|
|
2509
2509
|
for (a = 0, i = e.length; a < i; a += 1)
|
|
2510
|
-
|
|
2510
|
+
jt(e[a], t, n);
|
|
2511
2511
|
else
|
|
2512
2512
|
for (r = Object.keys(e), a = 0, i = r.length; a < i; a += 1)
|
|
2513
|
-
|
|
2513
|
+
jt(e[r[a]], t, n);
|
|
2514
2514
|
}
|
|
2515
|
-
function
|
|
2515
|
+
function Ri(e, t) {
|
|
2516
2516
|
t = t || {};
|
|
2517
|
-
var n = new
|
|
2518
|
-
n.noRefs ||
|
|
2517
|
+
var n = new Ni(t);
|
|
2518
|
+
n.noRefs || Vi(e, n);
|
|
2519
2519
|
var r = e;
|
|
2520
|
-
return n.replacer && (r = n.replacer.call({ "": r }, "", r)),
|
|
2520
|
+
return n.replacer && (r = n.replacer.call({ "": r }, "", r)), $e(n, 0, r, !0, !0) ? n.dump + `
|
|
2521
2521
|
` : "";
|
|
2522
2522
|
}
|
|
2523
|
-
var Di =
|
|
2523
|
+
var Di = Ri, zi = {
|
|
2524
2524
|
dump: Di
|
|
2525
2525
|
};
|
|
2526
2526
|
function Lt(e, t) {
|
|
@@ -2528,10 +2528,10 @@ function Lt(e, t) {
|
|
|
2528
2528
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2529
2529
|
};
|
|
2530
2530
|
}
|
|
2531
|
-
var Gi = ce, Hi = On, Ji =
|
|
2531
|
+
var Gi = ce, Hi = On, Ji = qn, Zi = Pn, Wi = Vn, Yi = Ft, Qi = or.load, Xi = or.loadAll, es = zi.dump, ts = fe, ns = {
|
|
2532
2532
|
binary: Hn,
|
|
2533
2533
|
float: Un,
|
|
2534
|
-
map:
|
|
2534
|
+
map: Fn,
|
|
2535
2535
|
null: Kn,
|
|
2536
2536
|
pairs: Zn,
|
|
2537
2537
|
set: Wn,
|
|
@@ -2540,8 +2540,8 @@ var Gi = ce, Hi = On, Ji = Fn, Zi = Pn, Wi = Rn, Yi = qt, Qi = or.load, Xi = or.
|
|
|
2540
2540
|
int: Ln,
|
|
2541
2541
|
merge: Gn,
|
|
2542
2542
|
omap: Jn,
|
|
2543
|
-
seq:
|
|
2544
|
-
str:
|
|
2543
|
+
seq: En,
|
|
2544
|
+
str: Mn
|
|
2545
2545
|
}, rs = Lt("safeLoad", "load"), as = Lt("safeLoadAll", "loadAll"), os = Lt("safeDump", "dump"), is = {
|
|
2546
2546
|
Type: Gi,
|
|
2547
2547
|
Schema: Hi,
|
|
@@ -2568,14 +2568,14 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2568
2568
|
}
|
|
2569
2569
|
},
|
|
2570
2570
|
setup(e) {
|
|
2571
|
-
const t = e, n =
|
|
2571
|
+
const t = e, n = _(() => {
|
|
2572
2572
|
const r = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, a]) => a !== null && a !== "" && (Array.isArray(a) ? a.length !== 0 : !0)));
|
|
2573
2573
|
return Object.keys(r).length === 0 && r.constructor === Object ? "" : is.dump(r).trim();
|
|
2574
2574
|
});
|
|
2575
2575
|
return (r, a) => {
|
|
2576
|
-
const i =
|
|
2576
|
+
const i = R("KCodeBlock");
|
|
2577
2577
|
return m(), $("div", ss, [
|
|
2578
|
-
t.yamlRecord ? (m(),
|
|
2578
|
+
t.yamlRecord ? (m(), V(i, {
|
|
2579
2579
|
key: 0,
|
|
2580
2580
|
id: "yaml-codeblock",
|
|
2581
2581
|
code: n.value,
|
|
@@ -2630,7 +2630,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2630
2630
|
}
|
|
2631
2631
|
},
|
|
2632
2632
|
setup(e) {
|
|
2633
|
-
const t = e, n =
|
|
2633
|
+
const t = e, n = Nt(), { i18n: { t: r } } = se.useI18n(), a = (o) => !!(o.tooltip || n[`${o.key}-label-tooltip`]), i = _(() => {
|
|
2634
2634
|
if (!t.record)
|
|
2635
2635
|
return t.record;
|
|
2636
2636
|
const o = JSON.parse(JSON.stringify(t.record));
|
|
@@ -2640,11 +2640,11 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2640
2640
|
e.format === "structured" ? (m(), $("div", ls, [
|
|
2641
2641
|
(m(!0), $(be, null, ve(e.propListTypes, (l) => (m(), $("div", {
|
|
2642
2642
|
key: `config-card-details-${l}-props`,
|
|
2643
|
-
class:
|
|
2643
|
+
class: Ee(`config-card-details-${l}-props`),
|
|
2644
2644
|
"data-testid": `config-card-details-${l}-props`
|
|
2645
2645
|
}, [
|
|
2646
2646
|
l !== "basic" ? (m(), $("div", cs, F(l === "advanced" ? g(r)("baseConfigCard.sections.advanced") : g(r)("baseConfigCard.sections.plugin")), 1)) : J("", !0),
|
|
2647
|
-
(m(!0), $(be, null, ve(e.propertyCollections[l], (u) => (m(),
|
|
2647
|
+
(m(!0), $(be, null, ve(e.propertyCollections[l], (u) => (m(), V(Tn, {
|
|
2648
2648
|
key: u.key,
|
|
2649
2649
|
item: u
|
|
2650
2650
|
}, Be({
|
|
@@ -2669,25 +2669,25 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2669
2669
|
]), 1032, ["item"]))), 128))
|
|
2670
2670
|
], 10, us))), 128))
|
|
2671
2671
|
])) : J("", !0),
|
|
2672
|
-
e.format === "json" && t.record ? (m(),
|
|
2672
|
+
e.format === "json" && t.record ? (m(), V($n, {
|
|
2673
2673
|
key: 1,
|
|
2674
2674
|
config: t.config,
|
|
2675
2675
|
"fetcher-url": t.fetcherUrl,
|
|
2676
2676
|
"json-record": i.value,
|
|
2677
2677
|
"request-method": "get"
|
|
2678
2678
|
}, null, 8, ["config", "fetcher-url", "json-record"])) : J("", !0),
|
|
2679
|
-
e.format === "yaml" && t.record ? (m(),
|
|
2679
|
+
e.format === "yaml" && t.record ? (m(), V(hr, {
|
|
2680
2680
|
key: 2,
|
|
2681
2681
|
"yaml-record": i.value
|
|
2682
2682
|
}, null, 8, ["yaml-record"])) : J("", !0)
|
|
2683
2683
|
], 64));
|
|
2684
2684
|
}
|
|
2685
|
-
}), ps = /* @__PURE__ */ Ce(ds, [["__scopeId", "data-v-2052238b"]]),
|
|
2685
|
+
}), ps = /* @__PURE__ */ Ce(ds, [["__scopeId", "data-v-2052238b"]]), Ie = "24px", ot = (e, t) => {
|
|
2686
2686
|
const n = e.__vccOpts || e;
|
|
2687
2687
|
for (const [r, a] of t)
|
|
2688
2688
|
n[r] = a;
|
|
2689
2689
|
return n;
|
|
2690
|
-
}, fs = (e) => (Je("data-v-
|
|
2690
|
+
}, fs = (e) => (Je("data-v-f68c7837"), e = e(), Ze(), e), ms = ["aria-hidden"], gs = {
|
|
2691
2691
|
key: 0,
|
|
2692
2692
|
"data-testid": "kui-icon-svg-title"
|
|
2693
2693
|
}, ys = /* @__PURE__ */ fs(() => /* @__PURE__ */ L("path", {
|
|
@@ -2724,7 +2724,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2724
2724
|
size: {
|
|
2725
2725
|
type: [Number, String],
|
|
2726
2726
|
required: !1,
|
|
2727
|
-
default:
|
|
2727
|
+
default: Ie,
|
|
2728
2728
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2729
2729
|
validator: (e) => {
|
|
2730
2730
|
if (typeof e == "number" && e > 0)
|
|
@@ -2745,7 +2745,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2745
2745
|
}
|
|
2746
2746
|
},
|
|
2747
2747
|
setup(e) {
|
|
2748
|
-
const t = e, n =
|
|
2748
|
+
const t = e, n = _(() => {
|
|
2749
2749
|
if (typeof t.size == "number" && t.size > 0)
|
|
2750
2750
|
return `${t.size}px`;
|
|
2751
2751
|
if (typeof t.size == "string") {
|
|
@@ -2753,8 +2753,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2753
2753
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2754
2754
|
return `${i}px`;
|
|
2755
2755
|
}
|
|
2756
|
-
return
|
|
2757
|
-
}), r =
|
|
2756
|
+
return Ie;
|
|
2757
|
+
}), r = _(() => ({
|
|
2758
2758
|
boxSizing: "border-box",
|
|
2759
2759
|
color: t.color,
|
|
2760
2760
|
display: t.display,
|
|
@@ -2762,7 +2762,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2762
2762
|
lineHeight: "0",
|
|
2763
2763
|
width: n.value
|
|
2764
2764
|
}));
|
|
2765
|
-
return (a, i) => (m(),
|
|
2765
|
+
return (a, i) => (m(), V(Se(e.as), {
|
|
2766
2766
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2767
2767
|
class: "kui-icon add-icon",
|
|
2768
2768
|
"data-testid": "kui-icon-wrapper-add-icon",
|
|
@@ -2786,7 +2786,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2786
2786
|
_: 1
|
|
2787
2787
|
}, 8, ["aria-hidden", "style"]));
|
|
2788
2788
|
}
|
|
2789
|
-
}), vs = /* @__PURE__ */ ot(hs, [["__scopeId", "data-v-
|
|
2789
|
+
}), vs = /* @__PURE__ */ ot(hs, [["__scopeId", "data-v-f68c7837"]]), bs = (e) => (Je("data-v-9af646cc"), e = e(), Ze(), e), Cs = ["aria-hidden"], ks = {
|
|
2790
2790
|
key: 0,
|
|
2791
2791
|
"data-testid": "kui-icon-svg-title"
|
|
2792
2792
|
}, ws = /* @__PURE__ */ bs(() => /* @__PURE__ */ L("path", {
|
|
@@ -2823,7 +2823,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2823
2823
|
size: {
|
|
2824
2824
|
type: [Number, String],
|
|
2825
2825
|
required: !1,
|
|
2826
|
-
default:
|
|
2826
|
+
default: Ie,
|
|
2827
2827
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2828
2828
|
validator: (e) => {
|
|
2829
2829
|
if (typeof e == "number" && e > 0)
|
|
@@ -2844,7 +2844,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2844
2844
|
}
|
|
2845
2845
|
},
|
|
2846
2846
|
setup(e) {
|
|
2847
|
-
const t = e, n =
|
|
2847
|
+
const t = e, n = _(() => {
|
|
2848
2848
|
if (typeof t.size == "number" && t.size > 0)
|
|
2849
2849
|
return `${t.size}px`;
|
|
2850
2850
|
if (typeof t.size == "string") {
|
|
@@ -2852,8 +2852,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2852
2852
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2853
2853
|
return `${i}px`;
|
|
2854
2854
|
}
|
|
2855
|
-
return
|
|
2856
|
-
}), r =
|
|
2855
|
+
return Ie;
|
|
2856
|
+
}), r = _(() => ({
|
|
2857
2857
|
boxSizing: "border-box",
|
|
2858
2858
|
color: t.color,
|
|
2859
2859
|
display: t.display,
|
|
@@ -2861,7 +2861,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2861
2861
|
lineHeight: "0",
|
|
2862
2862
|
width: n.value
|
|
2863
2863
|
}));
|
|
2864
|
-
return (a, i) => (m(),
|
|
2864
|
+
return (a, i) => (m(), V(Se(e.as), {
|
|
2865
2865
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2866
2866
|
class: "kui-icon book-icon",
|
|
2867
2867
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
@@ -2885,13 +2885,13 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2885
2885
|
_: 1
|
|
2886
2886
|
}, 8, ["aria-hidden", "style"]));
|
|
2887
2887
|
}
|
|
2888
|
-
}),
|
|
2888
|
+
}), Is = /* @__PURE__ */ ot(_s, [["__scopeId", "data-v-9af646cc"]]), Ss = (e) => (Je("data-v-84c4811e"), e = e(), Ze(), e), xs = ["aria-hidden"], As = {
|
|
2889
2889
|
key: 0,
|
|
2890
2890
|
"data-testid": "kui-icon-svg-title"
|
|
2891
|
-
},
|
|
2891
|
+
}, Ts = /* @__PURE__ */ Ss(() => /* @__PURE__ */ L("path", {
|
|
2892
2892
|
d: "M12 15.4L6 9.4L7.4 8L12 12.6L16.6 8L18 9.4L12 15.4Z",
|
|
2893
2893
|
fill: "currentColor"
|
|
2894
|
-
}, null, -1)),
|
|
2894
|
+
}, null, -1)), $s = /* @__PURE__ */ X({
|
|
2895
2895
|
__name: "ChevronDownIcon",
|
|
2896
2896
|
props: {
|
|
2897
2897
|
/** The accessibility text provided to screen readers */
|
|
@@ -2922,7 +2922,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2922
2922
|
size: {
|
|
2923
2923
|
type: [Number, String],
|
|
2924
2924
|
required: !1,
|
|
2925
|
-
default:
|
|
2925
|
+
default: Ie,
|
|
2926
2926
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2927
2927
|
validator: (e) => {
|
|
2928
2928
|
if (typeof e == "number" && e > 0)
|
|
@@ -2943,7 +2943,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2943
2943
|
}
|
|
2944
2944
|
},
|
|
2945
2945
|
setup(e) {
|
|
2946
|
-
const t = e, n =
|
|
2946
|
+
const t = e, n = _(() => {
|
|
2947
2947
|
if (typeof t.size == "number" && t.size > 0)
|
|
2948
2948
|
return `${t.size}px`;
|
|
2949
2949
|
if (typeof t.size == "string") {
|
|
@@ -2951,8 +2951,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2951
2951
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
2952
2952
|
return `${i}px`;
|
|
2953
2953
|
}
|
|
2954
|
-
return
|
|
2955
|
-
}), r =
|
|
2954
|
+
return Ie;
|
|
2955
|
+
}), r = _(() => ({
|
|
2956
2956
|
boxSizing: "border-box",
|
|
2957
2957
|
color: t.color,
|
|
2958
2958
|
display: t.display,
|
|
@@ -2960,7 +2960,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2960
2960
|
lineHeight: "0",
|
|
2961
2961
|
width: n.value
|
|
2962
2962
|
}));
|
|
2963
|
-
return (a, i) => (m(),
|
|
2963
|
+
return (a, i) => (m(), V(Se(e.as), {
|
|
2964
2964
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2965
2965
|
class: "kui-icon chevron-down-icon",
|
|
2966
2966
|
"data-testid": "kui-icon-wrapper-chevron-down-icon",
|
|
@@ -2977,20 +2977,20 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
2977
2977
|
width: "100%",
|
|
2978
2978
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2979
2979
|
}, [
|
|
2980
|
-
e.title ? (m(), $("title",
|
|
2981
|
-
|
|
2982
|
-
], 8,
|
|
2980
|
+
e.title ? (m(), $("title", As, F(e.title), 1)) : J("", !0),
|
|
2981
|
+
Ts
|
|
2982
|
+
], 8, xs))
|
|
2983
2983
|
]),
|
|
2984
2984
|
_: 1
|
|
2985
2985
|
}, 8, ["aria-hidden", "style"]));
|
|
2986
2986
|
}
|
|
2987
|
-
}),
|
|
2987
|
+
}), js = /* @__PURE__ */ ot($s, [["__scopeId", "data-v-84c4811e"]]), Ns = (e) => (Je("data-v-26ad8dc6"), e = e(), Ze(), e), Os = ["aria-hidden"], Ms = {
|
|
2988
2988
|
key: 0,
|
|
2989
2989
|
"data-testid": "kui-icon-svg-title"
|
|
2990
|
-
},
|
|
2990
|
+
}, Es = /* @__PURE__ */ Ns(() => /* @__PURE__ */ L("path", {
|
|
2991
2991
|
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2992
2992
|
fill: "currentColor"
|
|
2993
|
-
}, null, -1)),
|
|
2993
|
+
}, null, -1)), Fs = /* @__PURE__ */ X({
|
|
2994
2994
|
__name: "CloseIcon",
|
|
2995
2995
|
props: {
|
|
2996
2996
|
/** The accessibility text provided to screen readers */
|
|
@@ -3021,7 +3021,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3021
3021
|
size: {
|
|
3022
3022
|
type: [Number, String],
|
|
3023
3023
|
required: !1,
|
|
3024
|
-
default:
|
|
3024
|
+
default: Ie,
|
|
3025
3025
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
3026
3026
|
validator: (e) => {
|
|
3027
3027
|
if (typeof e == "number" && e > 0)
|
|
@@ -3042,7 +3042,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3042
3042
|
}
|
|
3043
3043
|
},
|
|
3044
3044
|
setup(e) {
|
|
3045
|
-
const t = e, n =
|
|
3045
|
+
const t = e, n = _(() => {
|
|
3046
3046
|
if (typeof t.size == "number" && t.size > 0)
|
|
3047
3047
|
return `${t.size}px`;
|
|
3048
3048
|
if (typeof t.size == "string") {
|
|
@@ -3050,8 +3050,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3050
3050
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
3051
3051
|
return `${i}px`;
|
|
3052
3052
|
}
|
|
3053
|
-
return
|
|
3054
|
-
}), r =
|
|
3053
|
+
return Ie;
|
|
3054
|
+
}), r = _(() => ({
|
|
3055
3055
|
boxSizing: "border-box",
|
|
3056
3056
|
color: t.color,
|
|
3057
3057
|
display: t.display,
|
|
@@ -3059,7 +3059,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3059
3059
|
lineHeight: "0",
|
|
3060
3060
|
width: n.value
|
|
3061
3061
|
}));
|
|
3062
|
-
return (a, i) => (m(),
|
|
3062
|
+
return (a, i) => (m(), V(Se(e.as), {
|
|
3063
3063
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3064
3064
|
class: "kui-icon close-icon",
|
|
3065
3065
|
"data-testid": "kui-icon-wrapper-close-icon",
|
|
@@ -3076,14 +3076,14 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3076
3076
|
width: "100%",
|
|
3077
3077
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3078
3078
|
}, [
|
|
3079
|
-
e.title ? (m(), $("title",
|
|
3080
|
-
|
|
3079
|
+
e.title ? (m(), $("title", Ms, F(e.title), 1)) : J("", !0),
|
|
3080
|
+
Es
|
|
3081
3081
|
], 8, Os))
|
|
3082
3082
|
]),
|
|
3083
3083
|
_: 1
|
|
3084
3084
|
}, 8, ["aria-hidden", "style"]));
|
|
3085
3085
|
}
|
|
3086
|
-
}),
|
|
3086
|
+
}), qs = /* @__PURE__ */ ot(Fs, [["__scopeId", "data-v-26ad8dc6"]]), Ks = (e) => (Je("data-v-d43c21f8"), e = e(), Ze(), e), Bs = ["aria-hidden"], Ls = {
|
|
3087
3087
|
key: 0,
|
|
3088
3088
|
"data-testid": "kui-icon-svg-title"
|
|
3089
3089
|
}, Us = /* @__PURE__ */ Ks(() => /* @__PURE__ */ L("path", {
|
|
@@ -3120,7 +3120,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3120
3120
|
size: {
|
|
3121
3121
|
type: [Number, String],
|
|
3122
3122
|
required: !1,
|
|
3123
|
-
default:
|
|
3123
|
+
default: Ie,
|
|
3124
3124
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
3125
3125
|
validator: (e) => {
|
|
3126
3126
|
if (typeof e == "number" && e > 0)
|
|
@@ -3141,7 +3141,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3141
3141
|
}
|
|
3142
3142
|
},
|
|
3143
3143
|
setup(e) {
|
|
3144
|
-
const t = e, n =
|
|
3144
|
+
const t = e, n = _(() => {
|
|
3145
3145
|
if (typeof t.size == "number" && t.size > 0)
|
|
3146
3146
|
return `${t.size}px`;
|
|
3147
3147
|
if (typeof t.size == "string") {
|
|
@@ -3149,8 +3149,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3149
3149
|
if (i && !isNaN(i) && Number.isInteger(i) && i > 0)
|
|
3150
3150
|
return `${i}px`;
|
|
3151
3151
|
}
|
|
3152
|
-
return
|
|
3153
|
-
}), r =
|
|
3152
|
+
return Ie;
|
|
3153
|
+
}), r = _(() => ({
|
|
3154
3154
|
boxSizing: "border-box",
|
|
3155
3155
|
color: t.color,
|
|
3156
3156
|
display: t.display,
|
|
@@ -3158,7 +3158,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3158
3158
|
lineHeight: "0",
|
|
3159
3159
|
width: n.value
|
|
3160
3160
|
}));
|
|
3161
|
-
return (a, i) => (m(),
|
|
3161
|
+
return (a, i) => (m(), V(Se(e.as), {
|
|
3162
3162
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3163
3163
|
class: "kui-icon more-icon",
|
|
3164
3164
|
"data-testid": "kui-icon-wrapper-more-icon",
|
|
@@ -3182,7 +3182,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3182
3182
|
_: 1
|
|
3183
3183
|
}, 8, ["aria-hidden", "style"]));
|
|
3184
3184
|
}
|
|
3185
|
-
}),
|
|
3185
|
+
}), Vs = /* @__PURE__ */ ot(Ps, [["__scopeId", "data-v-d43c21f8"]]), Rs = {
|
|
3186
3186
|
class: "config-card-title",
|
|
3187
3187
|
"data-testid": "config-card-title"
|
|
3188
3188
|
}, Ds = { class: "config-card-actions" }, zs = ["href"], Gs = { class: "config-card-details-section" }, Hs = /* @__PURE__ */ X({
|
|
@@ -3278,7 +3278,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3278
3278
|
label: "YAML",
|
|
3279
3279
|
value: "yaml"
|
|
3280
3280
|
}
|
|
3281
|
-
], p =
|
|
3281
|
+
], p = M("structured"), c = (d) => {
|
|
3282
3282
|
p.value = d == null ? void 0 : d.value;
|
|
3283
3283
|
}, y = {
|
|
3284
3284
|
id: {
|
|
@@ -3314,96 +3314,96 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3314
3314
|
// the last property displayed
|
|
3315
3315
|
section: he.Basic
|
|
3316
3316
|
}
|
|
3317
|
-
}, f =
|
|
3318
|
-
var d,
|
|
3319
|
-
if (!
|
|
3317
|
+
}, f = M(!1), b = M(!1), I = M(""), A = M({}), D = _(() => {
|
|
3318
|
+
var d, x, B;
|
|
3319
|
+
if (!A.value)
|
|
3320
3320
|
return [];
|
|
3321
|
-
const
|
|
3322
|
-
for (const
|
|
3323
|
-
const
|
|
3324
|
-
let
|
|
3325
|
-
(K || K === 0) && (
|
|
3321
|
+
const S = [], G = Object.keys(A.value).length;
|
|
3322
|
+
for (const E in A.value) {
|
|
3323
|
+
const C = (x = (d = a.configSchema) == null ? void 0 : d[E]) == null ? void 0 : x.order, K = (B = y[E]) == null ? void 0 : B.order;
|
|
3324
|
+
let O = G;
|
|
3325
|
+
(K || K === 0) && (O = K === -1 ? G + 1 : K), C && (O = C === -1 ? G + 1 : C), S.push([E, O]);
|
|
3326
3326
|
}
|
|
3327
|
-
return
|
|
3328
|
-
return
|
|
3329
|
-
}),
|
|
3330
|
-
var
|
|
3331
|
-
const
|
|
3327
|
+
return S.sort(function(E, C) {
|
|
3328
|
+
return E[1] - C[1];
|
|
3329
|
+
}), S.map((E) => {
|
|
3330
|
+
var C, K;
|
|
3331
|
+
const O = E[0], H = (C = A.value) == null ? void 0 : C[O], te = ((K = a.configSchema) == null ? void 0 : K[O]) || {}, de = y[O];
|
|
3332
3332
|
return {
|
|
3333
|
-
key:
|
|
3333
|
+
key: O,
|
|
3334
3334
|
value: H,
|
|
3335
3335
|
hidden: te.hidden || !1,
|
|
3336
3336
|
type: te.type ?? ((de == null ? void 0 : de.type) || ee.Text),
|
|
3337
|
-
label: te.label ?? ((de == null ? void 0 : de.label) || s(
|
|
3337
|
+
label: te.label ?? ((de == null ? void 0 : de.label) || s(O)),
|
|
3338
3338
|
tooltip: te.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3339
3339
|
section: te.section ?? ((de == null ? void 0 : de.section) || he.Advanced)
|
|
3340
3340
|
};
|
|
3341
|
-
}).filter((
|
|
3342
|
-
}),
|
|
3343
|
-
var d,
|
|
3344
|
-
if (!
|
|
3341
|
+
}).filter((E) => !E.hidden && E.key !== a.pluginConfigKey);
|
|
3342
|
+
}), q = _(() => {
|
|
3343
|
+
var d, x;
|
|
3344
|
+
if (!A.value || !a.pluginConfigKey)
|
|
3345
3345
|
return [];
|
|
3346
|
-
const B =
|
|
3347
|
-
for (const
|
|
3348
|
-
const
|
|
3349
|
-
let
|
|
3350
|
-
|
|
3346
|
+
const B = A.value[a.pluginConfigKey] || {}, S = Object.keys(B).length, G = [];
|
|
3347
|
+
for (const E in B) {
|
|
3348
|
+
const C = (x = (d = a.pluginConfigSchema) == null ? void 0 : d[E]) == null ? void 0 : x.order, K = B[E];
|
|
3349
|
+
let O = K != null && K !== "" ? S - 1 : S;
|
|
3350
|
+
C && (O = C === -1 ? S + 1 : C), G.push([E, O]);
|
|
3351
3351
|
}
|
|
3352
|
-
return G.sort(function(
|
|
3353
|
-
return
|
|
3354
|
-
}), G.map((
|
|
3355
|
-
var
|
|
3356
|
-
const K =
|
|
3352
|
+
return G.sort(function(E, C) {
|
|
3353
|
+
return E[1] - C[1];
|
|
3354
|
+
}), G.map((E) => {
|
|
3355
|
+
var C;
|
|
3356
|
+
const K = E[0], O = B[K], H = ((C = a.pluginConfigSchema) == null ? void 0 : C[K]) || {};
|
|
3357
3357
|
return {
|
|
3358
3358
|
key: K,
|
|
3359
|
-
value:
|
|
3359
|
+
value: O,
|
|
3360
3360
|
hidden: H.hidden || !1,
|
|
3361
3361
|
type: H.type ?? ee.Text,
|
|
3362
3362
|
label: H.label ?? s(K),
|
|
3363
3363
|
tooltip: H.tooltip ?? void 0,
|
|
3364
3364
|
section: he.Plugin
|
|
3365
3365
|
};
|
|
3366
|
-
}).filter((
|
|
3367
|
-
}), Z =
|
|
3368
|
-
var d,
|
|
3366
|
+
}).filter((E) => !E.hidden);
|
|
3367
|
+
}), Z = _(() => {
|
|
3368
|
+
var d, x, B, S;
|
|
3369
3369
|
return {
|
|
3370
|
-
basic: (d =
|
|
3371
|
-
advanced: (
|
|
3372
|
-
plugin: (
|
|
3370
|
+
basic: (d = D.value) == null ? void 0 : d.filter((G) => G.section === he.Basic),
|
|
3371
|
+
advanced: (x = D.value) == null ? void 0 : x.filter((G) => G.section === he.Advanced),
|
|
3372
|
+
plugin: (S = q.value) == null ? void 0 : S.concat((B = D.value) == null ? void 0 : B.filter((G) => G.section === he.Plugin))
|
|
3373
3373
|
};
|
|
3374
|
-
}), h =
|
|
3374
|
+
}), h = _(() => {
|
|
3375
3375
|
const d = [];
|
|
3376
3376
|
return Z.value.basic.length && d.push("basic"), Z.value.advanced.length && d.push("advanced"), Z.value.plugin.length && d.push("plugin"), d;
|
|
3377
|
-
}),
|
|
3378
|
-
var d,
|
|
3377
|
+
}), w = _(() => {
|
|
3378
|
+
var d, x;
|
|
3379
3379
|
let B = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3380
|
-
return a.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((d = a.config) == null ? void 0 : d.controlPlaneId) || "") : a.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (
|
|
3380
|
+
return a.config.app === "konnect" ? B = B.replace(/{controlPlaneId}/gi, ((d = a.config) == null ? void 0 : d.controlPlaneId) || "") : a.config.app === "kongManager" && (B = B.replace(/\/{workspace}/gi, (x = a.config) != null && x.workspace ? `/${a.config.workspace}` : "")), B = B.replace(/{id}/gi, a.config.entityId), B;
|
|
3381
3381
|
});
|
|
3382
|
-
return
|
|
3382
|
+
return Te(f, (d) => {
|
|
3383
3383
|
r("loading", d);
|
|
3384
3384
|
}, { immediate: !0 }), gt(async () => {
|
|
3385
|
-
|
|
3385
|
+
b.value = !1, f.value = !0;
|
|
3386
3386
|
try {
|
|
3387
|
-
const { data: d } = await l.get(
|
|
3387
|
+
const { data: d } = await l.get(w.value);
|
|
3388
3388
|
if (a.dataKey)
|
|
3389
3389
|
if (typeof d[a.dataKey] < "u")
|
|
3390
|
-
|
|
3390
|
+
A.value = { ...d[a.dataKey] };
|
|
3391
3391
|
else
|
|
3392
3392
|
throw new Error(i("errors.dataKeyUndefined", { dataKey: a.dataKey }));
|
|
3393
3393
|
else
|
|
3394
|
-
|
|
3395
|
-
Object.keys(a.configSchema).filter((
|
|
3396
|
-
|
|
3394
|
+
A.value = { ...d };
|
|
3395
|
+
Object.keys(a.configSchema).filter((x) => a.configSchema[x].forceShow).forEach((x) => {
|
|
3396
|
+
A.value && typeof A.value[x] > "u" && (A.value[x] = null);
|
|
3397
3397
|
}), r("fetch:success", d);
|
|
3398
3398
|
} catch (d) {
|
|
3399
|
-
const
|
|
3400
|
-
|
|
3399
|
+
const x = o(d);
|
|
3400
|
+
I.value = x.startsWith("code") ? i("baseConfigCard.errors.load") : x, b.value = !0, r("fetch:error", d);
|
|
3401
3401
|
} finally {
|
|
3402
3402
|
f.value = !1;
|
|
3403
3403
|
}
|
|
3404
|
-
}), (d,
|
|
3405
|
-
const B =
|
|
3406
|
-
return m(),
|
|
3404
|
+
}), (d, x) => {
|
|
3405
|
+
const B = R("KLabel"), S = R("KSelect"), G = R("KButton"), E = R("KSkeleton"), C = R("KEmptyState"), K = R("KCard");
|
|
3406
|
+
return m(), V(K, {
|
|
3407
3407
|
class: "kong-ui-entity-base-config-card",
|
|
3408
3408
|
"title-tag": e.titleTag
|
|
3409
3409
|
}, Be({
|
|
@@ -3419,12 +3419,12 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3419
3419
|
]),
|
|
3420
3420
|
_: 1
|
|
3421
3421
|
}),
|
|
3422
|
-
j(
|
|
3422
|
+
j(S, {
|
|
3423
3423
|
"data-testid": "select-config-format",
|
|
3424
3424
|
items: u,
|
|
3425
3425
|
onChange: c
|
|
3426
3426
|
}),
|
|
3427
|
-
e.configCardDoc ? (m(),
|
|
3427
|
+
e.configCardDoc ? (m(), V(G, {
|
|
3428
3428
|
key: 0,
|
|
3429
3429
|
appearance: "tertiary",
|
|
3430
3430
|
class: "book-icon",
|
|
@@ -3436,7 +3436,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3436
3436
|
rel: "noopener",
|
|
3437
3437
|
target: "_blank"
|
|
3438
3438
|
}, [
|
|
3439
|
-
j(g(
|
|
3439
|
+
j(g(Is), { size: g(Sa) }, null, 8, ["size"])
|
|
3440
3440
|
], 8, zs)
|
|
3441
3441
|
]),
|
|
3442
3442
|
_: 1
|
|
@@ -3444,34 +3444,34 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3444
3444
|
])
|
|
3445
3445
|
]),
|
|
3446
3446
|
default: v(() => [
|
|
3447
|
-
f.value ? (m(),
|
|
3447
|
+
f.value ? (m(), V(E, {
|
|
3448
3448
|
key: 0,
|
|
3449
3449
|
"data-testid": "config-card-loader",
|
|
3450
3450
|
"table-columns": 2,
|
|
3451
3451
|
type: "table"
|
|
3452
|
-
})) :
|
|
3452
|
+
})) : b.value ? (m(), V(C, {
|
|
3453
3453
|
key: 1,
|
|
3454
3454
|
"data-testid": "config-card-fetch-error",
|
|
3455
3455
|
"icon-variant": "error"
|
|
3456
3456
|
}, {
|
|
3457
3457
|
default: v(() => [
|
|
3458
|
-
L("h3", null, F(
|
|
3458
|
+
L("h3", null, F(I.value), 1)
|
|
3459
3459
|
]),
|
|
3460
3460
|
_: 1
|
|
3461
3461
|
})) : J("", !0),
|
|
3462
3462
|
L("div", Gs, [
|
|
3463
3463
|
j(ps, {
|
|
3464
3464
|
config: e.config,
|
|
3465
|
-
"fetcher-url":
|
|
3465
|
+
"fetcher-url": w.value,
|
|
3466
3466
|
format: p.value,
|
|
3467
3467
|
"prop-list-types": h.value,
|
|
3468
3468
|
"property-collections": Z.value,
|
|
3469
|
-
record:
|
|
3469
|
+
record: A.value
|
|
3470
3470
|
}, Be({ _: 2 }, [
|
|
3471
|
-
ve(Object.keys(d.$slots), (
|
|
3472
|
-
name:
|
|
3471
|
+
ve(Object.keys(d.$slots), (O) => ({
|
|
3472
|
+
name: O,
|
|
3473
3473
|
fn: v(({ row: H, rowValue: te }) => [
|
|
3474
|
-
ne(d.$slots,
|
|
3474
|
+
ne(d.$slots, O, {
|
|
3475
3475
|
row: H,
|
|
3476
3476
|
rowValue: te
|
|
3477
3477
|
}, void 0, !0)
|
|
@@ -3485,7 +3485,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3485
3485
|
e.hideTitle ? void 0 : {
|
|
3486
3486
|
name: "title",
|
|
3487
3487
|
fn: v(() => [
|
|
3488
|
-
L("span",
|
|
3488
|
+
L("span", Rs, [
|
|
3489
3489
|
ne(d.$slots, "title", {}, () => [
|
|
3490
3490
|
Y(F(g(i)("baseConfigCard.title")), 1)
|
|
3491
3491
|
], !0)
|
|
@@ -3568,19 +3568,19 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3568
3568
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3569
3569
|
setup(e, { emit: t }) {
|
|
3570
3570
|
var n;
|
|
3571
|
-
const r = t, a = e, i = Ot(), { i18n: { t: o } } = se.useI18n(), { getMessageFromError: s } = se.useErrors(), { axiosInstance: l } = se.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u =
|
|
3572
|
-
var h,
|
|
3571
|
+
const r = t, a = e, i = Ot(), { i18n: { t: o } } = se.useI18n(), { getMessageFromError: s } = se.useErrors(), { axiosInstance: l } = se.useAxios((n = a.config) == null ? void 0 : n.axiosRequestConfig), u = M(!1), p = M(!1), c = M(""), y = _(() => a.canSubmit === !1 || a.isReadonly), f = M(!1), b = _(() => {
|
|
3572
|
+
var h, w;
|
|
3573
3573
|
let d = `${a.config.apiBaseUrl}${a.fetchUrl}`;
|
|
3574
|
-
return a.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((h = a.config) == null ? void 0 : h.controlPlaneId) || "") : a.config.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, (
|
|
3575
|
-
}),
|
|
3574
|
+
return a.config.app === "konnect" ? d = d.replace(/{controlPlaneId}/gi, ((h = a.config) == null ? void 0 : h.controlPlaneId) || "") : a.config.app === "kongManager" && (d = d.replace(/\/{workspace}/gi, (w = a.config) != null && w.workspace ? `/${a.config.workspace}` : "")), a.editId ? (d = d.replace(/{id}/gi, a.editId), d) : (d = d.replace(/\/{id}/gi, ""), d);
|
|
3575
|
+
}), I = () => {
|
|
3576
3576
|
f.value = !f.value;
|
|
3577
|
-
},
|
|
3578
|
-
a.config.cancelRoute ? i.push(a.config.cancelRoute) :
|
|
3579
|
-
},
|
|
3577
|
+
}, A = () => {
|
|
3578
|
+
a.config.cancelRoute ? i.push(a.config.cancelRoute) : D();
|
|
3579
|
+
}, D = () => {
|
|
3580
3580
|
r("cancel");
|
|
3581
|
-
},
|
|
3581
|
+
}, q = () => {
|
|
3582
3582
|
y.value || r("submit");
|
|
3583
|
-
}, Z =
|
|
3583
|
+
}, Z = M([
|
|
3584
3584
|
{
|
|
3585
3585
|
title: o("baseForm.configuration.yaml"),
|
|
3586
3586
|
hash: "#yaml"
|
|
@@ -3590,33 +3590,33 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3590
3590
|
hash: "#json"
|
|
3591
3591
|
}
|
|
3592
3592
|
]);
|
|
3593
|
-
return
|
|
3593
|
+
return Te(() => u.value, (h) => {
|
|
3594
3594
|
r("loading", h);
|
|
3595
3595
|
}, { immediate: !0 }), gt(async () => {
|
|
3596
3596
|
if (a.editId)
|
|
3597
3597
|
try {
|
|
3598
3598
|
p.value = !1, u.value = !0;
|
|
3599
|
-
const { data: h } = await l.get(
|
|
3599
|
+
const { data: h } = await l.get(b.value);
|
|
3600
3600
|
r("fetch:success", h);
|
|
3601
3601
|
} catch (h) {
|
|
3602
|
-
const
|
|
3603
|
-
c.value =
|
|
3602
|
+
const w = s(h);
|
|
3603
|
+
c.value = w.startsWith("code") ? o("baseForm.errors.edit") : w, p.value = !0, r("fetch:error", h);
|
|
3604
3604
|
} finally {
|
|
3605
3605
|
u.value = !1;
|
|
3606
3606
|
}
|
|
3607
|
-
}), (h,
|
|
3608
|
-
const d =
|
|
3609
|
-
return m(),
|
|
3607
|
+
}), (h, w) => {
|
|
3608
|
+
const d = R("KSkeleton"), x = R("KEmptyState"), B = R("KAlert"), S = R("KButton"), G = R("KTabs"), E = R("KSlideout");
|
|
3609
|
+
return m(), V(Se(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3610
3610
|
default: v(() => [
|
|
3611
|
-
u.value ? (m(),
|
|
3611
|
+
u.value ? (m(), V(d, {
|
|
3612
3612
|
key: 0,
|
|
3613
3613
|
type: "form"
|
|
3614
|
-
})) : p.value ? (m(),
|
|
3614
|
+
})) : p.value ? (m(), V(x, {
|
|
3615
3615
|
key: 1,
|
|
3616
3616
|
"action-button-text": g(o)("baseForm.actions.back"),
|
|
3617
3617
|
"data-testid": "form-fetch-error",
|
|
3618
3618
|
"icon-variant": "error",
|
|
3619
|
-
onClickAction:
|
|
3619
|
+
onClickAction: A
|
|
3620
3620
|
}, {
|
|
3621
3621
|
default: v(() => [
|
|
3622
3622
|
L("h3", null, F(c.value), 1)
|
|
@@ -3626,11 +3626,11 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3626
3626
|
key: 2,
|
|
3627
3627
|
"data-testid": "form-content",
|
|
3628
3628
|
novalidate: a.noValidate,
|
|
3629
|
-
onReset:
|
|
3630
|
-
onSubmit:
|
|
3629
|
+
onReset: St(D, ["prevent"]),
|
|
3630
|
+
onSubmit: St(q, ["prevent"])
|
|
3631
3631
|
}, [
|
|
3632
3632
|
ne(h.$slots, "default", {}, void 0, !0),
|
|
3633
|
-
e.errorMessage ? (m(),
|
|
3633
|
+
e.errorMessage ? (m(), V(B, {
|
|
3634
3634
|
key: 0,
|
|
3635
3635
|
appearance: "danger",
|
|
3636
3636
|
"data-testid": "form-error",
|
|
@@ -3638,17 +3638,17 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3638
3638
|
}, null, 8, ["message"])) : J("", !0),
|
|
3639
3639
|
L("div", Ws, [
|
|
3640
3640
|
ne(h.$slots, "form-actions", {}, () => [
|
|
3641
|
-
j(
|
|
3641
|
+
j(S, {
|
|
3642
3642
|
appearance: "tertiary",
|
|
3643
3643
|
"data-testid": "form-view-configuration",
|
|
3644
|
-
onClick:
|
|
3644
|
+
onClick: w[0] || (w[0] = (C) => I())
|
|
3645
3645
|
}, {
|
|
3646
3646
|
default: v(() => [
|
|
3647
3647
|
Y(F(g(o)("baseForm.actions.viewConfiguration")), 1)
|
|
3648
3648
|
]),
|
|
3649
3649
|
_: 1
|
|
3650
3650
|
}),
|
|
3651
|
-
j(
|
|
3651
|
+
j(S, {
|
|
3652
3652
|
appearance: "secondary",
|
|
3653
3653
|
"data-testid": "form-cancel",
|
|
3654
3654
|
disabled: e.isReadonly,
|
|
@@ -3659,7 +3659,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3659
3659
|
]),
|
|
3660
3660
|
_: 1
|
|
3661
3661
|
}, 8, ["disabled"]),
|
|
3662
|
-
j(
|
|
3662
|
+
j(S, {
|
|
3663
3663
|
appearance: "primary",
|
|
3664
3664
|
"data-testid": "form-submit",
|
|
3665
3665
|
disabled: y.value,
|
|
@@ -3673,14 +3673,14 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3673
3673
|
], !0)
|
|
3674
3674
|
])
|
|
3675
3675
|
], 40, Zs)),
|
|
3676
|
-
j(
|
|
3676
|
+
j(E, {
|
|
3677
3677
|
"close-on-blur": !1,
|
|
3678
3678
|
"data-testid": "form-view-configuration-slideout",
|
|
3679
3679
|
"has-overlay": !1,
|
|
3680
3680
|
"offset-top": 60,
|
|
3681
3681
|
title: g(o)("baseForm.configuration.title"),
|
|
3682
3682
|
visible: f.value,
|
|
3683
|
-
onClose:
|
|
3683
|
+
onClose: w[1] || (w[1] = (C) => I())
|
|
3684
3684
|
}, {
|
|
3685
3685
|
default: v(() => [
|
|
3686
3686
|
L("div", null, F(g(o)("baseForm.configuration.message")), 1),
|
|
@@ -3689,9 +3689,9 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3689
3689
|
tabs: Z.value
|
|
3690
3690
|
}, {
|
|
3691
3691
|
json: v(() => [
|
|
3692
|
-
j(
|
|
3692
|
+
j($n, {
|
|
3693
3693
|
config: e.config,
|
|
3694
|
-
"fetcher-url":
|
|
3694
|
+
"fetcher-url": b.value,
|
|
3695
3695
|
"json-record": a.formFields,
|
|
3696
3696
|
"request-method": a.editId ? "put" : "post"
|
|
3697
3697
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
@@ -3728,73 +3728,67 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3728
3728
|
}
|
|
3729
3729
|
},
|
|
3730
3730
|
setup(e) {
|
|
3731
|
-
const t = e, n =
|
|
3732
|
-
var
|
|
3733
|
-
return ((
|
|
3734
|
-
}), r =
|
|
3735
|
-
var
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
}, l = () => {
|
|
3746
|
-
var k, U, N;
|
|
3747
|
-
let Z = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3731
|
+
const t = e, n = _(() => {
|
|
3732
|
+
var b;
|
|
3733
|
+
return ((b = t.rowEl) == null ? void 0 : b.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3734
|
+
}), r = _(() => {
|
|
3735
|
+
var b, I;
|
|
3736
|
+
const A = (b = t.rowEl) == null ? void 0 : b.querySelectorAll("td");
|
|
3737
|
+
return A ? ((I = A[0]) == null ? void 0 : I.getAttribute("data-testid")) === t.keyName : !1;
|
|
3738
|
+
}), a = _(() => r.value || t.tooltip);
|
|
3739
|
+
let i;
|
|
3740
|
+
const o = () => {
|
|
3741
|
+
i && (i.disconnect(), i = void 0);
|
|
3742
|
+
}, s = () => {
|
|
3743
|
+
var b, I, A;
|
|
3744
|
+
let D = ((b = n.value) == null ? void 0 : b.clientWidth) || 0;
|
|
3748
3745
|
if (n.value && "getComputedStyle" in window) {
|
|
3749
|
-
const
|
|
3750
|
-
|
|
3746
|
+
const Z = window.getComputedStyle(n.value);
|
|
3747
|
+
D -= (parseFloat(Z.paddingLeft) || 0) + (parseFloat(Z.paddingRight) || 0);
|
|
3751
3748
|
}
|
|
3752
|
-
|
|
3753
|
-
|
|
3754
|
-
|
|
3755
|
-
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3760
|
-
});
|
|
3749
|
+
const q = ((I = n.value) == null ? void 0 : I.querySelector('[data-truncate="true"]')) || null;
|
|
3750
|
+
u.value = (q == null ? void 0 : q.getBoundingClientRect().width) || 0, p.value = D, c.value = ((A = l.value) == null ? void 0 : A.innerText) || "";
|
|
3751
|
+
}, l = M({}), u = M(0), p = M(0), c = M(""), y = Te(
|
|
3752
|
+
n,
|
|
3753
|
+
(b) => {
|
|
3754
|
+
a.value && (o(), "ResizeObserver" in window && window && (i = new ResizeObserver((I) => {
|
|
3755
|
+
window.requestAnimationFrame(() => {
|
|
3756
|
+
!Array.isArray(I) || !I.length || s();
|
|
3761
3757
|
});
|
|
3762
|
-
|
|
3763
|
-
U && o.observe(U);
|
|
3764
|
-
}
|
|
3758
|
+
}), b && i.observe(b)));
|
|
3765
3759
|
},
|
|
3766
3760
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3767
|
-
),
|
|
3768
|
-
return
|
|
3769
|
-
|
|
3770
|
-
}),
|
|
3771
|
-
|
|
3772
|
-
}), (
|
|
3773
|
-
const
|
|
3761
|
+
), f = _(() => a.value ? u.value > p.value : !1);
|
|
3762
|
+
return Ir(() => {
|
|
3763
|
+
s();
|
|
3764
|
+
}), Sr(() => {
|
|
3765
|
+
y();
|
|
3766
|
+
}), (b, I) => {
|
|
3767
|
+
const A = R("KTooltip");
|
|
3774
3768
|
return m(), $("span", {
|
|
3775
3769
|
ref_key: "contentRef",
|
|
3776
|
-
ref:
|
|
3770
|
+
ref: l,
|
|
3777
3771
|
class: "content-wrapper"
|
|
3778
3772
|
}, [
|
|
3779
|
-
|
|
3773
|
+
a.value ? (m(), $("span", {
|
|
3780
3774
|
key: 0,
|
|
3781
|
-
"data-truncate":
|
|
3775
|
+
"data-truncate": a.value || void 0
|
|
3782
3776
|
}, [
|
|
3783
|
-
j(
|
|
3777
|
+
j(A, {
|
|
3784
3778
|
"max-width": "300",
|
|
3785
|
-
placement: "
|
|
3786
|
-
text:
|
|
3779
|
+
placement: "bottom-start",
|
|
3780
|
+
text: f.value ? c.value : ""
|
|
3787
3781
|
}, {
|
|
3788
3782
|
default: v(() => [
|
|
3789
|
-
ne(
|
|
3783
|
+
ne(b.$slots, "default", {}, void 0, !0)
|
|
3790
3784
|
]),
|
|
3791
3785
|
_: 3
|
|
3792
3786
|
}, 8, ["text"])
|
|
3793
|
-
], 8, Xs)) : ne(
|
|
3787
|
+
], 8, Xs)) : ne(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
3794
3788
|
], 512);
|
|
3795
3789
|
};
|
|
3796
3790
|
}
|
|
3797
|
-
}), tl = /* @__PURE__ */ Ce(el, [["__scopeId", "data-v-
|
|
3791
|
+
}), tl = /* @__PURE__ */ Ce(el, [["__scopeId", "data-v-aced1ac4"]]), nl = { class: "toolbar-container" }, rl = {
|
|
3798
3792
|
key: 0,
|
|
3799
3793
|
class: "toolbar-button-container"
|
|
3800
3794
|
}, al = ["data-testid"], ol = /* @__PURE__ */ X({
|
|
@@ -3915,8 +3909,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3915
3909
|
},
|
|
3916
3910
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3917
3911
|
setup(e, { emit: t }) {
|
|
3918
|
-
const n = e, r = t, { i18n: { t: a } } = se.useI18n(), i =
|
|
3919
|
-
var d,
|
|
3912
|
+
const n = e, r = t, { i18n: { t: a } } = se.useI18n(), i = _(() => {
|
|
3913
|
+
var d, x;
|
|
3920
3914
|
return typeof n.errorMessage == "string" ? {
|
|
3921
3915
|
hasError: !!n.errorMessage,
|
|
3922
3916
|
title: n.errorMessage,
|
|
@@ -3924,15 +3918,15 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3924
3918
|
} : {
|
|
3925
3919
|
hasError: !!n.errorMessage,
|
|
3926
3920
|
title: (d = n.errorMessage) == null ? void 0 : d.title,
|
|
3927
|
-
message: (
|
|
3921
|
+
message: (x = n.errorMessage) == null ? void 0 : x.message
|
|
3928
3922
|
};
|
|
3929
|
-
}), o =
|
|
3923
|
+
}), o = _(() => n.cacheIdentifier || n.preferencesStorageKey), s = (d) => d.hasData || !!n.query, l = _(() => {
|
|
3930
3924
|
const d = [];
|
|
3931
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3932
|
-
const B = n.tableHeaders[
|
|
3925
|
+
return Object.keys(n.tableHeaders).forEach((x) => {
|
|
3926
|
+
const B = n.tableHeaders[x];
|
|
3933
3927
|
d.push({
|
|
3934
|
-
label: B.label ??
|
|
3935
|
-
key:
|
|
3928
|
+
label: B.label ?? x,
|
|
3929
|
+
key: x,
|
|
3936
3930
|
sortable: B.sortable ?? !1,
|
|
3937
3931
|
hidable: !0
|
|
3938
3932
|
});
|
|
@@ -3944,39 +3938,39 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
3944
3938
|
"data-rowid": d.id,
|
|
3945
3939
|
"data-testid": d.name,
|
|
3946
3940
|
...n.rowAttributes(d)
|
|
3947
|
-
}), p =
|
|
3948
|
-
var
|
|
3949
|
-
return (
|
|
3941
|
+
}), p = M({}), c = (d) => {
|
|
3942
|
+
var x;
|
|
3943
|
+
return (x = p.value) == null ? void 0 : x.$el.querySelector(`[data-rowid="${d.id}"]`);
|
|
3950
3944
|
}, y = (d) => {
|
|
3951
|
-
const
|
|
3945
|
+
const x = {
|
|
3952
3946
|
"data-testid": d.headerKey,
|
|
3953
3947
|
...n.cellAttributes(d)
|
|
3954
3948
|
};
|
|
3955
|
-
return d.colIndex === 0 && (
|
|
3949
|
+
return d.colIndex === 0 && (x.style = {
|
|
3956
3950
|
maxWidth: "250px",
|
|
3957
3951
|
overflowX: "hidden",
|
|
3958
3952
|
textOverflow: "ellipsis"
|
|
3959
|
-
}),
|
|
3953
|
+
}), x;
|
|
3960
3954
|
}, f = () => {
|
|
3961
|
-
r("empty-state-cta-clicked"),
|
|
3962
|
-
},
|
|
3955
|
+
r("empty-state-cta-clicked"), b();
|
|
3956
|
+
}, b = () => {
|
|
3963
3957
|
r("clear-search-input");
|
|
3964
|
-
},
|
|
3965
|
-
r("click:row",
|
|
3966
|
-
}),
|
|
3958
|
+
}, I = _(() => n.disableRowClick ? void 0 : (d, x) => {
|
|
3959
|
+
r("click:row", x);
|
|
3960
|
+
}), A = (d) => {
|
|
3967
3961
|
r("sort", d);
|
|
3968
|
-
}, { setTablePreferences:
|
|
3969
|
-
const d =
|
|
3962
|
+
}, { setTablePreferences: D, getTablePreferences: q } = Dr(), Z = M(q(o.value)), h = _(() => {
|
|
3963
|
+
const d = q(o.value);
|
|
3970
3964
|
return {
|
|
3971
3965
|
...n.initialFetcherParams,
|
|
3972
3966
|
...d
|
|
3973
3967
|
};
|
|
3974
|
-
}),
|
|
3975
|
-
Z.value = d, o.value &&
|
|
3968
|
+
}), w = (d) => {
|
|
3969
|
+
Z.value = d, o.value && D(o.value, d);
|
|
3976
3970
|
};
|
|
3977
|
-
return (d,
|
|
3978
|
-
const B =
|
|
3979
|
-
return m(),
|
|
3971
|
+
return (d, x) => {
|
|
3972
|
+
const B = R("KButton"), S = R("KDropdown"), G = R("KTable"), E = R("KCard");
|
|
3973
|
+
return m(), V(E, {
|
|
3980
3974
|
class: "kong-ui-entity-base-table",
|
|
3981
3975
|
title: e.title,
|
|
3982
3976
|
"title-tag": e.titleTag
|
|
@@ -4011,34 +4005,34 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4011
4005
|
sortable: !e.disableSorting,
|
|
4012
4006
|
"table-preferences": Z.value,
|
|
4013
4007
|
onEmptyStateActionClick: f,
|
|
4014
|
-
"onRow:click":
|
|
4015
|
-
onSort:
|
|
4016
|
-
"onUpdate:tablePreferences":
|
|
4008
|
+
"onRow:click": I.value,
|
|
4009
|
+
onSort: x[0] || (x[0] = (C) => A(C)),
|
|
4010
|
+
"onUpdate:tablePreferences": w
|
|
4017
4011
|
}, Be({
|
|
4018
|
-
toolbar: v(({ state:
|
|
4019
|
-
|
|
4012
|
+
toolbar: v(({ state: C }) => [
|
|
4013
|
+
je(L("div", nl, [
|
|
4020
4014
|
ne(d.$slots, "toolbar-filter", {}, void 0, !0),
|
|
4021
4015
|
d.$slots["toolbar-button"] ? (m(), $("div", rl, [
|
|
4022
4016
|
ne(d.$slots, "toolbar-button", {}, void 0, !0)
|
|
4023
4017
|
])) : J("", !0)
|
|
4024
4018
|
], 512), [
|
|
4025
|
-
[
|
|
4019
|
+
[Ne, s(C)]
|
|
4026
4020
|
])
|
|
4027
4021
|
]),
|
|
4028
|
-
actions: v(({ row:
|
|
4022
|
+
actions: v(({ row: C, rowKey: K, rowValue: O }) => [
|
|
4029
4023
|
L("div", {
|
|
4030
4024
|
class: "actions-container",
|
|
4031
|
-
"data-testid":
|
|
4025
|
+
"data-testid": C.name
|
|
4032
4026
|
}, [
|
|
4033
|
-
j(
|
|
4034
|
-
"kpop-attributes": { placement: "
|
|
4027
|
+
j(S, {
|
|
4028
|
+
"kpop-attributes": { placement: "bottom-end" },
|
|
4035
4029
|
width: e.dropdownMenuWidth
|
|
4036
4030
|
}, {
|
|
4037
4031
|
items: v(() => [
|
|
4038
4032
|
ne(d.$slots, "actions", {
|
|
4039
|
-
row:
|
|
4033
|
+
row: C,
|
|
4040
4034
|
rowKey: K,
|
|
4041
|
-
rowValue:
|
|
4035
|
+
rowValue: O
|
|
4042
4036
|
}, void 0, !0)
|
|
4043
4037
|
]),
|
|
4044
4038
|
default: v(() => [
|
|
@@ -4050,7 +4044,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4050
4044
|
size: "small"
|
|
4051
4045
|
}, {
|
|
4052
4046
|
default: v(() => [
|
|
4053
|
-
j(g(
|
|
4047
|
+
j(g(Vs))
|
|
4054
4048
|
]),
|
|
4055
4049
|
_: 1
|
|
4056
4050
|
})
|
|
@@ -4061,17 +4055,18 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4061
4055
|
]),
|
|
4062
4056
|
_: 2
|
|
4063
4057
|
}, [
|
|
4064
|
-
ve(e.tableHeaders, (
|
|
4058
|
+
ve(e.tableHeaders, (C, K) => ({
|
|
4065
4059
|
name: K,
|
|
4066
|
-
fn: v(({ row:
|
|
4067
|
-
|
|
4060
|
+
fn: v(({ row: O, rowKey: H, rowValue: te }) => [
|
|
4061
|
+
c(O) ? (m(), V(tl, {
|
|
4062
|
+
key: 0,
|
|
4068
4063
|
"key-name": String(K),
|
|
4069
|
-
"row-el": c(
|
|
4070
|
-
tooltip:
|
|
4064
|
+
"row-el": c(O),
|
|
4065
|
+
tooltip: C.tooltip
|
|
4071
4066
|
}, {
|
|
4072
4067
|
default: v(() => [
|
|
4073
4068
|
ne(d.$slots, K, {
|
|
4074
|
-
row:
|
|
4069
|
+
row: O,
|
|
4075
4070
|
rowKey: H,
|
|
4076
4071
|
rowValue: te
|
|
4077
4072
|
}, () => [
|
|
@@ -4079,7 +4074,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4079
4074
|
], !0)
|
|
4080
4075
|
]),
|
|
4081
4076
|
_: 2
|
|
4082
|
-
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
4077
|
+
}, 1032, ["key-name", "row-el", "tooltip"])) : J("", !0)
|
|
4083
4078
|
])
|
|
4084
4079
|
})),
|
|
4085
4080
|
e.query ? void 0 : {
|
|
@@ -4095,7 +4090,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4095
4090
|
}, 8, ["title", "title-tag"]);
|
|
4096
4091
|
};
|
|
4097
4092
|
}
|
|
4098
|
-
}), il = /* @__PURE__ */ Ce(ol, [["__scopeId", "data-v-
|
|
4093
|
+
}), il = /* @__PURE__ */ Ce(ol, [["__scopeId", "data-v-e6b72ef3"]]), sl = {
|
|
4099
4094
|
key: 0,
|
|
4100
4095
|
class: "kong-ui-entity-delete-error"
|
|
4101
4096
|
}, ll = {
|
|
@@ -4140,14 +4135,14 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4140
4135
|
},
|
|
4141
4136
|
emits: ["cancel", "proceed"],
|
|
4142
4137
|
setup(e, { emit: t }) {
|
|
4143
|
-
const { i18nT: n } = se.useI18n(), r = e, a = t, i =
|
|
4138
|
+
const { i18nT: n } = se.useI18n(), r = e, a = t, i = _(() => r.needConfirm ? r.entityName : ""), o = () => {
|
|
4144
4139
|
a("cancel");
|
|
4145
4140
|
}, s = () => {
|
|
4146
4141
|
a("proceed");
|
|
4147
4142
|
};
|
|
4148
4143
|
return (l, u) => {
|
|
4149
|
-
const p =
|
|
4150
|
-
return m(),
|
|
4144
|
+
const p = R("KAlert"), c = R("KPrompt");
|
|
4145
|
+
return m(), V(c, {
|
|
4151
4146
|
"action-button-appearance": "danger",
|
|
4152
4147
|
"action-button-disabled": e.actionPending,
|
|
4153
4148
|
"action-button-text": "Yes, delete",
|
|
@@ -4237,7 +4232,7 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4237
4232
|
}), yl = {
|
|
4238
4233
|
key: 1,
|
|
4239
4234
|
class: "kong-ui-entity-filter"
|
|
4240
|
-
}, hl = { class: "kong-ui-entity-filter-menu" }, vl = ["data-testid"], bl = ["onClick", "onKeydown"], Cl = { class: "menu-item-indicator" }, kl = { class: "menu-item-body" }, wl = ["for"], _l = { class: "menu-item-buttons" },
|
|
4235
|
+
}, hl = { class: "kong-ui-entity-filter-menu" }, vl = ["data-testid"], bl = ["onClick", "onKeydown"], Cl = { class: "menu-item-indicator" }, kl = { class: "menu-item-body" }, wl = ["for"], _l = { class: "menu-item-buttons" }, Il = { class: "filter-clear-button-container" }, Sl = /* @__PURE__ */ X({
|
|
4241
4236
|
__name: "EntityFilter",
|
|
4242
4237
|
props: {
|
|
4243
4238
|
// filter config, either exact match or fuzzy match
|
|
@@ -4257,25 +4252,25 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4257
4252
|
},
|
|
4258
4253
|
emits: ["update:modelValue"],
|
|
4259
4254
|
setup(e, { emit: t }) {
|
|
4260
|
-
const { i18n: { t: n } } = se.useI18n(), r = e, a = t, i =
|
|
4255
|
+
const { i18n: { t: n } } = se.useI18n(), r = e, a = t, i = M(!1), o = M({}), s = M(/* @__PURE__ */ new Set()), l = _(() => {
|
|
4261
4256
|
const h = [];
|
|
4262
|
-
return new URLSearchParams(r.modelValue).forEach((
|
|
4263
|
-
|
|
4257
|
+
return new URLSearchParams(r.modelValue).forEach((w, d) => {
|
|
4258
|
+
w !== "" && h.push(d);
|
|
4264
4259
|
}), h;
|
|
4265
|
-
}), u =
|
|
4260
|
+
}), u = _(() => {
|
|
4266
4261
|
const h = r.config.fields;
|
|
4267
|
-
return Object.keys(h).filter((
|
|
4262
|
+
return Object.keys(h).filter((w) => {
|
|
4268
4263
|
var d;
|
|
4269
|
-
return (d = h == null ? void 0 : h[
|
|
4270
|
-
}).map((
|
|
4271
|
-
label: h[
|
|
4272
|
-
value:
|
|
4264
|
+
return (d = h == null ? void 0 : h[w]) == null ? void 0 : d.searchable;
|
|
4265
|
+
}).map((w) => ({
|
|
4266
|
+
label: h[w].label || w,
|
|
4267
|
+
value: w,
|
|
4273
4268
|
expanded: !1
|
|
4274
4269
|
}));
|
|
4275
4270
|
});
|
|
4276
|
-
|
|
4277
|
-
o.value = {}, new URLSearchParams(h).forEach((
|
|
4278
|
-
o.value[d] =
|
|
4271
|
+
Te(() => r.modelValue, (h) => {
|
|
4272
|
+
o.value = {}, new URLSearchParams(h).forEach((w, d) => {
|
|
4273
|
+
o.value[d] = w;
|
|
4279
4274
|
});
|
|
4280
4275
|
});
|
|
4281
4276
|
const p = () => {
|
|
@@ -4286,29 +4281,29 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4286
4281
|
a("update:modelValue", h);
|
|
4287
4282
|
}, f = () => {
|
|
4288
4283
|
y("");
|
|
4289
|
-
},
|
|
4290
|
-
var
|
|
4291
|
-
return (((d = (
|
|
4292
|
-
value:
|
|
4293
|
-
label:
|
|
4284
|
+
}, b = (h) => `filter-${h}`, I = (h) => {
|
|
4285
|
+
var w, d;
|
|
4286
|
+
return (((d = (w = r.config.schema) == null ? void 0 : w[h]) == null ? void 0 : d.values) ?? []).map((x) => ({
|
|
4287
|
+
value: x,
|
|
4288
|
+
label: x
|
|
4294
4289
|
}));
|
|
4295
|
-
},
|
|
4296
|
-
var
|
|
4297
|
-
return ((d = (
|
|
4298
|
-
},
|
|
4290
|
+
}, A = (h) => {
|
|
4291
|
+
var w, d;
|
|
4292
|
+
return ((d = (w = r.config.schema) == null ? void 0 : w[h]) == null ? void 0 : d.type) ?? "text";
|
|
4293
|
+
}, D = (h) => {
|
|
4299
4294
|
o.value = {
|
|
4300
4295
|
...o.value,
|
|
4301
4296
|
[h]: ""
|
|
4302
4297
|
}, Z();
|
|
4303
|
-
},
|
|
4298
|
+
}, q = () => {
|
|
4304
4299
|
o.value = {}, Z(!0);
|
|
4305
4300
|
}, Z = (h = !1) => {
|
|
4306
|
-
const
|
|
4307
|
-
h && (i.value = !1), a("update:modelValue", new URLSearchParams(
|
|
4301
|
+
const w = Object.keys(o.value).reduce((d, x) => (o.value[x] && (d[x] = `${o.value[x]}`), d), {});
|
|
4302
|
+
h && (i.value = !1), a("update:modelValue", new URLSearchParams(w).toString());
|
|
4308
4303
|
};
|
|
4309
|
-
return (h,
|
|
4310
|
-
const d =
|
|
4311
|
-
return e.config.isExactMatch ? (m(),
|
|
4304
|
+
return (h, w) => {
|
|
4305
|
+
const d = R("KInput"), x = R("KButton"), B = R("KSelect");
|
|
4306
|
+
return e.config.isExactMatch ? (m(), V(d, {
|
|
4312
4307
|
key: 0,
|
|
4313
4308
|
autocomplete: "off",
|
|
4314
4309
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4321,16 +4316,16 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4321
4316
|
j(yn)
|
|
4322
4317
|
]),
|
|
4323
4318
|
after: v(() => [
|
|
4324
|
-
|
|
4319
|
+
je(j(g(qs), {
|
|
4325
4320
|
class: "kong-ui-entity-filter-clear",
|
|
4326
4321
|
onClick: f
|
|
4327
4322
|
}, null, 512), [
|
|
4328
|
-
[
|
|
4323
|
+
[Ne, e.modelValue !== ""]
|
|
4329
4324
|
])
|
|
4330
4325
|
]),
|
|
4331
4326
|
_: 1
|
|
4332
4327
|
}, 8, ["model-value", "placeholder"])) : (m(), $("div", yl, [
|
|
4333
|
-
j(
|
|
4328
|
+
j(x, {
|
|
4334
4329
|
appearance: "tertiary",
|
|
4335
4330
|
"data-testid": "filter-button",
|
|
4336
4331
|
onClick: p
|
|
@@ -4341,77 +4336,77 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4341
4336
|
]),
|
|
4342
4337
|
_: 1
|
|
4343
4338
|
}),
|
|
4344
|
-
|
|
4339
|
+
je(L("div", {
|
|
4345
4340
|
class: "kong-ui-entity-filter-backdrop",
|
|
4346
4341
|
onClick: p
|
|
4347
4342
|
}, null, 512), [
|
|
4348
|
-
[
|
|
4343
|
+
[Ne, i.value]
|
|
4349
4344
|
]),
|
|
4350
|
-
|
|
4351
|
-
(m(!0), $(be, null, ve(u.value, (
|
|
4352
|
-
var G,
|
|
4345
|
+
je(L("div", hl, [
|
|
4346
|
+
(m(!0), $(be, null, ve(u.value, (S) => {
|
|
4347
|
+
var G, E;
|
|
4353
4348
|
return m(), $("div", {
|
|
4354
|
-
key:
|
|
4349
|
+
key: S.value,
|
|
4355
4350
|
class: "kong-ui-entity-filter-menu-item",
|
|
4356
|
-
"data-testid":
|
|
4351
|
+
"data-testid": S.value
|
|
4357
4352
|
}, [
|
|
4358
4353
|
L("span", {
|
|
4359
|
-
class:
|
|
4354
|
+
class: Ee(["menu-item-title", { expanded: s.value.has(S.value) }]),
|
|
4360
4355
|
role: "button",
|
|
4361
4356
|
tabindex: "0",
|
|
4362
|
-
onClick: (
|
|
4363
|
-
onKeydown: wr((
|
|
4357
|
+
onClick: (C) => c(S.value),
|
|
4358
|
+
onKeydown: wr((C) => c(S.value), ["enter"])
|
|
4364
4359
|
}, [
|
|
4365
|
-
Y(F(
|
|
4366
|
-
|
|
4367
|
-
[
|
|
4360
|
+
Y(F(S.label) + " ", 1),
|
|
4361
|
+
je(L("span", Cl, null, 512), [
|
|
4362
|
+
[Ne, l.value.includes(S.value)]
|
|
4368
4363
|
]),
|
|
4369
|
-
j(g(
|
|
4370
|
-
class:
|
|
4364
|
+
j(g(js), {
|
|
4365
|
+
class: Ee(["menu-item-expand-icon", { expanded: s.value.has(S.value) }]),
|
|
4371
4366
|
color: g(_a)
|
|
4372
4367
|
}, null, 8, ["class", "color"])
|
|
4373
4368
|
], 42, bl),
|
|
4374
|
-
|
|
4369
|
+
je(L("div", kl, [
|
|
4375
4370
|
L("label", {
|
|
4376
4371
|
class: "menu-item-label",
|
|
4377
|
-
for: S
|
|
4372
|
+
for: b(S.value)
|
|
4378
4373
|
}, F(g(n)("filter.fieldLabel")), 9, wl),
|
|
4379
|
-
((
|
|
4374
|
+
((E = (G = e.config.schema) == null ? void 0 : G[S.value]) == null ? void 0 : E.type) === "select" ? (m(), V(B, {
|
|
4380
4375
|
key: 0,
|
|
4381
|
-
id: S
|
|
4382
|
-
modelValue: o.value[
|
|
4383
|
-
"onUpdate:modelValue": (
|
|
4384
|
-
items:
|
|
4376
|
+
id: b(S.value),
|
|
4377
|
+
modelValue: o.value[S.value],
|
|
4378
|
+
"onUpdate:modelValue": (C) => o.value[S.value] = C,
|
|
4379
|
+
items: I(S.value),
|
|
4385
4380
|
placeholder: g(n)("filter.selectPlaceholder")
|
|
4386
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(),
|
|
4381
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (m(), V(d, {
|
|
4387
4382
|
key: 1,
|
|
4388
|
-
id: S
|
|
4389
|
-
modelValue: o.value[
|
|
4390
|
-
"onUpdate:modelValue": (
|
|
4383
|
+
id: b(S.value),
|
|
4384
|
+
modelValue: o.value[S.value],
|
|
4385
|
+
"onUpdate:modelValue": (C) => o.value[S.value] = C,
|
|
4391
4386
|
autocomplete: "off",
|
|
4392
4387
|
placeholder: g(n)("filter.inputPlaceholder"),
|
|
4393
|
-
type:
|
|
4388
|
+
type: A(S.value)
|
|
4394
4389
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4395
4390
|
], 512), [
|
|
4396
|
-
[
|
|
4391
|
+
[Ne, s.value.has(S.value)]
|
|
4397
4392
|
]),
|
|
4398
|
-
|
|
4399
|
-
j(
|
|
4393
|
+
je(L("div", _l, [
|
|
4394
|
+
j(x, {
|
|
4400
4395
|
appearance: "tertiary",
|
|
4401
4396
|
"data-testid": "apply-filter",
|
|
4402
4397
|
size: "small",
|
|
4403
|
-
onClick:
|
|
4398
|
+
onClick: w[0] || (w[0] = (C) => Z(!0))
|
|
4404
4399
|
}, {
|
|
4405
4400
|
default: v(() => [
|
|
4406
4401
|
Y(F(g(n)("filter.applyButtonText")), 1)
|
|
4407
4402
|
]),
|
|
4408
4403
|
_: 1
|
|
4409
4404
|
}),
|
|
4410
|
-
j(
|
|
4405
|
+
j(x, {
|
|
4411
4406
|
appearance: "tertiary",
|
|
4412
4407
|
"data-testid": "clear-filter",
|
|
4413
4408
|
size: "small",
|
|
4414
|
-
onClick: (
|
|
4409
|
+
onClick: (C) => D(S.value)
|
|
4415
4410
|
}, {
|
|
4416
4411
|
default: v(() => [
|
|
4417
4412
|
Y(F(g(n)("filter.clearButtonText")), 1)
|
|
@@ -4419,15 +4414,15 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4419
4414
|
_: 2
|
|
4420
4415
|
}, 1032, ["onClick"])
|
|
4421
4416
|
], 512), [
|
|
4422
|
-
[
|
|
4417
|
+
[Ne, s.value.has(S.value)]
|
|
4423
4418
|
])
|
|
4424
4419
|
], 8, vl);
|
|
4425
4420
|
}), 128)),
|
|
4426
|
-
L("div",
|
|
4427
|
-
j(
|
|
4421
|
+
L("div", Il, [
|
|
4422
|
+
j(x, {
|
|
4428
4423
|
appearance: "tertiary",
|
|
4429
4424
|
size: "small",
|
|
4430
|
-
onClick:
|
|
4425
|
+
onClick: q
|
|
4431
4426
|
}, {
|
|
4432
4427
|
default: v(() => [
|
|
4433
4428
|
Y(F(g(n)("filter.clearAllButtonText")), 1)
|
|
@@ -4436,12 +4431,12 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4436
4431
|
})
|
|
4437
4432
|
])
|
|
4438
4433
|
], 512), [
|
|
4439
|
-
[
|
|
4434
|
+
[Ne, i.value]
|
|
4440
4435
|
])
|
|
4441
4436
|
]));
|
|
4442
4437
|
};
|
|
4443
4438
|
}
|
|
4444
|
-
}),
|
|
4439
|
+
}), xl = /* @__PURE__ */ Ce(Sl, [["__scopeId", "data-v-94990087"]]), st = /* @__PURE__ */ X({
|
|
4445
4440
|
__name: "PermissionsWrapper",
|
|
4446
4441
|
props: {
|
|
4447
4442
|
/**
|
|
@@ -4463,8 +4458,8 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4463
4458
|
}
|
|
4464
4459
|
},
|
|
4465
4460
|
setup(e) {
|
|
4466
|
-
const t = e, n =
|
|
4467
|
-
return
|
|
4461
|
+
const t = e, n = M(void 0), r = _(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4462
|
+
return Te(() => t.authFunction, async () => {
|
|
4468
4463
|
n.value = await t.authFunction();
|
|
4469
4464
|
}, { immediate: !0 }), (a, i) => r.value ? ne(a.$slots, "default", {
|
|
4470
4465
|
key: 0,
|
|
@@ -4473,41 +4468,41 @@ const ss = { class: "yaml-config" }, hr = /* @__PURE__ */ X({
|
|
|
4473
4468
|
}
|
|
4474
4469
|
});
|
|
4475
4470
|
let lt;
|
|
4476
|
-
const
|
|
4477
|
-
function
|
|
4471
|
+
const Al = new Uint8Array(16);
|
|
4472
|
+
function Tl() {
|
|
4478
4473
|
if (!lt && (lt = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !lt))
|
|
4479
4474
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4480
|
-
return lt(
|
|
4475
|
+
return lt(Al);
|
|
4481
4476
|
}
|
|
4482
4477
|
const ue = [];
|
|
4483
4478
|
for (let e = 0; e < 256; ++e)
|
|
4484
4479
|
ue.push((e + 256).toString(16).slice(1));
|
|
4485
|
-
function
|
|
4480
|
+
function $l(e, t = 0) {
|
|
4486
4481
|
return ue[e[t + 0]] + ue[e[t + 1]] + ue[e[t + 2]] + ue[e[t + 3]] + "-" + ue[e[t + 4]] + ue[e[t + 5]] + "-" + ue[e[t + 6]] + ue[e[t + 7]] + "-" + ue[e[t + 8]] + ue[e[t + 9]] + "-" + ue[e[t + 10]] + ue[e[t + 11]] + ue[e[t + 12]] + ue[e[t + 13]] + ue[e[t + 14]] + ue[e[t + 15]];
|
|
4487
4482
|
}
|
|
4488
|
-
const
|
|
4489
|
-
randomUUID:
|
|
4483
|
+
const jl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), hn = {
|
|
4484
|
+
randomUUID: jl
|
|
4490
4485
|
};
|
|
4491
|
-
function
|
|
4486
|
+
function Nl(e, t, n) {
|
|
4492
4487
|
if (hn.randomUUID && !t && !e)
|
|
4493
4488
|
return hn.randomUUID();
|
|
4494
4489
|
e = e || {};
|
|
4495
|
-
const r = e.random || (e.rng ||
|
|
4490
|
+
const r = e.random || (e.rng || Tl)();
|
|
4496
4491
|
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, t) {
|
|
4497
4492
|
n = n || 0;
|
|
4498
4493
|
for (let a = 0; a < 16; ++a)
|
|
4499
4494
|
t[n + a] = r[a];
|
|
4500
4495
|
return t;
|
|
4501
4496
|
}
|
|
4502
|
-
return
|
|
4497
|
+
return $l(r);
|
|
4503
4498
|
}
|
|
4504
|
-
const Ol = ["aria-labelledby"],
|
|
4499
|
+
const Ol = ["aria-labelledby"], Ml = { class: "form-section-wrapper" }, El = {
|
|
4505
4500
|
key: 1,
|
|
4506
4501
|
class: "form-section-description"
|
|
4507
|
-
},
|
|
4502
|
+
}, Fl = {
|
|
4508
4503
|
key: 2,
|
|
4509
4504
|
class: "form-section-footer"
|
|
4510
|
-
},
|
|
4505
|
+
}, ql = { class: "form-section-content" }, Kl = /* @__PURE__ */ X({
|
|
4511
4506
|
__name: "EntityFormSection",
|
|
4512
4507
|
props: {
|
|
4513
4508
|
title: {
|
|
@@ -4536,18 +4531,18 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4536
4531
|
}
|
|
4537
4532
|
},
|
|
4538
4533
|
setup(e) {
|
|
4539
|
-
const t =
|
|
4534
|
+
const t = Nt(), n = Nl();
|
|
4540
4535
|
return (r, a) => (m(), $("div", {
|
|
4541
4536
|
"aria-labelledby": e.title ? g(n) : void 0,
|
|
4542
|
-
class:
|
|
4537
|
+
class: Ee(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4543
4538
|
role: "group"
|
|
4544
4539
|
}, [
|
|
4545
|
-
L("div",
|
|
4540
|
+
L("div", Ml, [
|
|
4546
4541
|
e.hideInfoHeader ? J("", !0) : (m(), $("div", {
|
|
4547
4542
|
key: 0,
|
|
4548
|
-
class:
|
|
4543
|
+
class: Ee(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4549
4544
|
}, [
|
|
4550
|
-
e.title ? (m(),
|
|
4545
|
+
e.title ? (m(), V(Se(e.titleTag), {
|
|
4551
4546
|
key: 0,
|
|
4552
4547
|
id: g(n),
|
|
4553
4548
|
class: "form-section-title"
|
|
@@ -4557,22 +4552,22 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4557
4552
|
]),
|
|
4558
4553
|
_: 1
|
|
4559
4554
|
}, 8, ["id"])) : J("", !0),
|
|
4560
|
-
e.description || g(t).description ? (m(), $("div",
|
|
4555
|
+
e.description || g(t).description ? (m(), $("div", El, [
|
|
4561
4556
|
ne(r.$slots, "description", {}, () => [
|
|
4562
4557
|
L("p", null, F(e.description), 1)
|
|
4563
4558
|
], !0)
|
|
4564
4559
|
])) : J("", !0),
|
|
4565
|
-
g(t).footer ? (m(), $("div",
|
|
4560
|
+
g(t).footer ? (m(), $("div", Fl, [
|
|
4566
4561
|
ne(r.$slots, "footer", {}, void 0, !0)
|
|
4567
4562
|
])) : J("", !0)
|
|
4568
4563
|
], 2)),
|
|
4569
|
-
L("div",
|
|
4564
|
+
L("div", ql, [
|
|
4570
4565
|
ne(r.$slots, "default", {}, void 0, !0)
|
|
4571
4566
|
])
|
|
4572
4567
|
])
|
|
4573
4568
|
], 10, Ol));
|
|
4574
4569
|
}
|
|
4575
|
-
}), vn = /* @__PURE__ */ Ce(Kl, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ut, useDeleteUrlBuilder: Bl, useErrors: Ll, useExternalLinkCreator: lu, useFetchUrlBuilder: uu, useFetcher: Ul, useDebouncedFilter: vr, useStringHelpers: cu, useHelpers: du, useGatewayFeatureSupported: pu, useTruncationDetector: fu, useValidators: Pl } = se,
|
|
4570
|
+
}), vn = /* @__PURE__ */ Ce(Kl, [["__scopeId", "data-v-b1f74200"]]), { useAxios: Ut, useDeleteUrlBuilder: Bl, useErrors: Ll, useExternalLinkCreator: lu, useFetchUrlBuilder: uu, useFetcher: Ul, useDebouncedFilter: vr, useStringHelpers: cu, useHelpers: du, useGatewayFeatureSupported: pu, useTruncationDetector: fu, useValidators: Pl } = se, Vl = { class: "add-to-group-form-container" }, Rl = { class: "add-to-group-cta-text" }, Dl = {
|
|
4576
4571
|
key: 0,
|
|
4577
4572
|
class: "kong-ui-entity-add-to-groups-error"
|
|
4578
4573
|
}, zl = { key: 0 }, Gl = /* @__PURE__ */ X({
|
|
@@ -4592,8 +4587,8 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4592
4587
|
},
|
|
4593
4588
|
emits: ["cancel", "add:success", "add:partial-success", "error"],
|
|
4594
4589
|
setup(e, { emit: t }) {
|
|
4595
|
-
var
|
|
4596
|
-
const { i18n: { t: n } } = yt.useI18n(), r = e, a = t, { axiosInstance: i } = Ut((
|
|
4590
|
+
var E;
|
|
4591
|
+
const { i18n: { t: n } } = yt.useI18n(), r = e, a = t, { axiosInstance: i } = Ut((E = r.config) == null ? void 0 : E.axiosRequestConfig), o = M([]), {
|
|
4597
4592
|
debouncedQueryChange: s,
|
|
4598
4593
|
loading: l,
|
|
4599
4594
|
allRecords: u,
|
|
@@ -4608,81 +4603,81 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4608
4603
|
fetchedItemsKey: "data",
|
|
4609
4604
|
searchKeys: ["name", "id"]
|
|
4610
4605
|
}
|
|
4611
|
-
), f =
|
|
4612
|
-
label:
|
|
4613
|
-
value:
|
|
4614
|
-
selected: o.value.includes(
|
|
4615
|
-
data:
|
|
4606
|
+
), f = _(() => p.value ? n("consumer_groups.errors.general") : ""), b = M(0), I = _(() => u.value === void 0), A = _(() => y.value.map((C) => ({
|
|
4607
|
+
label: C.name,
|
|
4608
|
+
value: C.id,
|
|
4609
|
+
selected: o.value.includes(C.id),
|
|
4610
|
+
data: C
|
|
4616
4611
|
// we need this to determine whether or not to show the description text
|
|
4617
|
-
}))),
|
|
4618
|
-
var
|
|
4619
|
-
const K =
|
|
4620
|
-
return K ? K.name :
|
|
4621
|
-
},
|
|
4622
|
-
|
|
4623
|
-
}, Z =
|
|
4612
|
+
}))), D = (C) => {
|
|
4613
|
+
var O;
|
|
4614
|
+
const K = I.value ? y.value.find((H) => H.id === C) : (O = u.value) == null ? void 0 : O.find((H) => H.id === C);
|
|
4615
|
+
return K ? K.name : C;
|
|
4616
|
+
}, q = () => {
|
|
4617
|
+
w.value = "", Z.value = [], S.value = [], a("cancel");
|
|
4618
|
+
}, Z = M([]), h = M(!1), w = M(""), d = async () => {
|
|
4624
4619
|
if (!o.value.length) {
|
|
4625
|
-
|
|
4620
|
+
w.value = "", S.value = [], a("cancel");
|
|
4626
4621
|
return;
|
|
4627
4622
|
}
|
|
4628
|
-
h.value = !0,
|
|
4623
|
+
h.value = !0, w.value = "", Z.value = [], S.value = [];
|
|
4629
4624
|
try {
|
|
4630
|
-
const
|
|
4631
|
-
let
|
|
4625
|
+
const C = o.value.map((H) => B(H)), K = await Promise.allSettled(C);
|
|
4626
|
+
let O = !0;
|
|
4632
4627
|
K.forEach((H) => {
|
|
4633
|
-
H.status !== "fulfilled" && (
|
|
4634
|
-
}),
|
|
4628
|
+
H.status !== "fulfilled" && (O = !1);
|
|
4629
|
+
}), O ? (Z.value = [], S.value = [], a("add:success", o.value), o.value = []) : (Z.value.length && a("add:partial-success", Z.value), o.value = [], G(K));
|
|
4635
4630
|
} catch {
|
|
4636
|
-
|
|
4631
|
+
w.value = n("consumer_groups.errors.add"), a("error", w.value);
|
|
4637
4632
|
} finally {
|
|
4638
4633
|
h.value = !1;
|
|
4639
4634
|
}
|
|
4640
|
-
},
|
|
4641
|
-
var K,
|
|
4642
|
-
let
|
|
4643
|
-
return r.config.app === "konnect" ?
|
|
4644
|
-
}), B = async (
|
|
4635
|
+
}, x = _(() => {
|
|
4636
|
+
var K, O, H, te;
|
|
4637
|
+
let C = `${r.config.apiBaseUrl}${Oe.list[r.config.app].forConsumer}`;
|
|
4638
|
+
return r.config.app === "konnect" ? C = C.replace(/{controlPlaneId}/gi, ((K = r.config) == null ? void 0 : K.controlPlaneId) || "").replace(/{consumerId}/gi, ((O = r.config) == null ? void 0 : O.consumerId) || "") : r.config.app === "kongManager" && (C = C.replace(/\/{workspace}/gi, (H = r.config) != null && H.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((te = r.config) == null ? void 0 : te.consumerId) || "")), C;
|
|
4639
|
+
}), B = async (C) => {
|
|
4645
4640
|
const K = {
|
|
4646
|
-
group:
|
|
4641
|
+
group: C
|
|
4647
4642
|
};
|
|
4648
4643
|
try {
|
|
4649
|
-
const
|
|
4650
|
-
return Z.value.push(
|
|
4651
|
-
} catch (
|
|
4652
|
-
let H = `${
|
|
4653
|
-
return
|
|
4644
|
+
const O = await i.post(x.value, K);
|
|
4645
|
+
return Z.value.push(C), O;
|
|
4646
|
+
} catch (O) {
|
|
4647
|
+
let H = `${D(C)} - ${O.message}`;
|
|
4648
|
+
return O.response.status === 409 && (H = `${D(C)} - ${n("consumer_groups.errors.already_added")}`), Promise.reject(Error(H));
|
|
4654
4649
|
}
|
|
4655
|
-
},
|
|
4656
|
-
|
|
4657
|
-
var
|
|
4658
|
-
return (
|
|
4650
|
+
}, S = M([]), G = (C) => {
|
|
4651
|
+
S.value = C.map((K) => {
|
|
4652
|
+
var O;
|
|
4653
|
+
return (O = K.reason) == null ? void 0 : O.message;
|
|
4659
4654
|
}).filter(Boolean);
|
|
4660
4655
|
};
|
|
4661
|
-
return
|
|
4662
|
-
|
|
4663
|
-
}, { immediate: !0, deep: !0 }),
|
|
4656
|
+
return Te(A, () => {
|
|
4657
|
+
b.value++;
|
|
4658
|
+
}, { immediate: !0, deep: !0 }), Te(() => r.visible, () => {
|
|
4664
4659
|
r.visible && c();
|
|
4665
|
-
}, { immediate: !0 }), (
|
|
4666
|
-
const
|
|
4667
|
-
return m(),
|
|
4660
|
+
}, { immediate: !0 }), (C, K) => {
|
|
4661
|
+
const O = R("KMultiselect"), H = R("KAlert"), te = R("KPrompt");
|
|
4662
|
+
return m(), V(te, {
|
|
4668
4663
|
"action-button-disabled": h.value,
|
|
4669
4664
|
class: "kong-ui-entities-add-to-groups-modal",
|
|
4670
4665
|
"data-testid": "add-to-group-modal",
|
|
4671
4666
|
title: g(n)("consumer_groups.consumers.add.title"),
|
|
4672
4667
|
visible: e.visible,
|
|
4673
|
-
onCancel:
|
|
4668
|
+
onCancel: q,
|
|
4674
4669
|
onProceed: d
|
|
4675
4670
|
}, {
|
|
4676
4671
|
default: v(() => [
|
|
4677
|
-
L("div",
|
|
4678
|
-
L("p",
|
|
4679
|
-
j(
|
|
4672
|
+
L("div", Vl, [
|
|
4673
|
+
L("p", Rl, F(g(n)("consumer_groups.consumers.add.ctaText")), 1),
|
|
4674
|
+
j(O, {
|
|
4680
4675
|
modelValue: o.value,
|
|
4681
4676
|
"onUpdate:modelValue": K[0] || (K[0] = (de) => o.value = de),
|
|
4682
4677
|
autosuggest: "",
|
|
4683
4678
|
"data-testid": "add-to-groups-multiselect",
|
|
4684
|
-
"dropdown-footer-text":
|
|
4685
|
-
items:
|
|
4679
|
+
"dropdown-footer-text": I.value ? g(n)("consumer_groups.consumers.add.footer") : void 0,
|
|
4680
|
+
items: A.value,
|
|
4686
4681
|
label: g(n)("consumer_groups.consumers.add.consumer_groups_label"),
|
|
4687
4682
|
loading: g(l),
|
|
4688
4683
|
placeholder: g(n)("consumer_groups.consumers.add.consumer_group_placeholder"),
|
|
@@ -4691,14 +4686,14 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4691
4686
|
width: "100%",
|
|
4692
4687
|
onQueryChange: g(s)
|
|
4693
4688
|
}, null, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly", "onQueryChange"]),
|
|
4694
|
-
|
|
4689
|
+
w.value || f.value || S.value.length ? (m(), $("div", Dl, [
|
|
4695
4690
|
j(H, { appearance: "danger" }, {
|
|
4696
4691
|
default: v(() => [
|
|
4697
4692
|
L("p", null, F(g(n)("consumer_groups.errors.add")), 1),
|
|
4698
|
-
|
|
4699
|
-
(m(!0), $(be, null, ve(
|
|
4693
|
+
S.value.length ? (m(), $("ul", zl, [
|
|
4694
|
+
(m(!0), $(be, null, ve(S.value, (de, We) => (m(), $("li", { key: We }, F(de), 1))), 128))
|
|
4700
4695
|
])) : J("", !0),
|
|
4701
|
-
L("div", null, F(
|
|
4696
|
+
L("div", null, F(w.value || f.value), 1)
|
|
4702
4697
|
]),
|
|
4703
4698
|
_: 1
|
|
4704
4699
|
})
|
|
@@ -4760,132 +4755,132 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4760
4755
|
},
|
|
4761
4756
|
emits: ["error", "copy:success", "copy:error", "delete:success", "add:success", "remove:success"],
|
|
4762
4757
|
setup(e, { emit: t }) {
|
|
4763
|
-
var
|
|
4764
|
-
const n = t, r = e, { i18nT: a, i18n: { t: i } } = yt.useI18n(), o = Ot(), { axiosInstance: s } = Ut((
|
|
4758
|
+
var Rt;
|
|
4759
|
+
const n = t, r = e, { i18nT: a, i18n: { t: i } } = yt.useI18n(), o = Ot(), { axiosInstance: s } = Ut((Rt = r.config) == null ? void 0 : Rt.axiosRequestConfig), l = M(1), u = _(() => !!r.config.consumerId), p = _(
|
|
4765
4760
|
() => u.value ? "kong-ui-entities-consumer-groups-list-in-consumer-page" : "kong-ui-entities-consumer-groups-list"
|
|
4766
|
-
), c =
|
|
4761
|
+
), c = _(() => r.config.app !== "kongManager" || !!r.config.disableSorting), y = {
|
|
4767
4762
|
name: { label: i("consumer_groups.list.table_headers.name"), searchable: !0, sortable: !0 }
|
|
4768
4763
|
};
|
|
4769
4764
|
r.config.app === "kongManager" && (y.consumers_count = { label: i("consumer_groups.list.table_headers.consumers_count"), searchable: !1, sortable: !1 }), y.tags = { label: i("consumer_groups.list.table_headers.tags"), sortable: !1 };
|
|
4770
|
-
const f = y,
|
|
4771
|
-
"data-testid":
|
|
4772
|
-
}),
|
|
4765
|
+
const f = y, b = (T) => ({
|
|
4766
|
+
"data-testid": T.username ?? T.custom_id ?? T.id
|
|
4767
|
+
}), I = _(() => {
|
|
4773
4768
|
var W, re, ge, we;
|
|
4774
|
-
let
|
|
4775
|
-
return r.config.app === "konnect" ?
|
|
4776
|
-
}),
|
|
4777
|
-
const
|
|
4778
|
-
return
|
|
4779
|
-
isExactMatch:
|
|
4769
|
+
let T = `${r.config.apiBaseUrl}${Oe.list[r.config.app][u.value ? "forConsumer" : "all"]}`;
|
|
4770
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((W = r.config) == null ? void 0 : W.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), T;
|
|
4771
|
+
}), A = M(""), D = _(() => {
|
|
4772
|
+
const T = r.config.app === "konnect" || r.config.isExactMatch;
|
|
4773
|
+
return T ? {
|
|
4774
|
+
isExactMatch: T,
|
|
4780
4775
|
fields: {
|
|
4781
4776
|
username: y.name,
|
|
4782
4777
|
id: { label: i("consumer_groups.list.table_headers.id") }
|
|
4783
4778
|
},
|
|
4784
4779
|
placeholder: i("consumer_groups.search.placeholder")
|
|
4785
4780
|
} : {
|
|
4786
|
-
isExactMatch:
|
|
4781
|
+
isExactMatch: T,
|
|
4787
4782
|
fields: {
|
|
4788
4783
|
name: y.name
|
|
4789
4784
|
},
|
|
4790
4785
|
schema: r.config.filterSchema
|
|
4791
4786
|
};
|
|
4792
|
-
}),
|
|
4793
|
-
|
|
4787
|
+
}), q = _(() => u.value && !r.config.paginatedEndpoint ? "consumer_groups" : void 0), { fetcher: Z, fetcherState: h } = Ul(r.config, I.value, q.value), w = () => {
|
|
4788
|
+
A.value = "";
|
|
4794
4789
|
}, d = () => {
|
|
4795
4790
|
l.value++;
|
|
4796
|
-
},
|
|
4797
|
-
const re =
|
|
4791
|
+
}, x = M(null), B = (T, W) => {
|
|
4792
|
+
const re = T.id;
|
|
4798
4793
|
if (!W(re)) {
|
|
4799
4794
|
n("copy:error", {
|
|
4800
|
-
entity:
|
|
4795
|
+
entity: T,
|
|
4801
4796
|
field: "id",
|
|
4802
4797
|
message: i("consumer_groups.errors.copy")
|
|
4803
4798
|
});
|
|
4804
4799
|
return;
|
|
4805
4800
|
}
|
|
4806
4801
|
n("copy:success", {
|
|
4807
|
-
entity:
|
|
4802
|
+
entity: T,
|
|
4808
4803
|
field: "id",
|
|
4809
4804
|
message: i("consumer_groups.copy.success", { val: re })
|
|
4810
4805
|
});
|
|
4811
|
-
},
|
|
4812
|
-
const re = JSON.stringify(
|
|
4806
|
+
}, S = (T, W) => {
|
|
4807
|
+
const re = JSON.stringify(T);
|
|
4813
4808
|
if (!W(re)) {
|
|
4814
4809
|
n("copy:error", {
|
|
4815
|
-
entity:
|
|
4810
|
+
entity: T,
|
|
4816
4811
|
message: i("consumer_groups.errors.copy")
|
|
4817
4812
|
});
|
|
4818
4813
|
return;
|
|
4819
4814
|
}
|
|
4820
4815
|
n("copy:success", {
|
|
4821
|
-
entity:
|
|
4816
|
+
entity: T,
|
|
4822
4817
|
message: i("consumer_groups.copy.success_brief")
|
|
4823
4818
|
});
|
|
4824
|
-
}, G = async (
|
|
4819
|
+
}, G = async (T) => {
|
|
4825
4820
|
var re;
|
|
4826
|
-
await ((re = r.canRetrieve) == null ? void 0 : re.call(r,
|
|
4827
|
-
},
|
|
4821
|
+
await ((re = r.canRetrieve) == null ? void 0 : re.call(r, T)) && o.push(r.config.getViewRoute(T.id));
|
|
4822
|
+
}, E = (T) => ({
|
|
4828
4823
|
label: i("consumer_groups.actions.view"),
|
|
4829
|
-
to: r.config.getViewRoute(
|
|
4830
|
-
}),
|
|
4824
|
+
to: r.config.getViewRoute(T)
|
|
4825
|
+
}), C = (T) => ({
|
|
4831
4826
|
label: i("consumer_groups.actions.edit"),
|
|
4832
|
-
to: r.config.getEditRoute(
|
|
4833
|
-
}), K =
|
|
4834
|
-
K.value =
|
|
4827
|
+
to: r.config.getEditRoute(T)
|
|
4828
|
+
}), K = M(void 0), O = M(!1), H = M(!1), te = M(""), de = Bl(r.config, I.value), We = (T) => {
|
|
4829
|
+
K.value = T, O.value = !0;
|
|
4835
4830
|
}, bt = () => {
|
|
4836
|
-
|
|
4831
|
+
O.value = !1;
|
|
4837
4832
|
}, it = async () => {
|
|
4838
|
-
var
|
|
4839
|
-
if ((
|
|
4833
|
+
var T, W, re;
|
|
4834
|
+
if ((T = K.value) != null && T.id) {
|
|
4840
4835
|
H.value = !0;
|
|
4841
4836
|
try {
|
|
4842
|
-
await s.delete(de(K.value.id)), H.value = !1,
|
|
4837
|
+
await s.delete(de(K.value.id)), H.value = !1, O.value = !1, l.value++, n("delete:success", K.value);
|
|
4843
4838
|
} catch (ge) {
|
|
4844
4839
|
te.value = ((re = (W = ge.response) == null ? void 0 : W.data) == null ? void 0 : re.message) || ge.message || i("consumer_groups.errors.delete"), n("error", ge);
|
|
4845
4840
|
} finally {
|
|
4846
4841
|
H.value = !1;
|
|
4847
4842
|
}
|
|
4848
4843
|
}
|
|
4849
|
-
}, Le =
|
|
4844
|
+
}, Le = M(!1), Ye = () => {
|
|
4850
4845
|
Le.value = !0;
|
|
4851
|
-
},
|
|
4846
|
+
}, k = () => {
|
|
4852
4847
|
Le.value = !1;
|
|
4853
|
-
},
|
|
4854
|
-
W ||
|
|
4848
|
+
}, U = (T, W) => {
|
|
4849
|
+
W || k(), l.value++, n("add:success", T);
|
|
4855
4850
|
}, ae = () => {
|
|
4856
4851
|
u.value && Ye();
|
|
4857
|
-
},
|
|
4858
|
-
|
|
4852
|
+
}, P = M(void 0), z = M(!1), me = M(""), ke = (T) => {
|
|
4853
|
+
P.value = T, z.value = !0;
|
|
4859
4854
|
}, le = () => {
|
|
4860
|
-
z.value = !1,
|
|
4861
|
-
}, Ue =
|
|
4855
|
+
z.value = !1, P.value = void 0;
|
|
4856
|
+
}, Ue = _(() => {
|
|
4862
4857
|
var W, re, ge, we;
|
|
4863
|
-
let
|
|
4864
|
-
return r.config.app === "konnect" ?
|
|
4865
|
-
}), Qe =
|
|
4866
|
-
if (
|
|
4858
|
+
let T = `${r.config.apiBaseUrl}${Oe.list[r.config.app].oneForConsumer}`;
|
|
4859
|
+
return r.config.app === "konnect" ? T = T.replace(/{controlPlaneId}/gi, ((W = r.config) == null ? void 0 : W.controlPlaneId) || "").replace(/{consumerId}/gi, ((re = r.config) == null ? void 0 : re.consumerId) || "") : r.config.app === "kongManager" && (T = T.replace(/\/{workspace}/gi, (ge = r.config) != null && ge.workspace ? `/${r.config.workspace}` : "").replace(/{consumerId}/gi, ((we = r.config) == null ? void 0 : we.consumerId) || "")), T;
|
|
4860
|
+
}), Qe = M(!1), br = async () => {
|
|
4861
|
+
if (P.value) {
|
|
4867
4862
|
Qe.value = !0;
|
|
4868
4863
|
try {
|
|
4869
|
-
const
|
|
4870
|
-
await s.delete(
|
|
4871
|
-
} catch (
|
|
4872
|
-
me.value =
|
|
4864
|
+
const T = Ue.value.replace(/{consumerGroupId}/gi, P.value.id);
|
|
4865
|
+
await s.delete(T), n("remove:success", P.value), le(), l.value++;
|
|
4866
|
+
} catch (T) {
|
|
4867
|
+
me.value = T.message || i("consumer_groups.errors.delete"), n("error", T);
|
|
4873
4868
|
} finally {
|
|
4874
4869
|
Qe.value = !1;
|
|
4875
4870
|
}
|
|
4876
4871
|
}
|
|
4877
|
-
},
|
|
4878
|
-
|
|
4872
|
+
}, Vt = M(!0);
|
|
4873
|
+
Te(h, (T) => {
|
|
4879
4874
|
var W, re, ge, we;
|
|
4880
|
-
if (Array.isArray((W =
|
|
4881
|
-
|
|
4875
|
+
if (Array.isArray((W = T == null ? void 0 : T.response) == null ? void 0 : W.data) && (Vt.value = T.response.data.length > 0), T.status === qe.Error) {
|
|
4876
|
+
x.value = {
|
|
4882
4877
|
title: i("consumer_groups.errors.general")
|
|
4883
|
-
}, (we = (ge = (re =
|
|
4878
|
+
}, (we = (ge = (re = T.error) == null ? void 0 : re.response) == null ? void 0 : ge.data) != null && we.message && (x.value.message = T.error.response.data.message), n("error", T.error);
|
|
4884
4879
|
return;
|
|
4885
4880
|
}
|
|
4886
|
-
|
|
4881
|
+
x.value = null;
|
|
4887
4882
|
});
|
|
4888
|
-
const Ct =
|
|
4883
|
+
const Ct = M({
|
|
4889
4884
|
ctaPath: u.value ? void 0 : r.config.createRoute,
|
|
4890
4885
|
ctaText: void 0,
|
|
4891
4886
|
message: `${i("consumer_groups.list.empty_state.description")}${r.config.additionMessageForEmptyState ? ` ${r.config.additionMessageForEmptyState}` : ""}`,
|
|
@@ -4893,8 +4888,8 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4893
4888
|
});
|
|
4894
4889
|
return gt(async () => {
|
|
4895
4890
|
await r.canCreate() && (Ct.value.title = u.value ? i("consumer_groups.list.empty_state.title_for_consumer") : i("consumer_groups.list.empty_state.title"), Ct.value.ctaText = u.value ? i("consumer_groups.actions.add_to_group") : i("consumer_groups.actions.create"));
|
|
4896
|
-
}), (
|
|
4897
|
-
const re =
|
|
4891
|
+
}), (T, W) => {
|
|
4892
|
+
const re = R("KButton"), ge = R("KBadge"), we = R("KTruncate"), Xe = R("KDropdownItem"), Dt = R("KClipboardProvider"), Cr = R("KPrompt");
|
|
4898
4893
|
return m(), $("div", Jl, [
|
|
4899
4894
|
j(g(il), {
|
|
4900
4895
|
"cache-identifier": e.cacheIdentifier,
|
|
@@ -4903,30 +4898,30 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4903
4898
|
"disable-sorting": c.value,
|
|
4904
4899
|
"empty-state-options": Ct.value,
|
|
4905
4900
|
"enable-entity-actions": "",
|
|
4906
|
-
"error-message":
|
|
4901
|
+
"error-message": x.value,
|
|
4907
4902
|
fetcher: g(Z),
|
|
4908
4903
|
"fetcher-cache-key": l.value,
|
|
4909
4904
|
"pagination-type": "offset",
|
|
4910
4905
|
"preferences-storage-key": p.value,
|
|
4911
|
-
query:
|
|
4912
|
-
"row-attributes":
|
|
4906
|
+
query: A.value,
|
|
4907
|
+
"row-attributes": b,
|
|
4913
4908
|
"table-headers": g(f),
|
|
4914
4909
|
"use-action-outside": e.useActionOutside,
|
|
4915
|
-
onClearSearchInput:
|
|
4910
|
+
onClearSearchInput: w,
|
|
4916
4911
|
"onClick:row": W[3] || (W[3] = (Q) => G(Q)),
|
|
4917
4912
|
onEmptyStateCtaClicked: ae,
|
|
4918
4913
|
onSort: d
|
|
4919
4914
|
}, {
|
|
4920
4915
|
"toolbar-filter": v(() => [
|
|
4921
|
-
u.value ? J("", !0) : (m(),
|
|
4916
|
+
u.value ? J("", !0) : (m(), V(g(xl), {
|
|
4922
4917
|
key: 0,
|
|
4923
|
-
modelValue:
|
|
4924
|
-
"onUpdate:modelValue": W[0] || (W[0] = (Q) =>
|
|
4925
|
-
config:
|
|
4918
|
+
modelValue: A.value,
|
|
4919
|
+
"onUpdate:modelValue": W[0] || (W[0] = (Q) => A.value = Q),
|
|
4920
|
+
config: D.value
|
|
4926
4921
|
}, null, 8, ["modelValue", "config"]))
|
|
4927
4922
|
]),
|
|
4928
4923
|
"toolbar-button": v(() => [
|
|
4929
|
-
(m(),
|
|
4924
|
+
(m(), V($r, {
|
|
4930
4925
|
disabled: !e.useActionOutside,
|
|
4931
4926
|
to: "#kong-ui-app-page-header-action-button"
|
|
4932
4927
|
}, [
|
|
@@ -4934,7 +4929,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4934
4929
|
"auth-function": () => e.canCreate()
|
|
4935
4930
|
}, {
|
|
4936
4931
|
default: v(() => [
|
|
4937
|
-
|
|
4932
|
+
je(j(re, {
|
|
4938
4933
|
appearance: "primary",
|
|
4939
4934
|
"data-testid": "toolbar-add-consumer-group",
|
|
4940
4935
|
size: "large",
|
|
@@ -4947,7 +4942,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4947
4942
|
]),
|
|
4948
4943
|
_: 1
|
|
4949
4944
|
}, 8, ["to"]), [
|
|
4950
|
-
[
|
|
4945
|
+
[Ne, Vt.value]
|
|
4951
4946
|
])
|
|
4952
4947
|
]),
|
|
4953
4948
|
_: 1
|
|
@@ -4961,11 +4956,11 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4961
4956
|
Y(F(Q ?? "-"), 1)
|
|
4962
4957
|
]),
|
|
4963
4958
|
tags: v(({ rowValue: Q }) => [
|
|
4964
|
-
(Q == null ? void 0 : Q.length) > 0 ? (m(),
|
|
4959
|
+
(Q == null ? void 0 : Q.length) > 0 ? (m(), V(we, { key: 0 }, {
|
|
4965
4960
|
default: v(() => [
|
|
4966
|
-
(m(!0), $(be, null, ve(Q, (Pe) => (m(),
|
|
4961
|
+
(m(!0), $(be, null, ve(Q, (Pe) => (m(), V(ge, {
|
|
4967
4962
|
key: Pe,
|
|
4968
|
-
onClick: W[2] || (W[2] =
|
|
4963
|
+
onClick: W[2] || (W[2] = St(() => {
|
|
4969
4964
|
}, ["stop"]))
|
|
4970
4965
|
}, {
|
|
4971
4966
|
default: v(() => [
|
|
@@ -4996,7 +4991,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
4996
4991
|
default: v(({ copyToClipboard: Pe }) => [
|
|
4997
4992
|
j(Xe, {
|
|
4998
4993
|
"data-testid": "action-entity-copy-json",
|
|
4999
|
-
onClick: (kr) =>
|
|
4994
|
+
onClick: (kr) => S(Q, Pe)
|
|
5000
4995
|
}, {
|
|
5001
4996
|
default: v(() => [
|
|
5002
4997
|
Y(F(g(i)("consumer_groups.actions.copy_json")), 1)
|
|
@@ -5013,7 +5008,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5013
5008
|
j(Xe, {
|
|
5014
5009
|
"data-testid": "action-entity-view",
|
|
5015
5010
|
"has-divider": "",
|
|
5016
|
-
item:
|
|
5011
|
+
item: E(Q.id)
|
|
5017
5012
|
}, null, 8, ["item"])
|
|
5018
5013
|
]),
|
|
5019
5014
|
_: 2
|
|
@@ -5024,7 +5019,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5024
5019
|
default: v(() => [
|
|
5025
5020
|
j(Xe, {
|
|
5026
5021
|
"data-testid": "action-entity-edit",
|
|
5027
|
-
item:
|
|
5022
|
+
item: C(Q.id)
|
|
5028
5023
|
}, null, 8, ["item"])
|
|
5029
5024
|
]),
|
|
5030
5025
|
_: 2
|
|
@@ -5058,20 +5053,20 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5058
5053
|
"entity-type": g(wn).ConsumerGroup,
|
|
5059
5054
|
error: te.value,
|
|
5060
5055
|
title: g(i)("consumer_groups.delete.title"),
|
|
5061
|
-
visible:
|
|
5056
|
+
visible: O.value,
|
|
5062
5057
|
onCancel: bt,
|
|
5063
5058
|
onProceed: it
|
|
5064
5059
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"]),
|
|
5065
|
-
e.config.consumerId ? (m(),
|
|
5060
|
+
e.config.consumerId ? (m(), V(Hl, {
|
|
5066
5061
|
key: 0,
|
|
5067
5062
|
config: e.config,
|
|
5068
5063
|
"data-testid": "add-to-group-modal",
|
|
5069
5064
|
visible: Le.value,
|
|
5070
|
-
"onAdd:partialSuccess": W[4] || (W[4] = (Q) =>
|
|
5071
|
-
"onAdd:success": W[5] || (W[5] = (Q) =>
|
|
5072
|
-
onCancel:
|
|
5065
|
+
"onAdd:partialSuccess": W[4] || (W[4] = (Q) => U(Q, !0)),
|
|
5066
|
+
"onAdd:success": W[5] || (W[5] = (Q) => U(Q)),
|
|
5067
|
+
onCancel: k
|
|
5073
5068
|
}, null, 8, ["config", "visible"])) : J("", !0),
|
|
5074
|
-
e.config.consumerId &&
|
|
5069
|
+
e.config.consumerId && P.value ? (m(), V(Cr, {
|
|
5075
5070
|
key: 1,
|
|
5076
5071
|
"action-button-appearance": "danger",
|
|
5077
5072
|
"data-testid": "exit-group-modal",
|
|
@@ -5087,7 +5082,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5087
5082
|
tag: "p"
|
|
5088
5083
|
}, Be({
|
|
5089
5084
|
consumerGroup: v(() => [
|
|
5090
|
-
L("strong", null, F(
|
|
5085
|
+
L("strong", null, F(P.value.name || P.value.id), 1)
|
|
5091
5086
|
]),
|
|
5092
5087
|
_: 2
|
|
5093
5088
|
}, [
|
|
@@ -5149,123 +5144,123 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5149
5144
|
} = vr(n.config, (Le = Oe.form[(it = n.config) == null ? void 0 : it.app]) == null ? void 0 : Le.consumersList, "", {
|
|
5150
5145
|
fetchedItemsKey: "data",
|
|
5151
5146
|
searchKeys: ["username", "custom_id", "id"]
|
|
5152
|
-
}), { axiosInstance: f } = Ut((Ye = n.config) == null ? void 0 : Ye.axiosRequestConfig), { getMessageFromError:
|
|
5153
|
-
label:
|
|
5154
|
-
value:
|
|
5155
|
-
selected: o.fields.consumers.includes(
|
|
5156
|
-
data:
|
|
5147
|
+
}), { axiosInstance: f } = Ut((Ye = n.config) == null ? void 0 : Ye.axiosRequestConfig), { getMessageFromError: b } = Ll(), I = Pl(), A = _(() => y.value.map((k) => ({
|
|
5148
|
+
label: k.username || k.custom_id,
|
|
5149
|
+
value: k.id,
|
|
5150
|
+
selected: o.fields.consumers.includes(k.id),
|
|
5151
|
+
data: k
|
|
5157
5152
|
// we need this to determine whether or not to show the description text
|
|
5158
|
-
}))),
|
|
5159
|
-
var
|
|
5160
|
-
return (
|
|
5161
|
-
}),
|
|
5153
|
+
}))), D = _(() => {
|
|
5154
|
+
var k, U;
|
|
5155
|
+
return (U = Oe.form[(k = n.config) == null ? void 0 : k.app]) == null ? void 0 : U.edit;
|
|
5156
|
+
}), q = _(() => n.consumerGroupId ? ut.Edit : ut.Create), Z = _(() => !!o.fields.name && !G.value), h = _(() => JSON.stringify(o.fields) !== JSON.stringify(s)), w = (k, U = "", ae = "") => {
|
|
5162
5157
|
var z, me, ke, le, Ue, Qe;
|
|
5163
|
-
let
|
|
5164
|
-
return ((ke = n.config) == null ? void 0 : ke.app) === "konnect" ?
|
|
5158
|
+
let P = `${(z = n.config) == null ? void 0 : z.apiBaseUrl}${Oe.form[(me = n.config) == null ? void 0 : me.app][k]}`;
|
|
5159
|
+
return ((ke = n.config) == null ? void 0 : ke.app) === "konnect" ? P = P.replace(/{controlPlaneId}/gi, ((le = n.config) == null ? void 0 : le.controlPlaneId) || "") : ((Ue = n.config) == null ? void 0 : Ue.app) === "kongManager" && (P = P.replace(/\/{workspace}/gi, (Qe = n.config) != null && Qe.workspace ? `/${n.config.workspace}` : "")), P = P.replace(/{id}/gi, U || n.consumerGroupId), (k === "addConsumer" || k === "removeConsumer") && (P = P.replace(/{consumerId}/gi, ae)), P;
|
|
5165
5160
|
}, d = () => {
|
|
5166
|
-
var
|
|
5167
|
-
i.push(((
|
|
5168
|
-
},
|
|
5169
|
-
r("error",
|
|
5170
|
-
}, B = (
|
|
5171
|
-
r("loading",
|
|
5172
|
-
},
|
|
5173
|
-
var ae,
|
|
5174
|
-
o.fields.name = ((ae =
|
|
5175
|
-
const
|
|
5176
|
-
if (o.fields.tags = (
|
|
5177
|
-
o.fields.consumers = ((me =
|
|
5161
|
+
var k;
|
|
5162
|
+
i.push(((k = n.config) == null ? void 0 : k.cancelRoute) || { name: "consumer-group-list" });
|
|
5163
|
+
}, x = (k) => {
|
|
5164
|
+
r("error", k);
|
|
5165
|
+
}, B = (k) => {
|
|
5166
|
+
r("loading", k);
|
|
5167
|
+
}, S = async (k) => {
|
|
5168
|
+
var ae, P, z, me, ke;
|
|
5169
|
+
o.fields.name = ((ae = k == null ? void 0 : k.item) == null ? void 0 : ae.name) || ((P = k == null ? void 0 : k.consumer_group) == null ? void 0 : P.name) || (k == null ? void 0 : k.name) || "";
|
|
5170
|
+
const U = ((z = k == null ? void 0 : k.item) == null ? void 0 : z.tags) || (k == null ? void 0 : k.consumer_group.tags) || (k == null ? void 0 : k.tags) || [];
|
|
5171
|
+
if (o.fields.tags = (U == null ? void 0 : U.join(", ")) || "", "consumers" in k)
|
|
5172
|
+
o.fields.consumers = ((me = k == null ? void 0 : k.consumers) == null ? void 0 : me.map((le) => le.id)) || [];
|
|
5178
5173
|
else
|
|
5179
5174
|
try {
|
|
5180
|
-
const { data: le } = await f.get(
|
|
5175
|
+
const { data: le } = await f.get(w("getConsumers"));
|
|
5181
5176
|
o.fields.consumers = "consumers" in le ? (ke = le == null ? void 0 : le.consumers) == null ? void 0 : ke.map((Ue) => Ue.id) : [];
|
|
5182
5177
|
} catch (le) {
|
|
5183
|
-
|
|
5178
|
+
O(le);
|
|
5184
5179
|
}
|
|
5185
5180
|
Object.assign(s, o.fields);
|
|
5186
|
-
}, G =
|
|
5187
|
-
var
|
|
5181
|
+
}, G = _(() => I.utf8Name(o.fields.name)), E = _(() => {
|
|
5182
|
+
var k, U;
|
|
5188
5183
|
return {
|
|
5189
5184
|
name: o.fields.name,
|
|
5190
|
-
tags: (
|
|
5185
|
+
tags: (U = (k = o.fields.tags.split(",")) == null ? void 0 : k.map((ae) => String(ae || "").trim())) == null ? void 0 : U.filter((ae) => ae !== "")
|
|
5191
5186
|
};
|
|
5192
|
-
}),
|
|
5193
|
-
o.errorMessage =
|
|
5194
|
-
}, H = (
|
|
5195
|
-
Object.assign(s, o.fields), r("update", { ...o.fields, id:
|
|
5196
|
-
}, te = (
|
|
5197
|
-
const
|
|
5198
|
-
|
|
5199
|
-
code:
|
|
5200
|
-
message:
|
|
5187
|
+
}), C = async (k, U = "") => await f.post(w("addConsumer", U, k), { consumer: k }), K = async (k, U = "") => await f.delete(w("removeConsumer", U, k)), O = (k) => {
|
|
5188
|
+
o.errorMessage = b(k), r("error", k);
|
|
5189
|
+
}, H = (k = n.consumerGroupId) => {
|
|
5190
|
+
Object.assign(s, o.fields), r("update", { ...o.fields, id: k });
|
|
5191
|
+
}, te = (k, U, ae = n.consumerGroupId) => {
|
|
5192
|
+
const P = k == null ? void 0 : k.find((z) => z.status !== "fulfilled");
|
|
5193
|
+
P ? O({
|
|
5194
|
+
code: P.status,
|
|
5195
|
+
message: U
|
|
5201
5196
|
}) : H(ae);
|
|
5202
5197
|
}, de = async () => {
|
|
5203
|
-
let
|
|
5198
|
+
let k = "";
|
|
5204
5199
|
try {
|
|
5205
|
-
const { data:
|
|
5206
|
-
|
|
5207
|
-
} catch (
|
|
5208
|
-
|
|
5200
|
+
const { data: U } = await f.post(w("create"), E.value);
|
|
5201
|
+
k = "item" in U ? U.item.id : U.id;
|
|
5202
|
+
} catch (U) {
|
|
5203
|
+
O(U);
|
|
5209
5204
|
}
|
|
5210
|
-
if (o.fields.consumers.length > 0 &&
|
|
5205
|
+
if (o.fields.consumers.length > 0 && k)
|
|
5211
5206
|
try {
|
|
5212
|
-
const
|
|
5213
|
-
te(ae, a("consumer_groups.errors.add_consumer"),
|
|
5214
|
-
} catch (
|
|
5215
|
-
|
|
5207
|
+
const U = o.fields.consumers.map((P) => C(P, k)), ae = await Promise.allSettled(U);
|
|
5208
|
+
te(ae, a("consumer_groups.errors.add_consumer"), k);
|
|
5209
|
+
} catch (U) {
|
|
5210
|
+
O(U);
|
|
5216
5211
|
}
|
|
5217
5212
|
else
|
|
5218
|
-
o.fields.consumers.length === 0 &&
|
|
5213
|
+
o.fields.consumers.length === 0 && k && H(k);
|
|
5219
5214
|
}, We = async () => {
|
|
5220
5215
|
var ae;
|
|
5221
5216
|
try {
|
|
5222
|
-
((ae = n.config) == null ? void 0 : ae.app) === "konnect" ? await f.put(
|
|
5223
|
-
} catch (
|
|
5224
|
-
|
|
5217
|
+
((ae = n.config) == null ? void 0 : ae.app) === "konnect" ? await f.put(w("edit"), E.value) : await f.patch(w("edit"), E.value);
|
|
5218
|
+
} catch (P) {
|
|
5219
|
+
O(P);
|
|
5225
5220
|
}
|
|
5226
|
-
const
|
|
5227
|
-
if (
|
|
5221
|
+
const k = o.fields.consumers.filter((P) => !s.consumers.includes(P)), U = s.consumers.filter((P) => !o.fields.consumers.includes(P));
|
|
5222
|
+
if (U.length === 0 && k.length === 0)
|
|
5228
5223
|
H();
|
|
5229
5224
|
else {
|
|
5230
|
-
if (
|
|
5225
|
+
if (U.length > 0)
|
|
5231
5226
|
try {
|
|
5232
|
-
const
|
|
5227
|
+
const P = U.map((me) => K(me)), z = await Promise.allSettled(P);
|
|
5233
5228
|
te(z, a("consumer_groups.errors.remove_consumer"));
|
|
5234
|
-
} catch (
|
|
5235
|
-
|
|
5229
|
+
} catch (P) {
|
|
5230
|
+
O(P);
|
|
5236
5231
|
}
|
|
5237
|
-
if (
|
|
5232
|
+
if (k.length > 0)
|
|
5238
5233
|
try {
|
|
5239
|
-
const
|
|
5234
|
+
const P = k.map((me) => C(me)), z = await Promise.allSettled(P);
|
|
5240
5235
|
te(z, a("consumer_groups.errors.add_consumer"));
|
|
5241
|
-
} catch (
|
|
5242
|
-
|
|
5236
|
+
} catch (P) {
|
|
5237
|
+
O(P);
|
|
5243
5238
|
}
|
|
5244
5239
|
}
|
|
5245
5240
|
}, bt = async () => {
|
|
5246
5241
|
try {
|
|
5247
|
-
o.readonly = !0,
|
|
5242
|
+
o.readonly = !0, q.value === ut.Create ? await de() : await We();
|
|
5248
5243
|
} finally {
|
|
5249
5244
|
o.readonly = !1;
|
|
5250
5245
|
}
|
|
5251
5246
|
};
|
|
5252
5247
|
return gt(async () => {
|
|
5253
5248
|
await c();
|
|
5254
|
-
}), (
|
|
5255
|
-
const ae =
|
|
5249
|
+
}), (k, U) => {
|
|
5250
|
+
const ae = R("KInput"), P = R("KMultiselect");
|
|
5256
5251
|
return m(), $("div", Yl, [
|
|
5257
5252
|
j(g(Qs), {
|
|
5258
5253
|
"can-submit": Z.value && h.value,
|
|
5259
5254
|
config: e.config,
|
|
5260
5255
|
"edit-id": e.consumerGroupId,
|
|
5261
5256
|
"error-message": o.errorMessage || g(p) || G.value,
|
|
5262
|
-
"fetch-url":
|
|
5263
|
-
"form-fields":
|
|
5257
|
+
"fetch-url": D.value,
|
|
5258
|
+
"form-fields": E.value,
|
|
5264
5259
|
"is-readonly": o.readonly,
|
|
5265
5260
|
onCancel: d,
|
|
5266
|
-
"onFetch:error":
|
|
5267
|
-
"onFetch:success":
|
|
5268
|
-
onLoading:
|
|
5261
|
+
"onFetch:error": U[3] || (U[3] = (z) => x(z)),
|
|
5262
|
+
"onFetch:success": S,
|
|
5263
|
+
onLoading: U[4] || (U[4] = (z) => B(z)),
|
|
5269
5264
|
onSubmit: bt
|
|
5270
5265
|
}, {
|
|
5271
5266
|
default: v(() => [
|
|
@@ -5276,7 +5271,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5276
5271
|
default: v(() => [
|
|
5277
5272
|
j(ae, {
|
|
5278
5273
|
modelValue: o.fields.name,
|
|
5279
|
-
"onUpdate:modelValue":
|
|
5274
|
+
"onUpdate:modelValue": U[0] || (U[0] = (z) => o.fields.name = z),
|
|
5280
5275
|
modelModifiers: { trim: !0 },
|
|
5281
5276
|
autocomplete: "off",
|
|
5282
5277
|
"data-testid": "consumer-group-form-name",
|
|
@@ -5287,7 +5282,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5287
5282
|
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
5288
5283
|
j(ae, {
|
|
5289
5284
|
modelValue: o.fields.tags,
|
|
5290
|
-
"onUpdate:modelValue":
|
|
5285
|
+
"onUpdate:modelValue": U[1] || (U[1] = (z) => o.fields.tags = z),
|
|
5291
5286
|
modelModifiers: { trim: !0 },
|
|
5292
5287
|
autocomplete: "off",
|
|
5293
5288
|
"data-testid": "consumer-group-form-tags",
|
|
@@ -5309,12 +5304,12 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5309
5304
|
title: g(a)("consumer_groups.form.consumers.title")
|
|
5310
5305
|
}, {
|
|
5311
5306
|
default: v(() => [
|
|
5312
|
-
j(
|
|
5307
|
+
j(P, {
|
|
5313
5308
|
modelValue: o.fields.consumers,
|
|
5314
|
-
"onUpdate:modelValue":
|
|
5309
|
+
"onUpdate:modelValue": U[2] || (U[2] = (z) => o.fields.consumers = z),
|
|
5315
5310
|
appearance: "select",
|
|
5316
5311
|
autosuggest: "",
|
|
5317
|
-
items:
|
|
5312
|
+
items: A.value,
|
|
5318
5313
|
label: g(a)("consumer_groups.form.fields.consumers.label"),
|
|
5319
5314
|
loading: g(u),
|
|
5320
5315
|
placeholder: g(a)("consumer_groups.form.fields.consumers.placeholder"),
|
|
@@ -5368,7 +5363,7 @@ const Ol = ["aria-labelledby"], El = { class: "form-section-wrapper" }, Ml = {
|
|
|
5368
5363
|
},
|
|
5369
5364
|
emits: ["loading", "fetch:error", "fetch:success"],
|
|
5370
5365
|
setup(e) {
|
|
5371
|
-
const t = e, { i18n: { t: n } } = yt.useI18n(), r =
|
|
5366
|
+
const t = e, { i18n: { t: n } } = yt.useI18n(), r = _(() => Oe.form[t.config.app].edit), a = M({
|
|
5372
5367
|
id: {},
|
|
5373
5368
|
name: {},
|
|
5374
5369
|
created_at: {},
|