@kong-ui-public/entities-shared 3.32.2-pr.2591.5f106f1b8.0 → 3.32.2
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-shared.es.js +1194 -1199
- package/dist/entities-shared.umd.js +47 -49
- package/dist/types/components/common/TerraformCodeBlock.vue.d.ts.map +1 -1
- package/dist/types/types/entity-base-config-card.d.ts +0 -1
- package/dist/types/types/entity-base-config-card.d.ts.map +1 -1
- package/package.json +5 -5
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { inject as Dt, ref as K, computed as
|
|
1
|
+
import { inject as Dt, ref as K, computed as F, unref as $, toValue as he, watch as be, toRef as Vn, provide as Pt, defineComponent as z, createBlock as j, openBlock as m, resolveDynamicComponent as je, normalizeClass as fe, withCtx as _, createElementBlock as S, createCommentVNode as N, createElementVNode as B, toDisplayString as O, Fragment as ue, renderList as ce, resolveComponent as P, createVNode as M, createTextVNode as q, useCssVars as Ut, useId as Yn, useSlots as De, renderSlot as D, createSlots as Se, normalizeProps as Wn, guardReactiveProps as Jn, mergeProps as qt, onMounted as tt, onBeforeMount as nt, withModifiers as Le, Teleport as Ht, onUnmounted as Gn, withDirectives as xe, vShow as Ce, withKeys as zn, warn as Qn } from "vue";
|
|
2
2
|
import pt from "axios";
|
|
3
3
|
import { createI18n as Zn, i18nTComponent as Xn } from "@kong-ui-public/i18n";
|
|
4
4
|
import { BadgeMethodAppearances as ei, KButton as mt, KTruncate as ti, KBadge as ni } from "@kong/kongponents";
|
|
5
5
|
import { BookIcon as Vt, AddIcon as Yt, CloseIcon as ii, ChevronDownIcon as ri, CopyIcon as ai } from "@kong/icons";
|
|
6
6
|
import { useRouter as oi } from "vue-router";
|
|
7
7
|
var li = /* @__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.Secret = "secret", e.RedisConfiguration = "redis configuration", e))(li || {}), si = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(si || {}), me = /* @__PURE__ */ ((e) => (e[e.InitialLoad = 0] = "InitialLoad", e[e.Loading = 1] = "Loading", e[e.Idle = 2] = "Idle", e[e.NoResults = 3] = "NoResults", e[e.NoRecords = 4] = "NoRecords", e[e.Error = 5] = "Error", e))(me || {}), it = /* @__PURE__ */ ((e) => (e.CaCertificate = "ca_certificate", e.Certificate = "certificate", e.Consumer = "consumer", e.ConsumerGroup = "consumer_group", e.GatewayService = "service", e.Key = "key", e.KeySet = "set", e.Plugin = "plugin", e.Route = "route", e.SNI = "sni", e.Upstream = "upstream", e.Target = "target", e.Vault = "vault", e.Partial = "partial", e.BackendCluster = "backend_cluster", e.VirtualCluster = "virtual_cluster", e.Listener = "listener", e.Policy = "policy", e.Other = "other", e))(it || {});
|
|
8
|
-
const Pe = Object.values(it)
|
|
8
|
+
const Pe = Object.values(it);
|
|
9
9
|
var V = /* @__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.CopyBadge = "copy-badge", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(V || {}), ae = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e.Policy = "policy", e))(ae || {});
|
|
10
10
|
const ht = [
|
|
11
11
|
"primary",
|
|
12
12
|
"secondary"
|
|
13
13
|
];
|
|
14
|
-
function
|
|
14
|
+
function ci() {
|
|
15
15
|
return {
|
|
16
16
|
getAxiosInstance: (e = {}) => {
|
|
17
17
|
try {
|
|
@@ -35,7 +35,7 @@ function ui() {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function ui() {
|
|
39
39
|
return {
|
|
40
40
|
debounce: (e, t) => {
|
|
41
41
|
let n;
|
|
@@ -47,13 +47,13 @@ function di() {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
const He = "khcp-user-table-preferences",
|
|
50
|
+
const He = "khcp-user-table-preferences", di = {
|
|
51
51
|
pageSize: 30,
|
|
52
52
|
sortColumnKey: void 0,
|
|
53
53
|
sortColumnOrder: void 0,
|
|
54
54
|
columnVisibility: {}
|
|
55
55
|
};
|
|
56
|
-
function
|
|
56
|
+
function fi() {
|
|
57
57
|
const e = (n) => {
|
|
58
58
|
if (typeof n == "string")
|
|
59
59
|
try {
|
|
@@ -77,7 +77,7 @@ function pi() {
|
|
|
77
77
|
},
|
|
78
78
|
getTablePreferences: (n, i) => {
|
|
79
79
|
const r = t();
|
|
80
|
-
return (r == null ? void 0 : r.get(n)) || void 0 || i ||
|
|
80
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || i || di;
|
|
81
81
|
},
|
|
82
82
|
deleteAllTablePreferences: () => {
|
|
83
83
|
localStorage.removeItem(He);
|
|
@@ -85,22 +85,22 @@ function pi() {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
function rt(e = {}) {
|
|
88
|
-
const { getAxiosInstance: t } =
|
|
88
|
+
const { getAxiosInstance: t } = ci();
|
|
89
89
|
return {
|
|
90
90
|
axiosInstance: t(e)
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
const
|
|
93
|
+
const pi = {
|
|
94
94
|
actions: {
|
|
95
95
|
copyId: "Copy ID",
|
|
96
96
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
97
97
|
copyToClipboard: "Copied successfully!",
|
|
98
98
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
99
99
|
}
|
|
100
|
-
},
|
|
100
|
+
}, mi = {
|
|
101
101
|
message: "Are you sure you want to delete this {entityType}?",
|
|
102
102
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
103
|
-
},
|
|
103
|
+
}, hi = {
|
|
104
104
|
actions: {
|
|
105
105
|
viewConfiguration: "View Configuration",
|
|
106
106
|
save: "Save",
|
|
@@ -117,13 +117,13 @@ const mi = {
|
|
|
117
117
|
errors: {
|
|
118
118
|
edit: "The entity could not be edited at this time."
|
|
119
119
|
}
|
|
120
|
-
},
|
|
120
|
+
}, gi = {
|
|
121
121
|
emptyState: {
|
|
122
122
|
noSearchResultsTitle: "No results found",
|
|
123
123
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
124
124
|
noSearchResultsCtaText: "Clear"
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, yi = {
|
|
127
127
|
title: "Configuration",
|
|
128
128
|
actions: {
|
|
129
129
|
copy: "Copy JSON"
|
|
@@ -160,10 +160,10 @@ const mi = {
|
|
|
160
160
|
entryTitle: "Entry {index}",
|
|
161
161
|
structuredFormat: "Structured"
|
|
162
162
|
}
|
|
163
|
-
},
|
|
163
|
+
}, vi = {
|
|
164
164
|
learnMore: "Learn more",
|
|
165
165
|
pricingTitle: "Pricing: "
|
|
166
|
-
},
|
|
166
|
+
}, bi = {
|
|
167
167
|
filterButtonText: "Filter",
|
|
168
168
|
fieldLabel: "Filter by:",
|
|
169
169
|
inputPlaceholder: "Enter a value",
|
|
@@ -171,17 +171,17 @@ const mi = {
|
|
|
171
171
|
applyButtonText: "Apply",
|
|
172
172
|
clearButtonText: "Clear",
|
|
173
173
|
clearAllButtonText: "Clear all filters"
|
|
174
|
-
},
|
|
174
|
+
}, xi = {
|
|
175
175
|
errors: {
|
|
176
176
|
fetch: "Could not fetch available items",
|
|
177
177
|
invalid: "Please select a valid value"
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, Ci = {
|
|
180
180
|
unexpected: "An unexpected error has occurred",
|
|
181
181
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
182
|
-
},
|
|
182
|
+
}, ki = {
|
|
183
183
|
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
184
|
-
},
|
|
184
|
+
}, Ai = {
|
|
185
185
|
enable: {
|
|
186
186
|
title: "Enable {entityType}",
|
|
187
187
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -193,17 +193,17 @@ const mi = {
|
|
|
193
193
|
confirmText: "Yes, disable"
|
|
194
194
|
}
|
|
195
195
|
}, wi = {
|
|
196
|
-
global:
|
|
197
|
-
deleteModal:
|
|
198
|
-
baseForm:
|
|
199
|
-
baseTable:
|
|
200
|
-
baseConfigCard:
|
|
201
|
-
emptyState:
|
|
202
|
-
filter:
|
|
203
|
-
debouncedFilter:
|
|
204
|
-
errors:
|
|
205
|
-
validationErrors:
|
|
206
|
-
toggleModal:
|
|
196
|
+
global: pi,
|
|
197
|
+
deleteModal: mi,
|
|
198
|
+
baseForm: hi,
|
|
199
|
+
baseTable: gi,
|
|
200
|
+
baseConfigCard: yi,
|
|
201
|
+
emptyState: vi,
|
|
202
|
+
filter: bi,
|
|
203
|
+
debouncedFilter: xi,
|
|
204
|
+
errors: Ci,
|
|
205
|
+
validationErrors: ki,
|
|
206
|
+
toggleModal: Ai
|
|
207
207
|
};
|
|
208
208
|
function Ue() {
|
|
209
209
|
const e = Zn("en-us", wi);
|
|
@@ -216,25 +216,25 @@ function Ue() {
|
|
|
216
216
|
function Wt() {
|
|
217
217
|
const e = (o, a) => (a == null ? void 0 : a[o]) ?? void 0, t = (o, a) => {
|
|
218
218
|
if (o.length !== a.length) return !1;
|
|
219
|
-
const
|
|
220
|
-
for (const
|
|
221
|
-
const c = o.filter((u) => u ===
|
|
219
|
+
const l = /* @__PURE__ */ new Set([...o, ...a]);
|
|
220
|
+
for (const s of l) {
|
|
221
|
+
const c = o.filter((u) => u === s).length, d = a.filter((u) => u === s).length;
|
|
222
222
|
if (c !== d) return !1;
|
|
223
223
|
}
|
|
224
224
|
return !0;
|
|
225
225
|
};
|
|
226
226
|
return {
|
|
227
227
|
getPropValue: e,
|
|
228
|
-
objectsAreEqual: (o, a,
|
|
229
|
-
if (
|
|
228
|
+
objectsAreEqual: (o, a, l) => {
|
|
229
|
+
if (l) {
|
|
230
230
|
if (Object.keys(o).length === Object.keys(a).length)
|
|
231
|
-
for (const
|
|
232
|
-
if (Array.isArray(o[
|
|
233
|
-
if (t(o[
|
|
231
|
+
for (const s in o)
|
|
232
|
+
if (Array.isArray(o[s]) && Array.isArray(a[s])) {
|
|
233
|
+
if (t(o[s], a[s]))
|
|
234
234
|
continue;
|
|
235
235
|
return !1;
|
|
236
236
|
} else {
|
|
237
|
-
if (o[
|
|
237
|
+
if (o[s] === a[s])
|
|
238
238
|
continue;
|
|
239
239
|
return !1;
|
|
240
240
|
}
|
|
@@ -248,60 +248,60 @@ function Wt() {
|
|
|
248
248
|
return !1;
|
|
249
249
|
}
|
|
250
250
|
},
|
|
251
|
-
sortAlpha: (o) => (a,
|
|
252
|
-
let
|
|
253
|
-
return Array.isArray(a[o]) && (
|
|
251
|
+
sortAlpha: (o) => (a, l) => {
|
|
252
|
+
let s = a[o] === void 0 || a[o] === null ? "" : a[o], c = l[o] === void 0 || l[o] === null ? "" : l[o];
|
|
253
|
+
return Array.isArray(a[o]) && (s = a[o][0]), Array.isArray(l[o]) && (c = l[o][0]), s.localeCompare(c);
|
|
254
254
|
},
|
|
255
255
|
isValidUuid: (o) => o ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(o) : !1
|
|
256
256
|
};
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function _i(e, t, n, i = {
|
|
259
259
|
fetchedItemsKey: "data",
|
|
260
260
|
searchKeys: ["id"]
|
|
261
261
|
}) {
|
|
262
262
|
n || (n = "1000");
|
|
263
|
-
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } =
|
|
264
|
-
await
|
|
265
|
-
}, 200),
|
|
266
|
-
const
|
|
267
|
-
return e.app === "konnect" ?
|
|
268
|
-
}), { isValidUuid:
|
|
263
|
+
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = Ue(), { debounce: a } = ui(), l = a(async (R) => {
|
|
264
|
+
await x(R);
|
|
265
|
+
}, 200), s = K(!1), c = K(""), d = K(""), u = K([]), h = K([]), p = K(void 0), y = F(() => {
|
|
266
|
+
const R = `${e.apiBaseUrl}${$(t)}`;
|
|
267
|
+
return e.app === "konnect" ? R.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? R.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : R;
|
|
268
|
+
}), { isValidUuid: b } = Wt(), C = async () => {
|
|
269
269
|
try {
|
|
270
|
-
|
|
271
|
-
const { data:
|
|
272
|
-
|
|
270
|
+
s.value = !0;
|
|
271
|
+
const { data: R } = await r.get(`${y.value}?size=${n}`);
|
|
272
|
+
R != null && R.next || (p.value = i.fetchedItemsKey in R ? R[i.fetchedItemsKey] : []), h.value = i.fetchedItemsKey in R ? R[i.fetchedItemsKey] : [], u.value = h.value;
|
|
273
273
|
} catch {
|
|
274
274
|
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
275
275
|
} finally {
|
|
276
|
-
|
|
276
|
+
s.value = !1;
|
|
277
277
|
}
|
|
278
|
-
}, k = K(""),
|
|
279
|
-
var W, X,
|
|
280
|
-
if (k.value !==
|
|
281
|
-
if (k.value =
|
|
282
|
-
u.value =
|
|
278
|
+
}, k = K(""), x = async (R) => {
|
|
279
|
+
var W, X, w;
|
|
280
|
+
if (k.value !== R) {
|
|
281
|
+
if (k.value = R ?? "", !R) {
|
|
282
|
+
u.value = h.value;
|
|
283
283
|
return;
|
|
284
284
|
}
|
|
285
|
-
if (
|
|
285
|
+
if (p.value === void 0)
|
|
286
286
|
try {
|
|
287
|
-
if (
|
|
288
|
-
const A = `${
|
|
289
|
-
i.fetchedItemsKey in
|
|
287
|
+
if (s.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
288
|
+
const A = `${y.value}/${R}`, { data: E } = await r.get(`${A}?size=${n}`);
|
|
289
|
+
i.fetchedItemsKey in E ? u.value = E[i.fetchedItemsKey] : E != null && E[i.exactMatchKey ?? "id"] ? u.value = [E] : u.value = [];
|
|
290
290
|
} else {
|
|
291
291
|
const A = [];
|
|
292
|
-
|
|
293
|
-
const { data:
|
|
294
|
-
return [
|
|
292
|
+
b(R) && i.searchKeys.includes("id") ? A.push((async () => {
|
|
293
|
+
const { data: g } = await r.get(`${y.value}/${R}`);
|
|
294
|
+
return [g[i.fetchedItemsKey] ?? g];
|
|
295
295
|
})()) : A.push(
|
|
296
|
-
...i.searchKeys.filter((
|
|
297
|
-
const { data:
|
|
298
|
-
return
|
|
296
|
+
...i.searchKeys.filter((g) => g !== "id").map(async (g) => {
|
|
297
|
+
const { data: v } = await r.get(`${y.value}?${g}=${R}`);
|
|
298
|
+
return v[i.fetchedItemsKey];
|
|
299
299
|
})
|
|
300
300
|
);
|
|
301
|
-
const
|
|
302
|
-
u.value = [], (W =
|
|
303
|
-
var
|
|
304
|
-
(
|
|
301
|
+
const E = await Promise.all(A), f = /* @__PURE__ */ new Set();
|
|
302
|
+
u.value = [], (W = E == null ? void 0 : E.forEach) == null || W.call(E, (g) => {
|
|
303
|
+
var v;
|
|
304
|
+
(v = g == null ? void 0 : g.forEach) == null || v.call(g, (H) => {
|
|
305
305
|
f.has(H.id) || (f.add(H.id), u.value.push(H));
|
|
306
306
|
});
|
|
307
307
|
});
|
|
@@ -309,41 +309,41 @@ function Si(e, t, n, i = {
|
|
|
309
309
|
} catch (A) {
|
|
310
310
|
((X = A == null ? void 0 : A.response) == null ? void 0 : X.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
311
311
|
} finally {
|
|
312
|
-
|
|
312
|
+
s.value = !1;
|
|
313
313
|
}
|
|
314
314
|
else
|
|
315
|
-
|
|
315
|
+
s.value = !0, d.value = "", u.value = (w = p.value) == null ? void 0 : w.filter((A) => {
|
|
316
316
|
var f;
|
|
317
|
-
let
|
|
318
|
-
for (const
|
|
319
|
-
const
|
|
320
|
-
|
|
317
|
+
let E = !1;
|
|
318
|
+
for (const g of i.searchKeys) {
|
|
319
|
+
const v = typeof A[g] == "string" ? (f = A[g]) == null ? void 0 : f.toLowerCase() : A[g];
|
|
320
|
+
v != null && v.includes(R.toLowerCase()) && (E = !0);
|
|
321
321
|
}
|
|
322
|
-
return
|
|
323
|
-
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")),
|
|
322
|
+
return E;
|
|
323
|
+
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), s.value = !1;
|
|
324
324
|
}
|
|
325
325
|
};
|
|
326
326
|
return {
|
|
327
|
-
loading:
|
|
327
|
+
loading: s,
|
|
328
328
|
error: c,
|
|
329
329
|
validationError: d,
|
|
330
330
|
results: u,
|
|
331
|
-
allRecords:
|
|
332
|
-
loadItems:
|
|
333
|
-
debouncedQueryChange:
|
|
331
|
+
allRecords: p,
|
|
332
|
+
loadItems: C,
|
|
333
|
+
debouncedQueryChange: l
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
const n = $(t), i =
|
|
336
|
+
function Si(e, t) {
|
|
337
|
+
const n = $(t), i = F(
|
|
338
338
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
339
339
|
);
|
|
340
340
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function $i() {
|
|
343
343
|
const { i18n: { t: e } } = Ue();
|
|
344
344
|
return {
|
|
345
345
|
getErrorFieldsFromError: (i) => {
|
|
346
|
-
var a,
|
|
346
|
+
var a, l, s;
|
|
347
347
|
if (!i)
|
|
348
348
|
return {
|
|
349
349
|
messages: [e("errors.unexpected")],
|
|
@@ -356,8 +356,8 @@ function Ti() {
|
|
|
356
356
|
};
|
|
357
357
|
let r = [e("errors.unexpected")];
|
|
358
358
|
const o = [];
|
|
359
|
-
if ((
|
|
360
|
-
if ((
|
|
359
|
+
if ((l = i == null ? void 0 : i.response) != null && l.data) {
|
|
360
|
+
if ((s = i.response.data.details) != null && s.length)
|
|
361
361
|
return r = [], i.response.data.details.forEach((c) => {
|
|
362
362
|
let d = e("errors.unexpected");
|
|
363
363
|
c.messages && Array.isArray(c.messages) && c.messages.length && (d = c.messages.join(", ")), c.field && o.push({ field: c.field, message: d }), r.push(`${c.field ?? ""} ${d}`);
|
|
@@ -385,7 +385,7 @@ function Ti() {
|
|
|
385
385
|
};
|
|
386
386
|
},
|
|
387
387
|
getMessageFromError: (i) => {
|
|
388
|
-
var r, o, a,
|
|
388
|
+
var r, o, a, l;
|
|
389
389
|
if (!i)
|
|
390
390
|
return e("errors.unexpected");
|
|
391
391
|
if (((r = i == null ? void 0 : i.response) == null ? void 0 : r.status) === 401)
|
|
@@ -394,27 +394,27 @@ function Ti() {
|
|
|
394
394
|
if (i.response.data.detail)
|
|
395
395
|
return i.response.data.detail;
|
|
396
396
|
if ((a = i.response.data.details) != null && a.length)
|
|
397
|
-
return i.response.data.details.map((
|
|
397
|
+
return i.response.data.details.map((s) => {
|
|
398
398
|
let c = e("errors.unexpected");
|
|
399
|
-
return
|
|
399
|
+
return s.messages && typeof s.messages == "object" && s.messages.length && (c = s.messages.join(", ")), s.field ? `${s.field} - ${c}` : c;
|
|
400
400
|
}).join("; ");
|
|
401
401
|
if (i.response.data.message) {
|
|
402
|
-
const { message:
|
|
403
|
-
return Array.isArray(
|
|
402
|
+
const { message: s } = i.response.data;
|
|
403
|
+
return Array.isArray(s) ? (l = s[0]) != null && l.constraints ? Object.values(s[0].constraints)[0] : s[0] : s;
|
|
404
404
|
}
|
|
405
405
|
if (typeof i.response.data == "string")
|
|
406
406
|
return i.response.data;
|
|
407
407
|
if (typeof i.response.data == "object")
|
|
408
|
-
return Object.keys(i.response.data).map((
|
|
408
|
+
return Object.keys(i.response.data).map((s) => `${s} ${i.response.data[s]}`).join(", ");
|
|
409
409
|
}
|
|
410
410
|
return i.message || e("errors.unexpected");
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function Ti(e) {
|
|
415
415
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
416
416
|
try {
|
|
417
|
-
const i = e.join("/"), r = `${n}${i}`, o = e.some((
|
|
417
|
+
const i = e.join("/"), r = `${n}${i}`, o = e.some((l) => l.trim() === "");
|
|
418
418
|
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(r) && !o && new URL(r))
|
|
419
419
|
return `${n}${i}`;
|
|
420
420
|
throw new Error("Invalid url");
|
|
@@ -423,75 +423,75 @@ function Ii(e) {
|
|
|
423
423
|
}
|
|
424
424
|
}
|
|
425
425
|
function Jt(e, t) {
|
|
426
|
-
const n =
|
|
426
|
+
const n = F(() => {
|
|
427
427
|
const r = he(e);
|
|
428
428
|
return r.app === "konnect" || !!r.isExactMatch;
|
|
429
|
-
}), i =
|
|
429
|
+
}), i = F(() => {
|
|
430
430
|
const r = he(t);
|
|
431
431
|
return r.startsWith("/") ? new URL(`${window.location.origin}${r}`) : new URL(r);
|
|
432
432
|
});
|
|
433
433
|
return (r) => {
|
|
434
|
-
const { page: o, pageSize: a, offset:
|
|
434
|
+
const { page: o, pageSize: a, offset: l, sortColumnKey: s, sortColumnOrder: c, query: d } = r;
|
|
435
435
|
try {
|
|
436
436
|
let u = new URL(i.value.href);
|
|
437
|
-
return n.value && d ? (u.search = "", u = he(e).isExactMatch ? new URL(`${u.href}/${d}`) : new URL(`${u.href}?filter[name][contains]=${d}`)) : (n.value || new URLSearchParams(d).forEach((
|
|
438
|
-
u.searchParams.append(
|
|
439
|
-
}),
|
|
437
|
+
return n.value && d ? (u.search = "", u = he(e).isExactMatch ? new URL(`${u.href}/${d}`) : new URL(`${u.href}?filter[name][contains]=${d}`)) : (n.value || new URLSearchParams(d).forEach((h, p) => {
|
|
438
|
+
u.searchParams.append(p, h);
|
|
439
|
+
}), s && u.searchParams.append("sort_by", s), c === "desc" && u.searchParams.append("sort_desc", "1"), u.searchParams.append("size", String(a))), l && o !== 1 && u.searchParams.append("offset", String(l)), u.href;
|
|
440
440
|
} catch (u) {
|
|
441
441
|
return console.error("RouteList(fetcher)", u), he(t);
|
|
442
442
|
}
|
|
443
443
|
};
|
|
444
444
|
}
|
|
445
445
|
const gt = /* @__PURE__ */ new Map();
|
|
446
|
-
function
|
|
447
|
-
const i = K(!0), r = he(e), { axiosInstance: o } = rt(r.axiosRequestConfig), a = Jt(e, t),
|
|
446
|
+
function Ii(e, t, n) {
|
|
447
|
+
const i = K(!0), r = he(e), { axiosInstance: o } = rt(r.axiosRequestConfig), a = Jt(e, t), l = K({
|
|
448
448
|
status: me.Idle
|
|
449
|
-
}),
|
|
450
|
-
var
|
|
451
|
-
const
|
|
449
|
+
}), s = async (u) => {
|
|
450
|
+
var p;
|
|
451
|
+
const h = he(n) || "data";
|
|
452
452
|
try {
|
|
453
|
-
|
|
454
|
-
let
|
|
455
|
-
|
|
456
|
-
const
|
|
457
|
-
if (
|
|
458
|
-
throw
|
|
459
|
-
const
|
|
460
|
-
let
|
|
461
|
-
|
|
462
|
-
const
|
|
463
|
-
data:
|
|
464
|
-
total:
|
|
465
|
-
...
|
|
453
|
+
l.value = i.value ? { status: me.InitialLoad } : { status: me.Loading }, i.value = !1;
|
|
454
|
+
let y = a(u);
|
|
455
|
+
y.includes("filter[name]") && (y = `${y}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
456
|
+
const b = await o.get(y);
|
|
457
|
+
if (b.status >= 400)
|
|
458
|
+
throw b;
|
|
459
|
+
const C = b.data, k = h && h.replace(/[^\w-_]/gi, "");
|
|
460
|
+
let x;
|
|
461
|
+
C[k] ? x = Array.isArray(C[k]) ? C[k] : [C[k]] : Array.isArray(C) ? x = C : x = Object.keys(C).length ? [C] : [];
|
|
462
|
+
const R = {
|
|
463
|
+
data: x,
|
|
464
|
+
total: x.length,
|
|
465
|
+
...C.offset ? {
|
|
466
466
|
pagination: {
|
|
467
|
-
offset:
|
|
467
|
+
offset: C.offset
|
|
468
468
|
}
|
|
469
469
|
} : null
|
|
470
470
|
};
|
|
471
|
-
return
|
|
471
|
+
return R.data.length === 0 && !u.query ? l.value = {
|
|
472
472
|
status: me.NoRecords,
|
|
473
|
-
response:
|
|
474
|
-
} :
|
|
473
|
+
response: R
|
|
474
|
+
} : l.value = {
|
|
475
475
|
status: me.Idle,
|
|
476
|
-
response:
|
|
477
|
-
},
|
|
478
|
-
} catch (
|
|
479
|
-
const
|
|
476
|
+
response: R
|
|
477
|
+
}, R;
|
|
478
|
+
} catch (y) {
|
|
479
|
+
const b = {
|
|
480
480
|
data: [],
|
|
481
481
|
total: 0
|
|
482
482
|
};
|
|
483
|
-
return u.query && (((
|
|
483
|
+
return u.query && (((p = y.response) == null ? void 0 : p.status) === 404 || y.status === 404) ? (l.value = {
|
|
484
484
|
status: me.NoResults,
|
|
485
|
-
response:
|
|
486
|
-
error:
|
|
487
|
-
},
|
|
485
|
+
response: b,
|
|
486
|
+
error: y.response ? y : { response: y }
|
|
487
|
+
}, b) : (l.value = {
|
|
488
488
|
status: me.Error,
|
|
489
|
-
response:
|
|
490
|
-
error:
|
|
491
|
-
},
|
|
489
|
+
response: b,
|
|
490
|
+
error: y.response ? y : { response: y }
|
|
491
|
+
}, b);
|
|
492
492
|
}
|
|
493
493
|
}, c = r.cacheIdentifier, d = Gt(c);
|
|
494
|
-
return { fetcher:
|
|
494
|
+
return { fetcher: s, fetcherState: l, fetcherCacheKey: d };
|
|
495
495
|
}
|
|
496
496
|
function Gt(e) {
|
|
497
497
|
if (e) {
|
|
@@ -500,7 +500,7 @@ function Gt(e) {
|
|
|
500
500
|
}
|
|
501
501
|
return K(1);
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function Ei() {
|
|
504
504
|
const e = (i, r = "_") => i ? i.split(r).map((o) => o.toLowerCase() === "id" ? o.toUpperCase() : o.charAt(0).toUpperCase() + o.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
505
505
|
return {
|
|
506
506
|
capitalize: (i) => i ? i.replace(t, (r) => r.toUpperCase()) : "",
|
|
@@ -517,24 +517,24 @@ const zt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
517
517
|
}, vt = (e) => e === "*" || e === "x" || e === "X", bt = (e) => {
|
|
518
518
|
const t = parseInt(e, 10);
|
|
519
519
|
return isNaN(t) ? e : t;
|
|
520
|
-
},
|
|
520
|
+
}, Fi = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Oi = (e, t) => {
|
|
521
521
|
if (vt(e) || vt(t))
|
|
522
522
|
return 0;
|
|
523
|
-
const [n, i] =
|
|
523
|
+
const [n, i] = Fi(bt(e), bt(t));
|
|
524
524
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
525
525
|
}, xt = (e, t) => {
|
|
526
526
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
527
|
-
const i =
|
|
527
|
+
const i = Oi(e[n] || "0", t[n] || "0");
|
|
528
528
|
if (i !== 0)
|
|
529
529
|
return i;
|
|
530
530
|
}
|
|
531
531
|
return 0;
|
|
532
|
-
},
|
|
532
|
+
}, Li = (e, t) => {
|
|
533
533
|
const n = yt(e), i = yt(t), r = n.pop(), o = i.pop(), a = xt(n, i);
|
|
534
534
|
return a !== 0 ? a : r && o ? xt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
535
535
|
}, Ct = (e, t, n) => {
|
|
536
|
-
|
|
537
|
-
const i =
|
|
536
|
+
Bi(n);
|
|
537
|
+
const i = Li(e, t);
|
|
538
538
|
return Qt[n].includes(i);
|
|
539
539
|
}, Qt = {
|
|
540
540
|
">": [1],
|
|
@@ -543,49 +543,49 @@ const zt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
543
543
|
"<=": [-1, 0],
|
|
544
544
|
"<": [-1],
|
|
545
545
|
"!=": [-1, 1]
|
|
546
|
-
}, kt = Object.keys(Qt),
|
|
546
|
+
}, kt = Object.keys(Qt), Bi = (e) => {
|
|
547
547
|
if (typeof e != "string")
|
|
548
548
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
549
549
|
if (kt.indexOf(e) === -1)
|
|
550
550
|
throw new Error(`Invalid operator, expected one of ${kt.join("|")}`);
|
|
551
|
-
},
|
|
552
|
-
function
|
|
551
|
+
}, Ri = (e) => typeof e == "string" && /^[v\d]/.test(e) && zt.test(e);
|
|
552
|
+
function Ki(e) {
|
|
553
553
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
554
554
|
if (!t)
|
|
555
555
|
return !0;
|
|
556
556
|
const { edition: i, version: r } = t;
|
|
557
|
-
if (!
|
|
557
|
+
if (!Ri(r))
|
|
558
558
|
return console.error("Invalid version"), !1;
|
|
559
559
|
const o = n[i];
|
|
560
560
|
if (!o)
|
|
561
561
|
return !1;
|
|
562
|
-
const [a,
|
|
563
|
-
return !(a && Ct(r, a, "<") ||
|
|
562
|
+
const [a, l] = o;
|
|
563
|
+
return !(a && Ct(r, a, "<") || l && Ct(r, l, ">"));
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function Ni(e) {
|
|
566
566
|
const t = K(0), n = K(0), i = K(!1);
|
|
567
567
|
return be(e, (o) => {
|
|
568
568
|
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
569
569
|
}), {
|
|
570
|
-
isTruncated:
|
|
570
|
+
isTruncated: F(() => t.value < n.value)
|
|
571
571
|
};
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Mi() {
|
|
574
574
|
const { i18n: { t: e } } = Ue();
|
|
575
575
|
return {
|
|
576
576
|
utf8Name: (n) => /^[\p{N}\p{L}.\-_~]*$/u.test(n) ? "" : e("validationErrors.utf8Name")
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
-
const Ge = Symbol("schema"),
|
|
579
|
+
const Ge = Symbol("schema"), ji = (e) => {
|
|
580
580
|
Pt(Ge, e);
|
|
581
|
-
},
|
|
581
|
+
}, Di = (e) => {
|
|
582
582
|
var r, o;
|
|
583
583
|
const t = Dt(Ge, void 0), n = (o = (r = t == null ? void 0 : t.value) == null ? void 0 : r.fields) == null ? void 0 : o.find((a) => Object.keys(a)[0] === e), i = Vn(n == null ? void 0 : n[e]);
|
|
584
584
|
return Pt(Ge, i), i;
|
|
585
585
|
};
|
|
586
|
-
function
|
|
586
|
+
function Pi(e) {
|
|
587
587
|
let t = "";
|
|
588
|
-
const n = K(!1), i = K(null), r =
|
|
588
|
+
const n = K(!1), i = K(null), r = F(() => {
|
|
589
589
|
let a;
|
|
590
590
|
return n.value ? a = !0 : i.value ? a = i.value.hasData || e && he(e) : a = !1, !a;
|
|
591
591
|
});
|
|
@@ -600,26 +600,26 @@ function Ui(e) {
|
|
|
600
600
|
}
|
|
601
601
|
const Y = {
|
|
602
602
|
useAxios: rt,
|
|
603
|
-
useDebouncedFilter:
|
|
604
|
-
useDeleteUrlBuilder:
|
|
605
|
-
useErrors:
|
|
606
|
-
useExternalLinkCreator:
|
|
607
|
-
useFetcher:
|
|
603
|
+
useDebouncedFilter: _i,
|
|
604
|
+
useDeleteUrlBuilder: Si,
|
|
605
|
+
useErrors: $i,
|
|
606
|
+
useExternalLinkCreator: Ti,
|
|
607
|
+
useFetcher: Ii,
|
|
608
608
|
useFetcherCacheKey: Gt,
|
|
609
609
|
useFetchUrlBuilder: Jt,
|
|
610
610
|
useHelpers: Wt,
|
|
611
|
-
useStringHelpers:
|
|
611
|
+
useStringHelpers: Ei,
|
|
612
612
|
useI18n: Ue,
|
|
613
|
-
useGatewayFeatureSupported:
|
|
614
|
-
useTruncationDetector:
|
|
615
|
-
useValidators:
|
|
616
|
-
useSchemaProvider:
|
|
617
|
-
useSubSchema:
|
|
618
|
-
useTableState:
|
|
619
|
-
},
|
|
613
|
+
useGatewayFeatureSupported: Ki,
|
|
614
|
+
useTruncationDetector: Ni,
|
|
615
|
+
useValidators: Mi,
|
|
616
|
+
useSchemaProvider: ji,
|
|
617
|
+
useSubSchema: Di,
|
|
618
|
+
useTableState: Pi
|
|
619
|
+
}, Ui = {
|
|
620
620
|
key: 0,
|
|
621
621
|
class: "config-card-fieldset-title"
|
|
622
|
-
},
|
|
622
|
+
}, qi = /* @__PURE__ */ z({
|
|
623
623
|
__name: "JsonCardItem",
|
|
624
624
|
props: {
|
|
625
625
|
item: {
|
|
@@ -636,19 +636,19 @@ const Y = {
|
|
|
636
636
|
}
|
|
637
637
|
},
|
|
638
638
|
setup(e) {
|
|
639
|
-
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: i } = Y.useStringHelpers(), r =
|
|
640
|
-
const
|
|
641
|
-
return t.isArrayItem && delete
|
|
642
|
-
}),
|
|
643
|
-
var
|
|
644
|
-
return t.isArrayItem ? (
|
|
639
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: i } = Y.useStringHelpers(), r = F(() => t.item.key ?? "json-array-item"), o = F(() => t.item.value ?? t.item), a = F(() => {
|
|
640
|
+
const s = JSON.parse(JSON.stringify(o.value));
|
|
641
|
+
return t.isArrayItem && delete s.name, s;
|
|
642
|
+
}), l = F(() => {
|
|
643
|
+
var s;
|
|
644
|
+
return t.isArrayItem ? (s = o.value) != null && s.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
645
645
|
});
|
|
646
|
-
return (
|
|
646
|
+
return (s, c) => (m(), j(je(e.isArrayItem ? "fieldset" : "div"), {
|
|
647
647
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
648
648
|
}, {
|
|
649
|
-
default:
|
|
650
|
-
e.isArrayItem ? (m(), S("legend",
|
|
651
|
-
|
|
649
|
+
default: _(() => [
|
|
650
|
+
e.isArrayItem ? (m(), S("legend", Ui, [
|
|
651
|
+
B("b", null, O(l.value), 1)
|
|
652
652
|
])) : N("", !0),
|
|
653
653
|
(m(!0), S(ue, null, ce(Object.keys(a.value), (d, u) => (m(), j(Xt, {
|
|
654
654
|
key: `${r.value}-property-${u}`,
|
|
@@ -667,7 +667,7 @@ const Y = {
|
|
|
667
667
|
for (const [i, r] of t)
|
|
668
668
|
n[i] = r;
|
|
669
669
|
return n;
|
|
670
|
-
}, Zt = /* @__PURE__ */ se(
|
|
670
|
+
}, Zt = /* @__PURE__ */ se(qi, [["__scopeId", "data-v-dc1e39a1"]]), Hi = /* @__PURE__ */ z({
|
|
671
671
|
__name: "InternalLinkItem",
|
|
672
672
|
props: {
|
|
673
673
|
item: {
|
|
@@ -686,15 +686,15 @@ const Y = {
|
|
|
686
686
|
class: "navigation-button",
|
|
687
687
|
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
688
688
|
}, {
|
|
689
|
-
default:
|
|
690
|
-
q(
|
|
689
|
+
default: _(() => [
|
|
690
|
+
q(O(e.item.value || $(t)("baseConfigCard.commonFields.link")), 1)
|
|
691
691
|
]),
|
|
692
692
|
_: 1
|
|
693
693
|
})
|
|
694
694
|
]);
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
}),
|
|
697
|
+
}), Vi = /* @__PURE__ */ se(Hi, [["__scopeId", "data-v-2feb8c2e"]]), Yi = /* @__PURE__ */ z({
|
|
698
698
|
__name: "StatusBadge",
|
|
699
699
|
props: {
|
|
700
700
|
status: {
|
|
@@ -709,18 +709,18 @@ const Y = {
|
|
|
709
709
|
return m(), j(r, {
|
|
710
710
|
appearance: e.status ? "success" : "neutral"
|
|
711
711
|
}, {
|
|
712
|
-
default:
|
|
713
|
-
q(
|
|
712
|
+
default: _(() => [
|
|
713
|
+
q(O(e.status ? $(t)("baseConfigCard.statusBadge.enabledLabel") : $(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
714
714
|
]),
|
|
715
715
|
_: 1
|
|
716
716
|
}, 8, ["appearance"]);
|
|
717
717
|
};
|
|
718
718
|
}
|
|
719
|
-
}),
|
|
719
|
+
}), Wi = "#0044f4", Ji = "#e0e4ea", Gi = "#afb7c5", zi = "#0044f4", Qi = "1px", Zi = "16px", Xi = "20px", er = { class: "config-card-details-row" }, tr = ["data-testid"], nr = ["data-testid"], ir = ["data-testid"], rr = ["data-testid"], ar = { key: 1 }, or = ["data-testid"], lr = ["data-testid"], sr = ["data-testid"], cr = ["data-testid"], ur = {
|
|
720
720
|
name: "ConfigCardItem",
|
|
721
|
-
components: { JsonCardItem: Zt, StatusBadge:
|
|
722
|
-
},
|
|
723
|
-
...
|
|
721
|
+
components: { JsonCardItem: Zt, StatusBadge: Yi, InternalLinkItem: Vi }
|
|
722
|
+
}, dr = /* @__PURE__ */ z({
|
|
723
|
+
...ur,
|
|
724
724
|
props: {
|
|
725
725
|
item: {
|
|
726
726
|
type: Object,
|
|
@@ -740,16 +740,16 @@ const Y = {
|
|
|
740
740
|
emits: ["navigation-click"],
|
|
741
741
|
setup(e, { emit: t }) {
|
|
742
742
|
Ut((W) => ({
|
|
743
|
-
"70f369b3":
|
|
743
|
+
"70f369b3": h.value ? "none" : `solid ${$(Qi)} ${$(Ji)}`,
|
|
744
744
|
"67c2fae6": u.value && c.value ? "block" : "flex",
|
|
745
745
|
"847b138c": u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
746
746
|
"847687d6": u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
747
747
|
}));
|
|
748
|
-
const n = e, i = t, r = Yn(), o = De(), { i18n: { t: a, formatIsoDate:
|
|
748
|
+
const n = e, i = t, r = Yn(), o = De(), { i18n: { t: a, formatIsoDate: l, formatUnixTimeStamp: s } } = Y.useI18n(), c = F(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = F(() => !!(n.item.tooltip || o["label-tooltip"])), u = F(() => n.item.type === V.Json || n.item.type === V.JsonArray), h = F(() => n.item.type === V.JsonArray), p = Y.useSubSchema(n.item.key), y = F(() => {
|
|
749
749
|
var W;
|
|
750
|
-
return n.item.type ? n.item.type : (W =
|
|
751
|
-
}),
|
|
752
|
-
switch (
|
|
750
|
+
return n.item.type ? n.item.type : (W = p == null ? void 0 : p.value) != null && W.encrypted ? V.Redacted : void 0;
|
|
751
|
+
}), b = F(() => {
|
|
752
|
+
switch (y.value) {
|
|
753
753
|
case V.ID:
|
|
754
754
|
return {
|
|
755
755
|
tag: "KCopy",
|
|
@@ -792,7 +792,7 @@ const Y = {
|
|
|
792
792
|
attrs: {
|
|
793
793
|
"data-testid": `${n.item.key}-date`
|
|
794
794
|
},
|
|
795
|
-
text: isNaN(Number(n.item.value)) ?
|
|
795
|
+
text: isNaN(Number(n.item.value)) ? l(n.item.value) : s(n.item.value)
|
|
796
796
|
};
|
|
797
797
|
case V.BadgeStatus:
|
|
798
798
|
return {
|
|
@@ -879,26 +879,26 @@ const Y = {
|
|
|
879
879
|
text: n.item.value
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
}),
|
|
882
|
+
}), C = K(), k = K(), { isTruncated: x } = Y.useTruncationDetector(C), { isTruncated: R } = Y.useTruncationDetector(k);
|
|
883
883
|
return (W, X) => {
|
|
884
|
-
const
|
|
885
|
-
return m(), S("div",
|
|
886
|
-
|
|
884
|
+
const w = P("KTooltip"), A = P("KLabel"), E = P("KBadge"), f = P("KCopy");
|
|
885
|
+
return m(), S("div", er, [
|
|
886
|
+
B("div", {
|
|
887
887
|
class: "config-card-details-label",
|
|
888
888
|
"data-testid": `${e.item.key}-label`
|
|
889
889
|
}, [
|
|
890
890
|
D(W.$slots, "label", { item: e.item }, () => [
|
|
891
891
|
M(A, { "tooltip-attributes": { maxWidth: "500px" } }, Se({
|
|
892
|
-
default:
|
|
893
|
-
M(
|
|
894
|
-
text: $(
|
|
892
|
+
default: _(() => [
|
|
893
|
+
M(w, {
|
|
894
|
+
text: $(x) ? e.item.label : ""
|
|
895
895
|
}, {
|
|
896
|
-
default:
|
|
897
|
-
|
|
896
|
+
default: _(() => [
|
|
897
|
+
B("span", {
|
|
898
898
|
ref_key: "labelContent",
|
|
899
|
-
ref:
|
|
899
|
+
ref: C,
|
|
900
900
|
class: "label-content"
|
|
901
|
-
},
|
|
901
|
+
}, O(e.item.label), 513)
|
|
902
902
|
]),
|
|
903
903
|
_: 1
|
|
904
904
|
}, 8, ["text"])
|
|
@@ -907,92 +907,92 @@ const Y = {
|
|
|
907
907
|
}, [
|
|
908
908
|
d.value ? {
|
|
909
909
|
name: "tooltip",
|
|
910
|
-
fn:
|
|
911
|
-
|
|
910
|
+
fn: _(() => [
|
|
911
|
+
B("div", {
|
|
912
912
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
913
913
|
}, [
|
|
914
914
|
D(W.$slots, "label-tooltip", {}, () => [
|
|
915
|
-
q(
|
|
915
|
+
q(O(e.item.tooltip), 1)
|
|
916
916
|
], !0)
|
|
917
|
-
], 8,
|
|
917
|
+
], 8, nr)
|
|
918
918
|
]),
|
|
919
919
|
key: "0"
|
|
920
920
|
} : void 0
|
|
921
921
|
]), 1024)
|
|
922
922
|
], !0)
|
|
923
|
-
], 8,
|
|
924
|
-
|
|
923
|
+
], 8, tr),
|
|
924
|
+
B("div", {
|
|
925
925
|
class: "config-card-details-value",
|
|
926
926
|
"data-testid": `${e.item.key}-property-value`
|
|
927
927
|
}, [
|
|
928
928
|
D(W.$slots, e.item.key, {
|
|
929
929
|
rowValue: e.item.value
|
|
930
930
|
}, () => [
|
|
931
|
-
c.value ? (m(), S("div",
|
|
932
|
-
(m(), j(je(
|
|
933
|
-
default:
|
|
934
|
-
|
|
931
|
+
c.value ? (m(), S("div", ar, [
|
|
932
|
+
(m(), j(je(b.value.tag), Wn(Jn(b.value.attrs)), {
|
|
933
|
+
default: _(() => [
|
|
934
|
+
b.value.additionalComponent === "KBadge" ? (m(), S("div", {
|
|
935
935
|
key: 0,
|
|
936
936
|
"data-testid": `${e.item.key}-badge-tags`
|
|
937
937
|
}, [
|
|
938
|
-
(m(!0), S(ue, null, ce(e.item.value, (
|
|
939
|
-
key: `${e.item.key}-badge-tag-${
|
|
938
|
+
(m(!0), S(ue, null, ce(e.item.value, (g, v) => (m(), j(E, {
|
|
939
|
+
key: `${e.item.key}-badge-tag-${v}`,
|
|
940
940
|
class: "config-badge",
|
|
941
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
942
|
-
tooltip:
|
|
941
|
+
"data-testid": `${e.item.key}-badge-tag-${v}`,
|
|
942
|
+
tooltip: g,
|
|
943
943
|
"truncation-tooltip": ""
|
|
944
944
|
}, {
|
|
945
|
-
default:
|
|
946
|
-
q(
|
|
945
|
+
default: _(() => [
|
|
946
|
+
q(O(g), 1)
|
|
947
947
|
]),
|
|
948
948
|
_: 2
|
|
949
949
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
950
|
-
], 8,
|
|
950
|
+
], 8, or)) : b.value.additionalComponent === "KCopy" ? (m(), S("div", {
|
|
951
951
|
key: 1,
|
|
952
952
|
class: "copy-uuid-array",
|
|
953
953
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
954
954
|
}, [
|
|
955
|
-
(m(!0), S(ue, null, ce(e.item.value, (
|
|
956
|
-
key: `${e.item.key}-copy-uuid-${
|
|
957
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
958
|
-
text:
|
|
955
|
+
(m(!0), S(ue, null, ce(e.item.value, (g, v) => (m(), j(f, qt({ ref_for: !0 }, b.value.childAttrs, {
|
|
956
|
+
key: `${e.item.key}-copy-uuid-${v}`,
|
|
957
|
+
"data-testid": `${e.item.key}-copy-uuid-${v}`,
|
|
958
|
+
text: g
|
|
959
959
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
960
|
-
], 8,
|
|
960
|
+
], 8, lr)) : b.value.additionalComponent === "KMethodBadge" ? (m(), S("div", {
|
|
961
961
|
key: 2,
|
|
962
962
|
class: "method-badge-array",
|
|
963
963
|
"data-testid": `${e.item.key}-badge-methods`
|
|
964
964
|
}, [
|
|
965
|
-
(m(!0), S(ue, null, ce(e.item.value, (
|
|
966
|
-
key: `${e.item.key}-badge-method-${
|
|
967
|
-
appearance: Object.values($(ei)).includes(
|
|
965
|
+
(m(!0), S(ue, null, ce(e.item.value, (g, v) => (m(), j(E, {
|
|
966
|
+
key: `${e.item.key}-badge-method-${v}`,
|
|
967
|
+
appearance: Object.values($(ei)).includes(g.toLowerCase()) ? g.toLowerCase() : "custom",
|
|
968
968
|
class: "config-badge",
|
|
969
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
969
|
+
"data-testid": `${e.item.key}-badge-method-${v}`
|
|
970
970
|
}, {
|
|
971
|
-
default:
|
|
972
|
-
q(
|
|
971
|
+
default: _(() => [
|
|
972
|
+
q(O(g), 1)
|
|
973
973
|
]),
|
|
974
974
|
_: 2
|
|
975
975
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
976
|
-
], 8,
|
|
976
|
+
], 8, sr)) : b.value.additionalComponent === "JsonCardItem" ? (m(), S("div", {
|
|
977
977
|
key: 3,
|
|
978
978
|
"data-testid": `${n.item.key}-json-array-content`
|
|
979
979
|
}, [
|
|
980
|
-
(m(!0), S(ue, null, ce(e.item.value, (
|
|
981
|
-
key: `json-array-item-${
|
|
982
|
-
index:
|
|
980
|
+
(m(!0), S(ue, null, ce(e.item.value, (g, v) => (m(), j(Zt, {
|
|
981
|
+
key: `json-array-item-${v}`,
|
|
982
|
+
index: v,
|
|
983
983
|
"is-array-item": "",
|
|
984
|
-
item:
|
|
984
|
+
item: g
|
|
985
985
|
}, null, 8, ["index", "item"]))), 128))
|
|
986
|
-
], 8,
|
|
986
|
+
], 8, cr)) : (m(), j(w, {
|
|
987
987
|
key: 4,
|
|
988
|
-
text: $(
|
|
988
|
+
text: $(R) ? e.item.value : ""
|
|
989
989
|
}, {
|
|
990
|
-
default:
|
|
991
|
-
|
|
990
|
+
default: _(() => [
|
|
991
|
+
B("span", {
|
|
992
992
|
ref_key: "textContent",
|
|
993
993
|
ref: k,
|
|
994
994
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
995
|
-
},
|
|
995
|
+
}, O(b.value.text), 3)
|
|
996
996
|
]),
|
|
997
997
|
_: 1
|
|
998
998
|
}, 8, ["text"]))
|
|
@@ -1002,13 +1002,13 @@ const Y = {
|
|
|
1002
1002
|
])) : (m(), S("div", {
|
|
1003
1003
|
key: 0,
|
|
1004
1004
|
"data-testid": `${e.item.key}-no-value`
|
|
1005
|
-
}, " – ", 8,
|
|
1005
|
+
}, " – ", 8, rr))
|
|
1006
1006
|
], !0)
|
|
1007
|
-
], 8,
|
|
1007
|
+
], 8, ir)
|
|
1008
1008
|
]);
|
|
1009
1009
|
};
|
|
1010
1010
|
}
|
|
1011
|
-
}), Xt = /* @__PURE__ */ se(
|
|
1011
|
+
}), Xt = /* @__PURE__ */ se(dr, [["__scopeId", "data-v-66d61bea"]]), fr = { class: "json-config config-card-code-block" }, pr = {
|
|
1012
1012
|
key: 0,
|
|
1013
1013
|
class: "json-endpoint"
|
|
1014
1014
|
}, en = /* @__PURE__ */ z({
|
|
@@ -1042,7 +1042,7 @@ const Y = {
|
|
|
1042
1042
|
Ut((r) => ({
|
|
1043
1043
|
eca0976a: `${i.value}ch`
|
|
1044
1044
|
}));
|
|
1045
|
-
const t = e, n =
|
|
1045
|
+
const t = e, n = F(() => t.entityRecord), i = F(() => {
|
|
1046
1046
|
var a;
|
|
1047
1047
|
if (!t.fetcherUrl)
|
|
1048
1048
|
return 0;
|
|
@@ -1050,18 +1050,18 @@ const Y = {
|
|
|
1050
1050
|
return r.length < 2 ? 0 : 41 + (t.requestMethod === "post" ? r[r.length - 1] : r[r.length - 2]).length;
|
|
1051
1051
|
});
|
|
1052
1052
|
return (r, o) => {
|
|
1053
|
-
const a = P("KBadge"),
|
|
1054
|
-
return m(), S("div",
|
|
1055
|
-
t.fetcherUrl ? (m(), S("div",
|
|
1053
|
+
const a = P("KBadge"), l = P("KCodeBlock");
|
|
1054
|
+
return m(), S("div", fr, [
|
|
1055
|
+
t.fetcherUrl ? (m(), S("div", pr, [
|
|
1056
1056
|
M(a, {
|
|
1057
1057
|
appearance: t.requestMethod
|
|
1058
1058
|
}, {
|
|
1059
|
-
default:
|
|
1060
|
-
q(
|
|
1059
|
+
default: _(() => [
|
|
1060
|
+
q(O(t.requestMethod), 1)
|
|
1061
1061
|
]),
|
|
1062
1062
|
_: 1
|
|
1063
1063
|
}, 8, ["appearance"]),
|
|
1064
|
-
M(
|
|
1064
|
+
M(l, {
|
|
1065
1065
|
id: "json-endpoint-codeblock",
|
|
1066
1066
|
code: t.fetcherUrl,
|
|
1067
1067
|
language: "json",
|
|
@@ -1069,7 +1069,7 @@ const Y = {
|
|
|
1069
1069
|
theme: "dark"
|
|
1070
1070
|
}, null, 8, ["code"])
|
|
1071
1071
|
])) : N("", !0),
|
|
1072
|
-
t.entityRecord ? (m(), j(
|
|
1072
|
+
t.entityRecord ? (m(), j(l, {
|
|
1073
1073
|
key: 1,
|
|
1074
1074
|
id: "json-codeblock",
|
|
1075
1075
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
@@ -1085,34 +1085,34 @@ const Y = {
|
|
|
1085
1085
|
function tn(e) {
|
|
1086
1086
|
return typeof e > "u" || e === null;
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1088
|
+
function mr(e) {
|
|
1089
1089
|
return typeof e == "object" && e !== null;
|
|
1090
1090
|
}
|
|
1091
|
-
function
|
|
1091
|
+
function hr(e) {
|
|
1092
1092
|
return Array.isArray(e) ? e : tn(e) ? [] : [e];
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1094
|
+
function gr(e, t) {
|
|
1095
1095
|
var n, i, r, o;
|
|
1096
1096
|
if (t)
|
|
1097
1097
|
for (o = Object.keys(t), n = 0, i = o.length; n < i; n += 1)
|
|
1098
1098
|
r = o[n], e[r] = t[r];
|
|
1099
1099
|
return e;
|
|
1100
1100
|
}
|
|
1101
|
-
function
|
|
1101
|
+
function yr(e, t) {
|
|
1102
1102
|
var n = "", i;
|
|
1103
1103
|
for (i = 0; i < t; i += 1)
|
|
1104
1104
|
n += e;
|
|
1105
1105
|
return n;
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function vr(e) {
|
|
1108
1108
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1109
1109
|
}
|
|
1110
|
-
var
|
|
1111
|
-
isNothing:
|
|
1112
|
-
isObject:
|
|
1113
|
-
toArray:
|
|
1114
|
-
repeat:
|
|
1115
|
-
isNegativeZero:
|
|
1110
|
+
var br = tn, xr = mr, Cr = hr, kr = yr, Ar = vr, wr = gr, ee = {
|
|
1111
|
+
isNothing: br,
|
|
1112
|
+
isObject: xr,
|
|
1113
|
+
toArray: Cr,
|
|
1114
|
+
repeat: kr,
|
|
1115
|
+
isNegativeZero: Ar,
|
|
1116
1116
|
extend: wr
|
|
1117
1117
|
};
|
|
1118
1118
|
function nn(e, t) {
|
|
@@ -1131,8 +1131,8 @@ Ie.prototype.toString = function(t) {
|
|
|
1131
1131
|
};
|
|
1132
1132
|
var oe = Ie;
|
|
1133
1133
|
function Ve(e, t, n, i, r) {
|
|
1134
|
-
var o = "", a = "",
|
|
1135
|
-
return i - t >
|
|
1134
|
+
var o = "", a = "", l = Math.floor(r / 2) - 1;
|
|
1135
|
+
return i - t > l && (o = " ... ", t = i - l + o.length), n - i > l && (a = " ...", n = i + l - a.length), {
|
|
1136
1136
|
str: o + e.slice(t, n).replace(/\t/g, "→") + a,
|
|
1137
1137
|
pos: i - t + o.length
|
|
1138
1138
|
// relative position
|
|
@@ -1141,36 +1141,36 @@ function Ve(e, t, n, i, r) {
|
|
|
1141
1141
|
function Ye(e, t) {
|
|
1142
1142
|
return ee.repeat(" ", t - e.length) + e;
|
|
1143
1143
|
}
|
|
1144
|
-
function
|
|
1144
|
+
function _r(e, t) {
|
|
1145
1145
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1146
1146
|
t.maxLength || (t.maxLength = 79), typeof t.indent != "number" && (t.indent = 1), typeof t.linesBefore != "number" && (t.linesBefore = 3), typeof t.linesAfter != "number" && (t.linesAfter = 2);
|
|
1147
1147
|
for (var n = /\r?\n|\r|\0/g, i = [0], r = [], o, a = -1; o = n.exec(e.buffer); )
|
|
1148
1148
|
r.push(o.index), i.push(o.index + o[0].length), e.position <= o.index && a < 0 && (a = i.length - 2);
|
|
1149
1149
|
a < 0 && (a = i.length - 1);
|
|
1150
|
-
var
|
|
1151
|
-
for (
|
|
1150
|
+
var l = "", s, c, d = Math.min(e.line + t.linesAfter, r.length).toString().length, u = t.maxLength - (t.indent + d + 3);
|
|
1151
|
+
for (s = 1; s <= t.linesBefore && !(a - s < 0); s++)
|
|
1152
1152
|
c = Ve(
|
|
1153
1153
|
e.buffer,
|
|
1154
|
-
i[a -
|
|
1155
|
-
r[a -
|
|
1156
|
-
e.position - (i[a] - i[a -
|
|
1154
|
+
i[a - s],
|
|
1155
|
+
r[a - s],
|
|
1156
|
+
e.position - (i[a] - i[a - s]),
|
|
1157
1157
|
u
|
|
1158
|
-
),
|
|
1159
|
-
` +
|
|
1160
|
-
for (c = Ve(e.buffer, i[a], r[a], e.position, u),
|
|
1161
|
-
`,
|
|
1162
|
-
`,
|
|
1158
|
+
), l = ee.repeat(" ", t.indent) + Ye((e.line - s + 1).toString(), d) + " | " + c.str + `
|
|
1159
|
+
` + l;
|
|
1160
|
+
for (c = Ve(e.buffer, i[a], r[a], e.position, u), l += ee.repeat(" ", t.indent) + Ye((e.line + 1).toString(), d) + " | " + c.str + `
|
|
1161
|
+
`, l += ee.repeat("-", t.indent + d + 3 + c.pos) + `^
|
|
1162
|
+
`, s = 1; s <= t.linesAfter && !(a + s >= r.length); s++)
|
|
1163
1163
|
c = Ve(
|
|
1164
1164
|
e.buffer,
|
|
1165
|
-
i[a +
|
|
1166
|
-
r[a +
|
|
1167
|
-
e.position - (i[a] - i[a +
|
|
1165
|
+
i[a + s],
|
|
1166
|
+
r[a + s],
|
|
1167
|
+
e.position - (i[a] - i[a + s]),
|
|
1168
1168
|
u
|
|
1169
|
-
),
|
|
1169
|
+
), l += ee.repeat(" ", t.indent) + Ye((e.line + s + 1).toString(), d) + " | " + c.str + `
|
|
1170
1170
|
`;
|
|
1171
|
-
return
|
|
1171
|
+
return l.replace(/\n$/, "");
|
|
1172
1172
|
}
|
|
1173
|
-
var
|
|
1173
|
+
var Sr = _r, $r = [
|
|
1174
1174
|
"kind",
|
|
1175
1175
|
"multi",
|
|
1176
1176
|
"resolve",
|
|
@@ -1181,12 +1181,12 @@ var $r = Sr, Tr = [
|
|
|
1181
1181
|
"representName",
|
|
1182
1182
|
"defaultStyle",
|
|
1183
1183
|
"styleAliases"
|
|
1184
|
-
],
|
|
1184
|
+
], Tr = [
|
|
1185
1185
|
"scalar",
|
|
1186
1186
|
"sequence",
|
|
1187
1187
|
"mapping"
|
|
1188
1188
|
];
|
|
1189
|
-
function
|
|
1189
|
+
function Ir(e) {
|
|
1190
1190
|
var t = {};
|
|
1191
1191
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1192
1192
|
e[n].forEach(function(i) {
|
|
@@ -1194,18 +1194,18 @@ function Er(e) {
|
|
|
1194
1194
|
});
|
|
1195
1195
|
}), t;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function Er(e, t) {
|
|
1198
1198
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1199
|
-
if (
|
|
1199
|
+
if ($r.indexOf(n) === -1)
|
|
1200
1200
|
throw new oe('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1201
1201
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1202
1202
|
return !0;
|
|
1203
1203
|
}, this.construct = t.construct || function(n) {
|
|
1204
1204
|
return n;
|
|
1205
|
-
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases =
|
|
1205
|
+
}, this.instanceOf = t.instanceOf || null, this.predicate = t.predicate || null, this.represent = t.represent || null, this.representName = t.representName || null, this.defaultStyle = t.defaultStyle || null, this.multi = t.multi || !1, this.styleAliases = Ir(t.styleAliases || null), Tr.indexOf(this.kind) === -1)
|
|
1206
1206
|
throw new oe('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1207
1207
|
}
|
|
1208
|
-
var ne =
|
|
1208
|
+
var ne = Er;
|
|
1209
1209
|
function At(e, t) {
|
|
1210
1210
|
var n = [];
|
|
1211
1211
|
return e[t].forEach(function(i) {
|
|
@@ -1215,7 +1215,7 @@ function At(e, t) {
|
|
|
1215
1215
|
}), n[r] = i;
|
|
1216
1216
|
}), n;
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1218
|
+
function Fr() {
|
|
1219
1219
|
var e = {
|
|
1220
1220
|
scalar: {},
|
|
1221
1221
|
sequence: {},
|
|
@@ -1260,7 +1260,7 @@ ze.prototype.extend = function(t) {
|
|
|
1260
1260
|
throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1261
1261
|
});
|
|
1262
1262
|
var r = Object.create(ze.prototype);
|
|
1263
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = At(r, "implicit"), r.compiledExplicit = At(r, "explicit"), r.compiledTypeMap =
|
|
1263
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = At(r, "implicit"), r.compiledExplicit = At(r, "explicit"), r.compiledTypeMap = Fr(r.compiledImplicit, r.compiledExplicit), r;
|
|
1264
1264
|
};
|
|
1265
1265
|
var rn = ze, an = new ne("tag:yaml.org,2002:str", {
|
|
1266
1266
|
kind: "scalar",
|
|
@@ -1284,22 +1284,22 @@ var rn = ze, an = new ne("tag:yaml.org,2002:str", {
|
|
|
1284
1284
|
ln
|
|
1285
1285
|
]
|
|
1286
1286
|
});
|
|
1287
|
-
function
|
|
1287
|
+
function Or(e) {
|
|
1288
1288
|
if (e === null) return !0;
|
|
1289
1289
|
var t = e.length;
|
|
1290
1290
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1292
|
+
function Lr() {
|
|
1293
1293
|
return null;
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Br(e) {
|
|
1296
1296
|
return e === null;
|
|
1297
1297
|
}
|
|
1298
1298
|
var cn = new ne("tag:yaml.org,2002:null", {
|
|
1299
1299
|
kind: "scalar",
|
|
1300
|
-
resolve:
|
|
1301
|
-
construct:
|
|
1302
|
-
predicate:
|
|
1300
|
+
resolve: Or,
|
|
1301
|
+
construct: Lr,
|
|
1302
|
+
predicate: Br,
|
|
1303
1303
|
represent: {
|
|
1304
1304
|
canonical: function() {
|
|
1305
1305
|
return "~";
|
|
@@ -1319,22 +1319,22 @@ var cn = new ne("tag:yaml.org,2002:null", {
|
|
|
1319
1319
|
},
|
|
1320
1320
|
defaultStyle: "lowercase"
|
|
1321
1321
|
});
|
|
1322
|
-
function
|
|
1322
|
+
function Rr(e) {
|
|
1323
1323
|
if (e === null) return !1;
|
|
1324
1324
|
var t = e.length;
|
|
1325
1325
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1327
|
+
function Kr(e) {
|
|
1328
1328
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Nr(e) {
|
|
1331
1331
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1332
1332
|
}
|
|
1333
1333
|
var un = new ne("tag:yaml.org,2002:bool", {
|
|
1334
1334
|
kind: "scalar",
|
|
1335
|
-
resolve:
|
|
1336
|
-
construct:
|
|
1337
|
-
predicate:
|
|
1335
|
+
resolve: Rr,
|
|
1336
|
+
construct: Kr,
|
|
1337
|
+
predicate: Nr,
|
|
1338
1338
|
represent: {
|
|
1339
1339
|
lowercase: function(e) {
|
|
1340
1340
|
return e ? "true" : "false";
|
|
@@ -1348,16 +1348,16 @@ var un = new ne("tag:yaml.org,2002:bool", {
|
|
|
1348
1348
|
},
|
|
1349
1349
|
defaultStyle: "lowercase"
|
|
1350
1350
|
});
|
|
1351
|
-
function
|
|
1351
|
+
function Mr(e) {
|
|
1352
1352
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function jr(e) {
|
|
1355
1355
|
return 48 <= e && e <= 55;
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1357
|
+
function Dr(e) {
|
|
1358
1358
|
return 48 <= e && e <= 57;
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function Pr(e) {
|
|
1361
1361
|
if (e === null) return !1;
|
|
1362
1362
|
var t = e.length, n = 0, i = !1, r;
|
|
1363
1363
|
if (!t) return !1;
|
|
@@ -1374,7 +1374,7 @@ function Ur(e) {
|
|
|
1374
1374
|
if (r === "x") {
|
|
1375
1375
|
for (n++; n < t; n++)
|
|
1376
1376
|
if (r = e[n], r !== "_") {
|
|
1377
|
-
if (!
|
|
1377
|
+
if (!Mr(e.charCodeAt(n))) return !1;
|
|
1378
1378
|
i = !0;
|
|
1379
1379
|
}
|
|
1380
1380
|
return i && r !== "_";
|
|
@@ -1382,7 +1382,7 @@ function Ur(e) {
|
|
|
1382
1382
|
if (r === "o") {
|
|
1383
1383
|
for (n++; n < t; n++)
|
|
1384
1384
|
if (r = e[n], r !== "_") {
|
|
1385
|
-
if (!
|
|
1385
|
+
if (!jr(e.charCodeAt(n))) return !1;
|
|
1386
1386
|
i = !0;
|
|
1387
1387
|
}
|
|
1388
1388
|
return i && r !== "_";
|
|
@@ -1391,13 +1391,13 @@ function Ur(e) {
|
|
|
1391
1391
|
if (r === "_") return !1;
|
|
1392
1392
|
for (; n < t; n++)
|
|
1393
1393
|
if (r = e[n], r !== "_") {
|
|
1394
|
-
if (!
|
|
1394
|
+
if (!Dr(e.charCodeAt(n)))
|
|
1395
1395
|
return !1;
|
|
1396
1396
|
i = !0;
|
|
1397
1397
|
}
|
|
1398
1398
|
return !(!i || r === "_");
|
|
1399
1399
|
}
|
|
1400
|
-
function
|
|
1400
|
+
function Ur(e) {
|
|
1401
1401
|
var t = e, n = 1, i;
|
|
1402
1402
|
if (t.indexOf("_") !== -1 && (t = t.replace(/_/g, "")), i = t[0], (i === "-" || i === "+") && (i === "-" && (n = -1), t = t.slice(1), i = t[0]), t === "0") return 0;
|
|
1403
1403
|
if (i === "0") {
|
|
@@ -1407,14 +1407,14 @@ function qr(e) {
|
|
|
1407
1407
|
}
|
|
1408
1408
|
return n * parseInt(t, 10);
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function qr(e) {
|
|
1411
1411
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ee.isNegativeZero(e);
|
|
1412
1412
|
}
|
|
1413
1413
|
var dn = new ne("tag:yaml.org,2002:int", {
|
|
1414
1414
|
kind: "scalar",
|
|
1415
|
-
resolve:
|
|
1416
|
-
construct:
|
|
1417
|
-
predicate:
|
|
1415
|
+
resolve: Pr,
|
|
1416
|
+
construct: Ur,
|
|
1417
|
+
predicate: qr,
|
|
1418
1418
|
represent: {
|
|
1419
1419
|
binary: function(e) {
|
|
1420
1420
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1437,21 +1437,21 @@ var dn = new ne("tag:yaml.org,2002:int", {
|
|
|
1437
1437
|
decimal: [10, "dec"],
|
|
1438
1438
|
hexadecimal: [16, "hex"]
|
|
1439
1439
|
}
|
|
1440
|
-
}),
|
|
1440
|
+
}), Hr = new RegExp(
|
|
1441
1441
|
// 2.5e4, 2.5 and integers
|
|
1442
1442
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1443
1443
|
);
|
|
1444
|
-
function
|
|
1445
|
-
return !(e === null || !
|
|
1444
|
+
function Vr(e) {
|
|
1445
|
+
return !(e === null || !Hr.test(e) || // Quick hack to not allow integers end with `_`
|
|
1446
1446
|
// Probably should update regexp & check speed
|
|
1447
1447
|
e[e.length - 1] === "_");
|
|
1448
1448
|
}
|
|
1449
|
-
function
|
|
1449
|
+
function Yr(e) {
|
|
1450
1450
|
var t, n;
|
|
1451
1451
|
return t = e.replace(/_/g, "").toLowerCase(), n = t[0] === "-" ? -1 : 1, "+-".indexOf(t[0]) >= 0 && (t = t.slice(1)), t === ".inf" ? n === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY : t === ".nan" ? NaN : n * parseFloat(t, 10);
|
|
1452
1452
|
}
|
|
1453
|
-
var
|
|
1454
|
-
function
|
|
1453
|
+
var Wr = /^[-+]?[0-9]+e/;
|
|
1454
|
+
function Jr(e, t) {
|
|
1455
1455
|
var n;
|
|
1456
1456
|
if (isNaN(e))
|
|
1457
1457
|
switch (t) {
|
|
@@ -1482,17 +1482,17 @@ function Gr(e, t) {
|
|
|
1482
1482
|
}
|
|
1483
1483
|
else if (ee.isNegativeZero(e))
|
|
1484
1484
|
return "-0.0";
|
|
1485
|
-
return n = e.toString(10),
|
|
1485
|
+
return n = e.toString(10), Wr.test(n) ? n.replace("e", ".e") : n;
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function Gr(e) {
|
|
1488
1488
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ee.isNegativeZero(e));
|
|
1489
1489
|
}
|
|
1490
1490
|
var fn = new ne("tag:yaml.org,2002:float", {
|
|
1491
1491
|
kind: "scalar",
|
|
1492
|
-
resolve:
|
|
1493
|
-
construct:
|
|
1494
|
-
predicate:
|
|
1495
|
-
represent:
|
|
1492
|
+
resolve: Vr,
|
|
1493
|
+
construct: Yr,
|
|
1494
|
+
predicate: Gr,
|
|
1495
|
+
represent: Jr,
|
|
1496
1496
|
defaultStyle: "lowercase"
|
|
1497
1497
|
}), pn = sn.extend({
|
|
1498
1498
|
implicit: [
|
|
@@ -1506,40 +1506,40 @@ var fn = new ne("tag:yaml.org,2002:float", {
|
|
|
1506
1506
|
), gn = new RegExp(
|
|
1507
1507
|
"^([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]))?))?$"
|
|
1508
1508
|
);
|
|
1509
|
-
function
|
|
1509
|
+
function zr(e) {
|
|
1510
1510
|
return e === null ? !1 : hn.exec(e) !== null || gn.exec(e) !== null;
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1513
|
-
var t, n, i, r, o, a,
|
|
1512
|
+
function Qr(e) {
|
|
1513
|
+
var t, n, i, r, o, a, l, s = 0, c = null, d, u, h;
|
|
1514
1514
|
if (t = hn.exec(e), t === null && (t = gn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1515
1515
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
1516
1516
|
return new Date(Date.UTC(n, i, r));
|
|
1517
|
-
if (o = +t[4], a = +t[5],
|
|
1518
|
-
for (
|
|
1519
|
-
|
|
1520
|
-
|
|
1517
|
+
if (o = +t[4], a = +t[5], l = +t[6], t[7]) {
|
|
1518
|
+
for (s = t[7].slice(0, 3); s.length < 3; )
|
|
1519
|
+
s += "0";
|
|
1520
|
+
s = +s;
|
|
1521
1521
|
}
|
|
1522
|
-
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)),
|
|
1522
|
+
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), h = new Date(Date.UTC(n, i, r, o, a, l, s)), c && h.setTime(h.getTime() - c), h;
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function Zr(e) {
|
|
1525
1525
|
return e.toISOString();
|
|
1526
1526
|
}
|
|
1527
1527
|
var yn = new ne("tag:yaml.org,2002:timestamp", {
|
|
1528
1528
|
kind: "scalar",
|
|
1529
|
-
resolve:
|
|
1530
|
-
construct:
|
|
1529
|
+
resolve: zr,
|
|
1530
|
+
construct: Qr,
|
|
1531
1531
|
instanceOf: Date,
|
|
1532
|
-
represent:
|
|
1532
|
+
represent: Zr
|
|
1533
1533
|
});
|
|
1534
|
-
function
|
|
1534
|
+
function Xr(e) {
|
|
1535
1535
|
return e === "<<" || e === null;
|
|
1536
1536
|
}
|
|
1537
1537
|
var vn = new ne("tag:yaml.org,2002:merge", {
|
|
1538
1538
|
kind: "scalar",
|
|
1539
|
-
resolve:
|
|
1539
|
+
resolve: Xr
|
|
1540
1540
|
}), at = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1541
1541
|
\r`;
|
|
1542
|
-
function
|
|
1542
|
+
function ea(e) {
|
|
1543
1543
|
if (e === null) return !1;
|
|
1544
1544
|
var t, n, i = 0, r = e.length, o = at;
|
|
1545
1545
|
for (n = 0; n < r; n++)
|
|
@@ -1549,35 +1549,35 @@ function ta(e) {
|
|
|
1549
1549
|
}
|
|
1550
1550
|
return i % 8 === 0;
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1553
|
-
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = at, a = 0,
|
|
1552
|
+
function ta(e) {
|
|
1553
|
+
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = at, a = 0, l = [];
|
|
1554
1554
|
for (t = 0; t < r; t++)
|
|
1555
|
-
t % 4 === 0 && t && (
|
|
1556
|
-
return n = r % 4 * 6, n === 0 ? (
|
|
1555
|
+
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
1556
|
+
return n = r % 4 * 6, n === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : n === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : n === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1558
|
+
function na(e) {
|
|
1559
1559
|
var t = "", n = 0, i, r, o = e.length, a = at;
|
|
1560
1560
|
for (i = 0; i < o; i++)
|
|
1561
1561
|
i % 3 === 0 && i && (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]), n = (n << 8) + e[i];
|
|
1562
1562
|
return r = o % 3, r === 0 ? (t += a[n >> 18 & 63], t += a[n >> 12 & 63], t += a[n >> 6 & 63], t += a[n & 63]) : r === 2 ? (t += a[n >> 10 & 63], t += a[n >> 4 & 63], t += a[n << 2 & 63], t += a[64]) : r === 1 && (t += a[n >> 2 & 63], t += a[n << 4 & 63], t += a[64], t += a[64]), t;
|
|
1563
1563
|
}
|
|
1564
|
-
function
|
|
1564
|
+
function ia(e) {
|
|
1565
1565
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1566
1566
|
}
|
|
1567
1567
|
var bn = new ne("tag:yaml.org,2002:binary", {
|
|
1568
1568
|
kind: "scalar",
|
|
1569
|
-
resolve:
|
|
1570
|
-
construct:
|
|
1571
|
-
predicate:
|
|
1572
|
-
represent:
|
|
1573
|
-
}),
|
|
1574
|
-
function
|
|
1569
|
+
resolve: ea,
|
|
1570
|
+
construct: ta,
|
|
1571
|
+
predicate: ia,
|
|
1572
|
+
represent: na
|
|
1573
|
+
}), ra = Object.prototype.hasOwnProperty, aa = Object.prototype.toString;
|
|
1574
|
+
function oa(e) {
|
|
1575
1575
|
if (e === null) return !0;
|
|
1576
|
-
var t = [], n, i, r, o, a,
|
|
1577
|
-
for (n = 0, i =
|
|
1578
|
-
if (r =
|
|
1576
|
+
var t = [], n, i, r, o, a, l = e;
|
|
1577
|
+
for (n = 0, i = l.length; n < i; n += 1) {
|
|
1578
|
+
if (r = l[n], a = !1, aa.call(r) !== "[object Object]") return !1;
|
|
1579
1579
|
for (o in r)
|
|
1580
|
-
if (
|
|
1580
|
+
if (ra.call(r, o))
|
|
1581
1581
|
if (!a) a = !0;
|
|
1582
1582
|
else return !1;
|
|
1583
1583
|
if (!a) return !1;
|
|
@@ -1586,24 +1586,24 @@ function la(e) {
|
|
|
1586
1586
|
}
|
|
1587
1587
|
return !0;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function la(e) {
|
|
1590
1590
|
return e !== null ? e : [];
|
|
1591
1591
|
}
|
|
1592
1592
|
var xn = new ne("tag:yaml.org,2002:omap", {
|
|
1593
1593
|
kind: "sequence",
|
|
1594
|
-
resolve:
|
|
1595
|
-
construct:
|
|
1596
|
-
}),
|
|
1597
|
-
function
|
|
1594
|
+
resolve: oa,
|
|
1595
|
+
construct: la
|
|
1596
|
+
}), sa = Object.prototype.toString;
|
|
1597
|
+
function ca(e) {
|
|
1598
1598
|
if (e === null) return !0;
|
|
1599
1599
|
var t, n, i, r, o, a = e;
|
|
1600
1600
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1601
|
-
if (i = a[t],
|
|
1601
|
+
if (i = a[t], sa.call(i) !== "[object Object]" || (r = Object.keys(i), r.length !== 1)) return !1;
|
|
1602
1602
|
o[t] = [r[0], i[r[0]]];
|
|
1603
1603
|
}
|
|
1604
1604
|
return !0;
|
|
1605
1605
|
}
|
|
1606
|
-
function
|
|
1606
|
+
function ua(e) {
|
|
1607
1607
|
if (e === null) return [];
|
|
1608
1608
|
var t, n, i, r, o, a = e;
|
|
1609
1609
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
@@ -1612,24 +1612,24 @@ function da(e) {
|
|
|
1612
1612
|
}
|
|
1613
1613
|
var Cn = new ne("tag:yaml.org,2002:pairs", {
|
|
1614
1614
|
kind: "sequence",
|
|
1615
|
-
resolve:
|
|
1616
|
-
construct:
|
|
1617
|
-
}),
|
|
1618
|
-
function
|
|
1615
|
+
resolve: ca,
|
|
1616
|
+
construct: ua
|
|
1617
|
+
}), da = Object.prototype.hasOwnProperty;
|
|
1618
|
+
function fa(e) {
|
|
1619
1619
|
if (e === null) return !0;
|
|
1620
1620
|
var t, n = e;
|
|
1621
1621
|
for (t in n)
|
|
1622
|
-
if (
|
|
1622
|
+
if (da.call(n, t) && n[t] !== null)
|
|
1623
1623
|
return !1;
|
|
1624
1624
|
return !0;
|
|
1625
1625
|
}
|
|
1626
|
-
function
|
|
1626
|
+
function pa(e) {
|
|
1627
1627
|
return e !== null ? e : {};
|
|
1628
1628
|
}
|
|
1629
1629
|
var kn = new ne("tag:yaml.org,2002:set", {
|
|
1630
1630
|
kind: "mapping",
|
|
1631
|
-
resolve:
|
|
1632
|
-
construct:
|
|
1631
|
+
resolve: fa,
|
|
1632
|
+
construct: pa
|
|
1633
1633
|
}), ot = mn.extend({
|
|
1634
1634
|
implicit: [
|
|
1635
1635
|
yn,
|
|
@@ -1641,8 +1641,8 @@ var kn = new ne("tag:yaml.org,2002:set", {
|
|
|
1641
1641
|
Cn,
|
|
1642
1642
|
kn
|
|
1643
1643
|
]
|
|
1644
|
-
}), ye = Object.prototype.hasOwnProperty, Be = 1, An = 2,
|
|
1645
|
-
function
|
|
1644
|
+
}), ye = Object.prototype.hasOwnProperty, Be = 1, An = 2, wn = 3, Re = 4, We = 1, ma = 2, wt = 3, ha = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, ga = /[\x85\u2028\u2029]/, ya = /[,\[\]\{\}]/, _n = /^(?:!|!!|![a-z\-]+!)$/i, Sn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1645
|
+
function _t(e) {
|
|
1646
1646
|
return Object.prototype.toString.call(e);
|
|
1647
1647
|
}
|
|
1648
1648
|
function de(e) {
|
|
@@ -1654,24 +1654,24 @@ function ve(e) {
|
|
|
1654
1654
|
function le(e) {
|
|
1655
1655
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function we(e) {
|
|
1658
1658
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function va(e) {
|
|
1661
1661
|
var t;
|
|
1662
1662
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1663
1663
|
}
|
|
1664
|
-
function
|
|
1664
|
+
function ba(e) {
|
|
1665
1665
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1667
|
+
function xa(e) {
|
|
1668
1668
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1669
1669
|
}
|
|
1670
1670
|
function St(e) {
|
|
1671
1671
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1672
1672
|
` : e === 118 ? "\v" : e === 102 ? "\f" : e === 114 ? "\r" : e === 101 ? "\x1B" : e === 32 ? " " : e === 34 ? '"' : e === 47 ? "/" : e === 92 ? "\\" : e === 78 ? "
" : e === 95 ? " " : e === 76 ? "\u2028" : e === 80 ? "\u2029" : "";
|
|
1673
1673
|
}
|
|
1674
|
-
function
|
|
1674
|
+
function Ca(e) {
|
|
1675
1675
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1676
1676
|
(e - 65536 >> 10) + 55296,
|
|
1677
1677
|
(e - 65536 & 1023) + 56320
|
|
@@ -1680,7 +1680,7 @@ function ka(e) {
|
|
|
1680
1680
|
var $n = new Array(256), Tn = new Array(256);
|
|
1681
1681
|
for (var ke = 0; ke < 256; ke++)
|
|
1682
1682
|
$n[ke] = St(ke) ? 1 : 0, Tn[ke] = St(ke);
|
|
1683
|
-
function
|
|
1683
|
+
function ka(e, t) {
|
|
1684
1684
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || ot, 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 = [];
|
|
1685
1685
|
}
|
|
1686
1686
|
function In(e, t) {
|
|
@@ -1692,7 +1692,7 @@ function In(e, t) {
|
|
|
1692
1692
|
line: e.line,
|
|
1693
1693
|
column: e.position - e.lineStart
|
|
1694
1694
|
};
|
|
1695
|
-
return n.snippet =
|
|
1695
|
+
return n.snippet = Sr(n), new oe(t, n);
|
|
1696
1696
|
}
|
|
1697
1697
|
function I(e, t) {
|
|
1698
1698
|
throw In(e, t);
|
|
@@ -1707,7 +1707,7 @@ var $t = {
|
|
|
1707
1707
|
},
|
|
1708
1708
|
TAG: function(t, n, i) {
|
|
1709
1709
|
var r, o;
|
|
1710
|
-
i.length !== 2 && I(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1],
|
|
1710
|
+
i.length !== 2 && I(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], _n.test(r) || I(t, "ill-formed tag handle (first argument) of the TAG directive"), ye.call(t.tagMap, r) && I(t, 'there is a previously declared suffix for "' + r + '" tag handle'), Sn.test(o) || I(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1711
1711
|
try {
|
|
1712
1712
|
o = decodeURIComponent(o);
|
|
1713
1713
|
} catch {
|
|
@@ -1717,33 +1717,33 @@ var $t = {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
};
|
|
1719
1719
|
function ge(e, t, n, i) {
|
|
1720
|
-
var r, o, a,
|
|
1720
|
+
var r, o, a, l;
|
|
1721
1721
|
if (t < n) {
|
|
1722
|
-
if (
|
|
1723
|
-
for (r = 0, o =
|
|
1724
|
-
a =
|
|
1725
|
-
else
|
|
1726
|
-
e.result +=
|
|
1722
|
+
if (l = e.input.slice(t, n), i)
|
|
1723
|
+
for (r = 0, o = l.length; r < o; r += 1)
|
|
1724
|
+
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || I(e, "expected valid JSON character");
|
|
1725
|
+
else ha.test(l) && I(e, "the stream contains non-printable characters");
|
|
1726
|
+
e.result += l;
|
|
1727
1727
|
}
|
|
1728
1728
|
}
|
|
1729
1729
|
function Tt(e, t, n, i) {
|
|
1730
|
-
var r, o, a,
|
|
1731
|
-
for (ee.isObject(n) || I(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0,
|
|
1730
|
+
var r, o, a, l;
|
|
1731
|
+
for (ee.isObject(n) || I(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1732
1732
|
o = r[a], ye.call(t, o) || (t[o] = n[o], i[o] = !0);
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1734
|
+
function _e(e, t, n, i, r, o, a, l, s) {
|
|
1735
1735
|
var c, d;
|
|
1736
1736
|
if (Array.isArray(r))
|
|
1737
1737
|
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1738
|
-
Array.isArray(r[c]) && I(e, "nested arrays are not supported inside keys"), typeof r == "object" &&
|
|
1739
|
-
if (typeof r == "object" &&
|
|
1738
|
+
Array.isArray(r[c]) && I(e, "nested arrays are not supported inside keys"), typeof r == "object" && _t(r[c]) === "[object Object]" && (r[c] = "[object Object]");
|
|
1739
|
+
if (typeof r == "object" && _t(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1740
1740
|
if (Array.isArray(o))
|
|
1741
1741
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
1742
1742
|
Tt(e, t, o[c], n);
|
|
1743
1743
|
else
|
|
1744
1744
|
Tt(e, t, o, n);
|
|
1745
1745
|
else
|
|
1746
|
-
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart =
|
|
1746
|
+
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, I(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(t, r, {
|
|
1747
1747
|
configurable: !0,
|
|
1748
1748
|
enumerable: !0,
|
|
1749
1749
|
writable: !0,
|
|
@@ -1779,32 +1779,32 @@ function st(e, t) {
|
|
|
1779
1779
|
t === 1 ? e.result += " " : t > 1 && (e.result += ee.repeat(`
|
|
1780
1780
|
`, t - 1));
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1783
|
-
var i, r, o, a,
|
|
1784
|
-
if (
|
|
1782
|
+
function Aa(e, t, n) {
|
|
1783
|
+
var i, r, o, a, l, s, c, d, u = e.kind, h = e.result, p;
|
|
1784
|
+
if (p = e.input.charCodeAt(e.position), le(p) || we(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (r = e.input.charCodeAt(e.position + 1), le(r) || n && we(r)))
|
|
1785
1785
|
return !1;
|
|
1786
|
-
for (e.kind = "scalar", e.result = "", o = a = e.position,
|
|
1787
|
-
if (
|
|
1788
|
-
if (r = e.input.charCodeAt(e.position + 1), le(r) || n &&
|
|
1786
|
+
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; p !== 0; ) {
|
|
1787
|
+
if (p === 58) {
|
|
1788
|
+
if (r = e.input.charCodeAt(e.position + 1), le(r) || n && we(r))
|
|
1789
1789
|
break;
|
|
1790
|
-
} else if (
|
|
1790
|
+
} else if (p === 35) {
|
|
1791
1791
|
if (i = e.input.charCodeAt(e.position - 1), le(i))
|
|
1792
1792
|
break;
|
|
1793
1793
|
} else {
|
|
1794
|
-
if (e.position === e.lineStart && qe(e) || n &&
|
|
1794
|
+
if (e.position === e.lineStart && qe(e) || n && we(p))
|
|
1795
1795
|
break;
|
|
1796
|
-
if (de(
|
|
1797
|
-
if (
|
|
1798
|
-
|
|
1796
|
+
if (de(p))
|
|
1797
|
+
if (s = e.line, c = e.lineStart, d = e.lineIndent, Z(e, !1, -1), e.lineIndent >= t) {
|
|
1798
|
+
l = !0, p = e.input.charCodeAt(e.position);
|
|
1799
1799
|
continue;
|
|
1800
1800
|
} else {
|
|
1801
|
-
e.position = a, e.line =
|
|
1801
|
+
e.position = a, e.line = s, e.lineStart = c, e.lineIndent = d;
|
|
1802
1802
|
break;
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
|
|
1805
|
+
l && (ge(e, o, a, !1), st(e, e.line - s), o = a = e.position, l = !1), ve(p) || (a = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1806
1806
|
}
|
|
1807
|
-
return ge(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result =
|
|
1807
|
+
return ge(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = h, !1);
|
|
1808
1808
|
}
|
|
1809
1809
|
function wa(e, t) {
|
|
1810
1810
|
var n, i, r;
|
|
@@ -1819,46 +1819,46 @@ function wa(e, t) {
|
|
|
1819
1819
|
else de(n) ? (ge(e, i, r, !0), st(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && qe(e) ? I(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1820
1820
|
I(e, "unexpected end of the stream within a single quoted scalar");
|
|
1821
1821
|
}
|
|
1822
|
-
function
|
|
1823
|
-
var n, i, r, o, a,
|
|
1824
|
-
if (
|
|
1822
|
+
function _a(e, t) {
|
|
1823
|
+
var n, i, r, o, a, l;
|
|
1824
|
+
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1825
1825
|
return !1;
|
|
1826
|
-
for (e.kind = "scalar", e.result = "", e.position++, n = i = e.position; (
|
|
1827
|
-
if (
|
|
1826
|
+
for (e.kind = "scalar", e.result = "", e.position++, n = i = e.position; (l = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1827
|
+
if (l === 34)
|
|
1828
1828
|
return ge(e, n, e.position, !0), e.position++, !0;
|
|
1829
|
-
if (
|
|
1830
|
-
if (ge(e, n, e.position, !0),
|
|
1829
|
+
if (l === 92) {
|
|
1830
|
+
if (ge(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), de(l))
|
|
1831
1831
|
Z(e, !1, t);
|
|
1832
|
-
else if (
|
|
1833
|
-
e.result += Tn[
|
|
1834
|
-
else if ((a =
|
|
1832
|
+
else if (l < 256 && $n[l])
|
|
1833
|
+
e.result += Tn[l], e.position++;
|
|
1834
|
+
else if ((a = ba(l)) > 0) {
|
|
1835
1835
|
for (r = a, o = 0; r > 0; r--)
|
|
1836
|
-
|
|
1837
|
-
e.result +=
|
|
1836
|
+
l = e.input.charCodeAt(++e.position), (a = va(l)) >= 0 ? o = (o << 4) + a : I(e, "expected hexadecimal character");
|
|
1837
|
+
e.result += Ca(o), e.position++;
|
|
1838
1838
|
} else
|
|
1839
1839
|
I(e, "unknown escape sequence");
|
|
1840
1840
|
n = i = e.position;
|
|
1841
|
-
} else de(
|
|
1841
|
+
} else de(l) ? (ge(e, n, i, !0), st(e, Z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && qe(e) ? I(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1842
1842
|
}
|
|
1843
1843
|
I(e, "unexpected end of the stream within a double quoted scalar");
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1846
|
-
var n = !0, i, r, o, a = e.tag,
|
|
1847
|
-
if (
|
|
1848
|
-
d = 93,
|
|
1849
|
-
else if (
|
|
1850
|
-
d = 125,
|
|
1845
|
+
function Sa(e, t) {
|
|
1846
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, c, d, u, h, p, y = /* @__PURE__ */ Object.create(null), b, C, k, x;
|
|
1847
|
+
if (x = e.input.charCodeAt(e.position), x === 91)
|
|
1848
|
+
d = 93, p = !1, l = [];
|
|
1849
|
+
else if (x === 123)
|
|
1850
|
+
d = 125, p = !0, l = {};
|
|
1851
1851
|
else
|
|
1852
1852
|
return !1;
|
|
1853
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] =
|
|
1854
|
-
if (Z(e, !0, t),
|
|
1855
|
-
return e.position++, e.tag = a, e.anchor =
|
|
1856
|
-
n ?
|
|
1853
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), x = e.input.charCodeAt(++e.position); x !== 0; ) {
|
|
1854
|
+
if (Z(e, !0, t), x = e.input.charCodeAt(e.position), x === d)
|
|
1855
|
+
return e.position++, e.tag = a, e.anchor = s, e.kind = p ? "mapping" : "sequence", e.result = l, !0;
|
|
1856
|
+
n ? x === 44 && I(e, "expected the node content, but found ','") : I(e, "missed comma between flow collection entries"), C = b = k = null, u = h = !1, x === 63 && (c = e.input.charCodeAt(e.position + 1), le(c) && (u = h = !0, e.position++, Z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, $e(e, t, Be, !1, !0), C = e.tag, b = e.result, Z(e, !0, t), x = e.input.charCodeAt(e.position), (h || e.line === i) && x === 58 && (u = !0, x = e.input.charCodeAt(++e.position), Z(e, !0, t), $e(e, t, Be, !1, !0), k = e.result), p ? _e(e, l, y, C, b, k, i, r, o) : u ? l.push(_e(e, null, y, C, b, k, i, r, o)) : l.push(b), Z(e, !0, t), x = e.input.charCodeAt(e.position), x === 44 ? (n = !0, x = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1857
1857
|
}
|
|
1858
1858
|
I(e, "unexpected end of the stream within a flow collection");
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1861
|
-
var n, i, r = We, o = !1, a = !1,
|
|
1860
|
+
function $a(e, t) {
|
|
1861
|
+
var n, i, r = We, o = !1, a = !1, l = t, s = 0, c = !1, d, u;
|
|
1862
1862
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1863
1863
|
i = !1;
|
|
1864
1864
|
else if (u === 62)
|
|
@@ -1867,9 +1867,9 @@ function Ta(e, t) {
|
|
|
1867
1867
|
return !1;
|
|
1868
1868
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1869
1869
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1870
|
-
We === r ? r = u === 43 ?
|
|
1871
|
-
else if ((d =
|
|
1872
|
-
d === 0 ? I(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? I(e, "repeat of an indentation width identifier") : (
|
|
1870
|
+
We === r ? r = u === 43 ? wt : ma : I(e, "repeat of a chomping mode identifier");
|
|
1871
|
+
else if ((d = xa(u)) >= 0)
|
|
1872
|
+
d === 0 ? I(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? I(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1873
1873
|
else
|
|
1874
1874
|
break;
|
|
1875
1875
|
if (ve(u)) {
|
|
@@ -1882,57 +1882,57 @@ function Ta(e, t) {
|
|
|
1882
1882
|
while (!de(u) && u !== 0);
|
|
1883
1883
|
}
|
|
1884
1884
|
for (; u !== 0; ) {
|
|
1885
|
-
for (lt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!a || e.lineIndent <
|
|
1885
|
+
for (lt(e), e.lineIndent = 0, u = e.input.charCodeAt(e.position); (!a || e.lineIndent < l) && u === 32; )
|
|
1886
1886
|
e.lineIndent++, u = e.input.charCodeAt(++e.position);
|
|
1887
|
-
if (!a && e.lineIndent >
|
|
1888
|
-
|
|
1887
|
+
if (!a && e.lineIndent > l && (l = e.lineIndent), de(u)) {
|
|
1888
|
+
s++;
|
|
1889
1889
|
continue;
|
|
1890
1890
|
}
|
|
1891
|
-
if (e.lineIndent <
|
|
1892
|
-
r ===
|
|
1893
|
-
`, o ? 1 +
|
|
1891
|
+
if (e.lineIndent < l) {
|
|
1892
|
+
r === wt ? e.result += ee.repeat(`
|
|
1893
|
+
`, o ? 1 + s : s) : r === We && o && (e.result += `
|
|
1894
1894
|
`);
|
|
1895
1895
|
break;
|
|
1896
1896
|
}
|
|
1897
1897
|
for (i ? ve(u) ? (c = !0, e.result += ee.repeat(`
|
|
1898
|
-
`, o ? 1 +
|
|
1899
|
-
`,
|
|
1900
|
-
`,
|
|
1901
|
-
`, o ? 1 +
|
|
1898
|
+
`, o ? 1 + s : s)) : c ? (c = !1, e.result += ee.repeat(`
|
|
1899
|
+
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += ee.repeat(`
|
|
1900
|
+
`, s) : e.result += ee.repeat(`
|
|
1901
|
+
`, o ? 1 + s : s), o = !0, a = !0, s = 0, n = e.position; !de(u) && u !== 0; )
|
|
1902
1902
|
u = e.input.charCodeAt(++e.position);
|
|
1903
1903
|
ge(e, n, e.position, !1);
|
|
1904
1904
|
}
|
|
1905
1905
|
return !0;
|
|
1906
1906
|
}
|
|
1907
1907
|
function It(e, t) {
|
|
1908
|
-
var n, i = e.tag, r = e.anchor, o = [], a,
|
|
1908
|
+
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1909
1909
|
if (e.firstTabInLine !== -1) return !1;
|
|
1910
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o),
|
|
1911
|
-
if (
|
|
1912
|
-
o.push(null),
|
|
1910
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, I(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !le(a)))); ) {
|
|
1911
|
+
if (l = !0, e.position++, Z(e, !0, -1) && e.lineIndent <= t) {
|
|
1912
|
+
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1913
1913
|
continue;
|
|
1914
1914
|
}
|
|
1915
|
-
if (n = e.line, $e(e, t,
|
|
1915
|
+
if (n = e.line, $e(e, t, wn, !1, !0), o.push(e.result), Z(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1916
1916
|
I(e, "bad indentation of a sequence entry");
|
|
1917
1917
|
else if (e.lineIndent < t)
|
|
1918
1918
|
break;
|
|
1919
1919
|
}
|
|
1920
|
-
return
|
|
1920
|
+
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1921
1921
|
}
|
|
1922
|
-
function
|
|
1923
|
-
var i, r, o, a,
|
|
1922
|
+
function Ta(e, t, n) {
|
|
1923
|
+
var i, r, o, a, l, s, c = e.tag, d = e.anchor, u = {}, h = /* @__PURE__ */ Object.create(null), p = null, y = null, b = null, C = !1, k = !1, x;
|
|
1924
1924
|
if (e.firstTabInLine !== -1) return !1;
|
|
1925
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1926
|
-
if (!
|
|
1927
|
-
|
|
1925
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), x = e.input.charCodeAt(e.position); x !== 0; ) {
|
|
1926
|
+
if (!C && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, I(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (x === 63 || x === 58) && le(i))
|
|
1927
|
+
x === 63 ? (C && (_e(e, u, h, p, y, null, a, l, s), p = y = b = null), k = !0, C = !0, r = !0) : C ? (C = !1, r = !0) : I(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, x = i;
|
|
1928
1928
|
else {
|
|
1929
|
-
if (a = e.line,
|
|
1929
|
+
if (a = e.line, l = e.lineStart, s = e.position, !$e(e, n, An, !1, !0))
|
|
1930
1930
|
break;
|
|
1931
1931
|
if (e.line === o) {
|
|
1932
|
-
for (
|
|
1933
|
-
|
|
1934
|
-
if (
|
|
1935
|
-
|
|
1932
|
+
for (x = e.input.charCodeAt(e.position); ve(x); )
|
|
1933
|
+
x = e.input.charCodeAt(++e.position);
|
|
1934
|
+
if (x === 58)
|
|
1935
|
+
x = e.input.charCodeAt(++e.position), le(x) || I(e, "a whitespace character is expected after the key-value separator within a block mapping"), C && (_e(e, u, h, p, y, null, a, l, s), p = y = b = null), k = !0, C = !1, r = !1, p = e.tag, y = e.result;
|
|
1936
1936
|
else if (k)
|
|
1937
1937
|
I(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1938
1938
|
else
|
|
@@ -1942,14 +1942,14 @@ function Ia(e, t, n) {
|
|
|
1942
1942
|
else
|
|
1943
1943
|
return e.tag = c, e.anchor = d, !0;
|
|
1944
1944
|
}
|
|
1945
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1945
|
+
if ((e.line === o || e.lineIndent > t) && (C && (a = e.line, l = e.lineStart, s = e.position), $e(e, t, Re, !0, r) && (C ? y = e.result : b = e.result), C || (_e(e, u, h, p, y, b, a, l, s), p = y = b = null), Z(e, !0, -1), x = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && x !== 0)
|
|
1946
1946
|
I(e, "bad indentation of a mapping entry");
|
|
1947
1947
|
else if (e.lineIndent < t)
|
|
1948
1948
|
break;
|
|
1949
1949
|
}
|
|
1950
|
-
return
|
|
1950
|
+
return C && _e(e, u, h, p, y, null, a, l, s), k && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), k;
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function Ia(e) {
|
|
1953
1953
|
var t, n = !1, i = !1, r, o, a;
|
|
1954
1954
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1955
1955
|
if (e.tag !== null && I(e, "duplication of a tag property"), a = e.input.charCodeAt(++e.position), a === 60 ? (n = !0, a = e.input.charCodeAt(++e.position)) : a === 33 ? (i = !0, r = "!!", a = e.input.charCodeAt(++e.position)) : r = "!", t = e.position, n) {
|
|
@@ -1959,8 +1959,8 @@ function Ea(e) {
|
|
|
1959
1959
|
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : I(e, "unexpected end of the stream within a verbatim tag");
|
|
1960
1960
|
} else {
|
|
1961
1961
|
for (; a !== 0 && !le(a); )
|
|
1962
|
-
a === 33 && (i ? I(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1),
|
|
1963
|
-
o = e.input.slice(t, e.position),
|
|
1962
|
+
a === 33 && (i ? I(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), _n.test(r) || I(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1963
|
+
o = e.input.slice(t, e.position), ya.test(o) && I(e, "tag suffix cannot contain flow indicator characters");
|
|
1964
1964
|
}
|
|
1965
1965
|
o && !Sn.test(o) && I(e, "tag name cannot contain such characters: " + o);
|
|
1966
1966
|
try {
|
|
@@ -1970,47 +1970,47 @@ function Ea(e) {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
return n ? e.tag = o : ye.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : I(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1973
|
+
function Ea(e) {
|
|
1974
1974
|
var t, n;
|
|
1975
1975
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1976
|
-
for (e.anchor !== null && I(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !le(n) && !
|
|
1976
|
+
for (e.anchor !== null && I(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !le(n) && !we(n); )
|
|
1977
1977
|
n = e.input.charCodeAt(++e.position);
|
|
1978
1978
|
return e.position === t && I(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function Fa(e) {
|
|
1981
1981
|
var t, n, i;
|
|
1982
1982
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
1983
|
-
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !le(i) && !
|
|
1983
|
+
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !le(i) && !we(i); )
|
|
1984
1984
|
i = e.input.charCodeAt(++e.position);
|
|
1985
1985
|
return e.position === t && I(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || I(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], Z(e, !0, -1), !0;
|
|
1986
1986
|
}
|
|
1987
1987
|
function $e(e, t, n, i, r) {
|
|
1988
|
-
var o, a,
|
|
1989
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a =
|
|
1990
|
-
for (;
|
|
1991
|
-
Z(e, !0, -1) ? (c = !0,
|
|
1992
|
-
if (
|
|
1988
|
+
var o, a, l, s = 1, c = !1, d = !1, u, h, p, y, b, C;
|
|
1989
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Re === n || wn === n, i && Z(e, !0, -1) && (c = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1990
|
+
for (; Ia(e) || Ea(e); )
|
|
1991
|
+
Z(e, !0, -1) ? (c = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1992
|
+
if (l && (l = c || r), (s === 1 || Re === n) && (Be === n || An === n ? b = t : b = t + 1, C = e.position - e.lineStart, s === 1 ? l && (It(e, C) || Ta(e, C, b)) || Sa(e, b) ? d = !0 : (a && $a(e, b) || wa(e, b) || _a(e, b) ? d = !0 : Fa(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && I(e, "alias node should not have any properties")) : Aa(e, b, Be === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && It(e, C))), e.tag === null)
|
|
1993
1993
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1994
1994
|
else if (e.tag === "?") {
|
|
1995
|
-
for (e.result !== null && e.kind !== "scalar" && I(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0,
|
|
1996
|
-
if (
|
|
1997
|
-
e.result =
|
|
1995
|
+
for (e.result !== null && e.kind !== "scalar" && I(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, h = e.implicitTypes.length; u < h; u += 1)
|
|
1996
|
+
if (y = e.implicitTypes[u], y.resolve(e.result)) {
|
|
1997
|
+
e.result = y.construct(e.result), e.tag = y.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1998
1998
|
break;
|
|
1999
1999
|
}
|
|
2000
2000
|
} else if (e.tag !== "!") {
|
|
2001
2001
|
if (ye.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2002
|
-
|
|
2002
|
+
y = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2003
2003
|
else
|
|
2004
|
-
for (
|
|
2005
|
-
if (e.tag.slice(0,
|
|
2006
|
-
|
|
2004
|
+
for (y = null, p = e.typeMap.multi[e.kind || "fallback"], u = 0, h = p.length; u < h; u += 1)
|
|
2005
|
+
if (e.tag.slice(0, p[u].tag.length) === p[u].tag) {
|
|
2006
|
+
y = p[u];
|
|
2007
2007
|
break;
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2009
|
+
y || I(e, "unknown tag !<" + e.tag + ">"), e.result !== null && y.kind !== e.kind && I(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + y.kind + '", not "' + e.kind + '"'), y.resolve(e.result, e.tag) ? (e.result = y.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : I(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2010
2010
|
}
|
|
2011
2011
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function Oa(e) {
|
|
2014
2014
|
var t = e.position, n, i, r, o = !1, a;
|
|
2015
2015
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (a = e.input.charCodeAt(e.position)) !== 0 && (Z(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
2016
2016
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !le(a); )
|
|
@@ -2031,7 +2031,7 @@ function La(e) {
|
|
|
2031
2031
|
}
|
|
2032
2032
|
a !== 0 && lt(e), ye.call($t, i) ? $t[i](e, i, r) : Ke(e, 'unknown document directive "' + i + '"');
|
|
2033
2033
|
}
|
|
2034
|
-
if (Z(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, Z(e, !0, -1)) : o && I(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, Re, !1, !0), Z(e, !0, -1), e.checkLineBreaks &&
|
|
2034
|
+
if (Z(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, Z(e, !0, -1)) : o && I(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, Re, !1, !0), Z(e, !0, -1), e.checkLineBreaks && ga.test(e.input.slice(t, e.position)) && Ke(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && qe(e)) {
|
|
2035
2035
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2036
2036
|
return;
|
|
2037
2037
|
}
|
|
@@ -2043,14 +2043,14 @@ function La(e) {
|
|
|
2043
2043
|
function En(e, t) {
|
|
2044
2044
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2045
2045
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2046
|
-
var n = new
|
|
2046
|
+
var n = new ka(e, t), i = e.indexOf("\0");
|
|
2047
2047
|
for (i !== -1 && (n.position = i, I(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2048
2048
|
n.lineIndent += 1, n.position += 1;
|
|
2049
2049
|
for (; n.position < n.length - 1; )
|
|
2050
|
-
|
|
2050
|
+
Oa(n);
|
|
2051
2051
|
return n.documents;
|
|
2052
2052
|
}
|
|
2053
|
-
function
|
|
2053
|
+
function La(e, t, n) {
|
|
2054
2054
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2055
2055
|
var i = En(e, n);
|
|
2056
2056
|
if (typeof t != "function")
|
|
@@ -2058,7 +2058,7 @@ function Ba(e, t, n) {
|
|
|
2058
2058
|
for (var r = 0, o = i.length; r < o; r += 1)
|
|
2059
2059
|
t(i[r]);
|
|
2060
2060
|
}
|
|
2061
|
-
function
|
|
2061
|
+
function Ba(e, t) {
|
|
2062
2062
|
var n = En(e, t);
|
|
2063
2063
|
if (n.length !== 0) {
|
|
2064
2064
|
if (n.length === 1)
|
|
@@ -2066,10 +2066,10 @@ function Ra(e, t) {
|
|
|
2066
2066
|
throw new oe("expected a single document in the stream, but found more");
|
|
2067
2067
|
}
|
|
2068
2068
|
}
|
|
2069
|
-
var
|
|
2070
|
-
loadAll:
|
|
2071
|
-
load:
|
|
2072
|
-
}, On = Object.prototype.toString, Ln = Object.prototype.hasOwnProperty, ct = 65279,
|
|
2069
|
+
var Ra = La, Ka = Ba, Fn = {
|
|
2070
|
+
loadAll: Ra,
|
|
2071
|
+
load: Ka
|
|
2072
|
+
}, On = Object.prototype.toString, Ln = Object.prototype.hasOwnProperty, ct = 65279, Na = 9, Ee = 10, Ma = 13, ja = 32, Da = 33, Pa = 34, Qe = 35, Ua = 37, qa = 38, Ha = 39, Va = 42, Bn = 44, Ya = 45, Ne = 58, Wa = 61, Ja = 62, Ga = 63, za = 64, Rn = 91, Kn = 93, Qa = 96, Nn = 123, Za = 124, Mn = 125, ie = {};
|
|
2073
2073
|
ie[0] = "\\0";
|
|
2074
2074
|
ie[7] = "\\a";
|
|
2075
2075
|
ie[8] = "\\b";
|
|
@@ -2085,7 +2085,7 @@ ie[133] = "\\N";
|
|
|
2085
2085
|
ie[160] = "\\_";
|
|
2086
2086
|
ie[8232] = "\\L";
|
|
2087
2087
|
ie[8233] = "\\P";
|
|
2088
|
-
var
|
|
2088
|
+
var Xa = [
|
|
2089
2089
|
"y",
|
|
2090
2090
|
"Y",
|
|
2091
2091
|
"yes",
|
|
@@ -2102,15 +2102,15 @@ var eo = [
|
|
|
2102
2102
|
"off",
|
|
2103
2103
|
"Off",
|
|
2104
2104
|
"OFF"
|
|
2105
|
-
],
|
|
2106
|
-
function
|
|
2107
|
-
var n, i, r, o, a,
|
|
2105
|
+
], eo = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2106
|
+
function to(e, t) {
|
|
2107
|
+
var n, i, r, o, a, l, s;
|
|
2108
2108
|
if (t === null) return {};
|
|
2109
2109
|
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
2110
|
-
a = i[r],
|
|
2110
|
+
a = i[r], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s && Ln.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[a] = l;
|
|
2111
2111
|
return n;
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function no(e) {
|
|
2114
2114
|
var t, n, i;
|
|
2115
2115
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2116
2116
|
n = "x", i = 2;
|
|
@@ -2122,14 +2122,14 @@ function io(e) {
|
|
|
2122
2122
|
throw new oe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2123
2123
|
return "\\" + n + ee.repeat("0", i - t.length) + t;
|
|
2124
2124
|
}
|
|
2125
|
-
var
|
|
2126
|
-
function
|
|
2127
|
-
this.schema = e.schema || ot, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ee.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
2125
|
+
var io = 1, Fe = 2;
|
|
2126
|
+
function ro(e) {
|
|
2127
|
+
this.schema = e.schema || ot, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = ee.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = to(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 === '"' ? Fe : io, 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;
|
|
2128
2128
|
}
|
|
2129
2129
|
function Et(e, t) {
|
|
2130
|
-
for (var n = ee.repeat(" ", t), i = 0, r = -1, o = "", a,
|
|
2130
|
+
for (var n = ee.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
2131
2131
|
r = e.indexOf(`
|
|
2132
|
-
`, i), r === -1 ? (a = e.slice(i), i =
|
|
2132
|
+
`, i), r === -1 ? (a = e.slice(i), i = l) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
2133
2133
|
` && (o += n), o += a;
|
|
2134
2134
|
return o;
|
|
2135
2135
|
}
|
|
@@ -2137,7 +2137,7 @@ function Ze(e, t) {
|
|
|
2137
2137
|
return `
|
|
2138
2138
|
` + ee.repeat(" ", e.indent * t);
|
|
2139
2139
|
}
|
|
2140
|
-
function
|
|
2140
|
+
function ao(e, t) {
|
|
2141
2141
|
var n, i, r;
|
|
2142
2142
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
2143
2143
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
@@ -2145,13 +2145,13 @@ function oo(e, t) {
|
|
|
2145
2145
|
return !1;
|
|
2146
2146
|
}
|
|
2147
2147
|
function Me(e) {
|
|
2148
|
-
return e ===
|
|
2148
|
+
return e === ja || e === Na;
|
|
2149
2149
|
}
|
|
2150
2150
|
function Oe(e) {
|
|
2151
2151
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ct || 65536 <= e && e <= 1114111;
|
|
2152
2152
|
}
|
|
2153
2153
|
function Ft(e) {
|
|
2154
|
-
return Oe(e) && e !== ct && e !==
|
|
2154
|
+
return Oe(e) && e !== ct && e !== Ma && e !== Ee;
|
|
2155
2155
|
}
|
|
2156
2156
|
function Ot(e, t, n) {
|
|
2157
2157
|
var i = Ft(e), r = i && !Me(e);
|
|
@@ -2163,10 +2163,10 @@ function Ot(e, t, n) {
|
|
|
2163
2163
|
) : i && e !== Bn && e !== Rn && e !== Kn && e !== Nn && e !== Mn) && e !== Qe && !(t === Ne && !r) || Ft(t) && !Me(t) && e === Qe || t === Ne && r
|
|
2164
2164
|
);
|
|
2165
2165
|
}
|
|
2166
|
-
function
|
|
2167
|
-
return Oe(e) && e !== ct && !Me(e) && e !==
|
|
2166
|
+
function oo(e) {
|
|
2167
|
+
return Oe(e) && e !== ct && !Me(e) && e !== Ya && e !== Ga && e !== Ne && e !== Bn && e !== Rn && e !== Kn && e !== Nn && e !== Mn && e !== Qe && e !== qa && e !== Va && e !== Da && e !== Za && e !== Wa && e !== Ja && e !== Ha && e !== Pa && e !== Ua && e !== za && e !== Qa;
|
|
2168
2168
|
}
|
|
2169
|
-
function
|
|
2169
|
+
function lo(e) {
|
|
2170
2170
|
return !Me(e) && e !== Ne;
|
|
2171
2171
|
}
|
|
2172
2172
|
function Te(e, t) {
|
|
@@ -2178,43 +2178,43 @@ function jn(e) {
|
|
|
2178
2178
|
return t.test(e);
|
|
2179
2179
|
}
|
|
2180
2180
|
var Dn = 1, Xe = 2, Pn = 3, Un = 4, Ae = 5;
|
|
2181
|
-
function
|
|
2182
|
-
var
|
|
2181
|
+
function so(e, t, n, i, r, o, a, l) {
|
|
2182
|
+
var s, c = 0, d = null, u = !1, h = !1, p = i !== -1, y = -1, b = oo(Te(e, 0)) && lo(Te(e, e.length - 1));
|
|
2183
2183
|
if (t || a)
|
|
2184
|
-
for (
|
|
2185
|
-
if (c = Te(e,
|
|
2184
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2185
|
+
if (c = Te(e, s), !Oe(c))
|
|
2186
2186
|
return Ae;
|
|
2187
|
-
|
|
2187
|
+
b = b && Ot(c, d, l), d = c;
|
|
2188
2188
|
}
|
|
2189
2189
|
else {
|
|
2190
|
-
for (
|
|
2191
|
-
if (c = Te(e,
|
|
2192
|
-
u = !0,
|
|
2193
|
-
|
|
2190
|
+
for (s = 0; s < e.length; c >= 65536 ? s += 2 : s++) {
|
|
2191
|
+
if (c = Te(e, s), c === Ee)
|
|
2192
|
+
u = !0, p && (h = h || // Foldable line = too long, and not more-indented.
|
|
2193
|
+
s - y - 1 > i && e[y + 1] !== " ", y = s);
|
|
2194
2194
|
else if (!Oe(c))
|
|
2195
2195
|
return Ae;
|
|
2196
|
-
|
|
2196
|
+
b = b && Ot(c, d, l), d = c;
|
|
2197
2197
|
}
|
|
2198
|
-
|
|
2198
|
+
h = h || p && s - y - 1 > i && e[y + 1] !== " ";
|
|
2199
2199
|
}
|
|
2200
|
-
return !u && !
|
|
2200
|
+
return !u && !h ? b && !a && !r(e) ? Dn : o === Fe ? Ae : Xe : n > 9 && jn(e) ? Ae : a ? o === Fe ? Ae : Xe : h ? Un : Pn;
|
|
2201
2201
|
}
|
|
2202
|
-
function
|
|
2202
|
+
function co(e, t, n, i, r) {
|
|
2203
2203
|
e.dump = function() {
|
|
2204
2204
|
if (t.length === 0)
|
|
2205
2205
|
return e.quotingType === Fe ? '""' : "''";
|
|
2206
|
-
if (!e.noCompatMode && (
|
|
2206
|
+
if (!e.noCompatMode && (Xa.indexOf(t) !== -1 || eo.test(t)))
|
|
2207
2207
|
return e.quotingType === Fe ? '"' + t + '"' : "'" + t + "'";
|
|
2208
|
-
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o),
|
|
2209
|
-
function
|
|
2210
|
-
return
|
|
2208
|
+
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2209
|
+
function s(c) {
|
|
2210
|
+
return ao(e, c);
|
|
2211
2211
|
}
|
|
2212
|
-
switch (
|
|
2212
|
+
switch (so(
|
|
2213
2213
|
t,
|
|
2214
|
-
|
|
2214
|
+
l,
|
|
2215
2215
|
e.indent,
|
|
2216
2216
|
a,
|
|
2217
|
-
|
|
2217
|
+
s,
|
|
2218
2218
|
e.quotingType,
|
|
2219
2219
|
e.forceQuotes && !i,
|
|
2220
2220
|
r
|
|
@@ -2226,9 +2226,9 @@ function uo(e, t, n, i, r) {
|
|
|
2226
2226
|
case Pn:
|
|
2227
2227
|
return "|" + Lt(t, e.indent) + Bt(Et(t, o));
|
|
2228
2228
|
case Un:
|
|
2229
|
-
return ">" + Lt(t, e.indent) + Bt(Et(
|
|
2229
|
+
return ">" + Lt(t, e.indent) + Bt(Et(uo(t, a), o));
|
|
2230
2230
|
case Ae:
|
|
2231
|
-
return '"' +
|
|
2231
|
+
return '"' + fo(t) + '"';
|
|
2232
2232
|
default:
|
|
2233
2233
|
throw new oe("impossible error: invalid scalar style");
|
|
2234
2234
|
}
|
|
@@ -2246,74 +2246,74 @@ function Bt(e) {
|
|
|
2246
2246
|
return e[e.length - 1] === `
|
|
2247
2247
|
` ? e.slice(0, -1) : e;
|
|
2248
2248
|
}
|
|
2249
|
-
function
|
|
2249
|
+
function uo(e, t) {
|
|
2250
2250
|
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
2251
2251
|
var c = e.indexOf(`
|
|
2252
2252
|
`);
|
|
2253
2253
|
return c = c !== -1 ? c : e.length, n.lastIndex = c, Rt(e.slice(0, c), t);
|
|
2254
2254
|
}(), r = e[0] === `
|
|
2255
2255
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2256
|
-
var
|
|
2257
|
-
o =
|
|
2258
|
-
` : "") + Rt(
|
|
2256
|
+
var l = a[1], s = a[2];
|
|
2257
|
+
o = s[0] === " ", i += l + (!r && !o && s !== "" ? `
|
|
2258
|
+
` : "") + Rt(s, t), r = o;
|
|
2259
2259
|
}
|
|
2260
2260
|
return i;
|
|
2261
2261
|
}
|
|
2262
2262
|
function Rt(e, t) {
|
|
2263
2263
|
if (e === "" || e[0] === " ") return e;
|
|
2264
|
-
for (var n = / [^ ]/g, i, r = 0, o, a = 0,
|
|
2265
|
-
|
|
2266
|
-
` + e.slice(r, o), r = o + 1), a =
|
|
2267
|
-
return
|
|
2268
|
-
`, e.length - r > t && a > r ?
|
|
2269
|
-
` + e.slice(a + 1) :
|
|
2270
|
-
}
|
|
2271
|
-
function
|
|
2264
|
+
for (var n = / [^ ]/g, i, r = 0, o, a = 0, l = 0, s = ""; i = n.exec(e); )
|
|
2265
|
+
l = i.index, l - r > t && (o = a > r ? a : l, s += `
|
|
2266
|
+
` + e.slice(r, o), r = o + 1), a = l;
|
|
2267
|
+
return s += `
|
|
2268
|
+
`, e.length - r > t && a > r ? s += e.slice(r, a) + `
|
|
2269
|
+
` + e.slice(a + 1) : s += e.slice(r), s.slice(1);
|
|
2270
|
+
}
|
|
2271
|
+
function fo(e) {
|
|
2272
2272
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
2273
|
-
n = Te(e, r), i = ie[n], !i && Oe(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i ||
|
|
2273
|
+
n = Te(e, r), i = ie[n], !i && Oe(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || no(n);
|
|
2274
2274
|
return t;
|
|
2275
2275
|
}
|
|
2276
|
-
function
|
|
2277
|
-
var i = "", r = e.tag, o, a,
|
|
2276
|
+
function po(e, t, n) {
|
|
2277
|
+
var i = "", r = e.tag, o, a, l;
|
|
2278
2278
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2279
|
-
|
|
2279
|
+
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (pe(e, t, l, !1, !1) || typeof l > "u" && pe(e, t, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
2280
2280
|
e.tag = r, e.dump = "[" + i + "]";
|
|
2281
2281
|
}
|
|
2282
2282
|
function Kt(e, t, n, i) {
|
|
2283
|
-
var r = "", o = e.tag, a,
|
|
2284
|
-
for (a = 0,
|
|
2285
|
-
|
|
2283
|
+
var r = "", o = e.tag, a, l, s;
|
|
2284
|
+
for (a = 0, l = n.length; a < l; a += 1)
|
|
2285
|
+
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (pe(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && pe(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += Ze(e, t)), e.dump && Ee === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2286
2286
|
e.tag = o, e.dump = r || "[]";
|
|
2287
2287
|
}
|
|
2288
|
-
function
|
|
2289
|
-
var i = "", r = e.tag, o = Object.keys(n), a,
|
|
2290
|
-
for (a = 0,
|
|
2291
|
-
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'),
|
|
2288
|
+
function mo(e, t, n) {
|
|
2289
|
+
var i = "", r = e.tag, o = Object.keys(n), a, l, s, c, d;
|
|
2290
|
+
for (a = 0, l = o.length; a < l; a += 1)
|
|
2291
|
+
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[a], c = n[s], e.replacer && (c = e.replacer.call(n, s, c)), pe(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), pe(e, t, c, !1, !1) && (d += e.dump, i += d));
|
|
2292
2292
|
e.tag = r, e.dump = "{" + i + "}";
|
|
2293
2293
|
}
|
|
2294
|
-
function
|
|
2295
|
-
var r = "", o = e.tag, a = Object.keys(n),
|
|
2294
|
+
function ho(e, t, n, i) {
|
|
2295
|
+
var r = "", o = e.tag, a = Object.keys(n), l, s, c, d, u, h;
|
|
2296
2296
|
if (e.sortKeys === !0)
|
|
2297
2297
|
a.sort();
|
|
2298
2298
|
else if (typeof e.sortKeys == "function")
|
|
2299
2299
|
a.sort(e.sortKeys);
|
|
2300
2300
|
else if (e.sortKeys)
|
|
2301
2301
|
throw new oe("sortKeys must be a boolean or a function");
|
|
2302
|
-
for (
|
|
2303
|
-
|
|
2302
|
+
for (l = 0, s = a.length; l < s; l += 1)
|
|
2303
|
+
h = "", (!i || r !== "") && (h += Ze(e, t)), c = a[l], d = n[c], e.replacer && (d = e.replacer.call(n, c, d)), pe(e, t + 1, c, !0, !0, !0) && (u = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, u && (e.dump && Ee === e.dump.charCodeAt(0) ? h += "?" : h += "? "), h += e.dump, u && (h += Ze(e, t)), pe(e, t + 1, d, !0, u) && (e.dump && Ee === e.dump.charCodeAt(0) ? h += ":" : h += ": ", h += e.dump, r += h));
|
|
2304
2304
|
e.tag = o, e.dump = r || "{}";
|
|
2305
2305
|
}
|
|
2306
2306
|
function Nt(e, t, n) {
|
|
2307
|
-
var i, r, o, a,
|
|
2307
|
+
var i, r, o, a, l, s;
|
|
2308
2308
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
2309
|
-
if (
|
|
2310
|
-
if (n ?
|
|
2311
|
-
if (
|
|
2312
|
-
i =
|
|
2313
|
-
else if (Ln.call(
|
|
2314
|
-
i =
|
|
2309
|
+
if (l = r[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
2310
|
+
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
2311
|
+
if (s = e.styleMap[l.tag] || l.defaultStyle, On.call(l.represent) === "[object Function]")
|
|
2312
|
+
i = l.represent(t, s);
|
|
2313
|
+
else if (Ln.call(l.represent, s))
|
|
2314
|
+
i = l.represent[s](t, s);
|
|
2315
2315
|
else
|
|
2316
|
-
throw new oe("!<" +
|
|
2316
|
+
throw new oe("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
2317
2317
|
e.dump = i;
|
|
2318
2318
|
}
|
|
2319
2319
|
return !0;
|
|
@@ -2322,23 +2322,23 @@ function Nt(e, t, n) {
|
|
|
2322
2322
|
}
|
|
2323
2323
|
function pe(e, t, n, i, r, o, a) {
|
|
2324
2324
|
e.tag = null, e.dump = n, Nt(e, n, !1) || Nt(e, n, !0);
|
|
2325
|
-
var
|
|
2325
|
+
var l = On.call(e.dump), s = i, c;
|
|
2326
2326
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2327
|
-
var d =
|
|
2328
|
-
if (d && (u = e.duplicates.indexOf(n),
|
|
2327
|
+
var d = l === "[object Object]" || l === "[object Array]", u, h;
|
|
2328
|
+
if (d && (u = e.duplicates.indexOf(n), h = u !== -1), (e.tag !== null && e.tag !== "?" || h || e.indent !== 2 && t > 0) && (r = !1), h && e.usedDuplicates[u])
|
|
2329
2329
|
e.dump = "*ref_" + u;
|
|
2330
2330
|
else {
|
|
2331
|
-
if (d &&
|
|
2332
|
-
i && Object.keys(e.dump).length !== 0 ? (
|
|
2333
|
-
else if (
|
|
2334
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Kt(e, t - 1, e.dump, r) : Kt(e, t, e.dump, r),
|
|
2335
|
-
else if (
|
|
2336
|
-
e.tag !== "?" &&
|
|
2331
|
+
if (d && h && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), l === "[object Object]")
|
|
2332
|
+
i && Object.keys(e.dump).length !== 0 ? (ho(e, t, e.dump, r), h && (e.dump = "&ref_" + u + e.dump)) : (mo(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2333
|
+
else if (l === "[object Array]")
|
|
2334
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Kt(e, t - 1, e.dump, r) : Kt(e, t, e.dump, r), h && (e.dump = "&ref_" + u + e.dump)) : (po(e, t, e.dump), h && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2335
|
+
else if (l === "[object String]")
|
|
2336
|
+
e.tag !== "?" && co(e, e.dump, t, o, s);
|
|
2337
2337
|
else {
|
|
2338
|
-
if (
|
|
2338
|
+
if (l === "[object Undefined]")
|
|
2339
2339
|
return !1;
|
|
2340
2340
|
if (e.skipInvalid) return !1;
|
|
2341
|
-
throw new oe("unacceptable kind of an object to dump " +
|
|
2341
|
+
throw new oe("unacceptable kind of an object to dump " + l);
|
|
2342
2342
|
}
|
|
2343
2343
|
e.tag !== null && e.tag !== "?" && (c = encodeURI(
|
|
2344
2344
|
e.tag[0] === "!" ? e.tag.slice(1) : e.tag
|
|
@@ -2346,7 +2346,7 @@ function pe(e, t, n, i, r, o, a) {
|
|
|
2346
2346
|
}
|
|
2347
2347
|
return !0;
|
|
2348
2348
|
}
|
|
2349
|
-
function
|
|
2349
|
+
function go(e, t) {
|
|
2350
2350
|
var n = [], i = [], r, o;
|
|
2351
2351
|
for (et(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
2352
2352
|
t.duplicates.push(n[i[r]]);
|
|
@@ -2364,23 +2364,23 @@ function et(e, t, n) {
|
|
|
2364
2364
|
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
2365
2365
|
et(e[i[r]], t, n);
|
|
2366
2366
|
}
|
|
2367
|
-
function
|
|
2367
|
+
function yo(e, t) {
|
|
2368
2368
|
t = t || {};
|
|
2369
|
-
var n = new
|
|
2370
|
-
n.noRefs ||
|
|
2369
|
+
var n = new ro(t);
|
|
2370
|
+
n.noRefs || go(e, n);
|
|
2371
2371
|
var i = e;
|
|
2372
2372
|
return n.replacer && (i = n.replacer.call({ "": i }, "", i)), pe(n, 0, i, !0, !0) ? n.dump + `
|
|
2373
2373
|
` : "";
|
|
2374
2374
|
}
|
|
2375
|
-
var
|
|
2376
|
-
dump:
|
|
2375
|
+
var vo = yo, bo = {
|
|
2376
|
+
dump: vo
|
|
2377
2377
|
};
|
|
2378
2378
|
function ut(e, t) {
|
|
2379
2379
|
return function() {
|
|
2380
2380
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2381
2381
|
};
|
|
2382
2382
|
}
|
|
2383
|
-
var
|
|
2383
|
+
var xo = ne, Co = rn, ko = sn, Ao = pn, wo = mn, _o = ot, So = Fn.load, $o = Fn.loadAll, To = bo.dump, Io = oe, Eo = {
|
|
2384
2384
|
binary: bn,
|
|
2385
2385
|
float: fn,
|
|
2386
2386
|
map: ln,
|
|
@@ -2394,23 +2394,23 @@ var Co = ne, ko = rn, Ao = sn, _o = pn, wo = mn, So = ot, $o = Fn.load, To = Fn.
|
|
|
2394
2394
|
omap: xn,
|
|
2395
2395
|
seq: on,
|
|
2396
2396
|
str: an
|
|
2397
|
-
},
|
|
2398
|
-
Type:
|
|
2399
|
-
Schema:
|
|
2400
|
-
FAILSAFE_SCHEMA:
|
|
2401
|
-
JSON_SCHEMA:
|
|
2397
|
+
}, Fo = ut("safeLoad", "load"), Oo = ut("safeLoadAll", "loadAll"), Lo = ut("safeDump", "dump"), Bo = {
|
|
2398
|
+
Type: xo,
|
|
2399
|
+
Schema: Co,
|
|
2400
|
+
FAILSAFE_SCHEMA: ko,
|
|
2401
|
+
JSON_SCHEMA: Ao,
|
|
2402
2402
|
CORE_SCHEMA: wo,
|
|
2403
|
-
DEFAULT_SCHEMA:
|
|
2404
|
-
load:
|
|
2405
|
-
loadAll:
|
|
2406
|
-
dump:
|
|
2407
|
-
YAMLException:
|
|
2408
|
-
types:
|
|
2409
|
-
safeLoad:
|
|
2410
|
-
safeLoadAll:
|
|
2411
|
-
safeDump:
|
|
2403
|
+
DEFAULT_SCHEMA: _o,
|
|
2404
|
+
load: So,
|
|
2405
|
+
loadAll: $o,
|
|
2406
|
+
dump: To,
|
|
2407
|
+
YAMLException: Io,
|
|
2408
|
+
types: Eo,
|
|
2409
|
+
safeLoad: Fo,
|
|
2410
|
+
safeLoadAll: Oo,
|
|
2411
|
+
safeDump: Lo
|
|
2412
2412
|
};
|
|
2413
|
-
const
|
|
2413
|
+
const Ro = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */ z({
|
|
2414
2414
|
__name: "YamlCodeBlock",
|
|
2415
2415
|
props: {
|
|
2416
2416
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2420,13 +2420,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2420
2420
|
}
|
|
2421
2421
|
},
|
|
2422
2422
|
setup(e) {
|
|
2423
|
-
const t = e, n =
|
|
2423
|
+
const t = e, n = F(() => {
|
|
2424
2424
|
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2425
|
-
return Object.keys(i).length === 0 && i.constructor === Object ? "" :
|
|
2425
|
+
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Bo.dump(i).trim();
|
|
2426
2426
|
});
|
|
2427
2427
|
return (i, r) => {
|
|
2428
2428
|
const o = P("KCodeBlock");
|
|
2429
|
-
return m(), S("div",
|
|
2429
|
+
return m(), S("div", Ro, [
|
|
2430
2430
|
t.entityRecord ? (m(), j(o, {
|
|
2431
2431
|
key: 0,
|
|
2432
2432
|
id: "yaml-codeblock",
|
|
@@ -2437,7 +2437,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2437
2437
|
]);
|
|
2438
2438
|
};
|
|
2439
2439
|
}
|
|
2440
|
-
}),
|
|
2440
|
+
}), Ko = { class: "terraform-config config-card-code-block" }, re = " ", Hn = /* @__PURE__ */ z({
|
|
2441
2441
|
__name: "TerraformCodeBlock",
|
|
2442
2442
|
props: {
|
|
2443
2443
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2456,95 +2456,91 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2456
2456
|
}
|
|
2457
2457
|
},
|
|
2458
2458
|
setup(e) {
|
|
2459
|
-
const t = e, n =
|
|
2460
|
-
const
|
|
2461
|
-
let
|
|
2462
|
-
return typeof l == "string" ?
|
|
2463
|
-
` :
|
|
2464
|
-
`,
|
|
2465
|
-
},
|
|
2459
|
+
const t = e, n = (l, s) => {
|
|
2460
|
+
const c = re;
|
|
2461
|
+
let d = "";
|
|
2462
|
+
return typeof l == "string" ? d += `${c}${s} = "${l}"
|
|
2463
|
+
` : d += `${c}${s} = ${String(l ?? "")}
|
|
2464
|
+
`, d;
|
|
2465
|
+
}, i = (l, s, c = "") => {
|
|
2466
2466
|
if (typeof l != "object")
|
|
2467
2467
|
return "Invalid object";
|
|
2468
|
-
const
|
|
2469
|
-
let
|
|
2470
|
-
if (
|
|
2468
|
+
const d = re + c;
|
|
2469
|
+
let u = "";
|
|
2470
|
+
if (s && (u += `${d}${s} = {
|
|
2471
2471
|
`), l === null)
|
|
2472
|
-
return
|
|
2473
|
-
const
|
|
2474
|
-
let
|
|
2475
|
-
for (const [
|
|
2476
|
-
Array.isArray(
|
|
2477
|
-
`,
|
|
2478
|
-
`,
|
|
2472
|
+
return s ? u += `${d}}` : u = "{}", u;
|
|
2473
|
+
const h = Object.fromEntries(Object.entries(l).filter(([, y]) => y !== null));
|
|
2474
|
+
let p = "";
|
|
2475
|
+
for (const [y, b] of Object.entries(h))
|
|
2476
|
+
Array.isArray(b) ? b.length === 0 ? p = "[]" : (p = `[
|
|
2477
|
+
`, p += r(b, void 0, d), p += `${d}${re}]`) : b && typeof b == "object" ? (p = `{
|
|
2478
|
+
`, p += i(b, void 0, d), p += `${d}${re}}`) : p = String(b ?? ""), typeof b == "string" && (p = `"${p}"`), u += `${d}${re}${y} = ${p}
|
|
2479
2479
|
`;
|
|
2480
|
-
return
|
|
2481
|
-
` :
|
|
2482
|
-
},
|
|
2480
|
+
return s ? u += `${d}}
|
|
2481
|
+
` : u;
|
|
2482
|
+
}, r = (l, s, c = "") => {
|
|
2483
2483
|
if (!Array.isArray(l))
|
|
2484
2484
|
return "Invalid array";
|
|
2485
|
-
const
|
|
2486
|
-
let
|
|
2487
|
-
|
|
2485
|
+
const d = re + c;
|
|
2486
|
+
let u = "";
|
|
2487
|
+
s && (l.length === 0 ? u += `${d}${s} = [` : u += `${d}${s} = [
|
|
2488
2488
|
`);
|
|
2489
|
-
for (let
|
|
2490
|
-
const
|
|
2491
|
-
typeof
|
|
2492
|
-
`,
|
|
2489
|
+
for (let h = 0; h < l.length; h++) {
|
|
2490
|
+
const p = l[h];
|
|
2491
|
+
typeof p == "object" ? (u += `${d}${re}{
|
|
2492
|
+
`, u += i(p, void 0, d), u += `${d}${re}}`) : typeof p == "string" ? u += `${d}${re}"${p}"` : u += `${d}${re}${String(p ?? "")}`, h < l.length - 1 && (u += ","), u += `
|
|
2493
2493
|
`;
|
|
2494
2494
|
}
|
|
2495
|
-
return
|
|
2496
|
-
` :
|
|
2497
|
-
`),
|
|
2498
|
-
},
|
|
2499
|
-
let
|
|
2500
|
-
for (const [
|
|
2501
|
-
Array.isArray(
|
|
2502
|
-
return
|
|
2503
|
-
},
|
|
2504
|
-
var
|
|
2505
|
-
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([,
|
|
2506
|
-
if (
|
|
2495
|
+
return s && (l.length === 0 ? u += `]
|
|
2496
|
+
` : u += `${d}]
|
|
2497
|
+
`), u;
|
|
2498
|
+
}, o = (l) => {
|
|
2499
|
+
let s = "";
|
|
2500
|
+
for (const [c, d] of Object.entries(l))
|
|
2501
|
+
Array.isArray(d) ? s += r(d, c) : typeof d == "object" ? s += i(d, c) : s += n(d, c);
|
|
2502
|
+
return s;
|
|
2503
|
+
}, a = F(() => {
|
|
2504
|
+
var u, h, p, y, b, C, k;
|
|
2505
|
+
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, x]) => x != null)), s = t.entityRecord.config ? Object.fromEntries(Object.entries((u = t.entityRecord) == null ? void 0 : u.config).filter(([, x]) => x != null)) : void 0;
|
|
2506
|
+
if (s && (l.config = s), Object.keys(l).length === 0)
|
|
2507
2507
|
return "";
|
|
2508
2508
|
delete l.id;
|
|
2509
|
-
let
|
|
2510
|
-
if ((
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
`;
|
|
2514
|
-
else if (t.entityType === "plugin") {
|
|
2515
|
-
const O = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2516
|
-
delete l.name, d += `resource "konnect_gateway_plugin_${O}" "my_${O}" {
|
|
2509
|
+
let c = "", d = "";
|
|
2510
|
+
if ((h = l.service) != null && h.id ? (d = "service", delete l.service) : (p = l.route) != null && p.id ? (d = "route", delete l.route) : (y = l.consumer) != null && y.id ? (d = "consumer", delete l.consumer) : (b = l.consumer_group) != null && b.id ? (d = "consumer_group", delete l.consumer_group) : (C = l.certificate) != null && C.id ? (d = "certificate", delete l.certificate) : (k = l.set) != null && k.id && (d = "set", delete l.set), t.entityType === "plugin") {
|
|
2511
|
+
const x = t.credentialType.replace(/-/g, "_") || (l.name + "").replace(/-/g, "_");
|
|
2512
|
+
delete l.name, c += `resource "konnect_gateway_plugin_${x}" "my_${x}" {
|
|
2517
2513
|
`;
|
|
2518
2514
|
} else
|
|
2519
|
-
|
|
2515
|
+
c += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
2520
2516
|
`;
|
|
2521
|
-
return
|
|
2522
|
-
`, d += `${re}${
|
|
2523
|
-
`,
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
`,
|
|
2517
|
+
return c += o(l), c += `${re}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
|
|
2518
|
+
`, d && (c += `${re}${d} = {
|
|
2519
|
+
`, c += `${re}${re}id = konnect_gateway_${d}.my_${d}.id
|
|
2520
|
+
`, c += `${re}}
|
|
2521
|
+
`), c += `}
|
|
2522
|
+
`, c;
|
|
2527
2523
|
});
|
|
2528
|
-
return (l,
|
|
2529
|
-
const
|
|
2530
|
-
return m(), S("div",
|
|
2531
|
-
t.entityRecord ? (m(), j(
|
|
2524
|
+
return (l, s) => {
|
|
2525
|
+
const c = P("KCodeBlock");
|
|
2526
|
+
return m(), S("div", Ko, [
|
|
2527
|
+
t.entityRecord ? (m(), j(c, {
|
|
2532
2528
|
key: 0,
|
|
2533
2529
|
id: "terraform-codeblock",
|
|
2534
|
-
code:
|
|
2530
|
+
code: a.value,
|
|
2535
2531
|
language: "terraform",
|
|
2536
2532
|
theme: "dark"
|
|
2537
2533
|
}, null, 8, ["code"])) : N("", !0)
|
|
2538
2534
|
]);
|
|
2539
2535
|
};
|
|
2540
2536
|
}
|
|
2541
|
-
}),
|
|
2537
|
+
}), No = {
|
|
2542
2538
|
key: 0,
|
|
2543
2539
|
class: "config-card-display-form"
|
|
2544
|
-
},
|
|
2540
|
+
}, Mo = ["data-testid"], jo = {
|
|
2545
2541
|
key: 0,
|
|
2546
2542
|
class: "config-card-prop-section-title"
|
|
2547
|
-
},
|
|
2543
|
+
}, Do = /* @__PURE__ */ z({
|
|
2548
2544
|
__name: "ConfigCardDisplay",
|
|
2549
2545
|
props: {
|
|
2550
2546
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2596,32 +2592,32 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2596
2592
|
}
|
|
2597
2593
|
},
|
|
2598
2594
|
setup(e) {
|
|
2599
|
-
const t = e, n = De(), { i18n: { t: i } } = Y.useI18n(), r = (
|
|
2595
|
+
const t = e, n = De(), { i18n: { t: i } } = Y.useI18n(), r = (l) => !!(l.tooltip || n[`${l.key}-label-tooltip`]), o = F(() => {
|
|
2600
2596
|
if (!t.record)
|
|
2601
2597
|
return t.record;
|
|
2602
|
-
let
|
|
2603
|
-
t.codeBlockRecordFormatter && (
|
|
2604
|
-
const
|
|
2605
|
-
return delete
|
|
2606
|
-
}), a =
|
|
2607
|
-
return (
|
|
2608
|
-
e.format === "structured" ? (m(), S("div",
|
|
2598
|
+
let l = t.record;
|
|
2599
|
+
t.codeBlockRecordFormatter && (l = t.codeBlockRecordFormatter(l, t.format));
|
|
2600
|
+
const s = JSON.parse(JSON.stringify(l));
|
|
2601
|
+
return delete s.created_at, delete s.updated_at, s;
|
|
2602
|
+
}), a = F(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2603
|
+
return (l, s) => (m(), S(ue, null, [
|
|
2604
|
+
e.format === "structured" ? (m(), S("div", No, [
|
|
2609
2605
|
(m(!0), S(ue, null, ce(e.propListTypes, (c) => (m(), S("div", {
|
|
2610
2606
|
key: `config-card-details-${c}-props`,
|
|
2611
2607
|
class: fe(`config-card-details-${c}-props`),
|
|
2612
2608
|
"data-testid": `config-card-details-${c}-props`
|
|
2613
2609
|
}, [
|
|
2614
|
-
c !== "basic" ? (m(), S("div",
|
|
2615
|
-
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) => D(
|
|
2610
|
+
c !== "basic" ? (m(), S("div", jo, O(c === "advanced" ? $(i)("baseConfigCard.sections.advanced") : c === "plugin" ? $(i)("baseConfigCard.sections.plugin") : $(i)("baseConfigCard.sections.policy")), 1)) : N("", !0),
|
|
2611
|
+
(m(!0), S(ue, null, ce(e.propertyCollections[c], (d) => D(l.$slots, `config-card-item-${d.key}`, {
|
|
2616
2612
|
key: d.key,
|
|
2617
2613
|
item: d
|
|
2618
2614
|
}, () => [
|
|
2619
2615
|
M(Xt, { item: d }, Se({
|
|
2620
|
-
label:
|
|
2621
|
-
D(
|
|
2616
|
+
label: _(() => [
|
|
2617
|
+
D(l.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2622
2618
|
]),
|
|
2623
|
-
[d.key]:
|
|
2624
|
-
D(
|
|
2619
|
+
[d.key]: _(({ rowValue: u }) => [
|
|
2620
|
+
D(l.$slots, d.key, {
|
|
2625
2621
|
row: d,
|
|
2626
2622
|
rowValue: u
|
|
2627
2623
|
}, void 0, !0)
|
|
@@ -2630,14 +2626,14 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2630
2626
|
}, [
|
|
2631
2627
|
r(d) ? {
|
|
2632
2628
|
name: "label-tooltip",
|
|
2633
|
-
fn:
|
|
2634
|
-
D(
|
|
2629
|
+
fn: _(() => [
|
|
2630
|
+
D(l.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2635
2631
|
]),
|
|
2636
2632
|
key: "0"
|
|
2637
2633
|
} : void 0
|
|
2638
2634
|
]), 1032, ["item"])
|
|
2639
2635
|
], !0)), 128))
|
|
2640
|
-
], 10,
|
|
2636
|
+
], 10, Mo))), 128))
|
|
2641
2637
|
])) : N("", !0),
|
|
2642
2638
|
e.format === "json" && o.value ? (m(), j(en, {
|
|
2643
2639
|
key: 1,
|
|
@@ -2657,10 +2653,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2657
2653
|
}, null, 8, ["entity-record", "entity-type"])) : N("", !0)
|
|
2658
2654
|
], 64));
|
|
2659
2655
|
}
|
|
2660
|
-
}),
|
|
2656
|
+
}), Po = /* @__PURE__ */ se(Do, [["__scopeId", "data-v-f11c7e34"]]), Uo = {
|
|
2661
2657
|
class: "config-card-title",
|
|
2662
2658
|
"data-testid": "config-card-title"
|
|
2663
|
-
},
|
|
2659
|
+
}, qo = { class: "config-card-actions" }, Ho = ["href"], Vo = { class: "config-card-details-section" }, Yo = /* @__PURE__ */ z({
|
|
2664
2660
|
__name: "EntityBaseConfigCard",
|
|
2665
2661
|
props: {
|
|
2666
2662
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2775,10 +2771,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2775
2771
|
},
|
|
2776
2772
|
emits: ["loading", "fetch:success", "fetch:error", "configFormatChange"],
|
|
2777
2773
|
setup(e, { emit: t }) {
|
|
2778
|
-
var
|
|
2774
|
+
var E;
|
|
2779
2775
|
const n = t, i = e, { i18n: { t: r } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { convertKeyToTitle: a } = Y.useStringHelpers();
|
|
2780
2776
|
Y.useSubSchema(i.pluginConfigKey);
|
|
2781
|
-
const { axiosInstance:
|
|
2777
|
+
const { axiosInstance: l } = Y.useAxios((E = i.config) == null ? void 0 : E.axiosRequestConfig), s = [
|
|
2782
2778
|
{
|
|
2783
2779
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
2784
2780
|
value: "structured",
|
|
@@ -2793,24 +2789,24 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2793
2789
|
value: "yaml"
|
|
2794
2790
|
}
|
|
2795
2791
|
];
|
|
2796
|
-
i.config.app === "konnect" &&
|
|
2792
|
+
i.config.app === "konnect" && s.splice(2, 0, {
|
|
2797
2793
|
label: r("baseForm.configuration.terraform"),
|
|
2798
2794
|
value: "terraform"
|
|
2799
2795
|
});
|
|
2800
|
-
const c =
|
|
2796
|
+
const c = s[0].value, d = K(c), u = (f) => {
|
|
2801
2797
|
d.value = f == null ? void 0 : f.value, n("configFormatChange", d.value);
|
|
2802
|
-
},
|
|
2803
|
-
localStorage.setItem(f,
|
|
2798
|
+
}, h = (f, g) => {
|
|
2799
|
+
localStorage.setItem(f, g);
|
|
2804
2800
|
};
|
|
2805
2801
|
be(d, (f) => {
|
|
2806
|
-
i.config.formatPreferenceKey &&
|
|
2802
|
+
i.config.formatPreferenceKey && h(i.config.formatPreferenceKey, f);
|
|
2807
2803
|
}), tt(() => {
|
|
2808
2804
|
if (i.config.formatPreferenceKey) {
|
|
2809
2805
|
const f = localStorage.getItem(i.config.formatPreferenceKey);
|
|
2810
|
-
f &&
|
|
2806
|
+
f && s.some((g) => g.value === f) ? d.value = f : d.value = c, h(i.config.formatPreferenceKey, d.value);
|
|
2811
2807
|
}
|
|
2812
2808
|
});
|
|
2813
|
-
const
|
|
2809
|
+
const p = {
|
|
2814
2810
|
id: {
|
|
2815
2811
|
type: V.ID,
|
|
2816
2812
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
@@ -2851,142 +2847,142 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2851
2847
|
// the last property displayed
|
|
2852
2848
|
section: ae.Basic
|
|
2853
2849
|
}
|
|
2854
|
-
},
|
|
2855
|
-
var
|
|
2850
|
+
}, y = K(!1), b = K(!1), C = K(""), k = K({}), x = F(() => {
|
|
2851
|
+
var v, H, J;
|
|
2856
2852
|
if (!k.value)
|
|
2857
2853
|
return [];
|
|
2858
|
-
const f = [],
|
|
2854
|
+
const f = [], g = Object.keys(k.value).length;
|
|
2859
2855
|
for (const T in k.value) {
|
|
2860
2856
|
if (T === "__ui_data") continue;
|
|
2861
|
-
const
|
|
2862
|
-
let U =
|
|
2863
|
-
(G || G === 0) && (U = G === -1 ?
|
|
2857
|
+
const L = (H = (v = i.configSchema) == null ? void 0 : v[T]) == null ? void 0 : H.order, G = (J = p[T]) == null ? void 0 : J.order;
|
|
2858
|
+
let U = g;
|
|
2859
|
+
(G || G === 0) && (U = G === -1 ? g + 1 : G), L && (U = L === -1 ? g + 1 : L), f.push([T, U]);
|
|
2864
2860
|
}
|
|
2865
|
-
return f.sort(function(T,
|
|
2866
|
-
return T[1] -
|
|
2861
|
+
return f.sort(function(T, L) {
|
|
2862
|
+
return T[1] - L[1];
|
|
2867
2863
|
}), f.map((T) => {
|
|
2868
2864
|
var dt, ft;
|
|
2869
|
-
const
|
|
2865
|
+
const L = T[0], G = (dt = k.value) == null ? void 0 : dt[L], U = ((ft = i.configSchema) == null ? void 0 : ft[L]) || {}, Q = p[L];
|
|
2870
2866
|
return {
|
|
2871
|
-
key:
|
|
2867
|
+
key: L,
|
|
2872
2868
|
value: G,
|
|
2873
2869
|
hidden: U.hidden || !1,
|
|
2874
2870
|
type: U.type ?? ((Q == null ? void 0 : Q.type) || V.Text),
|
|
2875
|
-
label: U.label ?? ((Q == null ? void 0 : Q.label) || a(
|
|
2871
|
+
label: U.label ?? ((Q == null ? void 0 : Q.label) || a(L)),
|
|
2876
2872
|
tooltip: U.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2877
2873
|
section: U.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2878
2874
|
};
|
|
2879
2875
|
}).filter((T) => !T.hidden && T.key !== i.pluginConfigKey);
|
|
2880
|
-
}),
|
|
2876
|
+
}), R = F(() => {
|
|
2881
2877
|
var H, J;
|
|
2882
2878
|
if (!k.value || !i.pluginConfigKey)
|
|
2883
2879
|
return [];
|
|
2884
|
-
const f = k.value[i.pluginConfigKey] || {},
|
|
2880
|
+
const f = k.value[i.pluginConfigKey] || {}, g = Object.keys(f).length, v = [];
|
|
2885
2881
|
for (const T in f) {
|
|
2886
|
-
const
|
|
2887
|
-
let U = G != null && G !== "" ?
|
|
2888
|
-
|
|
2882
|
+
const L = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[T]) == null ? void 0 : J.order, G = f[T];
|
|
2883
|
+
let U = G != null && G !== "" ? g - 1 : g;
|
|
2884
|
+
L && (U = L === -1 ? g + 1 : L), v.push([T, U]);
|
|
2889
2885
|
}
|
|
2890
|
-
return
|
|
2891
|
-
return T[1] -
|
|
2892
|
-
}),
|
|
2886
|
+
return v.sort(function(T, L) {
|
|
2887
|
+
return T[1] - L[1];
|
|
2888
|
+
}), v.map((T) => {
|
|
2893
2889
|
var Q;
|
|
2894
|
-
const
|
|
2890
|
+
const L = T[0], G = f[L], U = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[L]) || {};
|
|
2895
2891
|
return {
|
|
2896
|
-
key:
|
|
2892
|
+
key: L,
|
|
2897
2893
|
value: G,
|
|
2898
2894
|
hidden: U.hidden || !1,
|
|
2899
2895
|
type: U.type ?? V.Text,
|
|
2900
|
-
label: U.label ?? a(
|
|
2896
|
+
label: U.label ?? a(L),
|
|
2901
2897
|
tooltip: U.tooltip ?? void 0,
|
|
2902
2898
|
section: ae.Plugin
|
|
2903
2899
|
};
|
|
2904
2900
|
}).filter((T) => !T.hidden);
|
|
2905
|
-
}), W =
|
|
2901
|
+
}), W = F(() => {
|
|
2906
2902
|
var H, J;
|
|
2907
2903
|
if (!k.value || !i.policyConfigKey)
|
|
2908
2904
|
return [];
|
|
2909
|
-
const f = k.value[i.policyConfigKey] || {},
|
|
2905
|
+
const f = k.value[i.policyConfigKey] || {}, g = Object.keys(f).length, v = [];
|
|
2910
2906
|
for (const T in f) {
|
|
2911
|
-
const
|
|
2912
|
-
let U = G != null && G !== "" ?
|
|
2913
|
-
|
|
2907
|
+
const L = (J = (H = i.policyConfigSchema) == null ? void 0 : H[T]) == null ? void 0 : J.order, G = f[T];
|
|
2908
|
+
let U = G != null && G !== "" ? g - 1 : g;
|
|
2909
|
+
L && (U = L === -1 ? g + 1 : L), v.push([T, U]);
|
|
2914
2910
|
}
|
|
2915
|
-
return
|
|
2916
|
-
return T[1] -
|
|
2917
|
-
}),
|
|
2911
|
+
return v.sort(function(T, L) {
|
|
2912
|
+
return T[1] - L[1];
|
|
2913
|
+
}), v.map((T) => {
|
|
2918
2914
|
var Q;
|
|
2919
|
-
const
|
|
2915
|
+
const L = T[0], G = f[L], U = ((Q = i.policyConfigSchema) == null ? void 0 : Q[L]) || {};
|
|
2920
2916
|
return {
|
|
2921
|
-
key:
|
|
2917
|
+
key: L,
|
|
2922
2918
|
value: G,
|
|
2923
2919
|
hidden: U.hidden || !1,
|
|
2924
2920
|
type: U.type ?? V.Text,
|
|
2925
|
-
label: U.label ?? a(
|
|
2921
|
+
label: U.label ?? a(L),
|
|
2926
2922
|
tooltip: U.tooltip ?? void 0,
|
|
2927
2923
|
section: ae.Policy
|
|
2928
2924
|
};
|
|
2929
2925
|
}).filter((T) => !T.hidden);
|
|
2930
|
-
}), X =
|
|
2931
|
-
var f,
|
|
2926
|
+
}), X = F(() => {
|
|
2927
|
+
var f, g, v, H, J, T;
|
|
2932
2928
|
return {
|
|
2933
|
-
basic: (f =
|
|
2934
|
-
advanced: (
|
|
2935
|
-
plugin: (H =
|
|
2936
|
-
policy: (T = W.value) == null ? void 0 : T.concat((J =
|
|
2929
|
+
basic: (f = x.value) == null ? void 0 : f.filter((L) => L.section === ae.Basic),
|
|
2930
|
+
advanced: (g = x.value) == null ? void 0 : g.filter((L) => L.section === ae.Advanced),
|
|
2931
|
+
plugin: (H = R.value) == null ? void 0 : H.concat((v = x.value) == null ? void 0 : v.filter((L) => L.section === ae.Plugin)),
|
|
2932
|
+
policy: (T = W.value) == null ? void 0 : T.concat((J = x.value) == null ? void 0 : J.filter((L) => L.section === ae.Policy))
|
|
2937
2933
|
};
|
|
2938
|
-
}),
|
|
2934
|
+
}), w = F(() => {
|
|
2939
2935
|
const f = [];
|
|
2940
2936
|
return X.value.basic.length && f.push("basic"), X.value.advanced.length && f.push("advanced"), X.value.plugin.length && f.push("plugin"), X.value.policy.length && f.push("policy"), f;
|
|
2941
|
-
}), A =
|
|
2942
|
-
var
|
|
2937
|
+
}), A = F(() => {
|
|
2938
|
+
var g, v;
|
|
2943
2939
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
2944
|
-
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((
|
|
2940
|
+
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((g = i.config) == null ? void 0 : g.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (v = i.config) != null && v.workspace ? `/${i.config.workspace}` : "")), f = f.replace(/{id}/gi, i.config.entityId), f;
|
|
2945
2941
|
});
|
|
2946
|
-
return be(
|
|
2942
|
+
return be(y, (f) => {
|
|
2947
2943
|
n("loading", f);
|
|
2948
2944
|
}, { immediate: !0 }), nt(async () => {
|
|
2949
|
-
|
|
2945
|
+
b.value = !1, y.value = !0;
|
|
2950
2946
|
try {
|
|
2951
|
-
const { data: f } = await
|
|
2947
|
+
const { data: f } = await l.get(A.value);
|
|
2952
2948
|
if (i.dataKey)
|
|
2953
2949
|
if (typeof f[i.dataKey] < "u")
|
|
2954
2950
|
k.value = { ...f[i.dataKey] };
|
|
2955
2951
|
else
|
|
2956
2952
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
2957
2953
|
else i.recordResolver ? k.value = { ...i.recordResolver(f) } : k.value = { ...f };
|
|
2958
|
-
Object.keys(i.configSchema).filter((
|
|
2959
|
-
k.value && typeof k.value[
|
|
2954
|
+
Object.keys(i.configSchema).filter((v) => i.configSchema[v].forceShow).forEach((v) => {
|
|
2955
|
+
k.value && typeof k.value[v] > "u" && (k.value[v] = null);
|
|
2960
2956
|
}), n("fetch:success", f);
|
|
2961
2957
|
} catch (f) {
|
|
2962
|
-
const
|
|
2963
|
-
|
|
2958
|
+
const g = o(f);
|
|
2959
|
+
C.value = g.startsWith("code") ? r("baseConfigCard.errors.load") : g, b.value = !0, n("fetch:error", f);
|
|
2964
2960
|
} finally {
|
|
2965
|
-
|
|
2961
|
+
y.value = !1;
|
|
2966
2962
|
}
|
|
2967
|
-
}), (f,
|
|
2968
|
-
const
|
|
2963
|
+
}), (f, g) => {
|
|
2964
|
+
const v = P("KLabel"), H = P("KSelect"), J = P("KButton"), T = P("KSkeleton"), L = P("KEmptyState"), G = P("KCard");
|
|
2969
2965
|
return m(), j(G, {
|
|
2970
2966
|
class: "kong-ui-entity-base-config-card",
|
|
2971
2967
|
"title-tag": e.titleTag
|
|
2972
2968
|
}, Se({
|
|
2973
|
-
actions:
|
|
2974
|
-
|
|
2969
|
+
actions: _(() => [
|
|
2970
|
+
B("div", qo, [
|
|
2975
2971
|
D(f.$slots, "actions", {}, void 0, !0),
|
|
2976
|
-
M(
|
|
2972
|
+
M(v, {
|
|
2977
2973
|
class: "config-format-select-label",
|
|
2978
2974
|
"data-testid": "config-format-select-label"
|
|
2979
2975
|
}, {
|
|
2980
|
-
default:
|
|
2981
|
-
q(
|
|
2976
|
+
default: _(() => [
|
|
2977
|
+
q(O(e.label), 1)
|
|
2982
2978
|
]),
|
|
2983
2979
|
_: 1
|
|
2984
2980
|
}),
|
|
2985
2981
|
M(H, {
|
|
2986
2982
|
modelValue: d.value,
|
|
2987
|
-
"onUpdate:modelValue":
|
|
2983
|
+
"onUpdate:modelValue": g[0] || (g[0] = (U) => d.value = U),
|
|
2988
2984
|
"data-testid": "select-config-format",
|
|
2989
|
-
items:
|
|
2985
|
+
items: s,
|
|
2990
2986
|
onChange: u
|
|
2991
2987
|
}, null, 8, ["modelValue"]),
|
|
2992
2988
|
e.configCardDoc ? (m(), j(J, {
|
|
@@ -2995,49 +2991,49 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
2995
2991
|
class: "book-icon",
|
|
2996
2992
|
"data-testid": "book-icon"
|
|
2997
2993
|
}, {
|
|
2998
|
-
default:
|
|
2999
|
-
|
|
2994
|
+
default: _(() => [
|
|
2995
|
+
B("a", {
|
|
3000
2996
|
href: e.configCardDoc,
|
|
3001
2997
|
rel: "noopener",
|
|
3002
2998
|
target: "_blank"
|
|
3003
2999
|
}, [
|
|
3004
|
-
M($(Vt), { size: $(
|
|
3005
|
-
], 8,
|
|
3000
|
+
M($(Vt), { size: $(Xi) }, null, 8, ["size"])
|
|
3001
|
+
], 8, Ho)
|
|
3006
3002
|
]),
|
|
3007
3003
|
_: 1
|
|
3008
3004
|
})) : N("", !0)
|
|
3009
3005
|
])
|
|
3010
3006
|
]),
|
|
3011
|
-
default:
|
|
3012
|
-
|
|
3007
|
+
default: _(() => [
|
|
3008
|
+
y.value ? (m(), j(T, {
|
|
3013
3009
|
key: 0,
|
|
3014
3010
|
"data-testid": "config-card-loader",
|
|
3015
3011
|
"table-columns": 2,
|
|
3016
3012
|
type: "table"
|
|
3017
|
-
})) :
|
|
3013
|
+
})) : b.value ? (m(), j(L, {
|
|
3018
3014
|
key: 1,
|
|
3019
3015
|
"data-testid": "config-card-fetch-error",
|
|
3020
3016
|
"icon-variant": "error"
|
|
3021
3017
|
}, {
|
|
3022
|
-
default:
|
|
3023
|
-
|
|
3018
|
+
default: _(() => [
|
|
3019
|
+
B("h3", null, O(C.value), 1)
|
|
3024
3020
|
]),
|
|
3025
3021
|
_: 1
|
|
3026
3022
|
})) : N("", !0),
|
|
3027
|
-
|
|
3028
|
-
M(
|
|
3023
|
+
B("div", Vo, [
|
|
3024
|
+
M(Po, {
|
|
3029
3025
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3030
3026
|
config: e.config,
|
|
3031
3027
|
"entity-type": e.entityType,
|
|
3032
3028
|
"fetcher-url": A.value,
|
|
3033
3029
|
format: d.value,
|
|
3034
|
-
"prop-list-types":
|
|
3030
|
+
"prop-list-types": w.value,
|
|
3035
3031
|
"property-collections": X.value,
|
|
3036
3032
|
record: k.value
|
|
3037
3033
|
}, Se({ _: 2 }, [
|
|
3038
3034
|
ce(Object.keys(f.$slots), (U) => ({
|
|
3039
3035
|
name: U,
|
|
3040
|
-
fn:
|
|
3036
|
+
fn: _((Q) => [
|
|
3041
3037
|
D(f.$slots, U, qt({ record: k.value }, Q), void 0, !0)
|
|
3042
3038
|
])
|
|
3043
3039
|
}))
|
|
@@ -3048,10 +3044,10 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3048
3044
|
}, [
|
|
3049
3045
|
e.hideTitle ? void 0 : {
|
|
3050
3046
|
name: "title",
|
|
3051
|
-
fn:
|
|
3052
|
-
|
|
3047
|
+
fn: _(() => [
|
|
3048
|
+
B("span", Uo, [
|
|
3053
3049
|
D(f.$slots, "title", {}, () => [
|
|
3054
|
-
q(
|
|
3050
|
+
q(O($(r)("baseConfigCard.title")), 1)
|
|
3055
3051
|
], !0)
|
|
3056
3052
|
])
|
|
3057
3053
|
]),
|
|
@@ -3060,7 +3056,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3060
3056
|
]), 1032, ["title-tag"]);
|
|
3061
3057
|
};
|
|
3062
3058
|
}
|
|
3063
|
-
}),
|
|
3059
|
+
}), fs = /* @__PURE__ */ se(Yo, [["__scopeId", "data-v-8dc3c29c"]]), Wo = ["novalidate"], Jo = /* @__PURE__ */ z({
|
|
3064
3060
|
__name: "EntityBaseForm",
|
|
3065
3061
|
props: {
|
|
3066
3062
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3176,18 +3172,18 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3176
3172
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3177
3173
|
setup(e, { expose: t, emit: n }) {
|
|
3178
3174
|
var X;
|
|
3179
|
-
const i = n, r = e, o = oi(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError:
|
|
3180
|
-
var A,
|
|
3181
|
-
let
|
|
3182
|
-
return r.config.app === "konnect" ?
|
|
3183
|
-
}),
|
|
3184
|
-
|
|
3175
|
+
const i = n, r = e, o = oi(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: l } = Y.useErrors(), { axiosInstance: s } = Y.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c = K(!1), d = F(() => !!r.editId), u = K(!1), h = K(""), p = F(() => r.canSubmit === !1 || r.isReadonly), y = K(!1), b = F(() => {
|
|
3176
|
+
var A, E;
|
|
3177
|
+
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3178
|
+
return r.config.app === "konnect" ? w = w.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (w = w.replace(/\/{workspace}/gi, (E = r.config) != null && E.workspace ? `/${r.config.workspace}` : "")), r.editId ? (w = w.replace(/{id}/gi, r.editId), w) : (w = w.replace(/\/{id}/gi, ""), w);
|
|
3179
|
+
}), C = () => {
|
|
3180
|
+
y.value = !y.value;
|
|
3185
3181
|
}, k = () => {
|
|
3186
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) :
|
|
3187
|
-
},
|
|
3182
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : x();
|
|
3183
|
+
}, x = () => {
|
|
3188
3184
|
i("cancel");
|
|
3189
|
-
},
|
|
3190
|
-
|
|
3185
|
+
}, R = () => {
|
|
3186
|
+
p.value || i("submit");
|
|
3191
3187
|
}, W = K([
|
|
3192
3188
|
{
|
|
3193
3189
|
title: a("baseForm.configuration.json"),
|
|
@@ -3201,29 +3197,29 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3201
3197
|
return r.config.app === "konnect" && r.entityType !== it.Other && W.value.splice(1, 0, {
|
|
3202
3198
|
title: a("baseForm.configuration.terraform"),
|
|
3203
3199
|
hash: "#terraform"
|
|
3204
|
-
}), be(() => c.value, (
|
|
3205
|
-
i("loading",
|
|
3200
|
+
}), be(() => c.value, (w) => {
|
|
3201
|
+
i("loading", w);
|
|
3206
3202
|
}, { immediate: !0 }), nt(async () => {
|
|
3207
3203
|
if (r.editId)
|
|
3208
3204
|
try {
|
|
3209
3205
|
u.value = !1, c.value = !0;
|
|
3210
|
-
const { data:
|
|
3211
|
-
i("fetch:success",
|
|
3212
|
-
} catch (
|
|
3213
|
-
const A =
|
|
3214
|
-
|
|
3206
|
+
const { data: w } = await s.get(b.value);
|
|
3207
|
+
i("fetch:success", w);
|
|
3208
|
+
} catch (w) {
|
|
3209
|
+
const A = l(w);
|
|
3210
|
+
h.value = A.startsWith("code") ? a("baseForm.errors.edit") : A, u.value = !0, i("fetch:error", w);
|
|
3215
3211
|
} finally {
|
|
3216
3212
|
c.value = !1;
|
|
3217
3213
|
}
|
|
3218
3214
|
}), t({
|
|
3219
|
-
viewConfig:
|
|
3220
|
-
formCancel:
|
|
3221
|
-
formSubmit:
|
|
3222
|
-
}), (
|
|
3223
|
-
const
|
|
3215
|
+
viewConfig: C,
|
|
3216
|
+
formCancel: x,
|
|
3217
|
+
formSubmit: R
|
|
3218
|
+
}), (w, A) => {
|
|
3219
|
+
const E = P("KSkeleton"), f = P("KEmptyState"), g = P("KAlert"), v = P("KButton"), H = P("KTabs"), J = P("KSlideout");
|
|
3224
3220
|
return m(), j(je(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3225
|
-
default:
|
|
3226
|
-
c.value ? (m(), j(
|
|
3221
|
+
default: _(() => [
|
|
3222
|
+
c.value ? (m(), j(E, {
|
|
3227
3223
|
key: 0,
|
|
3228
3224
|
type: "form"
|
|
3229
3225
|
})) : u.value ? (m(), j(f, {
|
|
@@ -3233,19 +3229,19 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3233
3229
|
"icon-variant": "error",
|
|
3234
3230
|
onClickAction: k
|
|
3235
3231
|
}, {
|
|
3236
|
-
default:
|
|
3237
|
-
|
|
3232
|
+
default: _(() => [
|
|
3233
|
+
B("h3", null, O(h.value), 1)
|
|
3238
3234
|
]),
|
|
3239
3235
|
_: 1
|
|
3240
3236
|
}, 8, ["action-button-text"])) : (m(), S("form", {
|
|
3241
3237
|
key: 2,
|
|
3242
3238
|
"data-testid": "form-content",
|
|
3243
3239
|
novalidate: r.noValidate,
|
|
3244
|
-
onReset: Le(
|
|
3245
|
-
onSubmit: Le(
|
|
3240
|
+
onReset: Le(x, ["prevent"]),
|
|
3241
|
+
onSubmit: Le(R, ["prevent"])
|
|
3246
3242
|
}, [
|
|
3247
|
-
D(
|
|
3248
|
-
e.errorMessage ? (m(), j(
|
|
3243
|
+
D(w.$slots, "default", {}, void 0, !0),
|
|
3244
|
+
e.errorMessage ? (m(), j(g, {
|
|
3249
3245
|
key: 0,
|
|
3250
3246
|
appearance: "danger",
|
|
3251
3247
|
"data-testid": "form-error",
|
|
@@ -3256,79 +3252,79 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3256
3252
|
disabled: !e.actionTeleportTarget,
|
|
3257
3253
|
to: e.actionTeleportTarget
|
|
3258
3254
|
}, [
|
|
3259
|
-
|
|
3255
|
+
B("div", {
|
|
3260
3256
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3261
3257
|
"data-testid": "form-actions"
|
|
3262
3258
|
}, [
|
|
3263
|
-
D(
|
|
3264
|
-
M(
|
|
3259
|
+
D(w.$slots, "form-actions", {}, () => [
|
|
3260
|
+
M(v, {
|
|
3265
3261
|
appearance: "tertiary",
|
|
3266
3262
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3267
|
-
onClick: A[0] || (A[0] = (T) =>
|
|
3263
|
+
onClick: A[0] || (A[0] = (T) => C())
|
|
3268
3264
|
}, {
|
|
3269
|
-
default:
|
|
3270
|
-
q(
|
|
3265
|
+
default: _(() => [
|
|
3266
|
+
q(O($(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3271
3267
|
]),
|
|
3272
3268
|
_: 1
|
|
3273
3269
|
}, 8, ["data-testid"]),
|
|
3274
|
-
M(
|
|
3270
|
+
M(v, {
|
|
3275
3271
|
appearance: "secondary",
|
|
3276
3272
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3277
3273
|
disabled: e.isReadonly,
|
|
3278
3274
|
type: "reset",
|
|
3279
|
-
onClick: A[1] || (A[1] = (T) => !!e.actionTeleportTarget &&
|
|
3275
|
+
onClick: A[1] || (A[1] = (T) => !!e.actionTeleportTarget && x())
|
|
3280
3276
|
}, {
|
|
3281
|
-
default:
|
|
3282
|
-
q(
|
|
3277
|
+
default: _(() => [
|
|
3278
|
+
q(O(e.cancelButtonText ?? $(a)("baseForm.actions.cancel")), 1)
|
|
3283
3279
|
]),
|
|
3284
3280
|
_: 1
|
|
3285
3281
|
}, 8, ["data-testid", "disabled"]),
|
|
3286
|
-
M(
|
|
3282
|
+
M(v, {
|
|
3287
3283
|
appearance: "primary",
|
|
3288
3284
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3289
|
-
disabled:
|
|
3285
|
+
disabled: p.value,
|
|
3290
3286
|
type: "submit",
|
|
3291
|
-
onClick: A[2] || (A[2] = (T) => !!e.actionTeleportTarget &&
|
|
3287
|
+
onClick: A[2] || (A[2] = (T) => !!e.actionTeleportTarget && R())
|
|
3292
3288
|
}, {
|
|
3293
|
-
default:
|
|
3294
|
-
q(
|
|
3289
|
+
default: _(() => [
|
|
3290
|
+
q(O(e.saveButtonText ?? $(a)("baseForm.actions.save")), 1)
|
|
3295
3291
|
]),
|
|
3296
3292
|
_: 1
|
|
3297
3293
|
}, 8, ["data-testid", "disabled"])
|
|
3298
3294
|
], !0)
|
|
3299
3295
|
], 2)
|
|
3300
3296
|
], 8, ["disabled", "to"]))
|
|
3301
|
-
], 40,
|
|
3297
|
+
], 40, Wo)),
|
|
3302
3298
|
M(J, {
|
|
3303
3299
|
"close-on-blur": !1,
|
|
3304
3300
|
"data-testid": "form-view-configuration-slideout",
|
|
3305
3301
|
"has-overlay": !1,
|
|
3306
3302
|
"offset-top": e.slidoutTopOffset,
|
|
3307
3303
|
title: $(a)("baseForm.configuration.title"),
|
|
3308
|
-
visible:
|
|
3309
|
-
onClose: A[4] || (A[4] = (T) =>
|
|
3304
|
+
visible: y.value,
|
|
3305
|
+
onClose: A[4] || (A[4] = (T) => C())
|
|
3310
3306
|
}, {
|
|
3311
|
-
default:
|
|
3312
|
-
|
|
3307
|
+
default: _(() => [
|
|
3308
|
+
B("div", null, O($(a)("baseForm.configuration.message")), 1),
|
|
3313
3309
|
M(H, {
|
|
3314
3310
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3315
3311
|
tabs: W.value,
|
|
3316
3312
|
onChange: A[3] || (A[3] = (T) => i("codeBlockTabChange", T.replace("#", "")))
|
|
3317
3313
|
}, {
|
|
3318
|
-
json:
|
|
3314
|
+
json: _(() => [
|
|
3319
3315
|
M(en, {
|
|
3320
3316
|
config: e.config,
|
|
3321
3317
|
"entity-record": r.formFields,
|
|
3322
|
-
"fetcher-url":
|
|
3318
|
+
"fetcher-url": b.value,
|
|
3323
3319
|
"request-method": r.editId ? "put" : "post"
|
|
3324
3320
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3325
3321
|
]),
|
|
3326
|
-
yaml:
|
|
3322
|
+
yaml: _(() => [
|
|
3327
3323
|
M(qn, {
|
|
3328
3324
|
"entity-record": r.formFields
|
|
3329
3325
|
}, null, 8, ["entity-record"])
|
|
3330
3326
|
]),
|
|
3331
|
-
terraform:
|
|
3327
|
+
terraform: _(() => [
|
|
3332
3328
|
M(Hn, {
|
|
3333
3329
|
"entity-record": r.formFields,
|
|
3334
3330
|
"entity-type": e.entityType
|
|
@@ -3344,7 +3340,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3344
3340
|
});
|
|
3345
3341
|
};
|
|
3346
3342
|
}
|
|
3347
|
-
}),
|
|
3343
|
+
}), ps = /* @__PURE__ */ se(Jo, [["__scopeId", "data-v-7c5c8d6b"]]), Go = ["data-truncate"], zo = /* @__PURE__ */ z({
|
|
3348
3344
|
__name: "EntityBaseTableCell",
|
|
3349
3345
|
props: {
|
|
3350
3346
|
keyName: {
|
|
@@ -3361,49 +3357,49 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3361
3357
|
}
|
|
3362
3358
|
},
|
|
3363
3359
|
setup(e) {
|
|
3364
|
-
const t = e, n =
|
|
3365
|
-
var
|
|
3366
|
-
return ((
|
|
3367
|
-
}), i =
|
|
3368
|
-
var
|
|
3369
|
-
return ((
|
|
3370
|
-
}), r =
|
|
3371
|
-
var k,
|
|
3372
|
-
const
|
|
3373
|
-
return
|
|
3374
|
-
}), o =
|
|
3360
|
+
const t = e, n = F(() => {
|
|
3361
|
+
var C;
|
|
3362
|
+
return ((C = t.rowEl) == null ? void 0 : C.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3363
|
+
}), i = F(() => {
|
|
3364
|
+
var C;
|
|
3365
|
+
return ((C = n.value) == null ? void 0 : C.querySelector('[data-truncate="true"]')) || null;
|
|
3366
|
+
}), r = F(() => {
|
|
3367
|
+
var k, x;
|
|
3368
|
+
const C = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3369
|
+
return C ? ((x = C[0]) == null ? void 0 : x.getAttribute("data-testid")) === t.keyName : !0;
|
|
3370
|
+
}), o = F(() => r.value || t.tooltip);
|
|
3375
3371
|
let a;
|
|
3376
|
-
const
|
|
3372
|
+
const l = () => {
|
|
3377
3373
|
a && (a.disconnect(), a = void 0);
|
|
3378
|
-
},
|
|
3379
|
-
var k,
|
|
3380
|
-
let
|
|
3374
|
+
}, s = () => {
|
|
3375
|
+
var k, x, R;
|
|
3376
|
+
let C = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3381
3377
|
if (n.value && "getComputedStyle" in window) {
|
|
3382
3378
|
const W = window.getComputedStyle(n.value);
|
|
3383
|
-
|
|
3379
|
+
C -= (parseFloat(W.paddingLeft) || 0) + (parseFloat(W.paddingRight) || 0);
|
|
3384
3380
|
}
|
|
3385
|
-
d.value = ((
|
|
3386
|
-
}, c = K({}), d = K(0), u = K(0),
|
|
3387
|
-
|
|
3388
|
-
(
|
|
3389
|
-
if (o.value && (
|
|
3381
|
+
d.value = ((x = i.value) == null ? void 0 : x.getBoundingClientRect().width) || 0, u.value = C, h.value = ((R = c.value) == null ? void 0 : R.innerText) || "";
|
|
3382
|
+
}, c = K({}), d = K(0), u = K(0), h = K(""), p = F(() => [i.value, n.value]), y = be(
|
|
3383
|
+
p,
|
|
3384
|
+
(C) => {
|
|
3385
|
+
if (o.value && (l(), "ResizeObserver" in window && window)) {
|
|
3390
3386
|
a = new ResizeObserver((k) => {
|
|
3391
3387
|
window.requestAnimationFrame(() => {
|
|
3392
|
-
!Array.isArray(k) || !k.length ||
|
|
3388
|
+
!Array.isArray(k) || !k.length || s();
|
|
3393
3389
|
});
|
|
3394
3390
|
});
|
|
3395
|
-
for (const k of
|
|
3391
|
+
for (const k of C)
|
|
3396
3392
|
k && a.observe(k);
|
|
3397
3393
|
}
|
|
3398
3394
|
},
|
|
3399
3395
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3400
|
-
),
|
|
3396
|
+
), b = F(() => o.value ? d.value > u.value : !1);
|
|
3401
3397
|
return tt(() => {
|
|
3402
|
-
|
|
3398
|
+
s();
|
|
3403
3399
|
}), Gn(() => {
|
|
3404
|
-
|
|
3405
|
-
}), (
|
|
3406
|
-
const
|
|
3400
|
+
y();
|
|
3401
|
+
}), (C, k) => {
|
|
3402
|
+
const x = P("KTooltip");
|
|
3407
3403
|
return m(), S("span", {
|
|
3408
3404
|
ref_key: "contentRef",
|
|
3409
3405
|
ref: c,
|
|
@@ -3413,27 +3409,27 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3413
3409
|
key: 0,
|
|
3414
3410
|
"data-truncate": o.value || void 0
|
|
3415
3411
|
}, [
|
|
3416
|
-
M(
|
|
3412
|
+
M(x, {
|
|
3417
3413
|
"max-width": "300",
|
|
3418
3414
|
placement: "bottom-start",
|
|
3419
|
-
text:
|
|
3415
|
+
text: b.value ? h.value : ""
|
|
3420
3416
|
}, {
|
|
3421
|
-
default:
|
|
3422
|
-
D(
|
|
3417
|
+
default: _(() => [
|
|
3418
|
+
D(C.$slots, "default", {}, void 0, !0)
|
|
3423
3419
|
]),
|
|
3424
3420
|
_: 3
|
|
3425
3421
|
}, 8, ["text"])
|
|
3426
|
-
], 8,
|
|
3422
|
+
], 8, Go)) : D(C.$slots, "default", { key: 1 }, void 0, !0)
|
|
3427
3423
|
], 512);
|
|
3428
3424
|
};
|
|
3429
3425
|
}
|
|
3430
|
-
}),
|
|
3426
|
+
}), Qo = /* @__PURE__ */ se(zo, [["__scopeId", "data-v-a3a65cac"]]), Zo = { class: "toolbar-container" }, Xo = {
|
|
3431
3427
|
key: 0,
|
|
3432
3428
|
class: "toolbar-button-container"
|
|
3433
|
-
},
|
|
3429
|
+
}, el = {
|
|
3434
3430
|
key: 0,
|
|
3435
3431
|
class: "hidden"
|
|
3436
|
-
},
|
|
3432
|
+
}, tl = /* @__PURE__ */ z({
|
|
3437
3433
|
__name: "EntityBaseTable",
|
|
3438
3434
|
props: {
|
|
3439
3435
|
// table header configuration
|
|
@@ -3578,8 +3574,8 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3578
3574
|
},
|
|
3579
3575
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3580
3576
|
setup(e, { emit: t }) {
|
|
3581
|
-
const n = e, i = t, { i18n: { t: r } } = Y.useI18n(), o =
|
|
3582
|
-
var f,
|
|
3577
|
+
const n = e, i = t, { i18n: { t: r } } = Y.useI18n(), o = F(() => {
|
|
3578
|
+
var f, g;
|
|
3583
3579
|
return typeof n.errorMessage == "string" ? {
|
|
3584
3580
|
hasError: !!n.errorMessage,
|
|
3585
3581
|
title: n.errorMessage,
|
|
@@ -3587,15 +3583,15 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3587
3583
|
} : {
|
|
3588
3584
|
hasError: !!n.errorMessage,
|
|
3589
3585
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3590
|
-
message: (
|
|
3586
|
+
message: (g = n.errorMessage) == null ? void 0 : g.message
|
|
3591
3587
|
};
|
|
3592
|
-
}), a =
|
|
3588
|
+
}), a = F(() => n.cacheIdentifier || n.preferencesStorageKey), l = F(() => {
|
|
3593
3589
|
const f = [];
|
|
3594
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3595
|
-
const H = n.tableHeaders[
|
|
3590
|
+
return Object.keys(n.tableHeaders).forEach((v) => {
|
|
3591
|
+
const H = n.tableHeaders[v];
|
|
3596
3592
|
f.push({
|
|
3597
|
-
label: H.label ??
|
|
3598
|
-
key:
|
|
3593
|
+
label: H.label ?? v,
|
|
3594
|
+
key: v,
|
|
3599
3595
|
sortable: H.sortable ?? !1,
|
|
3600
3596
|
hidable: H.hidable ?? !0
|
|
3601
3597
|
});
|
|
@@ -3603,57 +3599,57 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3603
3599
|
key: "actions",
|
|
3604
3600
|
hideLabel: !0
|
|
3605
3601
|
}), f;
|
|
3606
|
-
}),
|
|
3602
|
+
}), s = (f) => ({
|
|
3607
3603
|
"data-rowid": f.id,
|
|
3608
3604
|
"data-testid": f.name,
|
|
3609
3605
|
...n.rowAttributes(f)
|
|
3610
3606
|
}), c = K({}), d = (f) => {
|
|
3611
|
-
var
|
|
3612
|
-
return (
|
|
3607
|
+
var g;
|
|
3608
|
+
return (g = c.value) == null ? void 0 : g.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3613
3609
|
}, u = (f) => {
|
|
3614
|
-
const
|
|
3610
|
+
const g = {
|
|
3615
3611
|
"data-testid": f.headerKey,
|
|
3616
3612
|
...n.cellAttributes(f)
|
|
3617
3613
|
};
|
|
3618
|
-
return f.colIndex === 0 && (
|
|
3614
|
+
return f.colIndex === 0 && (g.style = {
|
|
3619
3615
|
maxWidth: "250px",
|
|
3620
3616
|
overflowX: "hidden",
|
|
3621
3617
|
textOverflow: "ellipsis"
|
|
3622
|
-
}),
|
|
3623
|
-
},
|
|
3624
|
-
|
|
3625
|
-
},
|
|
3626
|
-
i("empty-state-cta-clicked"),
|
|
3627
|
-
},
|
|
3618
|
+
}), g;
|
|
3619
|
+
}, h = (f) => {
|
|
3620
|
+
x(f), i("state", f);
|
|
3621
|
+
}, p = () => {
|
|
3622
|
+
i("empty-state-cta-clicked"), y();
|
|
3623
|
+
}, y = () => {
|
|
3628
3624
|
i("clear-search-input");
|
|
3629
|
-
},
|
|
3630
|
-
i("click:row",
|
|
3631
|
-
}),
|
|
3625
|
+
}, b = F(() => n.disableRowClick ? void 0 : (f, g) => {
|
|
3626
|
+
i("click:row", g);
|
|
3627
|
+
}), C = (f) => {
|
|
3632
3628
|
i("sort", f);
|
|
3633
|
-
}, { hideTableToolbar: k, handleStateChange:
|
|
3629
|
+
}, { hideTableToolbar: k, handleStateChange: x } = Y.useTableState(() => n.query), { setTablePreferences: R, getTablePreferences: W } = fi(), X = K(W(a.value, n.defaultTablePreferences)), w = F(() => {
|
|
3634
3630
|
const f = W(a.value);
|
|
3635
3631
|
return {
|
|
3636
3632
|
...n.initialFetcherParams,
|
|
3637
3633
|
...f
|
|
3638
3634
|
};
|
|
3639
3635
|
}), A = (f) => {
|
|
3640
|
-
X.value = f,
|
|
3641
|
-
!("hidable" in
|
|
3642
|
-
}), a.value &&
|
|
3643
|
-
},
|
|
3636
|
+
X.value = f, l.value.forEach((g) => {
|
|
3637
|
+
!("hidable" in g) || !X.value.columnVisibility || g.hidable === !1 && (X.value.columnVisibility[g.key] = !0);
|
|
3638
|
+
}), a.value && R(a.value, f);
|
|
3639
|
+
}, E = F(() => ({
|
|
3644
3640
|
disablePageJump: n.disablePaginationPageJump,
|
|
3645
3641
|
offset: n.paginationType === "offset",
|
|
3646
3642
|
...n.paginationAttributes
|
|
3647
3643
|
}));
|
|
3648
|
-
return (f,
|
|
3649
|
-
const
|
|
3644
|
+
return (f, g) => {
|
|
3645
|
+
const v = P("KTableData"), H = P("KCard");
|
|
3650
3646
|
return m(), j(H, {
|
|
3651
3647
|
class: "kong-ui-entity-base-table",
|
|
3652
3648
|
title: e.title,
|
|
3653
3649
|
"title-tag": e.titleTag
|
|
3654
3650
|
}, {
|
|
3655
|
-
default:
|
|
3656
|
-
M(
|
|
3651
|
+
default: _(() => [
|
|
3652
|
+
M(v, {
|
|
3657
3653
|
ref_key: "tableRefs",
|
|
3658
3654
|
ref: c,
|
|
3659
3655
|
"cache-identifier": a.value,
|
|
@@ -3669,61 +3665,61 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3669
3665
|
"error-state-title": o.value.title,
|
|
3670
3666
|
fetcher: e.fetcher,
|
|
3671
3667
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3672
|
-
headers:
|
|
3668
|
+
headers: l.value,
|
|
3673
3669
|
"hide-pagination": e.hidePagination,
|
|
3674
3670
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3675
3671
|
"hide-toolbar": e.hideToolbar ?? $(k),
|
|
3676
|
-
"initial-fetcher-params":
|
|
3672
|
+
"initial-fetcher-params": w.value,
|
|
3677
3673
|
loading: e.isLoading,
|
|
3678
|
-
"pagination-attributes":
|
|
3674
|
+
"pagination-attributes": E.value,
|
|
3679
3675
|
"resize-columns": "",
|
|
3680
|
-
"row-attrs":
|
|
3676
|
+
"row-attrs": s,
|
|
3681
3677
|
"row-key": e.rowKey,
|
|
3682
3678
|
"search-input": e.query,
|
|
3683
3679
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3684
3680
|
sortable: !e.disableSorting,
|
|
3685
3681
|
"table-preferences": X.value,
|
|
3686
|
-
onEmptyStateActionClick:
|
|
3687
|
-
"onRow:click":
|
|
3688
|
-
onSort:
|
|
3689
|
-
onState:
|
|
3682
|
+
onEmptyStateActionClick: p,
|
|
3683
|
+
"onRow:click": b.value,
|
|
3684
|
+
onSort: g[0] || (g[0] = (J) => C(J)),
|
|
3685
|
+
onState: h,
|
|
3690
3686
|
"onUpdate:tablePreferences": A
|
|
3691
3687
|
}, Se({
|
|
3692
|
-
toolbar:
|
|
3693
|
-
|
|
3688
|
+
toolbar: _(() => [
|
|
3689
|
+
B("div", Zo, [
|
|
3694
3690
|
D(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3695
|
-
f.$slots["toolbar-button"] ? (m(), S("div",
|
|
3691
|
+
f.$slots["toolbar-button"] ? (m(), S("div", Xo, [
|
|
3696
3692
|
D(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3697
3693
|
])) : N("", !0)
|
|
3698
3694
|
])
|
|
3699
3695
|
]),
|
|
3700
|
-
"action-items":
|
|
3696
|
+
"action-items": _(({ row: J }) => [
|
|
3701
3697
|
D(f.$slots, "actions", { row: J }, void 0, !0)
|
|
3702
3698
|
]),
|
|
3703
3699
|
_: 2
|
|
3704
3700
|
}, [
|
|
3705
3701
|
f.$slots["empty-state"] ? {
|
|
3706
3702
|
name: "empty-state",
|
|
3707
|
-
fn:
|
|
3703
|
+
fn: _(() => [
|
|
3708
3704
|
D(f.$slots, "empty-state", {}, void 0, !0)
|
|
3709
3705
|
]),
|
|
3710
3706
|
key: "0"
|
|
3711
3707
|
} : void 0,
|
|
3712
3708
|
ce(e.tableHeaders, (J, T) => ({
|
|
3713
3709
|
name: T,
|
|
3714
|
-
fn:
|
|
3715
|
-
M(
|
|
3710
|
+
fn: _(({ row: L, rowValue: G }) => [
|
|
3711
|
+
M(Qo, {
|
|
3716
3712
|
"key-name": String(T),
|
|
3717
|
-
"row-el": d(
|
|
3713
|
+
"row-el": d(L),
|
|
3718
3714
|
tooltip: J.tooltip
|
|
3719
3715
|
}, {
|
|
3720
|
-
default:
|
|
3716
|
+
default: _(() => [
|
|
3721
3717
|
D(f.$slots, T, {
|
|
3722
|
-
row:
|
|
3718
|
+
row: L,
|
|
3723
3719
|
rowKey: e.rowKey,
|
|
3724
3720
|
rowValue: G
|
|
3725
3721
|
}, () => [
|
|
3726
|
-
q(
|
|
3722
|
+
q(O(G), 1)
|
|
3727
3723
|
], !0)
|
|
3728
3724
|
]),
|
|
3729
3725
|
_: 2
|
|
@@ -3732,13 +3728,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3732
3728
|
})),
|
|
3733
3729
|
e.query ? void 0 : {
|
|
3734
3730
|
name: "empty-state-action-icon",
|
|
3735
|
-
fn:
|
|
3731
|
+
fn: _(() => [
|
|
3736
3732
|
M($(Yt))
|
|
3737
3733
|
]),
|
|
3738
3734
|
key: "1"
|
|
3739
3735
|
}
|
|
3740
3736
|
]), 1032, ["cache-identifier", "client-sort", "empty-state-action-message", "empty-state-action-route", "empty-state-icon-variant", "empty-state-message", "empty-state-title", "error", "error-state-message", "error-state-title", "fetcher", "fetcher-cache-key", "headers", "hide-pagination", "hide-pagination-when-optional", "hide-toolbar", "initial-fetcher-params", "loading", "pagination-attributes", "row-key", "search-input", "sort-handler-function", "sortable", "table-preferences", "onRow:click"]),
|
|
3741
|
-
f.$slots["outside-actions"] && $(k) ? (m(), S("div",
|
|
3737
|
+
f.$slots["outside-actions"] && $(k) ? (m(), S("div", el, [
|
|
3742
3738
|
D(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3743
3739
|
])) : N("", !0)
|
|
3744
3740
|
]),
|
|
@@ -3746,13 +3742,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3746
3742
|
}, 8, ["title", "title-tag"]);
|
|
3747
3743
|
};
|
|
3748
3744
|
}
|
|
3749
|
-
}),
|
|
3745
|
+
}), ms = /* @__PURE__ */ se(tl, [["__scopeId", "data-v-44153100"]]), nl = {
|
|
3750
3746
|
key: 0,
|
|
3751
3747
|
class: "kong-ui-entity-delete-error"
|
|
3752
|
-
},
|
|
3748
|
+
}, il = {
|
|
3753
3749
|
key: 1,
|
|
3754
3750
|
class: "description"
|
|
3755
|
-
},
|
|
3751
|
+
}, rl = /* @__PURE__ */ z({
|
|
3756
3752
|
__name: "EntityDeleteModal",
|
|
3757
3753
|
props: {
|
|
3758
3754
|
visible: {
|
|
@@ -3791,12 +3787,12 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3791
3787
|
},
|
|
3792
3788
|
emits: ["cancel", "proceed"],
|
|
3793
3789
|
setup(e, { emit: t }) {
|
|
3794
|
-
const { i18nT: n } = Y.useI18n(), i = e, r = t, o =
|
|
3790
|
+
const { i18nT: n } = Y.useI18n(), i = e, r = t, o = F(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3795
3791
|
r("cancel");
|
|
3796
|
-
},
|
|
3792
|
+
}, l = () => {
|
|
3797
3793
|
r("proceed");
|
|
3798
3794
|
};
|
|
3799
|
-
return (
|
|
3795
|
+
return (s, c) => {
|
|
3800
3796
|
const d = P("KAlert"), u = P("KPrompt");
|
|
3801
3797
|
return m(), j(u, {
|
|
3802
3798
|
"action-button-appearance": "danger",
|
|
@@ -3807,13 +3803,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3807
3803
|
title: e.title,
|
|
3808
3804
|
visible: e.visible,
|
|
3809
3805
|
onCancel: a,
|
|
3810
|
-
onProceed:
|
|
3806
|
+
onProceed: l
|
|
3811
3807
|
}, {
|
|
3812
|
-
default:
|
|
3813
|
-
e.error ? (m(), S("div",
|
|
3808
|
+
default: _(() => [
|
|
3809
|
+
e.error ? (m(), S("div", nl, [
|
|
3814
3810
|
M(d, { appearance: "danger" }, {
|
|
3815
|
-
default:
|
|
3816
|
-
q(
|
|
3811
|
+
default: _(() => [
|
|
3812
|
+
q(O(e.error), 1)
|
|
3817
3813
|
]),
|
|
3818
3814
|
_: 1
|
|
3819
3815
|
})
|
|
@@ -3823,22 +3819,22 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3823
3819
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3824
3820
|
tag: "p"
|
|
3825
3821
|
}, Se({
|
|
3826
|
-
entityType:
|
|
3827
|
-
q(
|
|
3822
|
+
entityType: _(() => [
|
|
3823
|
+
q(O(i.entityType), 1)
|
|
3828
3824
|
]),
|
|
3829
3825
|
_: 2
|
|
3830
3826
|
}, [
|
|
3831
3827
|
i.entityName ? {
|
|
3832
3828
|
name: "entityName",
|
|
3833
|
-
fn:
|
|
3834
|
-
|
|
3829
|
+
fn: _(() => [
|
|
3830
|
+
B("strong", null, O(i.entityName), 1)
|
|
3835
3831
|
]),
|
|
3836
3832
|
key: "0"
|
|
3837
3833
|
} : void 0
|
|
3838
3834
|
]), 1032, ["keypath"]),
|
|
3839
|
-
i.description ||
|
|
3840
|
-
D(
|
|
3841
|
-
|
|
3835
|
+
i.description || s.$slots.description ? (m(), S("div", il, [
|
|
3836
|
+
D(s.$slots, "description", {}, () => [
|
|
3837
|
+
B("p", null, O(i.description), 1)
|
|
3842
3838
|
], !0)
|
|
3843
3839
|
])) : N("", !0)
|
|
3844
3840
|
]),
|
|
@@ -3846,13 +3842,13 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3846
3842
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3847
3843
|
};
|
|
3848
3844
|
}
|
|
3849
|
-
}),
|
|
3845
|
+
}), hs = /* @__PURE__ */ se(rl, [["__scopeId", "data-v-4361d622"]]), al = {
|
|
3850
3846
|
fill: "none",
|
|
3851
3847
|
height: "20",
|
|
3852
3848
|
viewBox: "0 0 20 20",
|
|
3853
3849
|
width: "20",
|
|
3854
3850
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3855
|
-
},
|
|
3851
|
+
}, ol = {
|
|
3856
3852
|
id: "mask0_180_20349",
|
|
3857
3853
|
height: "20",
|
|
3858
3854
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3860,35 +3856,35 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3860
3856
|
width: "20",
|
|
3861
3857
|
x: "0",
|
|
3862
3858
|
y: "0"
|
|
3863
|
-
},
|
|
3859
|
+
}, ll = ["fill"], sl = { mask: "url(#mask0_180_20349)" }, cl = ["fill"], Mt = /* @__PURE__ */ z({
|
|
3864
3860
|
__name: "IconFilter",
|
|
3865
3861
|
props: {
|
|
3866
3862
|
color: {
|
|
3867
3863
|
type: String,
|
|
3868
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3864
|
+
default: `var(--kong-ui-entity-filter-color, ${Wi})`
|
|
3869
3865
|
}
|
|
3870
3866
|
},
|
|
3871
3867
|
setup(e) {
|
|
3872
|
-
return (t, n) => (m(), S("svg",
|
|
3873
|
-
|
|
3874
|
-
|
|
3868
|
+
return (t, n) => (m(), S("svg", al, [
|
|
3869
|
+
B("mask", ol, [
|
|
3870
|
+
B("rect", {
|
|
3875
3871
|
fill: e.color,
|
|
3876
3872
|
height: "20",
|
|
3877
3873
|
width: "20"
|
|
3878
|
-
}, null, 8,
|
|
3874
|
+
}, null, 8, ll)
|
|
3879
3875
|
]),
|
|
3880
|
-
|
|
3881
|
-
|
|
3876
|
+
B("g", sl, [
|
|
3877
|
+
B("path", {
|
|
3882
3878
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3883
3879
|
fill: e.color
|
|
3884
|
-
}, null, 8,
|
|
3880
|
+
}, null, 8, cl)
|
|
3885
3881
|
])
|
|
3886
3882
|
]));
|
|
3887
3883
|
}
|
|
3888
|
-
}),
|
|
3884
|
+
}), ul = {
|
|
3889
3885
|
key: 1,
|
|
3890
3886
|
class: "kong-ui-entity-filter"
|
|
3891
|
-
},
|
|
3887
|
+
}, dl = { class: "kong-ui-entity-filter-menu" }, fl = ["data-testid"], pl = ["onClick", "onKeydown"], ml = { class: "menu-item-indicator" }, hl = { class: "menu-item-body" }, gl = ["for"], yl = { class: "menu-item-buttons" }, vl = { class: "filter-clear-button-container" }, bl = /* @__PURE__ */ z({
|
|
3892
3888
|
__name: "EntityFilter",
|
|
3893
3889
|
props: {
|
|
3894
3890
|
// filter config, either exact match or fuzzy match
|
|
@@ -3908,161 +3904,161 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
3908
3904
|
},
|
|
3909
3905
|
emits: ["update:modelValue"],
|
|
3910
3906
|
setup(e, { emit: t }) {
|
|
3911
|
-
const { i18n: { t: n } } = Y.useI18n(), i = e, r = t, o = K(!1), a = K({}),
|
|
3912
|
-
const
|
|
3913
|
-
return new URLSearchParams(i.modelValue).forEach((A,
|
|
3914
|
-
A !== "" &&
|
|
3915
|
-
}),
|
|
3916
|
-
}), c =
|
|
3917
|
-
const
|
|
3918
|
-
return Object.keys(
|
|
3919
|
-
var
|
|
3920
|
-
return (
|
|
3907
|
+
const { i18n: { t: n } } = Y.useI18n(), i = e, r = t, o = K(!1), a = K({}), l = K(/* @__PURE__ */ new Set()), s = F(() => {
|
|
3908
|
+
const w = [];
|
|
3909
|
+
return new URLSearchParams(i.modelValue).forEach((A, E) => {
|
|
3910
|
+
A !== "" && w.push(E);
|
|
3911
|
+
}), w;
|
|
3912
|
+
}), c = F(() => {
|
|
3913
|
+
const w = i.config.fields;
|
|
3914
|
+
return Object.keys(w).filter((A) => {
|
|
3915
|
+
var E;
|
|
3916
|
+
return (E = w == null ? void 0 : w[A]) == null ? void 0 : E.searchable;
|
|
3921
3917
|
}).map((A) => ({
|
|
3922
|
-
label:
|
|
3918
|
+
label: w[A].label || A,
|
|
3923
3919
|
value: A,
|
|
3924
3920
|
expanded: !1
|
|
3925
3921
|
}));
|
|
3926
3922
|
});
|
|
3927
|
-
be(() => i.modelValue, (
|
|
3928
|
-
a.value = {}, new URLSearchParams(
|
|
3929
|
-
a.value[
|
|
3923
|
+
be(() => i.modelValue, (w) => {
|
|
3924
|
+
a.value = {}, new URLSearchParams(w).forEach((A, E) => {
|
|
3925
|
+
a.value[E] = A;
|
|
3930
3926
|
});
|
|
3931
3927
|
});
|
|
3932
3928
|
const d = () => {
|
|
3933
3929
|
o.value = !o.value;
|
|
3934
|
-
}, u = (
|
|
3935
|
-
|
|
3936
|
-
},
|
|
3937
|
-
r("update:modelValue",
|
|
3938
|
-
},
|
|
3939
|
-
|
|
3940
|
-
},
|
|
3941
|
-
var A,
|
|
3942
|
-
return (((
|
|
3943
|
-
},
|
|
3944
|
-
var A,
|
|
3945
|
-
return ((
|
|
3946
|
-
}, k = (
|
|
3930
|
+
}, u = (w) => {
|
|
3931
|
+
l.value.has(w) ? l.value.delete(w) : l.value.add(w);
|
|
3932
|
+
}, h = (w) => {
|
|
3933
|
+
r("update:modelValue", w);
|
|
3934
|
+
}, p = () => {
|
|
3935
|
+
h("");
|
|
3936
|
+
}, y = (w) => `filter-${w}`, b = (w) => {
|
|
3937
|
+
var A, E;
|
|
3938
|
+
return (((E = (A = i.config.schema) == null ? void 0 : A[w]) == null ? void 0 : E.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
3939
|
+
}, C = (w) => {
|
|
3940
|
+
var A, E;
|
|
3941
|
+
return ((E = (A = i.config.schema) == null ? void 0 : A[w]) == null ? void 0 : E.type) ?? "text";
|
|
3942
|
+
}, k = (w) => {
|
|
3947
3943
|
a.value = {
|
|
3948
3944
|
...a.value,
|
|
3949
|
-
[
|
|
3950
|
-
},
|
|
3951
|
-
},
|
|
3952
|
-
a.value = {},
|
|
3953
|
-
},
|
|
3954
|
-
const A = Object.keys(a.value).reduce((
|
|
3955
|
-
|
|
3956
|
-
}, W = (
|
|
3957
|
-
var A,
|
|
3958
|
-
return !!((
|
|
3959
|
-
}, X = (
|
|
3945
|
+
[w]: ""
|
|
3946
|
+
}, R();
|
|
3947
|
+
}, x = () => {
|
|
3948
|
+
a.value = {}, R(!0);
|
|
3949
|
+
}, R = (w = !1) => {
|
|
3950
|
+
const A = Object.keys(a.value).reduce((E, f) => (a.value[f] && (E[f] = `${a.value[f]}`), E), {});
|
|
3951
|
+
w && (o.value = !1), r("update:modelValue", new URLSearchParams(A).toString());
|
|
3952
|
+
}, W = (w) => {
|
|
3953
|
+
var A, E;
|
|
3954
|
+
return !!((E = (A = i.config.schema) == null ? void 0 : A[w]) != null && E.filterFunction);
|
|
3955
|
+
}, X = (w, A) => {
|
|
3960
3956
|
var f;
|
|
3961
|
-
const
|
|
3962
|
-
return (
|
|
3957
|
+
const E = (f = i.config.schema) == null ? void 0 : f[w];
|
|
3958
|
+
return (E == null ? void 0 : E.filterFunction) === void 0 ? !0 : E.filterFunction(A);
|
|
3963
3959
|
};
|
|
3964
|
-
return (
|
|
3965
|
-
const
|
|
3966
|
-
return e.config.isExactMatch ? (m(), j(
|
|
3960
|
+
return (w, A) => {
|
|
3961
|
+
const E = P("KInput"), f = P("KButton"), g = P("KSelect");
|
|
3962
|
+
return e.config.isExactMatch ? (m(), j(E, {
|
|
3967
3963
|
key: 0,
|
|
3968
3964
|
autocomplete: "off",
|
|
3969
3965
|
class: "kong-ui-entity-filter-input",
|
|
3970
3966
|
"data-testid": "search-input",
|
|
3971
3967
|
"model-value": e.modelValue,
|
|
3972
3968
|
placeholder: e.config.placeholder,
|
|
3973
|
-
"onUpdate:modelValue":
|
|
3969
|
+
"onUpdate:modelValue": h
|
|
3974
3970
|
}, {
|
|
3975
|
-
before:
|
|
3971
|
+
before: _(() => [
|
|
3976
3972
|
M(Mt)
|
|
3977
3973
|
]),
|
|
3978
|
-
after:
|
|
3974
|
+
after: _(() => [
|
|
3979
3975
|
xe(M($(ii), {
|
|
3980
3976
|
class: "kong-ui-entity-filter-clear",
|
|
3981
3977
|
role: "button",
|
|
3982
3978
|
tabindex: "0",
|
|
3983
|
-
onClick:
|
|
3979
|
+
onClick: p
|
|
3984
3980
|
}, null, 512), [
|
|
3985
3981
|
[Ce, e.modelValue !== ""]
|
|
3986
3982
|
])
|
|
3987
3983
|
]),
|
|
3988
3984
|
_: 1
|
|
3989
|
-
}, 8, ["model-value", "placeholder"])) : (m(), S("div",
|
|
3985
|
+
}, 8, ["model-value", "placeholder"])) : (m(), S("div", ul, [
|
|
3990
3986
|
M(f, {
|
|
3991
3987
|
appearance: "tertiary",
|
|
3992
3988
|
"data-testid": "filter-button",
|
|
3993
3989
|
onClick: d
|
|
3994
3990
|
}, {
|
|
3995
|
-
default:
|
|
3991
|
+
default: _(() => [
|
|
3996
3992
|
M(Mt),
|
|
3997
|
-
q(" " +
|
|
3993
|
+
q(" " + O($(n)("filter.filterButtonText")) + " " + O(s.value.length > 0 ? `(${s.value.length})` : ""), 1)
|
|
3998
3994
|
]),
|
|
3999
3995
|
_: 1
|
|
4000
3996
|
}),
|
|
4001
|
-
xe(
|
|
3997
|
+
xe(B("div", {
|
|
4002
3998
|
class: "kong-ui-entity-filter-backdrop",
|
|
4003
3999
|
onClick: d
|
|
4004
4000
|
}, null, 512), [
|
|
4005
4001
|
[Ce, o.value]
|
|
4006
4002
|
]),
|
|
4007
|
-
xe(
|
|
4008
|
-
(m(!0), S(ue, null, ce(c.value, (
|
|
4003
|
+
xe(B("div", dl, [
|
|
4004
|
+
(m(!0), S(ue, null, ce(c.value, (v) => {
|
|
4009
4005
|
var H, J;
|
|
4010
4006
|
return m(), S("div", {
|
|
4011
|
-
key:
|
|
4007
|
+
key: v.value,
|
|
4012
4008
|
class: "kong-ui-entity-filter-menu-item",
|
|
4013
|
-
"data-testid":
|
|
4009
|
+
"data-testid": v.value
|
|
4014
4010
|
}, [
|
|
4015
|
-
|
|
4016
|
-
class: fe(["menu-item-title", { expanded:
|
|
4011
|
+
B("span", {
|
|
4012
|
+
class: fe(["menu-item-title", { expanded: l.value.has(v.value) }]),
|
|
4017
4013
|
role: "button",
|
|
4018
4014
|
tabindex: "0",
|
|
4019
|
-
onClick: (T) => u(
|
|
4020
|
-
onKeydown: zn((T) => u(
|
|
4015
|
+
onClick: (T) => u(v.value),
|
|
4016
|
+
onKeydown: zn((T) => u(v.value), ["enter"])
|
|
4021
4017
|
}, [
|
|
4022
|
-
q(
|
|
4023
|
-
xe(
|
|
4024
|
-
[Ce,
|
|
4018
|
+
q(O(v.label) + " ", 1),
|
|
4019
|
+
xe(B("span", ml, null, 512), [
|
|
4020
|
+
[Ce, s.value.includes(v.value)]
|
|
4025
4021
|
]),
|
|
4026
4022
|
M($(ri), {
|
|
4027
|
-
class: fe(["menu-item-expand-icon", { expanded:
|
|
4028
|
-
color: $(
|
|
4023
|
+
class: fe(["menu-item-expand-icon", { expanded: l.value.has(v.value) }]),
|
|
4024
|
+
color: $(Gi)
|
|
4029
4025
|
}, null, 8, ["class", "color"])
|
|
4030
|
-
], 42,
|
|
4031
|
-
xe(
|
|
4032
|
-
|
|
4026
|
+
], 42, pl),
|
|
4027
|
+
xe(B("div", hl, [
|
|
4028
|
+
B("label", {
|
|
4033
4029
|
class: "menu-item-label",
|
|
4034
|
-
for:
|
|
4035
|
-
},
|
|
4036
|
-
((J = (H = e.config.schema) == null ? void 0 : H[
|
|
4030
|
+
for: y(v.value)
|
|
4031
|
+
}, O($(n)("filter.fieldLabel")), 9, gl),
|
|
4032
|
+
((J = (H = e.config.schema) == null ? void 0 : H[v.value]) == null ? void 0 : J.type) === "select" ? (m(), j(g, {
|
|
4037
4033
|
key: 0,
|
|
4038
|
-
id:
|
|
4039
|
-
modelValue: a.value[
|
|
4040
|
-
"onUpdate:modelValue": (T) => a.value[
|
|
4041
|
-
"enable-filtering": W(
|
|
4042
|
-
"filter-function": (T) => X(
|
|
4043
|
-
items:
|
|
4034
|
+
id: y(v.value),
|
|
4035
|
+
modelValue: a.value[v.value],
|
|
4036
|
+
"onUpdate:modelValue": (T) => a.value[v.value] = T,
|
|
4037
|
+
"enable-filtering": W(v.value),
|
|
4038
|
+
"filter-function": (T) => X(v.value, T),
|
|
4039
|
+
items: b(v.value),
|
|
4044
4040
|
placeholder: $(n)("filter.selectPlaceholder")
|
|
4045
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(), j(
|
|
4041
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(), j(E, {
|
|
4046
4042
|
key: 1,
|
|
4047
|
-
id:
|
|
4048
|
-
modelValue: a.value[
|
|
4049
|
-
"onUpdate:modelValue": (T) => a.value[
|
|
4043
|
+
id: y(v.value),
|
|
4044
|
+
modelValue: a.value[v.value],
|
|
4045
|
+
"onUpdate:modelValue": (T) => a.value[v.value] = T,
|
|
4050
4046
|
autocomplete: "off",
|
|
4051
4047
|
placeholder: $(n)("filter.inputPlaceholder"),
|
|
4052
|
-
type:
|
|
4048
|
+
type: C(v.value)
|
|
4053
4049
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4054
4050
|
], 512), [
|
|
4055
|
-
[Ce,
|
|
4051
|
+
[Ce, l.value.has(v.value)]
|
|
4056
4052
|
]),
|
|
4057
|
-
xe(
|
|
4053
|
+
xe(B("div", yl, [
|
|
4058
4054
|
M(f, {
|
|
4059
4055
|
appearance: "tertiary",
|
|
4060
4056
|
"data-testid": "apply-filter",
|
|
4061
4057
|
size: "small",
|
|
4062
|
-
onClick: A[0] || (A[0] = (T) =>
|
|
4058
|
+
onClick: A[0] || (A[0] = (T) => R(!0))
|
|
4063
4059
|
}, {
|
|
4064
|
-
default:
|
|
4065
|
-
q(
|
|
4060
|
+
default: _(() => [
|
|
4061
|
+
q(O($(n)("filter.applyButtonText")), 1)
|
|
4066
4062
|
]),
|
|
4067
4063
|
_: 1
|
|
4068
4064
|
}),
|
|
@@ -4070,26 +4066,26 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4070
4066
|
appearance: "tertiary",
|
|
4071
4067
|
"data-testid": "clear-filter",
|
|
4072
4068
|
size: "small",
|
|
4073
|
-
onClick: (T) => k(
|
|
4069
|
+
onClick: (T) => k(v.value)
|
|
4074
4070
|
}, {
|
|
4075
|
-
default:
|
|
4076
|
-
q(
|
|
4071
|
+
default: _(() => [
|
|
4072
|
+
q(O($(n)("filter.clearButtonText")), 1)
|
|
4077
4073
|
]),
|
|
4078
4074
|
_: 2
|
|
4079
4075
|
}, 1032, ["onClick"])
|
|
4080
4076
|
], 512), [
|
|
4081
|
-
[Ce,
|
|
4077
|
+
[Ce, l.value.has(v.value)]
|
|
4082
4078
|
])
|
|
4083
|
-
], 8,
|
|
4079
|
+
], 8, fl);
|
|
4084
4080
|
}), 128)),
|
|
4085
|
-
|
|
4081
|
+
B("div", vl, [
|
|
4086
4082
|
M(f, {
|
|
4087
4083
|
appearance: "tertiary",
|
|
4088
4084
|
size: "small",
|
|
4089
|
-
onClick:
|
|
4085
|
+
onClick: x
|
|
4090
4086
|
}, {
|
|
4091
|
-
default:
|
|
4092
|
-
q(
|
|
4087
|
+
default: _(() => [
|
|
4088
|
+
q(O($(n)("filter.clearAllButtonText")), 1)
|
|
4093
4089
|
]),
|
|
4094
4090
|
_: 1
|
|
4095
4091
|
})
|
|
@@ -4100,7 +4096,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4100
4096
|
]));
|
|
4101
4097
|
};
|
|
4102
4098
|
}
|
|
4103
|
-
}),
|
|
4099
|
+
}), gs = /* @__PURE__ */ se(bl, [["__scopeId", "data-v-084f7978"]]), ys = /* @__PURE__ */ z({
|
|
4104
4100
|
__name: "EntityToggleModal",
|
|
4105
4101
|
props: {
|
|
4106
4102
|
visible: {
|
|
@@ -4132,9 +4128,9 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4132
4128
|
},
|
|
4133
4129
|
emits: ["cancel", "proceed"],
|
|
4134
4130
|
setup(e, { emit: t }) {
|
|
4135
|
-
const { i18n: { t: n }, i18nT: i } = Y.useI18n(), r = e, o = t, a = K(!1),
|
|
4131
|
+
const { i18n: { t: n }, i18nT: i } = Y.useI18n(), r = e, o = t, a = K(!1), l = F(
|
|
4136
4132
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4137
|
-
),
|
|
4133
|
+
), s = F(
|
|
4138
4134
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4139
4135
|
), c = () => o("cancel"), d = async () => {
|
|
4140
4136
|
if (r.onConfirm) {
|
|
@@ -4148,28 +4144,28 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4148
4144
|
}
|
|
4149
4145
|
}
|
|
4150
4146
|
};
|
|
4151
|
-
return (u,
|
|
4152
|
-
const
|
|
4147
|
+
return (u, h) => {
|
|
4148
|
+
const p = P("KPrompt");
|
|
4153
4149
|
return m(), j(Ht, { to: "body" }, [
|
|
4154
|
-
M(
|
|
4150
|
+
M(p, {
|
|
4155
4151
|
"action-button-disabled": a.value,
|
|
4156
|
-
"action-button-text":
|
|
4152
|
+
"action-button-text": s.value,
|
|
4157
4153
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
4158
|
-
title:
|
|
4154
|
+
title: l.value,
|
|
4159
4155
|
visible: e.visible,
|
|
4160
4156
|
onCancel: c,
|
|
4161
4157
|
onProceed: d
|
|
4162
4158
|
}, {
|
|
4163
|
-
default:
|
|
4159
|
+
default: _(() => [
|
|
4164
4160
|
M($(i), {
|
|
4165
4161
|
keypath: `toggleModal.${r.action}.message`,
|
|
4166
4162
|
scope: "global"
|
|
4167
4163
|
}, {
|
|
4168
|
-
entityType:
|
|
4169
|
-
q(
|
|
4164
|
+
entityType: _(() => [
|
|
4165
|
+
q(O(e.entityType), 1)
|
|
4170
4166
|
]),
|
|
4171
|
-
entityName:
|
|
4172
|
-
|
|
4167
|
+
entityName: _(() => [
|
|
4168
|
+
B("strong", null, O(e.entityName), 1)
|
|
4173
4169
|
]),
|
|
4174
4170
|
_: 1
|
|
4175
4171
|
}, 8, ["keypath"])
|
|
@@ -4179,7 +4175,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4179
4175
|
]);
|
|
4180
4176
|
};
|
|
4181
4177
|
}
|
|
4182
|
-
}),
|
|
4178
|
+
}), vs = /* @__PURE__ */ z({
|
|
4183
4179
|
__name: "PermissionsWrapper",
|
|
4184
4180
|
props: {
|
|
4185
4181
|
/**
|
|
@@ -4201,7 +4197,7 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4201
4197
|
}
|
|
4202
4198
|
},
|
|
4203
4199
|
setup(e) {
|
|
4204
|
-
const t = e, n = K(void 0), i =
|
|
4200
|
+
const t = e, n = K(void 0), i = F(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4205
4201
|
return be(() => t.authFunction, async () => {
|
|
4206
4202
|
n.value = await t.authFunction();
|
|
4207
4203
|
}, { immediate: !0 }), (r, o) => i.value ? D(r.$slots, "default", {
|
|
@@ -4212,37 +4208,37 @@ const Ko = { class: "yaml-config config-card-code-block" }, qn = /* @__PURE__ */
|
|
|
4212
4208
|
}), te = [];
|
|
4213
4209
|
for (let e = 0; e < 256; ++e)
|
|
4214
4210
|
te.push((e + 256).toString(16).slice(1));
|
|
4215
|
-
function
|
|
4211
|
+
function xl(e, t = 0) {
|
|
4216
4212
|
return (te[e[t + 0]] + te[e[t + 1]] + te[e[t + 2]] + te[e[t + 3]] + "-" + te[e[t + 4]] + te[e[t + 5]] + "-" + te[e[t + 6]] + te[e[t + 7]] + "-" + te[e[t + 8]] + te[e[t + 9]] + "-" + te[e[t + 10]] + te[e[t + 11]] + te[e[t + 12]] + te[e[t + 13]] + te[e[t + 14]] + te[e[t + 15]]).toLowerCase();
|
|
4217
4213
|
}
|
|
4218
4214
|
let Je;
|
|
4219
|
-
const
|
|
4220
|
-
function
|
|
4215
|
+
const Cl = new Uint8Array(16);
|
|
4216
|
+
function kl() {
|
|
4221
4217
|
if (!Je) {
|
|
4222
4218
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
4223
4219
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4224
4220
|
Je = crypto.getRandomValues.bind(crypto);
|
|
4225
4221
|
}
|
|
4226
|
-
return Je(
|
|
4222
|
+
return Je(Cl);
|
|
4227
4223
|
}
|
|
4228
|
-
const
|
|
4224
|
+
const Al = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), jt = { randomUUID: Al };
|
|
4229
4225
|
function wl(e, t, n) {
|
|
4230
4226
|
var r;
|
|
4231
4227
|
if (jt.randomUUID && !e)
|
|
4232
4228
|
return jt.randomUUID();
|
|
4233
4229
|
e = e || {};
|
|
4234
|
-
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ??
|
|
4230
|
+
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? kl();
|
|
4235
4231
|
if (i.length < 16)
|
|
4236
4232
|
throw new Error("Random bytes length must be >= 16");
|
|
4237
|
-
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128,
|
|
4233
|
+
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, xl(i);
|
|
4238
4234
|
}
|
|
4239
|
-
const
|
|
4235
|
+
const _l = ["aria-labelledby"], Sl = { class: "form-section-wrapper" }, $l = {
|
|
4240
4236
|
key: 1,
|
|
4241
4237
|
class: "form-section-description"
|
|
4242
|
-
},
|
|
4238
|
+
}, Tl = {
|
|
4243
4239
|
key: 2,
|
|
4244
4240
|
class: "form-section-footer"
|
|
4245
|
-
},
|
|
4241
|
+
}, Il = { class: "form-section-content" }, El = /* @__PURE__ */ z({
|
|
4246
4242
|
__name: "EntityFormSection",
|
|
4247
4243
|
props: {
|
|
4248
4244
|
title: {
|
|
@@ -4277,7 +4273,7 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4277
4273
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4278
4274
|
role: "group"
|
|
4279
4275
|
}, [
|
|
4280
|
-
|
|
4276
|
+
B("div", Sl, [
|
|
4281
4277
|
e.hideInfoHeader ? N("", !0) : (m(), S("div", {
|
|
4282
4278
|
key: 0,
|
|
4283
4279
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
@@ -4287,36 +4283,36 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4287
4283
|
id: $(n),
|
|
4288
4284
|
class: "form-section-title"
|
|
4289
4285
|
}, {
|
|
4290
|
-
default:
|
|
4291
|
-
q(
|
|
4286
|
+
default: _(() => [
|
|
4287
|
+
q(O(e.title), 1)
|
|
4292
4288
|
]),
|
|
4293
4289
|
_: 1
|
|
4294
4290
|
}, 8, ["id"])) : N("", !0),
|
|
4295
|
-
e.description || $(t).description ? (m(), S("div",
|
|
4291
|
+
e.description || $(t).description ? (m(), S("div", $l, [
|
|
4296
4292
|
D(i.$slots, "description", {}, () => [
|
|
4297
|
-
|
|
4293
|
+
B("p", null, O(e.description), 1)
|
|
4298
4294
|
], !0)
|
|
4299
4295
|
])) : N("", !0),
|
|
4300
|
-
$(t).footer ? (m(), S("div",
|
|
4296
|
+
$(t).footer ? (m(), S("div", Tl, [
|
|
4301
4297
|
D(i.$slots, "footer", {}, void 0, !0)
|
|
4302
4298
|
])) : N("", !0)
|
|
4303
4299
|
], 2)),
|
|
4304
|
-
|
|
4300
|
+
B("div", Il, [
|
|
4305
4301
|
D(i.$slots, "default", {}, void 0, !0)
|
|
4306
4302
|
])
|
|
4307
4303
|
])
|
|
4308
|
-
], 10,
|
|
4304
|
+
], 10, _l));
|
|
4309
4305
|
}
|
|
4310
|
-
}),
|
|
4306
|
+
}), bs = /* @__PURE__ */ se(El, [["__scopeId", "data-v-b1f74200"]]), Fl = { class: "ff-form-section" }, Ol = { class: "header" }, Ll = {
|
|
4311
4307
|
key: 0,
|
|
4312
4308
|
class: "step"
|
|
4313
|
-
},
|
|
4309
|
+
}, Bl = { class: "header-content" }, Rl = { class: "header-title" }, Kl = {
|
|
4314
4310
|
key: 0,
|
|
4315
4311
|
class: "header-description"
|
|
4316
|
-
},
|
|
4312
|
+
}, Nl = {
|
|
4317
4313
|
key: 1,
|
|
4318
4314
|
class: "header-extra"
|
|
4319
|
-
},
|
|
4315
|
+
}, Ml = { class: "content" }, jl = /* @__PURE__ */ z({
|
|
4320
4316
|
__name: "EntityFormBlock",
|
|
4321
4317
|
props: {
|
|
4322
4318
|
step: {},
|
|
@@ -4325,37 +4321,37 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4325
4321
|
},
|
|
4326
4322
|
setup(e) {
|
|
4327
4323
|
const t = De();
|
|
4328
|
-
return (n, i) => (m(), S("div",
|
|
4329
|
-
|
|
4330
|
-
n.step != null ? (m(), S("div",
|
|
4331
|
-
|
|
4332
|
-
|
|
4324
|
+
return (n, i) => (m(), S("div", Fl, [
|
|
4325
|
+
B("header", Ol, [
|
|
4326
|
+
n.step != null ? (m(), S("div", Ll, O(n.step), 1)) : N("", !0),
|
|
4327
|
+
B("div", Bl, [
|
|
4328
|
+
B("h2", Rl, [
|
|
4333
4329
|
D(n.$slots, "title", {}, () => [
|
|
4334
|
-
q(
|
|
4330
|
+
q(O(n.title), 1)
|
|
4335
4331
|
], !0)
|
|
4336
4332
|
]),
|
|
4337
|
-
n.description || t.description ? (m(), S("div",
|
|
4333
|
+
n.description || t.description ? (m(), S("div", Kl, [
|
|
4338
4334
|
D(n.$slots, "description", {}, () => [
|
|
4339
|
-
q(
|
|
4335
|
+
q(O(n.description), 1)
|
|
4340
4336
|
], !0)
|
|
4341
4337
|
])) : N("", !0)
|
|
4342
4338
|
]),
|
|
4343
|
-
t.extra ? (m(), S("div",
|
|
4339
|
+
t.extra ? (m(), S("div", Nl, [
|
|
4344
4340
|
D(n.$slots, "extra", {}, void 0, !0)
|
|
4345
4341
|
])) : N("", !0)
|
|
4346
4342
|
]),
|
|
4347
|
-
|
|
4343
|
+
B("div", Ml, [
|
|
4348
4344
|
D(n.$slots, "default", {}, void 0, !0)
|
|
4349
4345
|
])
|
|
4350
4346
|
]));
|
|
4351
4347
|
}
|
|
4352
|
-
}),
|
|
4348
|
+
}), xs = /* @__PURE__ */ se(jl, [["__scopeId", "data-v-cb6d2e95"]]), Dl = {
|
|
4353
4349
|
class: "kong-ui-public-entity-link",
|
|
4354
4350
|
"data-testid": "entity-link-parent"
|
|
4355
|
-
},
|
|
4351
|
+
}, Pl = {
|
|
4356
4352
|
key: 0,
|
|
4357
4353
|
class: "deleted-entity"
|
|
4358
|
-
},
|
|
4354
|
+
}, Ul = { key: 1 }, ql = ["onClick"], Hl = /* @__PURE__ */ z({
|
|
4359
4355
|
__name: "EntityLink",
|
|
4360
4356
|
props: {
|
|
4361
4357
|
entityLinkData: {
|
|
@@ -4379,64 +4375,64 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4379
4375
|
}
|
|
4380
4376
|
},
|
|
4381
4377
|
setup(e) {
|
|
4382
|
-
const t = e, n = K(), { isTruncated: i } = Y.useTruncationDetector(n), { i18n: { t: r } } = Y.useI18n(), o = r("global.actions.copyId"), a = K(o),
|
|
4378
|
+
const t = e, n = K(), { isTruncated: i } = Y.useTruncationDetector(n), { i18n: { t: r } } = Y.useI18n(), o = r("global.actions.copyId"), a = K(o), l = F(() => t.entityLinkData.deleted ?? !1), s = F(() => {
|
|
4383
4379
|
var u;
|
|
4384
4380
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4385
|
-
}), c =
|
|
4381
|
+
}), c = F(() => {
|
|
4386
4382
|
var u;
|
|
4387
|
-
return `${(u =
|
|
4383
|
+
return `${(u = s.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4388
4384
|
}), d = async (u) => {
|
|
4389
|
-
await u(
|
|
4385
|
+
await u(s.value || "") && (a.value = r("global.actions.copyToClipboard"), setTimeout(() => {
|
|
4390
4386
|
a.value = o;
|
|
4391
4387
|
}, 1800));
|
|
4392
4388
|
};
|
|
4393
|
-
return (u,
|
|
4394
|
-
const
|
|
4395
|
-
return m(), S("div",
|
|
4396
|
-
|
|
4389
|
+
return (u, h) => {
|
|
4390
|
+
const p = P("KTooltip"), y = P("KExternalLink"), b = P("KClipboardProvider");
|
|
4391
|
+
return m(), S("div", Dl, [
|
|
4392
|
+
l.value ? (m(), S("div", Pl, O(c.value), 1)) : s.value ? s.value ? (m(), j(y, {
|
|
4397
4393
|
key: 2,
|
|
4398
4394
|
class: "entity-link",
|
|
4399
4395
|
"hide-icon": !e.newWindow,
|
|
4400
4396
|
href: e.externalLink,
|
|
4401
4397
|
target: e.newWindow ? "_blank" : "_self"
|
|
4402
4398
|
}, {
|
|
4403
|
-
default:
|
|
4404
|
-
M(
|
|
4399
|
+
default: _(() => [
|
|
4400
|
+
M(p, {
|
|
4405
4401
|
text: $(i) && e.entityLinkData.label || ""
|
|
4406
4402
|
}, {
|
|
4407
|
-
default:
|
|
4408
|
-
|
|
4403
|
+
default: _(() => [
|
|
4404
|
+
B("span", {
|
|
4409
4405
|
ref_key: "textContent",
|
|
4410
4406
|
ref: n,
|
|
4411
4407
|
class: "entity-link-label"
|
|
4412
|
-
},
|
|
4408
|
+
}, O(e.entityLinkData.label), 513)
|
|
4413
4409
|
]),
|
|
4414
4410
|
_: 1
|
|
4415
4411
|
}, 8, ["text"])
|
|
4416
4412
|
]),
|
|
4417
4413
|
_: 1
|
|
4418
|
-
}, 8, ["hide-icon", "href", "target"])) : N("", !0) : (m(), S("div",
|
|
4419
|
-
|
|
4414
|
+
}, 8, ["hide-icon", "href", "target"])) : N("", !0) : (m(), S("div", Ul, O(" – "))),
|
|
4415
|
+
s.value && e.allowCopy ? (m(), j(p, {
|
|
4420
4416
|
key: a.value,
|
|
4421
4417
|
class: "copy-uuid-tooltip",
|
|
4422
4418
|
"max-width": "160",
|
|
4423
4419
|
placement: "bottom-end",
|
|
4424
4420
|
text: a.value
|
|
4425
4421
|
}, {
|
|
4426
|
-
default:
|
|
4427
|
-
M(
|
|
4428
|
-
default:
|
|
4429
|
-
|
|
4422
|
+
default: _(() => [
|
|
4423
|
+
M(b, null, {
|
|
4424
|
+
default: _(({ copyToClipboard: C }) => [
|
|
4425
|
+
B("span", {
|
|
4430
4426
|
class: "entity-link-copy-id",
|
|
4431
|
-
onClick: Le((k) => d(
|
|
4427
|
+
onClick: Le((k) => d(C), ["stop"])
|
|
4432
4428
|
}, [
|
|
4433
4429
|
M($(ai), {
|
|
4434
4430
|
class: "copy-icon",
|
|
4435
|
-
color: $(
|
|
4431
|
+
color: $(zi),
|
|
4436
4432
|
"data-testid": "copy-id",
|
|
4437
|
-
size: $(
|
|
4433
|
+
size: $(Zi)
|
|
4438
4434
|
}, null, 8, ["color", "size"])
|
|
4439
|
-
], 8,
|
|
4435
|
+
], 8, ql)
|
|
4440
4436
|
]),
|
|
4441
4437
|
_: 1
|
|
4442
4438
|
})
|
|
@@ -4446,34 +4442,34 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4446
4442
|
]);
|
|
4447
4443
|
};
|
|
4448
4444
|
}
|
|
4449
|
-
}),
|
|
4445
|
+
}), Cs = /* @__PURE__ */ se(Hl, [["__scopeId", "data-v-96efdfa5"]]), Vl = { class: "kong-ui-public-entity-empty-state" }, Yl = { class: "entity-empty-state-content" }, Wl = {
|
|
4450
4446
|
key: 0,
|
|
4451
4447
|
class: "empty-state-image"
|
|
4452
|
-
},
|
|
4448
|
+
}, Jl = {
|
|
4453
4449
|
key: 1,
|
|
4454
4450
|
class: "entity-empty-state-title"
|
|
4455
|
-
},
|
|
4451
|
+
}, Gl = {
|
|
4456
4452
|
key: 2,
|
|
4457
4453
|
class: "entity-empty-state-description"
|
|
4458
|
-
},
|
|
4454
|
+
}, zl = {
|
|
4459
4455
|
key: 3,
|
|
4460
4456
|
class: "entity-empty-state-pricing"
|
|
4461
|
-
},
|
|
4457
|
+
}, Ql = {
|
|
4462
4458
|
key: 0,
|
|
4463
4459
|
class: "entity-empty-state-message"
|
|
4464
|
-
},
|
|
4460
|
+
}, Zl = {
|
|
4465
4461
|
key: 1,
|
|
4466
4462
|
class: "entity-empty-state-action"
|
|
4467
|
-
},
|
|
4463
|
+
}, Xl = {
|
|
4468
4464
|
key: 2,
|
|
4469
4465
|
class: "entity-empty-state-card-container"
|
|
4470
|
-
},
|
|
4466
|
+
}, es = {
|
|
4471
4467
|
key: 0,
|
|
4472
4468
|
class: "feature-icon"
|
|
4473
|
-
},
|
|
4469
|
+
}, ts = { class: "card-header" }, ns = ["title"], is = {
|
|
4474
4470
|
key: 3,
|
|
4475
4471
|
class: "entity-empty-state-bottom-container"
|
|
4476
|
-
},
|
|
4472
|
+
}, rs = /* @__PURE__ */ z({
|
|
4477
4473
|
__name: "EntityEmptyState",
|
|
4478
4474
|
props: {
|
|
4479
4475
|
appearance: {
|
|
@@ -4514,56 +4510,56 @@ const Sl = ["aria-labelledby"], $l = { class: "form-section-wrapper" }, Tl = {
|
|
|
4514
4510
|
},
|
|
4515
4511
|
emits: ["click:create", "click:learn-more"],
|
|
4516
4512
|
setup(e) {
|
|
4517
|
-
const t = e, { i18n: { t: n } } = Y.useI18n(), i = K(!1), r =
|
|
4513
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), i = K(!1), r = F(() => i.value && !!t.actionButtonText), o = F(() => ht.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4518
4514
|
return nt(async () => {
|
|
4519
4515
|
i.value = await t.canCreate();
|
|
4520
4516
|
}), tt(() => Qn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4521
|
-
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a,
|
|
4522
|
-
const
|
|
4523
|
-
return m(), S("div",
|
|
4524
|
-
|
|
4525
|
-
a.$slots.image ? (m(), S("div",
|
|
4517
|
+
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, l) => {
|
|
4518
|
+
const s = P("KCard");
|
|
4519
|
+
return m(), S("div", Vl, [
|
|
4520
|
+
B("div", Yl, [
|
|
4521
|
+
a.$slots.image ? (m(), S("div", Wl, [
|
|
4526
4522
|
D(a.$slots, "image", {}, void 0, !0)
|
|
4527
4523
|
])) : N("", !0),
|
|
4528
|
-
e.title || a.$slots.title ? (m(), S("div",
|
|
4529
|
-
|
|
4524
|
+
e.title || a.$slots.title ? (m(), S("div", Jl, [
|
|
4525
|
+
B("h1", {
|
|
4530
4526
|
class: fe(o.value)
|
|
4531
4527
|
}, [
|
|
4532
4528
|
D(a.$slots, "title", {}, () => [
|
|
4533
|
-
q(
|
|
4529
|
+
q(O(e.title), 1)
|
|
4534
4530
|
], !0)
|
|
4535
4531
|
], 2)
|
|
4536
4532
|
])) : N("", !0),
|
|
4537
|
-
e.description || a.$slots.default ? (m(), S("div",
|
|
4533
|
+
e.description || a.$slots.default ? (m(), S("div", Gl, [
|
|
4538
4534
|
D(a.$slots, "default", {}, () => [
|
|
4539
|
-
|
|
4535
|
+
B("p", null, O(e.description), 1)
|
|
4540
4536
|
], !0)
|
|
4541
4537
|
])) : N("", !0),
|
|
4542
|
-
e.pricing || a.$slots.pricing ? (m(), S("div",
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4538
|
+
e.pricing || a.$slots.pricing ? (m(), S("div", zl, [
|
|
4539
|
+
B("p", null, [
|
|
4540
|
+
B("b", null, O($(n)("emptyState.pricingTitle")), 1),
|
|
4541
|
+
l[2] || (l[2] = q()),
|
|
4546
4542
|
D(a.$slots, "pricing", {}, () => [
|
|
4547
|
-
q(
|
|
4543
|
+
q(O(e.pricing), 1)
|
|
4548
4544
|
], !0)
|
|
4549
4545
|
])
|
|
4550
4546
|
])) : N("", !0)
|
|
4551
4547
|
]),
|
|
4552
|
-
a.$slots.message ? (m(), S("div",
|
|
4548
|
+
a.$slots.message ? (m(), S("div", Ql, [
|
|
4553
4549
|
D(a.$slots, "message", {}, void 0, !0)
|
|
4554
4550
|
])) : N("", !0),
|
|
4555
|
-
r.value || e.learnMore || a.$slots.actions ? (m(), S("div",
|
|
4551
|
+
r.value || e.learnMore || a.$slots.actions ? (m(), S("div", Zl, [
|
|
4556
4552
|
D(a.$slots, "actions", {}, () => [
|
|
4557
4553
|
r.value ? (m(), j($(mt), {
|
|
4558
4554
|
key: 0,
|
|
4559
4555
|
appearance: "primary",
|
|
4560
4556
|
"data-testid": "entity-create-button",
|
|
4561
4557
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4562
|
-
onClick:
|
|
4558
|
+
onClick: l[0] || (l[0] = (c) => a.$emit("click:create"))
|
|
4563
4559
|
}, {
|
|
4564
|
-
default:
|
|
4560
|
+
default: _(() => [
|
|
4565
4561
|
M($(Yt)),
|
|
4566
|
-
q(" " +
|
|
4562
|
+
q(" " + O(e.actionButtonText), 1)
|
|
4567
4563
|
]),
|
|
4568
4564
|
_: 1
|
|
4569
4565
|
}, 8, ["size"])) : N("", !0),
|
|
@@ -4572,42 +4568,42 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4572
4568
|
appearance: "secondary",
|
|
4573
4569
|
"data-testid": "entity-learn-more-button",
|
|
4574
4570
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4575
|
-
onClick:
|
|
4571
|
+
onClick: l[1] || (l[1] = (c) => a.$emit("click:learn-more"))
|
|
4576
4572
|
}, {
|
|
4577
|
-
default:
|
|
4573
|
+
default: _(() => [
|
|
4578
4574
|
M($(Vt), { decorative: "" }),
|
|
4579
|
-
q(" " +
|
|
4575
|
+
q(" " + O($(n)("emptyState.learnMore")), 1)
|
|
4580
4576
|
]),
|
|
4581
4577
|
_: 1
|
|
4582
4578
|
}, 8, ["size"])) : N("", !0)
|
|
4583
4579
|
], !0)
|
|
4584
4580
|
])) : N("", !0),
|
|
4585
|
-
e.features.length ? (m(), S("div",
|
|
4586
|
-
(m(!0), S(ue, null, ce(e.features, (c, d) => (m(), j(
|
|
4581
|
+
e.features.length ? (m(), S("div", Xl, [
|
|
4582
|
+
(m(!0), S(ue, null, ce(e.features, (c, d) => (m(), j(s, {
|
|
4587
4583
|
key: c,
|
|
4588
4584
|
class: "entity-empty-state-card"
|
|
4589
4585
|
}, {
|
|
4590
|
-
title:
|
|
4591
|
-
a.$slots[`feature-${d}-icon`] ? (m(), S("div",
|
|
4586
|
+
title: _(() => [
|
|
4587
|
+
a.$slots[`feature-${d}-icon`] ? (m(), S("div", es, [
|
|
4592
4588
|
D(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4593
4589
|
])) : N("", !0),
|
|
4594
|
-
|
|
4590
|
+
B("div", ts, O(c.title), 1)
|
|
4595
4591
|
]),
|
|
4596
|
-
default:
|
|
4597
|
-
|
|
4592
|
+
default: _(() => [
|
|
4593
|
+
B("div", {
|
|
4598
4594
|
title: c.description
|
|
4599
|
-
},
|
|
4595
|
+
}, O(c.description), 9, ns)
|
|
4600
4596
|
]),
|
|
4601
4597
|
_: 2
|
|
4602
4598
|
}, 1024))), 128))
|
|
4603
4599
|
])) : N("", !0),
|
|
4604
|
-
a.$slots.bottom ? (m(), S("div",
|
|
4600
|
+
a.$slots.bottom ? (m(), S("div", is, [
|
|
4605
4601
|
D(a.$slots, "bottom", {}, void 0, !0)
|
|
4606
4602
|
])) : N("", !0)
|
|
4607
4603
|
]);
|
|
4608
4604
|
};
|
|
4609
4605
|
}
|
|
4610
|
-
}),
|
|
4606
|
+
}), ks = /* @__PURE__ */ se(rs, [["__scopeId", "data-v-645aae54"]]), as = { key: 1 }, As = /* @__PURE__ */ z({
|
|
4611
4607
|
__name: "TableTags",
|
|
4612
4608
|
props: {
|
|
4613
4609
|
/** The tags to display in the table */
|
|
@@ -4621,7 +4617,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4621
4617
|
}
|
|
4622
4618
|
},
|
|
4623
4619
|
setup(e) {
|
|
4624
|
-
const t = e, n =
|
|
4620
|
+
const t = e, n = F(() => {
|
|
4625
4621
|
if (Array.isArray(t.tags))
|
|
4626
4622
|
return t.tags;
|
|
4627
4623
|
if (typeof t.tags == "string")
|
|
@@ -4636,65 +4632,64 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4636
4632
|
return (i, r) => {
|
|
4637
4633
|
var o;
|
|
4638
4634
|
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(), j($(ti), { key: 0 }, {
|
|
4639
|
-
default:
|
|
4635
|
+
default: _(() => [
|
|
4640
4636
|
(m(!0), S(ue, null, ce(n.value, (a) => (m(), j($(ni), {
|
|
4641
4637
|
key: a,
|
|
4642
4638
|
"max-width": e.tagMaxWidth,
|
|
4643
4639
|
onClick: r[0] || (r[0] = Le(() => {
|
|
4644
4640
|
}, ["stop"]))
|
|
4645
4641
|
}, {
|
|
4646
|
-
default:
|
|
4647
|
-
q(
|
|
4642
|
+
default: _(() => [
|
|
4643
|
+
q(O(a), 1)
|
|
4648
4644
|
]),
|
|
4649
4645
|
_: 2
|
|
4650
4646
|
}, 1032, ["max-width"]))), 128))
|
|
4651
4647
|
]),
|
|
4652
4648
|
_: 1
|
|
4653
|
-
})) : (m(), S("span",
|
|
4649
|
+
})) : (m(), S("span", as, "-"));
|
|
4654
4650
|
};
|
|
4655
4651
|
}
|
|
4656
|
-
}), { useAxios: ws, useDeleteUrlBuilder:
|
|
4652
|
+
}), { useAxios: ws, useDeleteUrlBuilder: _s, useErrors: Ss, useExternalLinkCreator: $s, useFetchUrlBuilder: Ts, useFetcher: Is, useFetcherCacheKey: Es, useDebouncedFilter: Fs, useStringHelpers: Os, useHelpers: Ls, useGatewayFeatureSupported: Bs, useTruncationDetector: Rs, useValidators: Ks, useSchemaProvider: Ns, useTableState: Ms } = Y;
|
|
4657
4653
|
export {
|
|
4658
4654
|
ht as Appearances,
|
|
4659
|
-
|
|
4655
|
+
Po as ConfigCardDisplay,
|
|
4660
4656
|
Xt as ConfigCardItem,
|
|
4661
4657
|
ae as ConfigurationSchemaSection,
|
|
4662
4658
|
V as ConfigurationSchemaType,
|
|
4663
|
-
|
|
4664
|
-
|
|
4659
|
+
fs as EntityBaseConfigCard,
|
|
4660
|
+
ps as EntityBaseForm,
|
|
4665
4661
|
si as EntityBaseFormType,
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
|
|
4670
|
-
|
|
4671
|
-
|
|
4672
|
-
|
|
4673
|
-
|
|
4662
|
+
ms as EntityBaseTable,
|
|
4663
|
+
hs as EntityDeleteModal,
|
|
4664
|
+
ks as EntityEmptyState,
|
|
4665
|
+
gs as EntityFilter,
|
|
4666
|
+
xs as EntityFormBlock,
|
|
4667
|
+
bs as EntityFormSection,
|
|
4668
|
+
Cs as EntityLink,
|
|
4669
|
+
ys as EntityToggleModal,
|
|
4674
4670
|
li as EntityTypes,
|
|
4675
|
-
ci as EventGatewayTypesArray,
|
|
4676
4671
|
me as FetcherStatus,
|
|
4677
|
-
|
|
4672
|
+
Vi as InternalLinkItem,
|
|
4678
4673
|
en as JsonCodeBlock,
|
|
4679
|
-
|
|
4674
|
+
vs as PermissionsWrapper,
|
|
4680
4675
|
it as SupportedEntityType,
|
|
4681
4676
|
Pe as SupportedEntityTypesArray,
|
|
4682
|
-
|
|
4677
|
+
As as TableTags,
|
|
4683
4678
|
Hn as TerraformCodeBlock,
|
|
4684
4679
|
qn as YamlCodeBlock,
|
|
4685
4680
|
ws as useAxios,
|
|
4686
|
-
|
|
4687
|
-
|
|
4688
|
-
|
|
4689
|
-
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4681
|
+
Fs as useDebouncedFilter,
|
|
4682
|
+
_s as useDeleteUrlBuilder,
|
|
4683
|
+
Ss as useErrors,
|
|
4684
|
+
$s as useExternalLinkCreator,
|
|
4685
|
+
Ts as useFetchUrlBuilder,
|
|
4686
|
+
Is as useFetcher,
|
|
4687
|
+
Es as useFetcherCacheKey,
|
|
4688
|
+
Bs as useGatewayFeatureSupported,
|
|
4689
|
+
Ls as useHelpers,
|
|
4690
|
+
Ns as useSchemaProvider,
|
|
4691
|
+
Os as useStringHelpers,
|
|
4692
|
+
Ms as useTableState,
|
|
4693
|
+
Rs as useTruncationDetector,
|
|
4694
|
+
Ks as useValidators
|
|
4700
4695
|
};
|