@kong-ui-public/entities-shared 3.33.2-pr.2665.fce224b51.0 → 3.33.3-pr.2665.4dd2b8e16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/entities-shared.es.js +1314 -1292
- package/dist/entities-shared.umd.js +33 -31
- package/dist/style.css +1 -1
- package/dist/types/components/common/DeckCodeBlock.vue.d.ts +1 -1
- package/dist/types/components/common/DeckCodeBlock.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-config-card/ConfigCardDisplay.vue.d.ts +1 -1
- package/dist/types/components/entity-base-config-card/ConfigCardDisplay.vue.d.ts.map +1 -1
- package/dist/types/components/entity-base-form/EntityBaseForm.vue.d.ts.map +1 -1
- package/dist/types/types/app-config.d.ts +2 -2
- package/dist/types/types/app-config.d.ts.map +1 -1
- package/dist/types/types/entity-base-form.d.ts +2 -0
- package/dist/types/types/entity-base-form.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { inject as
|
|
1
|
+
import { inject as Ut, ref as N, computed as T, unref as _, toValue as ge, watch as be, toRef as Gn, provide as qt, defineComponent as z, createBlock as M, openBlock as m, resolveDynamicComponent as De, normalizeClass as fe, withCtx as C, createElementBlock as $, createCommentVNode as j, createElementVNode as B, toDisplayString as L, Fragment as ue, renderList as ce, resolveComponent as D, createVNode as R, createTextVNode as U, useCssVars as Ht, useId as zn, useSlots as Pe, renderSlot as P, createSlots as Se, normalizeProps as Qn, guardReactiveProps as Zn, mergeProps as Vt, onMounted as nt, onBeforeMount as it, withModifiers as Be, Teleport as Yt, onUnmounted as Xn, withDirectives as xe, vShow as Ce, withKeys as ei, warn as ti } from "vue";
|
|
2
2
|
import pt from "axios";
|
|
3
|
-
import { createI18n as
|
|
4
|
-
import { BadgeMethodAppearances as
|
|
5
|
-
import { BookIcon as
|
|
6
|
-
import { useRouter as
|
|
7
|
-
var
|
|
8
|
-
const Ue = Object.values(Ee),
|
|
3
|
+
import { createI18n as ni, i18nTComponent as ii } from "@kong-ui-public/i18n";
|
|
4
|
+
import { BadgeMethodAppearances as ri, KExternalLink as ai, KButton as mt, KTruncate as oi, KBadge as li } from "@kong/kongponents";
|
|
5
|
+
import { BookIcon as Wt, LanguageShellIcon as gt, LanguageBashIcon as ht, AddIcon as Jt, CloseIcon as si, ChevronDownIcon as ci, CopyIcon as ui } from "@kong/icons";
|
|
6
|
+
import { useRouter as di } from "vue-router";
|
|
7
|
+
var fi = /* @__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))(fi || {}), pi = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(pi || {}), 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 || {}), Ee = /* @__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.ProducePolicy = "produce_policy", e.ConsumePolicy = "consume_policy", e.ClusterPolicy = "cluster_policy", e.ListenerPolicy = "listener_policy", e.SchemaRegistry = "schema_registry", e.StaticKey = "static_key", e.Other = "other", e))(Ee || {});
|
|
8
|
+
const Ue = Object.values(Ee), mi = [
|
|
9
9
|
"ca_certificate",
|
|
10
10
|
"certificate",
|
|
11
11
|
"consumer",
|
|
@@ -20,17 +20,17 @@ const Ue = Object.values(Ee), fi = [
|
|
|
20
20
|
"vault",
|
|
21
21
|
"partial"
|
|
22
22
|
/* Partial */
|
|
23
|
-
],
|
|
23
|
+
], gi = ["backend_cluster", "virtual_cluster", "listener", "produce_policy", "consume_policy", "cluster_policy", "listener_policy", "schema_registry", "static_key"];
|
|
24
24
|
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 || {});
|
|
25
25
|
const yt = [
|
|
26
26
|
"primary",
|
|
27
27
|
"secondary"
|
|
28
28
|
];
|
|
29
|
-
function
|
|
29
|
+
function hi() {
|
|
30
30
|
return {
|
|
31
31
|
getAxiosInstance: (e = {}) => {
|
|
32
32
|
try {
|
|
33
|
-
const t =
|
|
33
|
+
const t = Ut("get-axios-instance", void 0);
|
|
34
34
|
return typeof t == "function" ? t(e) : pt.create({
|
|
35
35
|
withCredentials: !0,
|
|
36
36
|
timeout: 3e4,
|
|
@@ -62,13 +62,13 @@ function yi() {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
const Ve = "khcp-user-table-preferences",
|
|
65
|
+
const Ve = "khcp-user-table-preferences", vi = {
|
|
66
66
|
pageSize: 30,
|
|
67
67
|
sortColumnKey: void 0,
|
|
68
68
|
sortColumnOrder: void 0,
|
|
69
69
|
columnVisibility: {}
|
|
70
70
|
};
|
|
71
|
-
function
|
|
71
|
+
function bi() {
|
|
72
72
|
const e = (n) => {
|
|
73
73
|
if (typeof n == "string")
|
|
74
74
|
try {
|
|
@@ -92,7 +92,7 @@ function hi() {
|
|
|
92
92
|
},
|
|
93
93
|
getTablePreferences: (n, i) => {
|
|
94
94
|
const r = t();
|
|
95
|
-
return (r == null ? void 0 : r.get(n)) || void 0 || i ||
|
|
95
|
+
return (r == null ? void 0 : r.get(n)) || void 0 || i || vi;
|
|
96
96
|
},
|
|
97
97
|
deleteAllTablePreferences: () => {
|
|
98
98
|
localStorage.removeItem(Ve);
|
|
@@ -100,22 +100,22 @@ function hi() {
|
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
function rt(e = {}) {
|
|
103
|
-
const { getAxiosInstance: t } =
|
|
103
|
+
const { getAxiosInstance: t } = hi();
|
|
104
104
|
return {
|
|
105
105
|
axiosInstance: t(e)
|
|
106
106
|
};
|
|
107
107
|
}
|
|
108
|
-
const
|
|
108
|
+
const xi = {
|
|
109
109
|
actions: {
|
|
110
110
|
copyId: "Copy ID",
|
|
111
111
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
112
112
|
copyToClipboard: "Copied successfully!",
|
|
113
113
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
114
114
|
}
|
|
115
|
-
},
|
|
115
|
+
}, Ci = {
|
|
116
116
|
message: "Are you sure you want to delete this {entityType}?",
|
|
117
117
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
118
|
-
},
|
|
118
|
+
}, ki = {
|
|
119
119
|
actions: {
|
|
120
120
|
viewConfiguration: "View Configuration",
|
|
121
121
|
save: "Save",
|
|
@@ -133,13 +133,13 @@ const vi = {
|
|
|
133
133
|
errors: {
|
|
134
134
|
edit: "The entity could not be edited at this time."
|
|
135
135
|
}
|
|
136
|
-
},
|
|
136
|
+
}, Ai = {
|
|
137
137
|
emptyState: {
|
|
138
138
|
noSearchResultsTitle: "No results found",
|
|
139
139
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
140
140
|
noSearchResultsCtaText: "Clear"
|
|
141
141
|
}
|
|
142
|
-
},
|
|
142
|
+
}, _i = {
|
|
143
143
|
title: "Configuration",
|
|
144
144
|
actions: {
|
|
145
145
|
copy: "Copy JSON"
|
|
@@ -176,10 +176,10 @@ const vi = {
|
|
|
176
176
|
entryTitle: "Entry {index}",
|
|
177
177
|
structuredFormat: "Structured"
|
|
178
178
|
}
|
|
179
|
-
},
|
|
179
|
+
}, wi = {
|
|
180
180
|
learnMore: "Learn more",
|
|
181
181
|
pricingTitle: "Pricing: "
|
|
182
|
-
},
|
|
182
|
+
}, Si = {
|
|
183
183
|
filterButtonText: "Filter",
|
|
184
184
|
fieldLabel: "Filter by:",
|
|
185
185
|
inputPlaceholder: "Enter a value",
|
|
@@ -187,17 +187,17 @@ const vi = {
|
|
|
187
187
|
applyButtonText: "Apply",
|
|
188
188
|
clearButtonText: "Clear",
|
|
189
189
|
clearAllButtonText: "Clear all filters"
|
|
190
|
-
},
|
|
190
|
+
}, $i = {
|
|
191
191
|
errors: {
|
|
192
192
|
fetch: "Could not fetch available items",
|
|
193
193
|
invalid: "Please select a valid value"
|
|
194
194
|
}
|
|
195
|
-
},
|
|
195
|
+
}, Ti = {
|
|
196
196
|
unexpected: "An unexpected error has occurred",
|
|
197
197
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
198
|
-
},
|
|
198
|
+
}, Ei = {
|
|
199
199
|
utf8Name: "The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
200
|
-
},
|
|
200
|
+
}, Ii = {
|
|
201
201
|
enable: {
|
|
202
202
|
title: "Enable {entityType}",
|
|
203
203
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -208,28 +208,32 @@ const vi = {
|
|
|
208
208
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
209
209
|
confirmText: "Yes, disable"
|
|
210
210
|
}
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
211
|
+
}, Fi = {
|
|
212
|
+
hint: "The {token} environment variable must be added first. See {link} for details.",
|
|
213
|
+
documentation: "the documentation"
|
|
214
|
+
}, Oi = {
|
|
215
|
+
global: xi,
|
|
216
|
+
deleteModal: Ci,
|
|
217
|
+
baseForm: ki,
|
|
218
|
+
baseTable: Ai,
|
|
219
|
+
baseConfigCard: _i,
|
|
220
|
+
emptyState: wi,
|
|
221
|
+
filter: Si,
|
|
222
|
+
debouncedFilter: $i,
|
|
223
|
+
errors: Ti,
|
|
224
|
+
validationErrors: Ei,
|
|
225
|
+
toggleModal: Ii,
|
|
226
|
+
deckCodeBlock: Fi
|
|
223
227
|
};
|
|
224
228
|
function qe() {
|
|
225
|
-
const e =
|
|
229
|
+
const e = ni("en-us", Oi);
|
|
226
230
|
return {
|
|
227
231
|
i18n: e,
|
|
228
|
-
i18nT:
|
|
232
|
+
i18nT: ii(e)
|
|
229
233
|
// Translation component <i18n-t>
|
|
230
234
|
};
|
|
231
235
|
}
|
|
232
|
-
function
|
|
236
|
+
function Gt() {
|
|
233
237
|
const e = (o, a) => (a == null ? void 0 : a[o]) ?? void 0, t = (o, a) => {
|
|
234
238
|
if (o.length !== a.length) return !1;
|
|
235
239
|
const s = /* @__PURE__ */ new Set([...o, ...a]);
|
|
@@ -271,69 +275,69 @@ function Wt() {
|
|
|
271
275
|
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
|
|
272
276
|
};
|
|
273
277
|
}
|
|
274
|
-
function
|
|
278
|
+
function Li(e, t, n, i = {
|
|
275
279
|
fetchedItemsKey: "data",
|
|
276
280
|
searchKeys: ["id"]
|
|
277
281
|
}) {
|
|
278
282
|
n || (n = "1000");
|
|
279
283
|
const { axiosInstance: r } = rt(e.axiosRequestConfig), { i18n: { t: o } } = qe(), { debounce: a } = yi(), s = a(async (E) => {
|
|
280
|
-
await
|
|
281
|
-
}, 200), l = N(!1), c = N(""), d = N(""), u = N([]), p = N([]),
|
|
282
|
-
const E = `${e.apiBaseUrl}${
|
|
284
|
+
await A(E);
|
|
285
|
+
}, 200), l = N(!1), c = N(""), d = N(""), u = N([]), p = N([]), h = N(void 0), g = T(() => {
|
|
286
|
+
const E = `${e.apiBaseUrl}${_(t)}`;
|
|
283
287
|
return e.app === "konnect" ? E.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" ? E.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : "") : E;
|
|
284
|
-
}), { isValidUuid:
|
|
288
|
+
}), { isValidUuid: v } = Gt(), y = async () => {
|
|
285
289
|
try {
|
|
286
290
|
l.value = !0;
|
|
287
|
-
const { data: E } = await r.get(`${
|
|
288
|
-
E != null && E.next || (
|
|
291
|
+
const { data: E } = await r.get(`${g.value}?size=${n}`);
|
|
292
|
+
E != null && E.next || (h.value = i.fetchedItemsKey in E ? E[i.fetchedItemsKey] : []), p.value = i.fetchedItemsKey in E ? E[i.fetchedItemsKey] : [], u.value = p.value;
|
|
289
293
|
} catch {
|
|
290
294
|
u.value = [], c.value = o("debouncedFilter.errors.fetch");
|
|
291
295
|
} finally {
|
|
292
296
|
l.value = !1;
|
|
293
297
|
}
|
|
294
|
-
},
|
|
295
|
-
var
|
|
296
|
-
if (
|
|
297
|
-
if (
|
|
298
|
+
}, k = N(""), A = async (E) => {
|
|
299
|
+
var W, X, S;
|
|
300
|
+
if (k.value !== E) {
|
|
301
|
+
if (k.value = E ?? "", !E) {
|
|
298
302
|
u.value = p.value;
|
|
299
303
|
return;
|
|
300
304
|
}
|
|
301
|
-
if (
|
|
305
|
+
if (h.value === void 0)
|
|
302
306
|
try {
|
|
303
307
|
if (l.value = !0, c.value = "", d.value = "", e.app === "konnect") {
|
|
304
|
-
const
|
|
308
|
+
const w = `${g.value}/${E}`, { data: O } = await r.get(`${w}?size=${n}`);
|
|
305
309
|
i.fetchedItemsKey in O ? u.value = O[i.fetchedItemsKey] : O != null && O[i.exactMatchKey ?? "id"] ? u.value = [O] : u.value = [];
|
|
306
310
|
} else {
|
|
307
|
-
const
|
|
308
|
-
|
|
309
|
-
const { data:
|
|
310
|
-
return [
|
|
311
|
-
})()) :
|
|
312
|
-
...i.searchKeys.filter((
|
|
313
|
-
const { data:
|
|
314
|
-
return
|
|
311
|
+
const w = [];
|
|
312
|
+
v(E) && i.searchKeys.includes("id") ? w.push((async () => {
|
|
313
|
+
const { data: b } = await r.get(`${g.value}/${E}`);
|
|
314
|
+
return [b[i.fetchedItemsKey] ?? b];
|
|
315
|
+
})()) : w.push(
|
|
316
|
+
...i.searchKeys.filter((b) => b !== "id").map(async (b) => {
|
|
317
|
+
const { data: x } = await r.get(`${g.value}?${b}=${E}`);
|
|
318
|
+
return x[i.fetchedItemsKey];
|
|
315
319
|
})
|
|
316
320
|
);
|
|
317
|
-
const O = await Promise.all(
|
|
318
|
-
u.value = [], (
|
|
319
|
-
var
|
|
320
|
-
(
|
|
321
|
+
const O = await Promise.all(w), f = /* @__PURE__ */ new Set();
|
|
322
|
+
u.value = [], (W = O == null ? void 0 : O.forEach) == null || W.call(O, (b) => {
|
|
323
|
+
var x;
|
|
324
|
+
(x = b == null ? void 0 : b.forEach) == null || x.call(b, (H) => {
|
|
321
325
|
f.has(H.id) || (f.add(H.id), u.value.push(H));
|
|
322
326
|
});
|
|
323
327
|
});
|
|
324
328
|
}
|
|
325
|
-
} catch (
|
|
326
|
-
((X =
|
|
329
|
+
} catch (w) {
|
|
330
|
+
((X = w == null ? void 0 : w.response) == null ? void 0 : X.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (u.value = [], c.value = o("debouncedFilter.errors.fetch"));
|
|
327
331
|
} finally {
|
|
328
332
|
l.value = !1;
|
|
329
333
|
}
|
|
330
334
|
else
|
|
331
|
-
l.value = !0, d.value = "", u.value = (
|
|
335
|
+
l.value = !0, d.value = "", u.value = (S = h.value) == null ? void 0 : S.filter((w) => {
|
|
332
336
|
var f;
|
|
333
337
|
let O = !1;
|
|
334
|
-
for (const
|
|
335
|
-
const
|
|
336
|
-
|
|
338
|
+
for (const b of i.searchKeys) {
|
|
339
|
+
const x = typeof w[b] == "string" ? (f = w[b]) == null ? void 0 : f.toLowerCase() : w[b];
|
|
340
|
+
x != null && x.includes(E.toLowerCase()) && (O = !0);
|
|
337
341
|
}
|
|
338
342
|
return O;
|
|
339
343
|
}), (!u.value || !u.value.length) && (d.value = o("debouncedFilter.errors.invalid")), l.value = !1;
|
|
@@ -344,18 +348,18 @@ function Ii(e, t, n, i = {
|
|
|
344
348
|
error: c,
|
|
345
349
|
validationError: d,
|
|
346
350
|
results: u,
|
|
347
|
-
allRecords:
|
|
348
|
-
loadItems:
|
|
351
|
+
allRecords: h,
|
|
352
|
+
loadItems: y,
|
|
349
353
|
debouncedQueryChange: s
|
|
350
354
|
};
|
|
351
355
|
}
|
|
352
|
-
function
|
|
353
|
-
const n =
|
|
356
|
+
function Bi(e, t) {
|
|
357
|
+
const n = _(t), i = T(
|
|
354
358
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
355
359
|
);
|
|
356
360
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
357
361
|
}
|
|
358
|
-
function
|
|
362
|
+
function Ki() {
|
|
359
363
|
const { i18n: { t: e } } = qe();
|
|
360
364
|
return {
|
|
361
365
|
getErrorFieldsFromError: (i) => {
|
|
@@ -427,7 +431,7 @@ function Oi() {
|
|
|
427
431
|
}
|
|
428
432
|
};
|
|
429
433
|
}
|
|
430
|
-
function
|
|
434
|
+
function Ri(e) {
|
|
431
435
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
432
436
|
try {
|
|
433
437
|
const i = e.join("/"), r = `${n}${i}`, o = e.some((s) => s.trim() === "");
|
|
@@ -438,49 +442,49 @@ function Li(e) {
|
|
|
438
442
|
return console.warn("Failed to build valid URL:", i), "";
|
|
439
443
|
}
|
|
440
444
|
}
|
|
441
|
-
function
|
|
442
|
-
const n =
|
|
443
|
-
const r =
|
|
445
|
+
function zt(e, t) {
|
|
446
|
+
const n = T(() => {
|
|
447
|
+
const r = ge(e);
|
|
444
448
|
return r.app === "konnect" || !!r.isExactMatch;
|
|
445
|
-
}), i =
|
|
446
|
-
const r =
|
|
449
|
+
}), i = T(() => {
|
|
450
|
+
const r = ge(t);
|
|
447
451
|
return r.startsWith("/") ? new URL(`${window.location.origin}${r}`) : new URL(r);
|
|
448
452
|
});
|
|
449
453
|
return (r) => {
|
|
450
454
|
const { page: o, pageSize: a, offset: s, sortColumnKey: l, sortColumnOrder: c, query: d } = r;
|
|
451
455
|
try {
|
|
452
456
|
let u = new URL(i.value.href);
|
|
453
|
-
return n.value && d ? (u.search = "", u =
|
|
454
|
-
u.searchParams.append(
|
|
457
|
+
return n.value && d ? (u.search = "", u = ge(e).isExactMatch ? new URL(`${u.href}/${d}`) : new URL(`${u.href}?filter[name][contains]=${d}`)) : (n.value || new URLSearchParams(d).forEach((p, h) => {
|
|
458
|
+
u.searchParams.append(h, p);
|
|
455
459
|
}), l && u.searchParams.append("sort_by", l), c === "desc" && u.searchParams.append("sort_desc", "1"), u.searchParams.append("size", String(a))), s && o !== 1 && u.searchParams.append("offset", String(s)), u.href;
|
|
456
460
|
} catch (u) {
|
|
457
|
-
return console.error("RouteList(fetcher)", u),
|
|
461
|
+
return console.error("RouteList(fetcher)", u), ge(t);
|
|
458
462
|
}
|
|
459
463
|
};
|
|
460
464
|
}
|
|
461
|
-
const
|
|
462
|
-
function
|
|
463
|
-
const i = N(!0), r =
|
|
465
|
+
const vt = /* @__PURE__ */ new Map();
|
|
466
|
+
function Ni(e, t, n) {
|
|
467
|
+
const i = N(!0), r = ge(e), { axiosInstance: o } = rt(r.axiosRequestConfig), a = zt(e, t), s = N({
|
|
464
468
|
status: me.Idle
|
|
465
469
|
}), l = async (u) => {
|
|
466
|
-
var
|
|
467
|
-
const p =
|
|
470
|
+
var h;
|
|
471
|
+
const p = ge(n) || "data";
|
|
468
472
|
try {
|
|
469
473
|
s.value = i.value ? { status: me.InitialLoad } : { status: me.Loading }, i.value = !1;
|
|
470
|
-
let
|
|
471
|
-
|
|
472
|
-
const
|
|
473
|
-
if (
|
|
474
|
-
throw
|
|
475
|
-
const
|
|
476
|
-
let
|
|
477
|
-
|
|
474
|
+
let g = a(u);
|
|
475
|
+
g.includes("filter[name]") && (g = `${g}&page[size]=${u.pageSize}&page[number]=${u.page}`);
|
|
476
|
+
const v = await o.get(g);
|
|
477
|
+
if (v.status >= 400)
|
|
478
|
+
throw v;
|
|
479
|
+
const y = v.data, k = p && p.replace(/[^\w-_]/gi, "");
|
|
480
|
+
let A;
|
|
481
|
+
y[k] ? A = Array.isArray(y[k]) ? y[k] : [y[k]] : Array.isArray(y) ? A = y : A = Object.keys(y).length ? [y] : [];
|
|
478
482
|
const E = {
|
|
479
|
-
data:
|
|
480
|
-
total:
|
|
481
|
-
...
|
|
483
|
+
data: A,
|
|
484
|
+
total: A.length,
|
|
485
|
+
...y.offset ? {
|
|
482
486
|
pagination: {
|
|
483
|
-
offset:
|
|
487
|
+
offset: y.offset
|
|
484
488
|
}
|
|
485
489
|
} : null
|
|
486
490
|
};
|
|
@@ -491,151 +495,151 @@ function Bi(e, t, n) {
|
|
|
491
495
|
status: me.Idle,
|
|
492
496
|
response: E
|
|
493
497
|
}, E;
|
|
494
|
-
} catch (
|
|
495
|
-
const
|
|
498
|
+
} catch (g) {
|
|
499
|
+
const v = {
|
|
496
500
|
data: [],
|
|
497
501
|
total: 0
|
|
498
502
|
};
|
|
499
|
-
return u.query && (((
|
|
503
|
+
return u.query && (((h = g.response) == null ? void 0 : h.status) === 404 || g.status === 404) ? (s.value = {
|
|
500
504
|
status: me.NoResults,
|
|
501
|
-
response:
|
|
502
|
-
error:
|
|
503
|
-
},
|
|
505
|
+
response: v,
|
|
506
|
+
error: g.response ? g : { response: g }
|
|
507
|
+
}, v) : (s.value = {
|
|
504
508
|
status: me.Error,
|
|
505
|
-
response:
|
|
506
|
-
error:
|
|
507
|
-
},
|
|
509
|
+
response: v,
|
|
510
|
+
error: g.response ? g : { response: g }
|
|
511
|
+
}, v);
|
|
508
512
|
}
|
|
509
|
-
}, c = r.cacheIdentifier, d =
|
|
513
|
+
}, c = r.cacheIdentifier, d = Qt(c);
|
|
510
514
|
return { fetcher: l, fetcherState: s, fetcherCacheKey: d };
|
|
511
515
|
}
|
|
512
|
-
function
|
|
516
|
+
function Qt(e) {
|
|
513
517
|
if (e) {
|
|
514
|
-
let t =
|
|
515
|
-
return t || (t = N(1),
|
|
518
|
+
let t = vt.get(e);
|
|
519
|
+
return t || (t = N(1), vt.set(e, t)), t;
|
|
516
520
|
}
|
|
517
521
|
return N(1);
|
|
518
522
|
}
|
|
519
|
-
function
|
|
523
|
+
function Mi() {
|
|
520
524
|
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;
|
|
521
525
|
return {
|
|
522
526
|
capitalize: (i) => i ? i.replace(t, (r) => r.toUpperCase()) : "",
|
|
523
527
|
convertKeyToTitle: e
|
|
524
528
|
};
|
|
525
529
|
}
|
|
526
|
-
const
|
|
530
|
+
const Zt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, bt = (e) => {
|
|
527
531
|
if (typeof e != "string")
|
|
528
532
|
throw new TypeError("Invalid argument expected string");
|
|
529
|
-
const t = e.match(
|
|
533
|
+
const t = e.match(Zt);
|
|
530
534
|
if (!t)
|
|
531
535
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
532
536
|
return t.shift(), t;
|
|
533
|
-
},
|
|
537
|
+
}, xt = (e) => e === "*" || e === "x" || e === "X", Ct = (e) => {
|
|
534
538
|
const t = parseInt(e, 10);
|
|
535
539
|
return isNaN(t) ? e : t;
|
|
536
|
-
},
|
|
537
|
-
if (
|
|
540
|
+
}, ji = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Di = (e, t) => {
|
|
541
|
+
if (xt(e) || xt(t))
|
|
538
542
|
return 0;
|
|
539
|
-
const [n, i] =
|
|
543
|
+
const [n, i] = ji(Ct(e), Ct(t));
|
|
540
544
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
541
|
-
},
|
|
545
|
+
}, kt = (e, t) => {
|
|
542
546
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
543
|
-
const i =
|
|
547
|
+
const i = Di(e[n] || "0", t[n] || "0");
|
|
544
548
|
if (i !== 0)
|
|
545
549
|
return i;
|
|
546
550
|
}
|
|
547
551
|
return 0;
|
|
548
|
-
},
|
|
549
|
-
const n =
|
|
550
|
-
return a !== 0 ? a : r && o ?
|
|
551
|
-
},
|
|
552
|
-
|
|
553
|
-
const i =
|
|
554
|
-
return
|
|
555
|
-
},
|
|
552
|
+
}, Pi = (e, t) => {
|
|
553
|
+
const n = bt(e), i = bt(t), r = n.pop(), o = i.pop(), a = kt(n, i);
|
|
554
|
+
return a !== 0 ? a : r && o ? kt(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
555
|
+
}, At = (e, t, n) => {
|
|
556
|
+
Ui(n);
|
|
557
|
+
const i = Pi(e, t);
|
|
558
|
+
return Xt[n].includes(i);
|
|
559
|
+
}, Xt = {
|
|
556
560
|
">": [1],
|
|
557
561
|
">=": [0, 1],
|
|
558
562
|
"=": [0],
|
|
559
563
|
"<=": [-1, 0],
|
|
560
564
|
"<": [-1],
|
|
561
565
|
"!=": [-1, 1]
|
|
562
|
-
},
|
|
566
|
+
}, _t = Object.keys(Xt), Ui = (e) => {
|
|
563
567
|
if (typeof e != "string")
|
|
564
568
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
565
|
-
if (
|
|
566
|
-
throw new Error(`Invalid operator, expected one of ${
|
|
567
|
-
},
|
|
568
|
-
function
|
|
569
|
+
if (_t.indexOf(e) === -1)
|
|
570
|
+
throw new Error(`Invalid operator, expected one of ${_t.join("|")}`);
|
|
571
|
+
}, qi = (e) => typeof e == "string" && /^[v\d]/.test(e) && Zt.test(e);
|
|
572
|
+
function Hi(e) {
|
|
569
573
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
570
574
|
if (!t)
|
|
571
575
|
return !0;
|
|
572
576
|
const { edition: i, version: r } = t;
|
|
573
|
-
if (!
|
|
577
|
+
if (!qi(r))
|
|
574
578
|
return console.error("Invalid version"), !1;
|
|
575
579
|
const o = n[i];
|
|
576
580
|
if (!o)
|
|
577
581
|
return !1;
|
|
578
582
|
const [a, s] = o;
|
|
579
|
-
return !(a &&
|
|
583
|
+
return !(a && At(r, a, "<") || s && At(r, s, ">"));
|
|
580
584
|
}
|
|
581
|
-
function
|
|
585
|
+
function Vi(e) {
|
|
582
586
|
const t = N(0), n = N(0), i = N(!1);
|
|
583
587
|
return be(e, (o) => {
|
|
584
588
|
o && !i.value && (t.value = o.offsetWidth, n.value = o.scrollWidth, i.value = !0);
|
|
585
589
|
}), {
|
|
586
|
-
isTruncated:
|
|
590
|
+
isTruncated: T(() => t.value < n.value)
|
|
587
591
|
};
|
|
588
592
|
}
|
|
589
|
-
function
|
|
593
|
+
function Yi() {
|
|
590
594
|
const { i18n: { t: e } } = qe();
|
|
591
595
|
return {
|
|
592
596
|
utf8Name: (n) => /^[\p{N}\p{L}.\-_~]*$/u.test(n) ? "" : e("validationErrors.utf8Name")
|
|
593
597
|
};
|
|
594
598
|
}
|
|
595
|
-
const ze = Symbol("schema"),
|
|
596
|
-
|
|
597
|
-
},
|
|
599
|
+
const ze = Symbol("schema"), Wi = (e) => {
|
|
600
|
+
qt(ze, e);
|
|
601
|
+
}, Ji = (e) => {
|
|
598
602
|
var r, o;
|
|
599
|
-
const t =
|
|
600
|
-
return
|
|
603
|
+
const t = Ut(ze, 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 = Gn(n == null ? void 0 : n[e]);
|
|
604
|
+
return qt(ze, i), i;
|
|
601
605
|
};
|
|
602
|
-
function
|
|
606
|
+
function Gi(e) {
|
|
603
607
|
let t = "";
|
|
604
|
-
const n = N(!1), i = N(null), r =
|
|
608
|
+
const n = N(!1), i = N(null), r = T(() => {
|
|
605
609
|
let a;
|
|
606
|
-
return n.value ? a = !0 : i.value ? a = i.value.hasData || e &&
|
|
610
|
+
return n.value ? a = !0 : i.value ? a = i.value.hasData || e && ge(e) : a = !1, !a;
|
|
607
611
|
});
|
|
608
612
|
return {
|
|
609
613
|
tableState: i,
|
|
610
614
|
hasRecords: n,
|
|
611
615
|
hideTableToolbar: r,
|
|
612
616
|
handleStateChange: (a) => {
|
|
613
|
-
a.hasData ? n.value = !0 : a.state === "success" && !a.hasData && (!e || !t) && (n.value = !1), e && (t =
|
|
617
|
+
a.hasData ? n.value = !0 : a.state === "success" && !a.hasData && (!e || !t) && (n.value = !1), e && (t = ge(e)), i.value = { ...a };
|
|
614
618
|
}
|
|
615
619
|
};
|
|
616
620
|
}
|
|
617
|
-
const
|
|
621
|
+
const Y = {
|
|
618
622
|
useAxios: rt,
|
|
619
|
-
useDebouncedFilter:
|
|
620
|
-
useDeleteUrlBuilder:
|
|
621
|
-
useErrors:
|
|
622
|
-
useExternalLinkCreator:
|
|
623
|
-
useFetcher:
|
|
624
|
-
useFetcherCacheKey:
|
|
625
|
-
useFetchUrlBuilder:
|
|
626
|
-
useHelpers:
|
|
627
|
-
useStringHelpers:
|
|
623
|
+
useDebouncedFilter: Li,
|
|
624
|
+
useDeleteUrlBuilder: Bi,
|
|
625
|
+
useErrors: Ki,
|
|
626
|
+
useExternalLinkCreator: Ri,
|
|
627
|
+
useFetcher: Ni,
|
|
628
|
+
useFetcherCacheKey: Qt,
|
|
629
|
+
useFetchUrlBuilder: zt,
|
|
630
|
+
useHelpers: Gt,
|
|
631
|
+
useStringHelpers: Mi,
|
|
628
632
|
useI18n: qe,
|
|
629
|
-
useGatewayFeatureSupported:
|
|
630
|
-
useTruncationDetector:
|
|
631
|
-
useValidators:
|
|
632
|
-
useSchemaProvider:
|
|
633
|
-
useSubSchema:
|
|
634
|
-
useTableState:
|
|
635
|
-
},
|
|
633
|
+
useGatewayFeatureSupported: Hi,
|
|
634
|
+
useTruncationDetector: Vi,
|
|
635
|
+
useValidators: Yi,
|
|
636
|
+
useSchemaProvider: Wi,
|
|
637
|
+
useSubSchema: Ji,
|
|
638
|
+
useTableState: Gi
|
|
639
|
+
}, zi = {
|
|
636
640
|
key: 0,
|
|
637
641
|
class: "config-card-fieldset-title"
|
|
638
|
-
},
|
|
642
|
+
}, Qi = /* @__PURE__ */ z({
|
|
639
643
|
__name: "JsonCardItem",
|
|
640
644
|
props: {
|
|
641
645
|
item: {
|
|
@@ -652,25 +656,25 @@ const W = {
|
|
|
652
656
|
}
|
|
653
657
|
},
|
|
654
658
|
setup(e) {
|
|
655
|
-
const t = e, { i18n: { t: n } } =
|
|
659
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), { convertKeyToTitle: i } = Y.useStringHelpers(), r = T(() => t.item.key ?? "json-array-item"), o = T(() => t.item.value ?? t.item), a = T(() => {
|
|
656
660
|
const l = JSON.parse(JSON.stringify(o.value));
|
|
657
661
|
return t.isArrayItem && delete l.name, l;
|
|
658
|
-
}), s =
|
|
662
|
+
}), s = T(() => {
|
|
659
663
|
var l;
|
|
660
664
|
return t.isArrayItem ? (l = o.value) != null && l.name ? i(o.value.name, "_") : n("baseConfigCard.general.entryTitle", { index: t.index }) : "";
|
|
661
665
|
});
|
|
662
|
-
return (l, c) => (m(),
|
|
666
|
+
return (l, c) => (m(), M(De(e.isArrayItem ? "fieldset" : "div"), {
|
|
663
667
|
class: fe(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
664
668
|
}, {
|
|
665
|
-
default:
|
|
666
|
-
e.isArrayItem ? (m(),
|
|
669
|
+
default: C(() => [
|
|
670
|
+
e.isArrayItem ? (m(), $("legend", zi, [
|
|
667
671
|
B("b", null, L(s.value), 1)
|
|
668
|
-
])) :
|
|
669
|
-
(m(!0),
|
|
672
|
+
])) : j("", !0),
|
|
673
|
+
(m(!0), $(ue, null, ce(Object.keys(a.value), (d, u) => (m(), M(tn, {
|
|
670
674
|
key: `${r.value}-property-${u}`,
|
|
671
675
|
item: {
|
|
672
676
|
key: d,
|
|
673
|
-
label:
|
|
677
|
+
label: _(i)(d),
|
|
674
678
|
value: a.value[d]
|
|
675
679
|
}
|
|
676
680
|
}, null, 8, ["item"]))), 128))
|
|
@@ -678,12 +682,12 @@ const W = {
|
|
|
678
682
|
_: 1
|
|
679
683
|
}, 8, ["class"]));
|
|
680
684
|
}
|
|
681
|
-
}),
|
|
685
|
+
}), le = (e, t) => {
|
|
682
686
|
const n = e.__vccOpts || e;
|
|
683
687
|
for (const [i, r] of t)
|
|
684
688
|
n[i] = r;
|
|
685
689
|
return n;
|
|
686
|
-
},
|
|
690
|
+
}, en = /* @__PURE__ */ le(Qi, [["__scopeId", "data-v-dc1e39a1"]]), Zi = /* @__PURE__ */ z({
|
|
687
691
|
__name: "InternalLinkItem",
|
|
688
692
|
props: {
|
|
689
693
|
item: {
|
|
@@ -693,24 +697,24 @@ const W = {
|
|
|
693
697
|
},
|
|
694
698
|
emits: ["navigation-click"],
|
|
695
699
|
setup(e) {
|
|
696
|
-
const { i18n: { t } } =
|
|
700
|
+
const { i18n: { t } } = Y.useI18n();
|
|
697
701
|
return (n, i) => {
|
|
698
702
|
const r = D("KButton");
|
|
699
|
-
return m(),
|
|
700
|
-
|
|
703
|
+
return m(), $("div", null, [
|
|
704
|
+
R(r, {
|
|
701
705
|
appearance: "tertiary",
|
|
702
706
|
class: "navigation-button",
|
|
703
707
|
onClick: i[0] || (i[0] = (o) => n.$emit("navigation-click", e.item))
|
|
704
708
|
}, {
|
|
705
|
-
default:
|
|
706
|
-
U(L(e.item.value ||
|
|
709
|
+
default: C(() => [
|
|
710
|
+
U(L(e.item.value || _(t)("baseConfigCard.commonFields.link")), 1)
|
|
707
711
|
]),
|
|
708
712
|
_: 1
|
|
709
713
|
})
|
|
710
714
|
]);
|
|
711
715
|
};
|
|
712
716
|
}
|
|
713
|
-
}),
|
|
717
|
+
}), Xi = /* @__PURE__ */ le(Zi, [["__scopeId", "data-v-2feb8c2e"]]), er = /* @__PURE__ */ z({
|
|
714
718
|
__name: "StatusBadge",
|
|
715
719
|
props: {
|
|
716
720
|
status: {
|
|
@@ -719,24 +723,24 @@ const W = {
|
|
|
719
723
|
}
|
|
720
724
|
},
|
|
721
725
|
setup(e) {
|
|
722
|
-
const { i18n: { t } } =
|
|
726
|
+
const { i18n: { t } } = Y.useI18n();
|
|
723
727
|
return (n, i) => {
|
|
724
728
|
const r = D("KBadge");
|
|
725
|
-
return m(),
|
|
729
|
+
return m(), M(r, {
|
|
726
730
|
appearance: e.status ? "success" : "neutral"
|
|
727
731
|
}, {
|
|
728
|
-
default:
|
|
729
|
-
U(L(e.status ?
|
|
732
|
+
default: C(() => [
|
|
733
|
+
U(L(e.status ? _(t)("baseConfigCard.statusBadge.enabledLabel") : _(t)("baseConfigCard.statusBadge.disabledLabel")), 1)
|
|
730
734
|
]),
|
|
731
735
|
_: 1
|
|
732
736
|
}, 8, ["appearance"]);
|
|
733
737
|
};
|
|
734
738
|
}
|
|
735
|
-
}),
|
|
739
|
+
}), tr = "#0044f4", nr = "#e0e4ea", ir = "#afb7c5", rr = "#0044f4", ar = "1px", or = "16px", lr = "20px", sr = { class: "config-card-details-row" }, cr = ["data-testid"], ur = ["data-testid"], dr = ["data-testid"], fr = ["data-testid"], pr = { key: 1 }, mr = ["data-testid"], gr = ["data-testid"], hr = ["data-testid"], yr = ["data-testid"], vr = {
|
|
736
740
|
name: "ConfigCardItem",
|
|
737
|
-
components: { JsonCardItem:
|
|
738
|
-
},
|
|
739
|
-
...
|
|
741
|
+
components: { JsonCardItem: en, StatusBadge: er, InternalLinkItem: Xi }
|
|
742
|
+
}, br = /* @__PURE__ */ z({
|
|
743
|
+
...vr,
|
|
740
744
|
props: {
|
|
741
745
|
item: {
|
|
742
746
|
type: Object,
|
|
@@ -755,17 +759,17 @@ const W = {
|
|
|
755
759
|
},
|
|
756
760
|
emits: ["navigation-click"],
|
|
757
761
|
setup(e, { emit: t }) {
|
|
758
|
-
|
|
759
|
-
v70f369b3: p.value ? "none" : `solid ${
|
|
762
|
+
Ht((W) => ({
|
|
763
|
+
v70f369b3: p.value ? "none" : `solid ${_(ar)} ${_(nr)}`,
|
|
760
764
|
v67c2fae6: u.value && c.value ? "block" : "flex",
|
|
761
765
|
v847b138c: u.value && c.value ? "100%" : n.slim ? "50%" : "25%",
|
|
762
766
|
v847687d6: u.value && c.value ? "100%" : n.slim ? "50%" : "75%"
|
|
763
767
|
}));
|
|
764
|
-
const n = e, i = t, r =
|
|
765
|
-
var
|
|
766
|
-
return n.item.type ? n.item.type : (
|
|
767
|
-
}),
|
|
768
|
-
switch (
|
|
768
|
+
const n = e, i = t, r = zn(), o = Pe(), { i18n: { t: a, formatIsoDate: s, formatUnixTimeStamp: l } } = Y.useI18n(), c = T(() => n.item.value !== void 0 && n.item.value !== null && n.item.value !== ""), d = T(() => !!(n.item.tooltip || o["label-tooltip"])), u = T(() => n.item.type === V.Json || n.item.type === V.JsonArray), p = T(() => n.item.type === V.JsonArray), h = Y.useSubSchema(n.item.key), g = T(() => {
|
|
769
|
+
var W;
|
|
770
|
+
return n.item.type ? n.item.type : (W = h == null ? void 0 : h.value) != null && W.encrypted ? V.Redacted : void 0;
|
|
771
|
+
}), v = T(() => {
|
|
772
|
+
switch (g.value) {
|
|
769
773
|
case V.ID:
|
|
770
774
|
return {
|
|
771
775
|
tag: "KCopy",
|
|
@@ -845,8 +849,8 @@ const W = {
|
|
|
845
849
|
attrs: {
|
|
846
850
|
"data-testid": `${n.item.key}-internal-link`,
|
|
847
851
|
item: n.item,
|
|
848
|
-
onNavigationClick: (
|
|
849
|
-
i("navigation-click",
|
|
852
|
+
onNavigationClick: (W) => {
|
|
853
|
+
i("navigation-click", W);
|
|
850
854
|
}
|
|
851
855
|
}
|
|
852
856
|
};
|
|
@@ -895,24 +899,24 @@ const W = {
|
|
|
895
899
|
text: n.item.value
|
|
896
900
|
};
|
|
897
901
|
}
|
|
898
|
-
}),
|
|
899
|
-
return (
|
|
900
|
-
const
|
|
901
|
-
return m(),
|
|
902
|
+
}), y = N(), k = N(), { isTruncated: A } = Y.useTruncationDetector(y), { isTruncated: E } = Y.useTruncationDetector(k);
|
|
903
|
+
return (W, X) => {
|
|
904
|
+
const S = D("KTooltip"), w = D("KLabel"), O = D("KBadge"), f = D("KCopy");
|
|
905
|
+
return m(), $("div", sr, [
|
|
902
906
|
B("div", {
|
|
903
907
|
class: "config-card-details-label",
|
|
904
908
|
"data-testid": `${e.item.key}-label`
|
|
905
909
|
}, [
|
|
906
|
-
P(
|
|
907
|
-
|
|
908
|
-
default:
|
|
909
|
-
|
|
910
|
-
text:
|
|
910
|
+
P(W.$slots, "label", { item: e.item }, () => [
|
|
911
|
+
R(w, { "tooltip-attributes": { maxWidth: "500px" } }, Se({
|
|
912
|
+
default: C(() => [
|
|
913
|
+
R(S, {
|
|
914
|
+
text: _(A) ? e.item.label : ""
|
|
911
915
|
}, {
|
|
912
|
-
default:
|
|
916
|
+
default: C(() => [
|
|
913
917
|
B("span", {
|
|
914
918
|
ref_key: "labelContent",
|
|
915
|
-
ref:
|
|
919
|
+
ref: y,
|
|
916
920
|
class: "label-content"
|
|
917
921
|
}, L(e.item.label), 513)
|
|
918
922
|
]),
|
|
@@ -923,111 +927,111 @@ const W = {
|
|
|
923
927
|
}, [
|
|
924
928
|
d.value ? {
|
|
925
929
|
name: "tooltip",
|
|
926
|
-
fn:
|
|
930
|
+
fn: C(() => [
|
|
927
931
|
B("div", {
|
|
928
932
|
"data-testid": `${e.item.key}-label-tooltip`
|
|
929
933
|
}, [
|
|
930
|
-
P(
|
|
934
|
+
P(W.$slots, "label-tooltip", {}, () => [
|
|
931
935
|
U(L(e.item.tooltip), 1)
|
|
932
936
|
], !0)
|
|
933
|
-
], 8,
|
|
937
|
+
], 8, ur)
|
|
934
938
|
]),
|
|
935
939
|
key: "0"
|
|
936
940
|
} : void 0
|
|
937
941
|
]), 1024)
|
|
938
942
|
], !0)
|
|
939
|
-
], 8,
|
|
943
|
+
], 8, cr),
|
|
940
944
|
B("div", {
|
|
941
945
|
class: "config-card-details-value",
|
|
942
946
|
"data-testid": `${e.item.key}-property-value`
|
|
943
947
|
}, [
|
|
944
|
-
P(
|
|
948
|
+
P(W.$slots, e.item.key, {
|
|
945
949
|
rowValue: e.item.value
|
|
946
950
|
}, () => [
|
|
947
|
-
c.value ? (m(),
|
|
948
|
-
(m(),
|
|
949
|
-
default:
|
|
950
|
-
|
|
951
|
+
c.value ? (m(), $("div", pr, [
|
|
952
|
+
(m(), M(De(v.value.tag), Qn(Zn(v.value.attrs)), {
|
|
953
|
+
default: C(() => [
|
|
954
|
+
v.value.additionalComponent === "KBadge" ? (m(), $("div", {
|
|
951
955
|
key: 0,
|
|
952
956
|
"data-testid": `${e.item.key}-badge-tags`
|
|
953
957
|
}, [
|
|
954
|
-
(m(!0),
|
|
955
|
-
key: `${e.item.key}-badge-tag-${
|
|
958
|
+
(m(!0), $(ue, null, ce(e.item.value, (b, x) => (m(), M(O, {
|
|
959
|
+
key: `${e.item.key}-badge-tag-${x}`,
|
|
956
960
|
class: "config-badge",
|
|
957
|
-
"data-testid": `${e.item.key}-badge-tag-${
|
|
958
|
-
tooltip:
|
|
961
|
+
"data-testid": `${e.item.key}-badge-tag-${x}`,
|
|
962
|
+
tooltip: b,
|
|
959
963
|
"truncation-tooltip": ""
|
|
960
964
|
}, {
|
|
961
|
-
default:
|
|
962
|
-
U(L(
|
|
965
|
+
default: C(() => [
|
|
966
|
+
U(L(b), 1)
|
|
963
967
|
]),
|
|
964
968
|
_: 2
|
|
965
969
|
}, 1032, ["data-testid", "tooltip"]))), 128))
|
|
966
|
-
], 8,
|
|
970
|
+
], 8, mr)) : v.value.additionalComponent === "KCopy" ? (m(), $("div", {
|
|
967
971
|
key: 1,
|
|
968
972
|
class: "copy-uuid-array",
|
|
969
973
|
"data-testid": `${e.item.key}-copy-uuid-array`
|
|
970
974
|
}, [
|
|
971
|
-
(m(!0),
|
|
972
|
-
key: `${e.item.key}-copy-uuid-${
|
|
973
|
-
"data-testid": `${e.item.key}-copy-uuid-${
|
|
974
|
-
text:
|
|
975
|
+
(m(!0), $(ue, null, ce(e.item.value, (b, x) => (m(), M(f, Vt({ ref_for: !0 }, v.value.childAttrs, {
|
|
976
|
+
key: `${e.item.key}-copy-uuid-${x}`,
|
|
977
|
+
"data-testid": `${e.item.key}-copy-uuid-${x}`,
|
|
978
|
+
text: b
|
|
975
979
|
}), null, 16, ["data-testid", "text"]))), 128))
|
|
976
|
-
], 8,
|
|
980
|
+
], 8, gr)) : v.value.additionalComponent === "KMethodBadge" ? (m(), $("div", {
|
|
977
981
|
key: 2,
|
|
978
982
|
class: "method-badge-array",
|
|
979
983
|
"data-testid": `${e.item.key}-badge-methods`
|
|
980
984
|
}, [
|
|
981
|
-
(m(!0),
|
|
982
|
-
key: `${e.item.key}-badge-method-${
|
|
983
|
-
appearance: Object.values(
|
|
985
|
+
(m(!0), $(ue, null, ce(e.item.value, (b, x) => (m(), M(O, {
|
|
986
|
+
key: `${e.item.key}-badge-method-${x}`,
|
|
987
|
+
appearance: Object.values(_(ri)).includes(b.toLowerCase()) ? b.toLowerCase() : "custom",
|
|
984
988
|
class: "config-badge",
|
|
985
|
-
"data-testid": `${e.item.key}-badge-method-${
|
|
989
|
+
"data-testid": `${e.item.key}-badge-method-${x}`
|
|
986
990
|
}, {
|
|
987
|
-
default:
|
|
988
|
-
U(L(
|
|
991
|
+
default: C(() => [
|
|
992
|
+
U(L(b), 1)
|
|
989
993
|
]),
|
|
990
994
|
_: 2
|
|
991
995
|
}, 1032, ["appearance", "data-testid"]))), 128))
|
|
992
|
-
], 8,
|
|
996
|
+
], 8, hr)) : v.value.additionalComponent === "JsonCardItem" ? (m(), $("div", {
|
|
993
997
|
key: 3,
|
|
994
998
|
"data-testid": `${n.item.key}-json-array-content`
|
|
995
999
|
}, [
|
|
996
|
-
(m(!0),
|
|
997
|
-
key: `json-array-item-${
|
|
998
|
-
index:
|
|
1000
|
+
(m(!0), $(ue, null, ce(e.item.value, (b, x) => (m(), M(en, {
|
|
1001
|
+
key: `json-array-item-${x}`,
|
|
1002
|
+
index: x,
|
|
999
1003
|
"is-array-item": "",
|
|
1000
|
-
item:
|
|
1004
|
+
item: b
|
|
1001
1005
|
}, null, 8, ["index", "item"]))), 128))
|
|
1002
|
-
], 8,
|
|
1006
|
+
], 8, yr)) : (m(), M(S, {
|
|
1003
1007
|
key: 4,
|
|
1004
|
-
text:
|
|
1008
|
+
text: _(E) ? e.item.value : ""
|
|
1005
1009
|
}, {
|
|
1006
|
-
default:
|
|
1010
|
+
default: C(() => [
|
|
1007
1011
|
B("span", {
|
|
1008
1012
|
ref_key: "textContent",
|
|
1009
|
-
ref:
|
|
1013
|
+
ref: k,
|
|
1010
1014
|
class: fe(["attrs-data-text", { truncated: e.truncated }])
|
|
1011
|
-
}, L(
|
|
1015
|
+
}, L(v.value.text), 3)
|
|
1012
1016
|
]),
|
|
1013
1017
|
_: 1
|
|
1014
1018
|
}, 8, ["text"]))
|
|
1015
1019
|
]),
|
|
1016
1020
|
_: 1
|
|
1017
1021
|
}, 16))
|
|
1018
|
-
])) : (m(),
|
|
1022
|
+
])) : (m(), $("div", {
|
|
1019
1023
|
key: 0,
|
|
1020
1024
|
"data-testid": `${e.item.key}-no-value`
|
|
1021
|
-
}, " – ", 8,
|
|
1025
|
+
}, " – ", 8, fr))
|
|
1022
1026
|
], !0)
|
|
1023
|
-
], 8,
|
|
1027
|
+
], 8, dr)
|
|
1024
1028
|
]);
|
|
1025
1029
|
};
|
|
1026
1030
|
}
|
|
1027
|
-
}),
|
|
1031
|
+
}), tn = /* @__PURE__ */ le(br, [["__scopeId", "data-v-66d61bea"]]), xr = { class: "json-config config-card-code-block" }, Cr = {
|
|
1028
1032
|
key: 0,
|
|
1029
1033
|
class: "json-endpoint"
|
|
1030
|
-
},
|
|
1034
|
+
}, nn = /* @__PURE__ */ z({
|
|
1031
1035
|
__name: "JsonCodeBlock",
|
|
1032
1036
|
props: {
|
|
1033
1037
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -1055,10 +1059,10 @@ const W = {
|
|
|
1055
1059
|
}
|
|
1056
1060
|
},
|
|
1057
1061
|
setup(e) {
|
|
1058
|
-
|
|
1062
|
+
Ht((r) => ({
|
|
1059
1063
|
eca0976a: `${i.value}ch`
|
|
1060
1064
|
}));
|
|
1061
|
-
const t = e, n =
|
|
1065
|
+
const t = e, n = T(() => t.entityRecord), i = T(() => {
|
|
1062
1066
|
var a;
|
|
1063
1067
|
if (!t.fetcherUrl)
|
|
1064
1068
|
return 0;
|
|
@@ -1067,83 +1071,83 @@ const W = {
|
|
|
1067
1071
|
});
|
|
1068
1072
|
return (r, o) => {
|
|
1069
1073
|
const a = D("KBadge"), s = D("KCodeBlock");
|
|
1070
|
-
return m(),
|
|
1071
|
-
t.fetcherUrl ? (m(),
|
|
1072
|
-
|
|
1074
|
+
return m(), $("div", xr, [
|
|
1075
|
+
t.fetcherUrl ? (m(), $("div", Cr, [
|
|
1076
|
+
R(a, {
|
|
1073
1077
|
appearance: t.requestMethod
|
|
1074
1078
|
}, {
|
|
1075
|
-
default:
|
|
1079
|
+
default: C(() => [
|
|
1076
1080
|
U(L(t.requestMethod), 1)
|
|
1077
1081
|
]),
|
|
1078
1082
|
_: 1
|
|
1079
1083
|
}, 8, ["appearance"]),
|
|
1080
|
-
|
|
1084
|
+
R(s, {
|
|
1081
1085
|
id: "json-endpoint-codeblock",
|
|
1082
1086
|
code: t.fetcherUrl,
|
|
1083
1087
|
language: "json",
|
|
1084
1088
|
"single-line": "",
|
|
1085
1089
|
theme: "dark"
|
|
1086
1090
|
}, null, 8, ["code"])
|
|
1087
|
-
])) :
|
|
1088
|
-
t.entityRecord ? (m(),
|
|
1091
|
+
])) : j("", !0),
|
|
1092
|
+
t.entityRecord ? (m(), M(s, {
|
|
1089
1093
|
key: 1,
|
|
1090
1094
|
id: "json-codeblock",
|
|
1091
1095
|
class: fe({ "json-content": t.fetcherUrl }),
|
|
1092
1096
|
code: JSON.stringify(n.value, null, 2),
|
|
1093
1097
|
language: "json",
|
|
1094
1098
|
theme: "dark"
|
|
1095
|
-
}, null, 8, ["class", "code"])) :
|
|
1099
|
+
}, null, 8, ["class", "code"])) : j("", !0)
|
|
1096
1100
|
]);
|
|
1097
1101
|
};
|
|
1098
1102
|
}
|
|
1099
1103
|
});
|
|
1100
1104
|
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
1101
|
-
function
|
|
1105
|
+
function rn(e) {
|
|
1102
1106
|
return typeof e > "u" || e === null;
|
|
1103
1107
|
}
|
|
1104
|
-
function
|
|
1108
|
+
function kr(e) {
|
|
1105
1109
|
return typeof e == "object" && e !== null;
|
|
1106
1110
|
}
|
|
1107
|
-
function
|
|
1108
|
-
return Array.isArray(e) ? e :
|
|
1111
|
+
function Ar(e) {
|
|
1112
|
+
return Array.isArray(e) ? e : rn(e) ? [] : [e];
|
|
1109
1113
|
}
|
|
1110
|
-
function
|
|
1114
|
+
function _r(e, t) {
|
|
1111
1115
|
var n, i, r, o;
|
|
1112
1116
|
if (t)
|
|
1113
1117
|
for (o = Object.keys(t), n = 0, i = o.length; n < i; n += 1)
|
|
1114
1118
|
r = o[n], e[r] = t[r];
|
|
1115
1119
|
return e;
|
|
1116
1120
|
}
|
|
1117
|
-
function
|
|
1121
|
+
function wr(e, t) {
|
|
1118
1122
|
var n = "", i;
|
|
1119
1123
|
for (i = 0; i < t; i += 1)
|
|
1120
1124
|
n += e;
|
|
1121
1125
|
return n;
|
|
1122
1126
|
}
|
|
1123
|
-
function
|
|
1127
|
+
function Sr(e) {
|
|
1124
1128
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1125
1129
|
}
|
|
1126
|
-
var
|
|
1127
|
-
isNothing:
|
|
1128
|
-
isObject:
|
|
1129
|
-
toArray:
|
|
1130
|
-
repeat:
|
|
1131
|
-
isNegativeZero:
|
|
1132
|
-
extend:
|
|
1130
|
+
var $r = rn, Tr = kr, Er = Ar, Ir = wr, Fr = Sr, Or = _r, ee = {
|
|
1131
|
+
isNothing: $r,
|
|
1132
|
+
isObject: Tr,
|
|
1133
|
+
toArray: Er,
|
|
1134
|
+
repeat: Ir,
|
|
1135
|
+
isNegativeZero: Fr,
|
|
1136
|
+
extend: Or
|
|
1133
1137
|
};
|
|
1134
|
-
function
|
|
1138
|
+
function an(e, t) {
|
|
1135
1139
|
var n = "", i = e.reason || "(unknown reason)";
|
|
1136
1140
|
return e.mark ? (e.mark.name && (n += 'in "' + e.mark.name + '" '), n += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !t && e.mark.snippet && (n += `
|
|
1137
1141
|
|
|
1138
1142
|
` + e.mark.snippet), i + " " + n) : i;
|
|
1139
1143
|
}
|
|
1140
1144
|
function Ie(e, t) {
|
|
1141
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
1145
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = an(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
1142
1146
|
}
|
|
1143
1147
|
Ie.prototype = Object.create(Error.prototype);
|
|
1144
1148
|
Ie.prototype.constructor = Ie;
|
|
1145
1149
|
Ie.prototype.toString = function(t) {
|
|
1146
|
-
return this.name + ": " +
|
|
1150
|
+
return this.name + ": " + an(this, t);
|
|
1147
1151
|
};
|
|
1148
1152
|
var oe = Ie;
|
|
1149
1153
|
function Ye(e, t, n, i, r) {
|
|
@@ -1157,7 +1161,7 @@ function Ye(e, t, n, i, r) {
|
|
|
1157
1161
|
function We(e, t) {
|
|
1158
1162
|
return ee.repeat(" ", t - e.length) + e;
|
|
1159
1163
|
}
|
|
1160
|
-
function
|
|
1164
|
+
function Lr(e, t) {
|
|
1161
1165
|
if (t = Object.create(t || null), !e.buffer) return null;
|
|
1162
1166
|
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);
|
|
1163
1167
|
for (var n = /\r?\n|\r|\0/g, i = [0], r = [], o, a = -1; o = n.exec(e.buffer); )
|
|
@@ -1186,7 +1190,7 @@ function Ir(e, t) {
|
|
|
1186
1190
|
`;
|
|
1187
1191
|
return s.replace(/\n$/, "");
|
|
1188
1192
|
}
|
|
1189
|
-
var
|
|
1193
|
+
var Br = Lr, Kr = [
|
|
1190
1194
|
"kind",
|
|
1191
1195
|
"multi",
|
|
1192
1196
|
"resolve",
|
|
@@ -1197,12 +1201,12 @@ var Fr = Ir, Or = [
|
|
|
1197
1201
|
"representName",
|
|
1198
1202
|
"defaultStyle",
|
|
1199
1203
|
"styleAliases"
|
|
1200
|
-
],
|
|
1204
|
+
], Rr = [
|
|
1201
1205
|
"scalar",
|
|
1202
1206
|
"sequence",
|
|
1203
1207
|
"mapping"
|
|
1204
1208
|
];
|
|
1205
|
-
function
|
|
1209
|
+
function Nr(e) {
|
|
1206
1210
|
var t = {};
|
|
1207
1211
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
1208
1212
|
e[n].forEach(function(i) {
|
|
@@ -1210,19 +1214,19 @@ function Br(e) {
|
|
|
1210
1214
|
});
|
|
1211
1215
|
}), t;
|
|
1212
1216
|
}
|
|
1213
|
-
function
|
|
1217
|
+
function Mr(e, t) {
|
|
1214
1218
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
1215
|
-
if (
|
|
1219
|
+
if (Kr.indexOf(n) === -1)
|
|
1216
1220
|
throw new oe('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
1217
1221
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
1218
1222
|
return !0;
|
|
1219
1223
|
}, this.construct = t.construct || function(n) {
|
|
1220
1224
|
return n;
|
|
1221
|
-
}, 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 =
|
|
1225
|
+
}, 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 = Nr(t.styleAliases || null), Rr.indexOf(this.kind) === -1)
|
|
1222
1226
|
throw new oe('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1223
1227
|
}
|
|
1224
|
-
var ne =
|
|
1225
|
-
function
|
|
1228
|
+
var ne = Mr;
|
|
1229
|
+
function wt(e, t) {
|
|
1226
1230
|
var n = [];
|
|
1227
1231
|
return e[t].forEach(function(i) {
|
|
1228
1232
|
var r = n.length;
|
|
@@ -1231,7 +1235,7 @@ function At(e, t) {
|
|
|
1231
1235
|
}), n[r] = i;
|
|
1232
1236
|
}), n;
|
|
1233
1237
|
}
|
|
1234
|
-
function
|
|
1238
|
+
function jr() {
|
|
1235
1239
|
var e = {
|
|
1236
1240
|
scalar: {},
|
|
1237
1241
|
sequence: {},
|
|
@@ -1276,46 +1280,46 @@ Qe.prototype.extend = function(t) {
|
|
|
1276
1280
|
throw new oe("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1277
1281
|
});
|
|
1278
1282
|
var r = Object.create(Qe.prototype);
|
|
1279
|
-
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit =
|
|
1283
|
+
return r.implicit = (this.implicit || []).concat(n), r.explicit = (this.explicit || []).concat(i), r.compiledImplicit = wt(r, "implicit"), r.compiledExplicit = wt(r, "explicit"), r.compiledTypeMap = jr(r.compiledImplicit, r.compiledExplicit), r;
|
|
1280
1284
|
};
|
|
1281
|
-
var
|
|
1285
|
+
var on = Qe, ln = new ne("tag:yaml.org,2002:str", {
|
|
1282
1286
|
kind: "scalar",
|
|
1283
1287
|
construct: function(e) {
|
|
1284
1288
|
return e !== null ? e : "";
|
|
1285
1289
|
}
|
|
1286
|
-
}),
|
|
1290
|
+
}), sn = new ne("tag:yaml.org,2002:seq", {
|
|
1287
1291
|
kind: "sequence",
|
|
1288
1292
|
construct: function(e) {
|
|
1289
1293
|
return e !== null ? e : [];
|
|
1290
1294
|
}
|
|
1291
|
-
}),
|
|
1295
|
+
}), cn = new ne("tag:yaml.org,2002:map", {
|
|
1292
1296
|
kind: "mapping",
|
|
1293
1297
|
construct: function(e) {
|
|
1294
1298
|
return e !== null ? e : {};
|
|
1295
1299
|
}
|
|
1296
|
-
}),
|
|
1300
|
+
}), un = new on({
|
|
1297
1301
|
explicit: [
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1302
|
+
ln,
|
|
1303
|
+
sn,
|
|
1304
|
+
cn
|
|
1301
1305
|
]
|
|
1302
1306
|
});
|
|
1303
|
-
function
|
|
1307
|
+
function Dr(e) {
|
|
1304
1308
|
if (e === null) return !0;
|
|
1305
1309
|
var t = e.length;
|
|
1306
1310
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1307
1311
|
}
|
|
1308
|
-
function
|
|
1312
|
+
function Pr() {
|
|
1309
1313
|
return null;
|
|
1310
1314
|
}
|
|
1311
|
-
function
|
|
1315
|
+
function Ur(e) {
|
|
1312
1316
|
return e === null;
|
|
1313
1317
|
}
|
|
1314
|
-
var
|
|
1318
|
+
var dn = new ne("tag:yaml.org,2002:null", {
|
|
1315
1319
|
kind: "scalar",
|
|
1316
|
-
resolve:
|
|
1317
|
-
construct:
|
|
1318
|
-
predicate:
|
|
1320
|
+
resolve: Dr,
|
|
1321
|
+
construct: Pr,
|
|
1322
|
+
predicate: Ur,
|
|
1319
1323
|
represent: {
|
|
1320
1324
|
canonical: function() {
|
|
1321
1325
|
return "~";
|
|
@@ -1335,22 +1339,22 @@ var cn = new ne("tag:yaml.org,2002:null", {
|
|
|
1335
1339
|
},
|
|
1336
1340
|
defaultStyle: "lowercase"
|
|
1337
1341
|
});
|
|
1338
|
-
function
|
|
1342
|
+
function qr(e) {
|
|
1339
1343
|
if (e === null) return !1;
|
|
1340
1344
|
var t = e.length;
|
|
1341
1345
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1342
1346
|
}
|
|
1343
|
-
function
|
|
1347
|
+
function Hr(e) {
|
|
1344
1348
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1345
1349
|
}
|
|
1346
|
-
function
|
|
1350
|
+
function Vr(e) {
|
|
1347
1351
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1348
1352
|
}
|
|
1349
|
-
var
|
|
1353
|
+
var fn = new ne("tag:yaml.org,2002:bool", {
|
|
1350
1354
|
kind: "scalar",
|
|
1351
|
-
resolve:
|
|
1352
|
-
construct:
|
|
1353
|
-
predicate:
|
|
1355
|
+
resolve: qr,
|
|
1356
|
+
construct: Hr,
|
|
1357
|
+
predicate: Vr,
|
|
1354
1358
|
represent: {
|
|
1355
1359
|
lowercase: function(e) {
|
|
1356
1360
|
return e ? "true" : "false";
|
|
@@ -1364,16 +1368,16 @@ var un = new ne("tag:yaml.org,2002:bool", {
|
|
|
1364
1368
|
},
|
|
1365
1369
|
defaultStyle: "lowercase"
|
|
1366
1370
|
});
|
|
1367
|
-
function
|
|
1371
|
+
function Yr(e) {
|
|
1368
1372
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1369
1373
|
}
|
|
1370
|
-
function
|
|
1374
|
+
function Wr(e) {
|
|
1371
1375
|
return 48 <= e && e <= 55;
|
|
1372
1376
|
}
|
|
1373
|
-
function
|
|
1377
|
+
function Jr(e) {
|
|
1374
1378
|
return 48 <= e && e <= 57;
|
|
1375
1379
|
}
|
|
1376
|
-
function
|
|
1380
|
+
function Gr(e) {
|
|
1377
1381
|
if (e === null) return !1;
|
|
1378
1382
|
var t = e.length, n = 0, i = !1, r;
|
|
1379
1383
|
if (!t) return !1;
|
|
@@ -1390,7 +1394,7 @@ function Yr(e) {
|
|
|
1390
1394
|
if (r === "x") {
|
|
1391
1395
|
for (n++; n < t; n++)
|
|
1392
1396
|
if (r = e[n], r !== "_") {
|
|
1393
|
-
if (!
|
|
1397
|
+
if (!Yr(e.charCodeAt(n))) return !1;
|
|
1394
1398
|
i = !0;
|
|
1395
1399
|
}
|
|
1396
1400
|
return i && r !== "_";
|
|
@@ -1398,7 +1402,7 @@ function Yr(e) {
|
|
|
1398
1402
|
if (r === "o") {
|
|
1399
1403
|
for (n++; n < t; n++)
|
|
1400
1404
|
if (r = e[n], r !== "_") {
|
|
1401
|
-
if (!
|
|
1405
|
+
if (!Wr(e.charCodeAt(n))) return !1;
|
|
1402
1406
|
i = !0;
|
|
1403
1407
|
}
|
|
1404
1408
|
return i && r !== "_";
|
|
@@ -1407,13 +1411,13 @@ function Yr(e) {
|
|
|
1407
1411
|
if (r === "_") return !1;
|
|
1408
1412
|
for (; n < t; n++)
|
|
1409
1413
|
if (r = e[n], r !== "_") {
|
|
1410
|
-
if (!
|
|
1414
|
+
if (!Jr(e.charCodeAt(n)))
|
|
1411
1415
|
return !1;
|
|
1412
1416
|
i = !0;
|
|
1413
1417
|
}
|
|
1414
1418
|
return !(!i || r === "_");
|
|
1415
1419
|
}
|
|
1416
|
-
function
|
|
1420
|
+
function zr(e) {
|
|
1417
1421
|
var t = e, n = 1, i;
|
|
1418
1422
|
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;
|
|
1419
1423
|
if (i === "0") {
|
|
@@ -1423,14 +1427,14 @@ function Wr(e) {
|
|
|
1423
1427
|
}
|
|
1424
1428
|
return n * parseInt(t, 10);
|
|
1425
1429
|
}
|
|
1426
|
-
function
|
|
1430
|
+
function Qr(e) {
|
|
1427
1431
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !ee.isNegativeZero(e);
|
|
1428
1432
|
}
|
|
1429
|
-
var
|
|
1433
|
+
var pn = new ne("tag:yaml.org,2002:int", {
|
|
1430
1434
|
kind: "scalar",
|
|
1431
|
-
resolve:
|
|
1432
|
-
construct:
|
|
1433
|
-
predicate:
|
|
1435
|
+
resolve: Gr,
|
|
1436
|
+
construct: zr,
|
|
1437
|
+
predicate: Qr,
|
|
1434
1438
|
represent: {
|
|
1435
1439
|
binary: function(e) {
|
|
1436
1440
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1453,21 +1457,21 @@ var dn = new ne("tag:yaml.org,2002:int", {
|
|
|
1453
1457
|
decimal: [10, "dec"],
|
|
1454
1458
|
hexadecimal: [16, "hex"]
|
|
1455
1459
|
}
|
|
1456
|
-
}),
|
|
1460
|
+
}), Zr = new RegExp(
|
|
1457
1461
|
// 2.5e4, 2.5 and integers
|
|
1458
1462
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1459
1463
|
);
|
|
1460
|
-
function
|
|
1461
|
-
return !(e === null || !
|
|
1464
|
+
function Xr(e) {
|
|
1465
|
+
return !(e === null || !Zr.test(e) || // Quick hack to not allow integers end with `_`
|
|
1462
1466
|
// Probably should update regexp & check speed
|
|
1463
1467
|
e[e.length - 1] === "_");
|
|
1464
1468
|
}
|
|
1465
|
-
function
|
|
1469
|
+
function ea(e) {
|
|
1466
1470
|
var t, n;
|
|
1467
1471
|
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);
|
|
1468
1472
|
}
|
|
1469
|
-
var
|
|
1470
|
-
function
|
|
1473
|
+
var ta = /^[-+]?[0-9]+e/;
|
|
1474
|
+
function na(e, t) {
|
|
1471
1475
|
var n;
|
|
1472
1476
|
if (isNaN(e))
|
|
1473
1477
|
switch (t) {
|
|
@@ -1498,36 +1502,36 @@ function Xr(e, t) {
|
|
|
1498
1502
|
}
|
|
1499
1503
|
else if (ee.isNegativeZero(e))
|
|
1500
1504
|
return "-0.0";
|
|
1501
|
-
return n = e.toString(10),
|
|
1505
|
+
return n = e.toString(10), ta.test(n) ? n.replace("e", ".e") : n;
|
|
1502
1506
|
}
|
|
1503
|
-
function
|
|
1507
|
+
function ia(e) {
|
|
1504
1508
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || ee.isNegativeZero(e));
|
|
1505
1509
|
}
|
|
1506
|
-
var
|
|
1510
|
+
var mn = new ne("tag:yaml.org,2002:float", {
|
|
1507
1511
|
kind: "scalar",
|
|
1508
|
-
resolve:
|
|
1509
|
-
construct:
|
|
1510
|
-
predicate:
|
|
1511
|
-
represent:
|
|
1512
|
+
resolve: Xr,
|
|
1513
|
+
construct: ea,
|
|
1514
|
+
predicate: ia,
|
|
1515
|
+
represent: na,
|
|
1512
1516
|
defaultStyle: "lowercase"
|
|
1513
|
-
}),
|
|
1517
|
+
}), gn = un.extend({
|
|
1514
1518
|
implicit: [
|
|
1515
|
-
cn,
|
|
1516
|
-
un,
|
|
1517
1519
|
dn,
|
|
1518
|
-
fn
|
|
1520
|
+
fn,
|
|
1521
|
+
pn,
|
|
1522
|
+
mn
|
|
1519
1523
|
]
|
|
1520
|
-
}),
|
|
1524
|
+
}), hn = gn, yn = new RegExp(
|
|
1521
1525
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1522
|
-
),
|
|
1526
|
+
), vn = new RegExp(
|
|
1523
1527
|
"^([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]))?))?$"
|
|
1524
1528
|
);
|
|
1525
|
-
function
|
|
1526
|
-
return e === null ? !1 : yn.exec(e) !== null ||
|
|
1529
|
+
function ra(e) {
|
|
1530
|
+
return e === null ? !1 : yn.exec(e) !== null || vn.exec(e) !== null;
|
|
1527
1531
|
}
|
|
1528
|
-
function
|
|
1532
|
+
function aa(e) {
|
|
1529
1533
|
var t, n, i, r, o, a, s, l = 0, c = null, d, u, p;
|
|
1530
|
-
if (t = yn.exec(e), t === null && (t =
|
|
1534
|
+
if (t = yn.exec(e), t === null && (t = vn.exec(e)), t === null) throw new Error("Date resolve error");
|
|
1531
1535
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
1532
1536
|
return new Date(Date.UTC(n, i, r));
|
|
1533
1537
|
if (o = +t[4], a = +t[5], s = +t[6], t[7]) {
|
|
@@ -1537,25 +1541,25 @@ function na(e) {
|
|
|
1537
1541
|
}
|
|
1538
1542
|
return t[9] && (d = +t[10], u = +(t[11] || 0), c = (d * 60 + u) * 6e4, t[9] === "-" && (c = -c)), p = new Date(Date.UTC(n, i, r, o, a, s, l)), c && p.setTime(p.getTime() - c), p;
|
|
1539
1543
|
}
|
|
1540
|
-
function
|
|
1544
|
+
function oa(e) {
|
|
1541
1545
|
return e.toISOString();
|
|
1542
1546
|
}
|
|
1543
|
-
var
|
|
1547
|
+
var bn = new ne("tag:yaml.org,2002:timestamp", {
|
|
1544
1548
|
kind: "scalar",
|
|
1545
|
-
resolve:
|
|
1546
|
-
construct:
|
|
1549
|
+
resolve: ra,
|
|
1550
|
+
construct: aa,
|
|
1547
1551
|
instanceOf: Date,
|
|
1548
|
-
represent:
|
|
1552
|
+
represent: oa
|
|
1549
1553
|
});
|
|
1550
|
-
function
|
|
1554
|
+
function la(e) {
|
|
1551
1555
|
return e === "<<" || e === null;
|
|
1552
1556
|
}
|
|
1553
|
-
var
|
|
1557
|
+
var xn = new ne("tag:yaml.org,2002:merge", {
|
|
1554
1558
|
kind: "scalar",
|
|
1555
|
-
resolve:
|
|
1559
|
+
resolve: la
|
|
1556
1560
|
}), at = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1557
1561
|
\r`;
|
|
1558
|
-
function
|
|
1562
|
+
function sa(e) {
|
|
1559
1563
|
if (e === null) return !1;
|
|
1560
1564
|
var t, n, i = 0, r = e.length, o = at;
|
|
1561
1565
|
for (n = 0; n < r; n++)
|
|
@@ -1565,35 +1569,35 @@ function aa(e) {
|
|
|
1565
1569
|
}
|
|
1566
1570
|
return i % 8 === 0;
|
|
1567
1571
|
}
|
|
1568
|
-
function
|
|
1572
|
+
function ca(e) {
|
|
1569
1573
|
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = at, a = 0, s = [];
|
|
1570
1574
|
for (t = 0; t < r; t++)
|
|
1571
1575
|
t % 4 === 0 && t && (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
1572
1576
|
return n = r % 4 * 6, n === 0 ? (s.push(a >> 16 & 255), s.push(a >> 8 & 255), s.push(a & 255)) : n === 18 ? (s.push(a >> 10 & 255), s.push(a >> 2 & 255)) : n === 12 && s.push(a >> 4 & 255), new Uint8Array(s);
|
|
1573
1577
|
}
|
|
1574
|
-
function
|
|
1578
|
+
function ua(e) {
|
|
1575
1579
|
var t = "", n = 0, i, r, o = e.length, a = at;
|
|
1576
1580
|
for (i = 0; i < o; i++)
|
|
1577
1581
|
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];
|
|
1578
1582
|
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;
|
|
1579
1583
|
}
|
|
1580
|
-
function
|
|
1584
|
+
function da(e) {
|
|
1581
1585
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1582
1586
|
}
|
|
1583
|
-
var
|
|
1587
|
+
var Cn = new ne("tag:yaml.org,2002:binary", {
|
|
1584
1588
|
kind: "scalar",
|
|
1585
|
-
resolve:
|
|
1586
|
-
construct:
|
|
1587
|
-
predicate:
|
|
1588
|
-
represent:
|
|
1589
|
-
}),
|
|
1590
|
-
function
|
|
1589
|
+
resolve: sa,
|
|
1590
|
+
construct: ca,
|
|
1591
|
+
predicate: da,
|
|
1592
|
+
represent: ua
|
|
1593
|
+
}), fa = Object.prototype.hasOwnProperty, pa = Object.prototype.toString;
|
|
1594
|
+
function ma(e) {
|
|
1591
1595
|
if (e === null) return !0;
|
|
1592
1596
|
var t = [], n, i, r, o, a, s = e;
|
|
1593
1597
|
for (n = 0, i = s.length; n < i; n += 1) {
|
|
1594
|
-
if (r = s[n], a = !1,
|
|
1598
|
+
if (r = s[n], a = !1, pa.call(r) !== "[object Object]") return !1;
|
|
1595
1599
|
for (o in r)
|
|
1596
|
-
if (
|
|
1600
|
+
if (fa.call(r, o))
|
|
1597
1601
|
if (!a) a = !0;
|
|
1598
1602
|
else return !1;
|
|
1599
1603
|
if (!a) return !1;
|
|
@@ -1602,63 +1606,63 @@ function da(e) {
|
|
|
1602
1606
|
}
|
|
1603
1607
|
return !0;
|
|
1604
1608
|
}
|
|
1605
|
-
function
|
|
1609
|
+
function ga(e) {
|
|
1606
1610
|
return e !== null ? e : [];
|
|
1607
1611
|
}
|
|
1608
|
-
var
|
|
1612
|
+
var kn = new ne("tag:yaml.org,2002:omap", {
|
|
1609
1613
|
kind: "sequence",
|
|
1610
|
-
resolve:
|
|
1611
|
-
construct:
|
|
1612
|
-
}),
|
|
1613
|
-
function
|
|
1614
|
+
resolve: ma,
|
|
1615
|
+
construct: ga
|
|
1616
|
+
}), ha = Object.prototype.toString;
|
|
1617
|
+
function ya(e) {
|
|
1614
1618
|
if (e === null) return !0;
|
|
1615
1619
|
var t, n, i, r, o, a = e;
|
|
1616
1620
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1617
|
-
if (i = a[t],
|
|
1621
|
+
if (i = a[t], ha.call(i) !== "[object Object]" || (r = Object.keys(i), r.length !== 1)) return !1;
|
|
1618
1622
|
o[t] = [r[0], i[r[0]]];
|
|
1619
1623
|
}
|
|
1620
1624
|
return !0;
|
|
1621
1625
|
}
|
|
1622
|
-
function
|
|
1626
|
+
function va(e) {
|
|
1623
1627
|
if (e === null) return [];
|
|
1624
1628
|
var t, n, i, r, o, a = e;
|
|
1625
1629
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1)
|
|
1626
1630
|
i = a[t], r = Object.keys(i), o[t] = [r[0], i[r[0]]];
|
|
1627
1631
|
return o;
|
|
1628
1632
|
}
|
|
1629
|
-
var
|
|
1633
|
+
var An = new ne("tag:yaml.org,2002:pairs", {
|
|
1630
1634
|
kind: "sequence",
|
|
1631
|
-
resolve:
|
|
1632
|
-
construct:
|
|
1633
|
-
}),
|
|
1634
|
-
function
|
|
1635
|
+
resolve: ya,
|
|
1636
|
+
construct: va
|
|
1637
|
+
}), ba = Object.prototype.hasOwnProperty;
|
|
1638
|
+
function xa(e) {
|
|
1635
1639
|
if (e === null) return !0;
|
|
1636
1640
|
var t, n = e;
|
|
1637
1641
|
for (t in n)
|
|
1638
|
-
if (
|
|
1642
|
+
if (ba.call(n, t) && n[t] !== null)
|
|
1639
1643
|
return !1;
|
|
1640
1644
|
return !0;
|
|
1641
1645
|
}
|
|
1642
|
-
function
|
|
1646
|
+
function Ca(e) {
|
|
1643
1647
|
return e !== null ? e : {};
|
|
1644
1648
|
}
|
|
1645
|
-
var
|
|
1649
|
+
var _n = new ne("tag:yaml.org,2002:set", {
|
|
1646
1650
|
kind: "mapping",
|
|
1647
|
-
resolve:
|
|
1648
|
-
construct:
|
|
1649
|
-
}), ot =
|
|
1651
|
+
resolve: xa,
|
|
1652
|
+
construct: Ca
|
|
1653
|
+
}), ot = hn.extend({
|
|
1650
1654
|
implicit: [
|
|
1651
|
-
|
|
1652
|
-
|
|
1655
|
+
bn,
|
|
1656
|
+
xn
|
|
1653
1657
|
],
|
|
1654
1658
|
explicit: [
|
|
1655
|
-
bn,
|
|
1656
|
-
xn,
|
|
1657
1659
|
Cn,
|
|
1658
|
-
kn
|
|
1660
|
+
kn,
|
|
1661
|
+
An,
|
|
1662
|
+
_n
|
|
1659
1663
|
]
|
|
1660
|
-
}),
|
|
1661
|
-
function
|
|
1664
|
+
}), ye = Object.prototype.hasOwnProperty, Ke = 1, wn = 2, Sn = 3, Re = 4, Je = 1, ka = 2, St = 3, Aa = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, _a = /[\x85\u2028\u2029]/, wa = /[,\[\]\{\}]/, $n = /^(?:!|!!|![a-z\-]+!)$/i, Tn = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1665
|
+
function $t(e) {
|
|
1662
1666
|
return Object.prototype.toString.call(e);
|
|
1663
1667
|
}
|
|
1664
1668
|
function de(e) {
|
|
@@ -1667,33 +1671,33 @@ function de(e) {
|
|
|
1667
1671
|
function ve(e) {
|
|
1668
1672
|
return e === 9 || e === 32;
|
|
1669
1673
|
}
|
|
1670
|
-
function
|
|
1674
|
+
function se(e) {
|
|
1671
1675
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1672
1676
|
}
|
|
1673
1677
|
function _e(e) {
|
|
1674
1678
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1675
1679
|
}
|
|
1676
|
-
function
|
|
1680
|
+
function Sa(e) {
|
|
1677
1681
|
var t;
|
|
1678
1682
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1679
1683
|
}
|
|
1680
|
-
function
|
|
1684
|
+
function $a(e) {
|
|
1681
1685
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1682
1686
|
}
|
|
1683
|
-
function
|
|
1687
|
+
function Ta(e) {
|
|
1684
1688
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1685
1689
|
}
|
|
1686
|
-
function
|
|
1690
|
+
function Tt(e) {
|
|
1687
1691
|
return e === 48 ? "\0" : e === 97 ? "\x07" : e === 98 ? "\b" : e === 116 || e === 9 ? " " : e === 110 ? `
|
|
1688
1692
|
` : 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" : "";
|
|
1689
1693
|
}
|
|
1690
|
-
function
|
|
1694
|
+
function Ea(e) {
|
|
1691
1695
|
return e <= 65535 ? String.fromCharCode(e) : String.fromCharCode(
|
|
1692
1696
|
(e - 65536 >> 10) + 55296,
|
|
1693
1697
|
(e - 65536 & 1023) + 56320
|
|
1694
1698
|
);
|
|
1695
1699
|
}
|
|
1696
|
-
function
|
|
1700
|
+
function En(e, t, n) {
|
|
1697
1701
|
t === "__proto__" ? Object.defineProperty(e, t, {
|
|
1698
1702
|
configurable: !0,
|
|
1699
1703
|
enumerable: !0,
|
|
@@ -1701,13 +1705,13 @@ function $n(e, t, n) {
|
|
|
1701
1705
|
value: n
|
|
1702
1706
|
}) : e[t] = n;
|
|
1703
1707
|
}
|
|
1704
|
-
var
|
|
1708
|
+
var In = new Array(256), Fn = new Array(256);
|
|
1705
1709
|
for (var ke = 0; ke < 256; ke++)
|
|
1706
|
-
|
|
1707
|
-
function
|
|
1710
|
+
In[ke] = Tt(ke) ? 1 : 0, Fn[ke] = Tt(ke);
|
|
1711
|
+
function Ia(e, t) {
|
|
1708
1712
|
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 = [];
|
|
1709
1713
|
}
|
|
1710
|
-
function
|
|
1714
|
+
function On(e, t) {
|
|
1711
1715
|
var n = {
|
|
1712
1716
|
name: e.filename,
|
|
1713
1717
|
buffer: e.input.slice(0, -1),
|
|
@@ -1716,22 +1720,22 @@ function In(e, t) {
|
|
|
1716
1720
|
line: e.line,
|
|
1717
1721
|
column: e.position - e.lineStart
|
|
1718
1722
|
};
|
|
1719
|
-
return n.snippet =
|
|
1723
|
+
return n.snippet = Br(n), new oe(t, n);
|
|
1720
1724
|
}
|
|
1721
1725
|
function F(e, t) {
|
|
1722
|
-
throw
|
|
1726
|
+
throw On(e, t);
|
|
1723
1727
|
}
|
|
1724
1728
|
function Ne(e, t) {
|
|
1725
|
-
e.onWarning && e.onWarning.call(null,
|
|
1729
|
+
e.onWarning && e.onWarning.call(null, On(e, t));
|
|
1726
1730
|
}
|
|
1727
|
-
var
|
|
1731
|
+
var Et = {
|
|
1728
1732
|
YAML: function(t, n, i) {
|
|
1729
1733
|
var r, o, a;
|
|
1730
1734
|
t.version !== null && F(t, "duplication of %YAML directive"), i.length !== 1 && F(t, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(i[0]), r === null && F(t, "ill-formed argument of the YAML directive"), o = parseInt(r[1], 10), a = parseInt(r[2], 10), o !== 1 && F(t, "unacceptable YAML version of the document"), t.version = i[0], t.checkLineBreaks = a < 2, a !== 1 && a !== 2 && Ne(t, "unsupported YAML version of the document");
|
|
1731
1735
|
},
|
|
1732
1736
|
TAG: function(t, n, i) {
|
|
1733
1737
|
var r, o;
|
|
1734
|
-
i.length !== 2 && F(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1],
|
|
1738
|
+
i.length !== 2 && F(t, "TAG directive accepts exactly two arguments"), r = i[0], o = i[1], $n.test(r) || F(t, "ill-formed tag handle (first argument) of the TAG directive"), ye.call(t.tagMap, r) && F(t, 'there is a previously declared suffix for "' + r + '" tag handle'), Tn.test(o) || F(t, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1735
1739
|
try {
|
|
1736
1740
|
o = decodeURIComponent(o);
|
|
1737
1741
|
} catch {
|
|
@@ -1740,34 +1744,34 @@ var $t = {
|
|
|
1740
1744
|
t.tagMap[r] = o;
|
|
1741
1745
|
}
|
|
1742
1746
|
};
|
|
1743
|
-
function
|
|
1747
|
+
function he(e, t, n, i) {
|
|
1744
1748
|
var r, o, a, s;
|
|
1745
1749
|
if (t < n) {
|
|
1746
1750
|
if (s = e.input.slice(t, n), i)
|
|
1747
1751
|
for (r = 0, o = s.length; r < o; r += 1)
|
|
1748
1752
|
a = s.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || F(e, "expected valid JSON character");
|
|
1749
|
-
else
|
|
1753
|
+
else Aa.test(s) && F(e, "the stream contains non-printable characters");
|
|
1750
1754
|
e.result += s;
|
|
1751
1755
|
}
|
|
1752
1756
|
}
|
|
1753
|
-
function
|
|
1757
|
+
function It(e, t, n, i) {
|
|
1754
1758
|
var r, o, a, s;
|
|
1755
1759
|
for (ee.isObject(n) || F(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, s = r.length; a < s; a += 1)
|
|
1756
|
-
o = r[a],
|
|
1760
|
+
o = r[a], ye.call(t, o) || (En(t, o, n[o]), i[o] = !0);
|
|
1757
1761
|
}
|
|
1758
1762
|
function we(e, t, n, i, r, o, a, s, l) {
|
|
1759
1763
|
var c, d;
|
|
1760
1764
|
if (Array.isArray(r))
|
|
1761
1765
|
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1762
|
-
Array.isArray(r[c]) && F(e, "nested arrays are not supported inside keys"), typeof r == "object" &&
|
|
1763
|
-
if (typeof r == "object" &&
|
|
1766
|
+
Array.isArray(r[c]) && F(e, "nested arrays are not supported inside keys"), typeof r == "object" && $t(r[c]) === "[object Object]" && (r[c] = "[object Object]");
|
|
1767
|
+
if (typeof r == "object" && $t(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1764
1768
|
if (Array.isArray(o))
|
|
1765
1769
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
1766
|
-
|
|
1770
|
+
It(e, t, o[c], n);
|
|
1767
1771
|
else
|
|
1768
|
-
|
|
1772
|
+
It(e, t, o, n);
|
|
1769
1773
|
else
|
|
1770
|
-
!e.json && !
|
|
1774
|
+
!e.json && !ye.call(n, r) && ye.call(t, r) && (e.line = a || e.line, e.lineStart = s || e.lineStart, e.position = l || e.position, F(e, "duplicated mapping key")), En(t, r, o), delete n[r];
|
|
1771
1775
|
return t;
|
|
1772
1776
|
}
|
|
1773
1777
|
function lt(e) {
|
|
@@ -1792,91 +1796,91 @@ function Z(e, t, n) {
|
|
|
1792
1796
|
}
|
|
1793
1797
|
function He(e) {
|
|
1794
1798
|
var t = e.position, n;
|
|
1795
|
-
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 ||
|
|
1799
|
+
return n = e.input.charCodeAt(t), !!((n === 45 || n === 46) && n === e.input.charCodeAt(t + 1) && n === e.input.charCodeAt(t + 2) && (t += 3, n = e.input.charCodeAt(t), n === 0 || se(n)));
|
|
1796
1800
|
}
|
|
1797
1801
|
function st(e, t) {
|
|
1798
1802
|
t === 1 ? e.result += " " : t > 1 && (e.result += ee.repeat(`
|
|
1799
1803
|
`, t - 1));
|
|
1800
1804
|
}
|
|
1801
|
-
function
|
|
1802
|
-
var i, r, o, a, s, l, c, d, u = e.kind, p = e.result,
|
|
1803
|
-
if (
|
|
1805
|
+
function Fa(e, t, n) {
|
|
1806
|
+
var i, r, o, a, s, l, c, d, u = e.kind, p = e.result, h;
|
|
1807
|
+
if (h = e.input.charCodeAt(e.position), se(h) || _e(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (r = e.input.charCodeAt(e.position + 1), se(r) || n && _e(r)))
|
|
1804
1808
|
return !1;
|
|
1805
|
-
for (e.kind = "scalar", e.result = "", o = a = e.position, s = !1;
|
|
1806
|
-
if (
|
|
1807
|
-
if (r = e.input.charCodeAt(e.position + 1),
|
|
1809
|
+
for (e.kind = "scalar", e.result = "", o = a = e.position, s = !1; h !== 0; ) {
|
|
1810
|
+
if (h === 58) {
|
|
1811
|
+
if (r = e.input.charCodeAt(e.position + 1), se(r) || n && _e(r))
|
|
1808
1812
|
break;
|
|
1809
|
-
} else if (
|
|
1810
|
-
if (i = e.input.charCodeAt(e.position - 1),
|
|
1813
|
+
} else if (h === 35) {
|
|
1814
|
+
if (i = e.input.charCodeAt(e.position - 1), se(i))
|
|
1811
1815
|
break;
|
|
1812
1816
|
} else {
|
|
1813
|
-
if (e.position === e.lineStart && He(e) || n && _e(
|
|
1817
|
+
if (e.position === e.lineStart && He(e) || n && _e(h))
|
|
1814
1818
|
break;
|
|
1815
|
-
if (de(
|
|
1819
|
+
if (de(h))
|
|
1816
1820
|
if (l = e.line, c = e.lineStart, d = e.lineIndent, Z(e, !1, -1), e.lineIndent >= t) {
|
|
1817
|
-
s = !0,
|
|
1821
|
+
s = !0, h = e.input.charCodeAt(e.position);
|
|
1818
1822
|
continue;
|
|
1819
1823
|
} else {
|
|
1820
1824
|
e.position = a, e.line = l, e.lineStart = c, e.lineIndent = d;
|
|
1821
1825
|
break;
|
|
1822
1826
|
}
|
|
1823
1827
|
}
|
|
1824
|
-
s && (
|
|
1828
|
+
s && (he(e, o, a, !1), st(e, e.line - l), o = a = e.position, s = !1), ve(h) || (a = e.position + 1), h = e.input.charCodeAt(++e.position);
|
|
1825
1829
|
}
|
|
1826
|
-
return
|
|
1830
|
+
return he(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1827
1831
|
}
|
|
1828
|
-
function
|
|
1832
|
+
function Oa(e, t) {
|
|
1829
1833
|
var n, i, r;
|
|
1830
1834
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1831
1835
|
return !1;
|
|
1832
1836
|
for (e.kind = "scalar", e.result = "", e.position++, i = r = e.position; (n = e.input.charCodeAt(e.position)) !== 0; )
|
|
1833
1837
|
if (n === 39)
|
|
1834
|
-
if (
|
|
1838
|
+
if (he(e, i, e.position, !0), n = e.input.charCodeAt(++e.position), n === 39)
|
|
1835
1839
|
i = e.position, e.position++, r = e.position;
|
|
1836
1840
|
else
|
|
1837
1841
|
return !0;
|
|
1838
|
-
else de(n) ? (
|
|
1842
|
+
else de(n) ? (he(e, i, r, !0), st(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart && He(e) ? F(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1839
1843
|
F(e, "unexpected end of the stream within a single quoted scalar");
|
|
1840
1844
|
}
|
|
1841
|
-
function
|
|
1845
|
+
function La(e, t) {
|
|
1842
1846
|
var n, i, r, o, a, s;
|
|
1843
1847
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1844
1848
|
return !1;
|
|
1845
1849
|
for (e.kind = "scalar", e.result = "", e.position++, n = i = e.position; (s = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
1846
1850
|
if (s === 34)
|
|
1847
|
-
return
|
|
1851
|
+
return he(e, n, e.position, !0), e.position++, !0;
|
|
1848
1852
|
if (s === 92) {
|
|
1849
|
-
if (
|
|
1853
|
+
if (he(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), de(s))
|
|
1850
1854
|
Z(e, !1, t);
|
|
1851
|
-
else if (s < 256 &&
|
|
1852
|
-
e.result +=
|
|
1853
|
-
else if ((a =
|
|
1855
|
+
else if (s < 256 && In[s])
|
|
1856
|
+
e.result += Fn[s], e.position++;
|
|
1857
|
+
else if ((a = $a(s)) > 0) {
|
|
1854
1858
|
for (r = a, o = 0; r > 0; r--)
|
|
1855
|
-
s = e.input.charCodeAt(++e.position), (a =
|
|
1856
|
-
e.result +=
|
|
1859
|
+
s = e.input.charCodeAt(++e.position), (a = Sa(s)) >= 0 ? o = (o << 4) + a : F(e, "expected hexadecimal character");
|
|
1860
|
+
e.result += Ea(o), e.position++;
|
|
1857
1861
|
} else
|
|
1858
1862
|
F(e, "unknown escape sequence");
|
|
1859
1863
|
n = i = e.position;
|
|
1860
|
-
} else de(s) ? (
|
|
1864
|
+
} else de(s) ? (he(e, n, i, !0), st(e, Z(e, !1, t)), n = i = e.position) : e.position === e.lineStart && He(e) ? F(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1861
1865
|
}
|
|
1862
1866
|
F(e, "unexpected end of the stream within a double quoted scalar");
|
|
1863
1867
|
}
|
|
1864
|
-
function
|
|
1865
|
-
var n = !0, i, r, o, a = e.tag, s, l = e.anchor, c, d, u, p,
|
|
1866
|
-
if (
|
|
1867
|
-
d = 93,
|
|
1868
|
-
else if (
|
|
1869
|
-
d = 125,
|
|
1868
|
+
function Ba(e, t) {
|
|
1869
|
+
var n = !0, i, r, o, a = e.tag, s, l = e.anchor, c, d, u, p, h, g = /* @__PURE__ */ Object.create(null), v, y, k, A;
|
|
1870
|
+
if (A = e.input.charCodeAt(e.position), A === 91)
|
|
1871
|
+
d = 93, h = !1, s = [];
|
|
1872
|
+
else if (A === 123)
|
|
1873
|
+
d = 125, h = !0, s = {};
|
|
1870
1874
|
else
|
|
1871
1875
|
return !1;
|
|
1872
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = s),
|
|
1873
|
-
if (Z(e, !0, t),
|
|
1874
|
-
return e.position++, e.tag = a, e.anchor = l, e.kind =
|
|
1875
|
-
n ?
|
|
1876
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), A = e.input.charCodeAt(++e.position); A !== 0; ) {
|
|
1877
|
+
if (Z(e, !0, t), A = e.input.charCodeAt(e.position), A === d)
|
|
1878
|
+
return e.position++, e.tag = a, e.anchor = l, e.kind = h ? "mapping" : "sequence", e.result = s, !0;
|
|
1879
|
+
n ? A === 44 && F(e, "expected the node content, but found ','") : F(e, "missed comma between flow collection entries"), y = v = k = null, u = p = !1, A === 63 && (c = e.input.charCodeAt(e.position + 1), se(c) && (u = p = !0, e.position++, Z(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, $e(e, t, Ke, !1, !0), y = e.tag, v = e.result, Z(e, !0, t), A = e.input.charCodeAt(e.position), (p || e.line === i) && A === 58 && (u = !0, A = e.input.charCodeAt(++e.position), Z(e, !0, t), $e(e, t, Ke, !1, !0), k = e.result), h ? we(e, s, g, y, v, k, i, r, o) : u ? s.push(we(e, null, g, y, v, k, i, r, o)) : s.push(v), Z(e, !0, t), A = e.input.charCodeAt(e.position), A === 44 ? (n = !0, A = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1876
1880
|
}
|
|
1877
1881
|
F(e, "unexpected end of the stream within a flow collection");
|
|
1878
1882
|
}
|
|
1879
|
-
function
|
|
1883
|
+
function Ka(e, t) {
|
|
1880
1884
|
var n, i, r = Je, o = !1, a = !1, s = t, l = 0, c = !1, d, u;
|
|
1881
1885
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1882
1886
|
i = !1;
|
|
@@ -1886,8 +1890,8 @@ function Oa(e, t) {
|
|
|
1886
1890
|
return !1;
|
|
1887
1891
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1888
1892
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1889
|
-
Je === r ? r = u === 43 ?
|
|
1890
|
-
else if ((d =
|
|
1893
|
+
Je === r ? r = u === 43 ? St : ka : F(e, "repeat of a chomping mode identifier");
|
|
1894
|
+
else if ((d = Ta(u)) >= 0)
|
|
1891
1895
|
d === 0 ? F(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? F(e, "repeat of an indentation width identifier") : (s = t + d - 1, a = !0);
|
|
1892
1896
|
else
|
|
1893
1897
|
break;
|
|
@@ -1908,7 +1912,7 @@ function Oa(e, t) {
|
|
|
1908
1912
|
continue;
|
|
1909
1913
|
}
|
|
1910
1914
|
if (e.lineIndent < s) {
|
|
1911
|
-
r ===
|
|
1915
|
+
r === St ? e.result += ee.repeat(`
|
|
1912
1916
|
`, o ? 1 + l : l) : r === Je && o && (e.result += `
|
|
1913
1917
|
`);
|
|
1914
1918
|
break;
|
|
@@ -1919,56 +1923,56 @@ function Oa(e, t) {
|
|
|
1919
1923
|
`, l) : e.result += ee.repeat(`
|
|
1920
1924
|
`, o ? 1 + l : l), o = !0, a = !0, l = 0, n = e.position; !de(u) && u !== 0; )
|
|
1921
1925
|
u = e.input.charCodeAt(++e.position);
|
|
1922
|
-
|
|
1926
|
+
he(e, n, e.position, !1);
|
|
1923
1927
|
}
|
|
1924
1928
|
return !0;
|
|
1925
1929
|
}
|
|
1926
|
-
function
|
|
1930
|
+
function Ft(e, t) {
|
|
1927
1931
|
var n, i = e.tag, r = e.anchor, o = [], a, s = !1, l;
|
|
1928
1932
|
if (e.firstTabInLine !== -1) return !1;
|
|
1929
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), !(l !== 45 || (a = e.input.charCodeAt(e.position + 1), !
|
|
1933
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), l = e.input.charCodeAt(e.position); l !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), !(l !== 45 || (a = e.input.charCodeAt(e.position + 1), !se(a)))); ) {
|
|
1930
1934
|
if (s = !0, e.position++, Z(e, !0, -1) && e.lineIndent <= t) {
|
|
1931
1935
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
1932
1936
|
continue;
|
|
1933
1937
|
}
|
|
1934
|
-
if (n = e.line, $e(e, t,
|
|
1938
|
+
if (n = e.line, $e(e, t, Sn, !1, !0), o.push(e.result), Z(e, !0, -1), l = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && l !== 0)
|
|
1935
1939
|
F(e, "bad indentation of a sequence entry");
|
|
1936
1940
|
else if (e.lineIndent < t)
|
|
1937
1941
|
break;
|
|
1938
1942
|
}
|
|
1939
1943
|
return s ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1940
1944
|
}
|
|
1941
|
-
function
|
|
1942
|
-
var i, r, o, a, s, l, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null),
|
|
1945
|
+
function Ra(e, t, n) {
|
|
1946
|
+
var i, r, o, a, s, l, c = e.tag, d = e.anchor, u = {}, p = /* @__PURE__ */ Object.create(null), h = null, g = null, v = null, y = !1, k = !1, A;
|
|
1943
1947
|
if (e.firstTabInLine !== -1) return !1;
|
|
1944
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = u),
|
|
1945
|
-
if (!
|
|
1946
|
-
|
|
1948
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), A = e.input.charCodeAt(e.position); A !== 0; ) {
|
|
1949
|
+
if (!y && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, F(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (A === 63 || A === 58) && se(i))
|
|
1950
|
+
A === 63 ? (y && (we(e, u, p, h, g, null, a, s, l), h = g = v = null), k = !0, y = !0, r = !0) : y ? (y = !1, r = !0) : F(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, A = i;
|
|
1947
1951
|
else {
|
|
1948
|
-
if (a = e.line, s = e.lineStart, l = e.position, !$e(e, n,
|
|
1952
|
+
if (a = e.line, s = e.lineStart, l = e.position, !$e(e, n, wn, !1, !0))
|
|
1949
1953
|
break;
|
|
1950
1954
|
if (e.line === o) {
|
|
1951
|
-
for (
|
|
1952
|
-
|
|
1953
|
-
if (
|
|
1954
|
-
|
|
1955
|
-
else if (
|
|
1955
|
+
for (A = e.input.charCodeAt(e.position); ve(A); )
|
|
1956
|
+
A = e.input.charCodeAt(++e.position);
|
|
1957
|
+
if (A === 58)
|
|
1958
|
+
A = e.input.charCodeAt(++e.position), se(A) || F(e, "a whitespace character is expected after the key-value separator within a block mapping"), y && (we(e, u, p, h, g, null, a, s, l), h = g = v = null), k = !0, y = !1, r = !1, h = e.tag, g = e.result;
|
|
1959
|
+
else if (k)
|
|
1956
1960
|
F(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1957
1961
|
else
|
|
1958
1962
|
return e.tag = c, e.anchor = d, !0;
|
|
1959
|
-
} else if (
|
|
1963
|
+
} else if (k)
|
|
1960
1964
|
F(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1961
1965
|
else
|
|
1962
1966
|
return e.tag = c, e.anchor = d, !0;
|
|
1963
1967
|
}
|
|
1964
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1968
|
+
if ((e.line === o || e.lineIndent > t) && (y && (a = e.line, s = e.lineStart, l = e.position), $e(e, t, Re, !0, r) && (y ? g = e.result : v = e.result), y || (we(e, u, p, h, g, v, a, s, l), h = g = v = null), Z(e, !0, -1), A = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && A !== 0)
|
|
1965
1969
|
F(e, "bad indentation of a mapping entry");
|
|
1966
1970
|
else if (e.lineIndent < t)
|
|
1967
1971
|
break;
|
|
1968
1972
|
}
|
|
1969
|
-
return
|
|
1973
|
+
return y && we(e, u, p, h, g, null, a, s, l), k && (e.tag = c, e.anchor = d, e.kind = "mapping", e.result = u), k;
|
|
1970
1974
|
}
|
|
1971
|
-
function
|
|
1975
|
+
function Na(e) {
|
|
1972
1976
|
var t, n = !1, i = !1, r, o, a;
|
|
1973
1977
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1974
1978
|
if (e.tag !== null && F(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) {
|
|
@@ -1977,62 +1981,62 @@ function Ba(e) {
|
|
|
1977
1981
|
while (a !== 0 && a !== 62);
|
|
1978
1982
|
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : F(e, "unexpected end of the stream within a verbatim tag");
|
|
1979
1983
|
} else {
|
|
1980
|
-
for (; a !== 0 && !
|
|
1981
|
-
a === 33 && (i ? F(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1),
|
|
1982
|
-
o = e.input.slice(t, e.position),
|
|
1984
|
+
for (; a !== 0 && !se(a); )
|
|
1985
|
+
a === 33 && (i ? F(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), $n.test(r) || F(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1986
|
+
o = e.input.slice(t, e.position), wa.test(o) && F(e, "tag suffix cannot contain flow indicator characters");
|
|
1983
1987
|
}
|
|
1984
|
-
o && !
|
|
1988
|
+
o && !Tn.test(o) && F(e, "tag name cannot contain such characters: " + o);
|
|
1985
1989
|
try {
|
|
1986
1990
|
o = decodeURIComponent(o);
|
|
1987
1991
|
} catch {
|
|
1988
1992
|
F(e, "tag name is malformed: " + o);
|
|
1989
1993
|
}
|
|
1990
|
-
return n ? e.tag = o :
|
|
1994
|
+
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 : F(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1991
1995
|
}
|
|
1992
|
-
function
|
|
1996
|
+
function Ma(e) {
|
|
1993
1997
|
var t, n;
|
|
1994
1998
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1995
|
-
for (e.anchor !== null && F(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !
|
|
1999
|
+
for (e.anchor !== null && F(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !se(n) && !_e(n); )
|
|
1996
2000
|
n = e.input.charCodeAt(++e.position);
|
|
1997
2001
|
return e.position === t && F(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1998
2002
|
}
|
|
1999
|
-
function
|
|
2003
|
+
function ja(e) {
|
|
2000
2004
|
var t, n, i;
|
|
2001
2005
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
2002
|
-
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !
|
|
2006
|
+
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !se(i) && !_e(i); )
|
|
2003
2007
|
i = e.input.charCodeAt(++e.position);
|
|
2004
|
-
return e.position === t && F(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position),
|
|
2008
|
+
return e.position === t && F(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), ye.call(e.anchorMap, n) || F(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], Z(e, !0, -1), !0;
|
|
2005
2009
|
}
|
|
2006
2010
|
function $e(e, t, n, i, r) {
|
|
2007
|
-
var o, a, s, l = 1, c = !1, d = !1, u, p,
|
|
2008
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = s =
|
|
2009
|
-
for (;
|
|
2011
|
+
var o, a, s, l = 1, c = !1, d = !1, u, p, h, g, v, y;
|
|
2012
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = s = Re === n || Sn === n, i && Z(e, !0, -1) && (c = !0, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)), l === 1)
|
|
2013
|
+
for (; Na(e) || Ma(e); )
|
|
2010
2014
|
Z(e, !0, -1) ? (c = !0, s = o, e.lineIndent > t ? l = 1 : e.lineIndent === t ? l = 0 : e.lineIndent < t && (l = -1)) : s = !1;
|
|
2011
|
-
if (s && (s = c || r), (l === 1 ||
|
|
2015
|
+
if (s && (s = c || r), (l === 1 || Re === n) && (Ke === n || wn === n ? v = t : v = t + 1, y = e.position - e.lineStart, l === 1 ? s && (Ft(e, y) || Ra(e, y, v)) || Ba(e, v) ? d = !0 : (a && Ka(e, v) || Oa(e, v) || La(e, v) ? d = !0 : ja(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && F(e, "alias node should not have any properties")) : Fa(e, v, Ke === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : l === 0 && (d = s && Ft(e, y))), e.tag === null)
|
|
2012
2016
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2013
2017
|
else if (e.tag === "?") {
|
|
2014
2018
|
for (e.result !== null && e.kind !== "scalar" && F(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), u = 0, p = e.implicitTypes.length; u < p; u += 1)
|
|
2015
|
-
if (
|
|
2016
|
-
e.result =
|
|
2019
|
+
if (g = e.implicitTypes[u], g.resolve(e.result)) {
|
|
2020
|
+
e.result = g.construct(e.result), e.tag = g.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2017
2021
|
break;
|
|
2018
2022
|
}
|
|
2019
2023
|
} else if (e.tag !== "!") {
|
|
2020
|
-
if (
|
|
2021
|
-
|
|
2024
|
+
if (ye.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2025
|
+
g = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2022
2026
|
else
|
|
2023
|
-
for (
|
|
2024
|
-
if (e.tag.slice(0,
|
|
2025
|
-
|
|
2027
|
+
for (g = null, h = e.typeMap.multi[e.kind || "fallback"], u = 0, p = h.length; u < p; u += 1)
|
|
2028
|
+
if (e.tag.slice(0, h[u].tag.length) === h[u].tag) {
|
|
2029
|
+
g = h[u];
|
|
2026
2030
|
break;
|
|
2027
2031
|
}
|
|
2028
|
-
|
|
2032
|
+
g || F(e, "unknown tag !<" + e.tag + ">"), e.result !== null && g.kind !== e.kind && F(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + g.kind + '", not "' + e.kind + '"'), g.resolve(e.result, e.tag) ? (e.result = g.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : F(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
2029
2033
|
}
|
|
2030
2034
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2031
2035
|
}
|
|
2032
|
-
function
|
|
2036
|
+
function Da(e) {
|
|
2033
2037
|
var t = e.position, n, i, r, o = !1, a;
|
|
2034
2038
|
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)); ) {
|
|
2035
|
-
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !
|
|
2039
|
+
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !se(a); )
|
|
2036
2040
|
a = e.input.charCodeAt(++e.position);
|
|
2037
2041
|
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && F(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
2038
2042
|
for (; ve(a); )
|
|
@@ -2044,13 +2048,13 @@ function Na(e) {
|
|
|
2044
2048
|
break;
|
|
2045
2049
|
}
|
|
2046
2050
|
if (de(a)) break;
|
|
2047
|
-
for (n = e.position; a !== 0 && !
|
|
2051
|
+
for (n = e.position; a !== 0 && !se(a); )
|
|
2048
2052
|
a = e.input.charCodeAt(++e.position);
|
|
2049
2053
|
r.push(e.input.slice(n, e.position));
|
|
2050
2054
|
}
|
|
2051
|
-
a !== 0 && lt(e),
|
|
2055
|
+
a !== 0 && lt(e), ye.call(Et, i) ? Et[i](e, i, r) : Ne(e, 'unknown document directive "' + i + '"');
|
|
2052
2056
|
}
|
|
2053
|
-
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 && F(e, "directives end mark is expected"), $e(e, e.lineIndent - 1,
|
|
2057
|
+
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 && F(e, "directives end mark is expected"), $e(e, e.lineIndent - 1, Re, !1, !0), Z(e, !0, -1), e.checkLineBreaks && _a.test(e.input.slice(t, e.position)) && Ne(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && He(e)) {
|
|
2054
2058
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2055
2059
|
return;
|
|
2056
2060
|
}
|
|
@@ -2059,36 +2063,36 @@ function Na(e) {
|
|
|
2059
2063
|
else
|
|
2060
2064
|
return;
|
|
2061
2065
|
}
|
|
2062
|
-
function
|
|
2066
|
+
function Ln(e, t) {
|
|
2063
2067
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2064
2068
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2065
|
-
var n = new
|
|
2069
|
+
var n = new Ia(e, t), i = e.indexOf("\0");
|
|
2066
2070
|
for (i !== -1 && (n.position = i, F(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
2067
2071
|
n.lineIndent += 1, n.position += 1;
|
|
2068
2072
|
for (; n.position < n.length - 1; )
|
|
2069
|
-
|
|
2073
|
+
Da(n);
|
|
2070
2074
|
return n.documents;
|
|
2071
2075
|
}
|
|
2072
|
-
function
|
|
2076
|
+
function Pa(e, t, n) {
|
|
2073
2077
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2074
|
-
var i =
|
|
2078
|
+
var i = Ln(e, n);
|
|
2075
2079
|
if (typeof t != "function")
|
|
2076
2080
|
return i;
|
|
2077
2081
|
for (var r = 0, o = i.length; r < o; r += 1)
|
|
2078
2082
|
t(i[r]);
|
|
2079
2083
|
}
|
|
2080
|
-
function
|
|
2081
|
-
var n =
|
|
2084
|
+
function Ua(e, t) {
|
|
2085
|
+
var n = Ln(e, t);
|
|
2082
2086
|
if (n.length !== 0) {
|
|
2083
2087
|
if (n.length === 1)
|
|
2084
2088
|
return n[0];
|
|
2085
2089
|
throw new oe("expected a single document in the stream, but found more");
|
|
2086
2090
|
}
|
|
2087
2091
|
}
|
|
2088
|
-
var
|
|
2089
|
-
loadAll:
|
|
2090
|
-
load:
|
|
2091
|
-
},
|
|
2092
|
+
var qa = Pa, Ha = Ua, Bn = {
|
|
2093
|
+
loadAll: qa,
|
|
2094
|
+
load: Ha
|
|
2095
|
+
}, Kn = Object.prototype.toString, Rn = Object.prototype.hasOwnProperty, ct = 65279, Va = 9, Fe = 10, Ya = 13, Wa = 32, Ja = 33, Ga = 34, Ze = 35, za = 37, Qa = 38, Za = 39, Xa = 42, Nn = 44, eo = 45, Me = 58, to = 61, no = 62, io = 63, ro = 64, Mn = 91, jn = 93, ao = 96, Dn = 123, oo = 124, Pn = 125, re = {};
|
|
2092
2096
|
re[0] = "\\0";
|
|
2093
2097
|
re[7] = "\\a";
|
|
2094
2098
|
re[8] = "\\b";
|
|
@@ -2104,7 +2108,7 @@ re[133] = "\\N";
|
|
|
2104
2108
|
re[160] = "\\_";
|
|
2105
2109
|
re[8232] = "\\L";
|
|
2106
2110
|
re[8233] = "\\P";
|
|
2107
|
-
var
|
|
2111
|
+
var lo = [
|
|
2108
2112
|
"y",
|
|
2109
2113
|
"Y",
|
|
2110
2114
|
"yes",
|
|
@@ -2121,15 +2125,15 @@ var ro = [
|
|
|
2121
2125
|
"off",
|
|
2122
2126
|
"Off",
|
|
2123
2127
|
"OFF"
|
|
2124
|
-
],
|
|
2125
|
-
function
|
|
2128
|
+
], so = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2129
|
+
function co(e, t) {
|
|
2126
2130
|
var n, i, r, o, a, s, l;
|
|
2127
2131
|
if (t === null) return {};
|
|
2128
2132
|
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
2129
|
-
a = i[r], s = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = e.compiledTypeMap.fallback[a], l &&
|
|
2133
|
+
a = i[r], s = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), l = e.compiledTypeMap.fallback[a], l && Rn.call(l.styleAliases, s) && (s = l.styleAliases[s]), n[a] = s;
|
|
2130
2134
|
return n;
|
|
2131
2135
|
}
|
|
2132
|
-
function
|
|
2136
|
+
function uo(e) {
|
|
2133
2137
|
var t, n, i;
|
|
2134
2138
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2135
2139
|
n = "x", i = 2;
|
|
@@ -2141,11 +2145,11 @@ function lo(e) {
|
|
|
2141
2145
|
throw new oe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2142
2146
|
return "\\" + n + ee.repeat("0", i - t.length) + t;
|
|
2143
2147
|
}
|
|
2144
|
-
var
|
|
2145
|
-
function
|
|
2146
|
-
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 =
|
|
2148
|
+
var fo = 1, Oe = 2;
|
|
2149
|
+
function po(e) {
|
|
2150
|
+
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 = co(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 === '"' ? Oe : fo, 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;
|
|
2147
2151
|
}
|
|
2148
|
-
function
|
|
2152
|
+
function Ot(e, t) {
|
|
2149
2153
|
for (var n = ee.repeat(" ", t), i = 0, r = -1, o = "", a, s = e.length; i < s; )
|
|
2150
2154
|
r = e.indexOf(`
|
|
2151
2155
|
`, i), r === -1 ? (a = e.slice(i), i = s) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
@@ -2156,7 +2160,7 @@ function Xe(e, t) {
|
|
|
2156
2160
|
return `
|
|
2157
2161
|
` + ee.repeat(" ", e.indent * t);
|
|
2158
2162
|
}
|
|
2159
|
-
function
|
|
2163
|
+
function mo(e, t) {
|
|
2160
2164
|
var n, i, r;
|
|
2161
2165
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
2162
2166
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
@@ -2164,71 +2168,71 @@ function uo(e, t) {
|
|
|
2164
2168
|
return !1;
|
|
2165
2169
|
}
|
|
2166
2170
|
function je(e) {
|
|
2167
|
-
return e ===
|
|
2171
|
+
return e === Wa || e === Va;
|
|
2168
2172
|
}
|
|
2169
2173
|
function Le(e) {
|
|
2170
2174
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ct || 65536 <= e && e <= 1114111;
|
|
2171
2175
|
}
|
|
2172
|
-
function
|
|
2173
|
-
return Le(e) && e !== ct && e !==
|
|
2176
|
+
function Lt(e) {
|
|
2177
|
+
return Le(e) && e !== ct && e !== Ya && e !== Fe;
|
|
2174
2178
|
}
|
|
2175
|
-
function
|
|
2176
|
-
var i =
|
|
2179
|
+
function Bt(e, t, n) {
|
|
2180
|
+
var i = Lt(e), r = i && !je(e);
|
|
2177
2181
|
return (
|
|
2178
2182
|
// ns-plain-safe
|
|
2179
2183
|
(n ? (
|
|
2180
2184
|
// c = flow-in
|
|
2181
2185
|
i
|
|
2182
|
-
) : i && e !==
|
|
2186
|
+
) : i && e !== Nn && e !== Mn && e !== jn && e !== Dn && e !== Pn) && e !== Ze && !(t === Me && !r) || Lt(t) && !je(t) && e === Ze || t === Me && r
|
|
2183
2187
|
);
|
|
2184
2188
|
}
|
|
2185
|
-
function
|
|
2186
|
-
return Le(e) && e !== ct && !je(e) && e !==
|
|
2189
|
+
function go(e) {
|
|
2190
|
+
return Le(e) && e !== ct && !je(e) && e !== eo && e !== io && e !== Me && e !== Nn && e !== Mn && e !== jn && e !== Dn && e !== Pn && e !== Ze && e !== Qa && e !== Xa && e !== Ja && e !== oo && e !== to && e !== no && e !== Za && e !== Ga && e !== za && e !== ro && e !== ao;
|
|
2187
2191
|
}
|
|
2188
|
-
function
|
|
2192
|
+
function ho(e) {
|
|
2189
2193
|
return !je(e) && e !== Me;
|
|
2190
2194
|
}
|
|
2191
2195
|
function Te(e, t) {
|
|
2192
2196
|
var n = e.charCodeAt(t), i;
|
|
2193
2197
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
2194
2198
|
}
|
|
2195
|
-
function
|
|
2199
|
+
function Un(e) {
|
|
2196
2200
|
var t = /^\n* /;
|
|
2197
2201
|
return t.test(e);
|
|
2198
2202
|
}
|
|
2199
|
-
var
|
|
2200
|
-
function
|
|
2201
|
-
var l, c = 0, d = null, u = !1, p = !1,
|
|
2203
|
+
var qn = 1, et = 2, Hn = 3, Vn = 4, Ae = 5;
|
|
2204
|
+
function yo(e, t, n, i, r, o, a, s) {
|
|
2205
|
+
var l, c = 0, d = null, u = !1, p = !1, h = i !== -1, g = -1, v = go(Te(e, 0)) && ho(Te(e, e.length - 1));
|
|
2202
2206
|
if (t || a)
|
|
2203
2207
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2204
2208
|
if (c = Te(e, l), !Le(c))
|
|
2205
2209
|
return Ae;
|
|
2206
|
-
|
|
2210
|
+
v = v && Bt(c, d, s), d = c;
|
|
2207
2211
|
}
|
|
2208
2212
|
else {
|
|
2209
2213
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2210
2214
|
if (c = Te(e, l), c === Fe)
|
|
2211
|
-
u = !0,
|
|
2212
|
-
l -
|
|
2215
|
+
u = !0, h && (p = p || // Foldable line = too long, and not more-indented.
|
|
2216
|
+
l - g - 1 > i && e[g + 1] !== " ", g = l);
|
|
2213
2217
|
else if (!Le(c))
|
|
2214
2218
|
return Ae;
|
|
2215
|
-
|
|
2219
|
+
v = v && Bt(c, d, s), d = c;
|
|
2216
2220
|
}
|
|
2217
|
-
p = p ||
|
|
2221
|
+
p = p || h && l - g - 1 > i && e[g + 1] !== " ";
|
|
2218
2222
|
}
|
|
2219
|
-
return !u && !p ?
|
|
2223
|
+
return !u && !p ? v && !a && !r(e) ? qn : o === Oe ? Ae : et : n > 9 && Un(e) ? Ae : a ? o === Oe ? Ae : et : p ? Vn : Hn;
|
|
2220
2224
|
}
|
|
2221
|
-
function
|
|
2225
|
+
function vo(e, t, n, i, r) {
|
|
2222
2226
|
e.dump = function() {
|
|
2223
2227
|
if (t.length === 0)
|
|
2224
2228
|
return e.quotingType === Oe ? '""' : "''";
|
|
2225
|
-
if (!e.noCompatMode && (
|
|
2229
|
+
if (!e.noCompatMode && (lo.indexOf(t) !== -1 || so.test(t)))
|
|
2226
2230
|
return e.quotingType === Oe ? '"' + t + '"' : "'" + t + "'";
|
|
2227
2231
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), s = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
2228
2232
|
function l(c) {
|
|
2229
|
-
return
|
|
2233
|
+
return mo(e, c);
|
|
2230
2234
|
}
|
|
2231
|
-
switch (
|
|
2235
|
+
switch (yo(
|
|
2232
2236
|
t,
|
|
2233
2237
|
s,
|
|
2234
2238
|
e.indent,
|
|
@@ -2238,47 +2242,47 @@ function yo(e, t, n, i, r) {
|
|
|
2238
2242
|
e.forceQuotes && !i,
|
|
2239
2243
|
r
|
|
2240
2244
|
)) {
|
|
2241
|
-
case
|
|
2245
|
+
case qn:
|
|
2242
2246
|
return t;
|
|
2243
2247
|
case et:
|
|
2244
2248
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2245
|
-
case
|
|
2246
|
-
return "|" +
|
|
2247
|
-
case
|
|
2248
|
-
return ">" +
|
|
2249
|
+
case Hn:
|
|
2250
|
+
return "|" + Kt(t, e.indent) + Rt(Ot(t, o));
|
|
2251
|
+
case Vn:
|
|
2252
|
+
return ">" + Kt(t, e.indent) + Rt(Ot(bo(t, a), o));
|
|
2249
2253
|
case Ae:
|
|
2250
|
-
return '"' +
|
|
2254
|
+
return '"' + xo(t) + '"';
|
|
2251
2255
|
default:
|
|
2252
2256
|
throw new oe("impossible error: invalid scalar style");
|
|
2253
2257
|
}
|
|
2254
2258
|
}();
|
|
2255
2259
|
}
|
|
2256
|
-
function
|
|
2257
|
-
var n =
|
|
2260
|
+
function Kt(e, t) {
|
|
2261
|
+
var n = Un(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
2258
2262
|
`, r = i && (e[e.length - 2] === `
|
|
2259
2263
|
` || e === `
|
|
2260
2264
|
`), o = r ? "+" : i ? "" : "-";
|
|
2261
2265
|
return n + o + `
|
|
2262
2266
|
`;
|
|
2263
2267
|
}
|
|
2264
|
-
function
|
|
2268
|
+
function Rt(e) {
|
|
2265
2269
|
return e[e.length - 1] === `
|
|
2266
2270
|
` ? e.slice(0, -1) : e;
|
|
2267
2271
|
}
|
|
2268
|
-
function
|
|
2272
|
+
function bo(e, t) {
|
|
2269
2273
|
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
2270
2274
|
var c = e.indexOf(`
|
|
2271
2275
|
`);
|
|
2272
|
-
return c = c !== -1 ? c : e.length, n.lastIndex = c,
|
|
2276
|
+
return c = c !== -1 ? c : e.length, n.lastIndex = c, Nt(e.slice(0, c), t);
|
|
2273
2277
|
}(), r = e[0] === `
|
|
2274
2278
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
2275
2279
|
var s = a[1], l = a[2];
|
|
2276
2280
|
o = l[0] === " ", i += s + (!r && !o && l !== "" ? `
|
|
2277
|
-
` : "") +
|
|
2281
|
+
` : "") + Nt(l, t), r = o;
|
|
2278
2282
|
}
|
|
2279
2283
|
return i;
|
|
2280
2284
|
}
|
|
2281
|
-
function
|
|
2285
|
+
function Nt(e, t) {
|
|
2282
2286
|
if (e === "" || e[0] === " ") return e;
|
|
2283
2287
|
for (var n = / [^ ]/g, i, r = 0, o, a = 0, s = 0, l = ""; i = n.exec(e); )
|
|
2284
2288
|
s = i.index, s - r > t && (o = a > r ? a : s, l += `
|
|
@@ -2287,30 +2291,30 @@ function Rt(e, t) {
|
|
|
2287
2291
|
`, e.length - r > t && a > r ? l += e.slice(r, a) + `
|
|
2288
2292
|
` + e.slice(a + 1) : l += e.slice(r), l.slice(1);
|
|
2289
2293
|
}
|
|
2290
|
-
function
|
|
2294
|
+
function xo(e) {
|
|
2291
2295
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
2292
|
-
n = Te(e, r), i = re[n], !i && Le(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i ||
|
|
2296
|
+
n = Te(e, r), i = re[n], !i && Le(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || uo(n);
|
|
2293
2297
|
return t;
|
|
2294
2298
|
}
|
|
2295
|
-
function
|
|
2299
|
+
function Co(e, t, n) {
|
|
2296
2300
|
var i = "", r = e.tag, o, a, s;
|
|
2297
2301
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2298
2302
|
s = n[o], e.replacer && (s = e.replacer.call(n, String(o), s)), (pe(e, t, s, !1, !1) || typeof s > "u" && pe(e, t, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
2299
2303
|
e.tag = r, e.dump = "[" + i + "]";
|
|
2300
2304
|
}
|
|
2301
|
-
function
|
|
2305
|
+
function Mt(e, t, n, i) {
|
|
2302
2306
|
var r = "", o = e.tag, a, s, l;
|
|
2303
2307
|
for (a = 0, s = n.length; a < s; a += 1)
|
|
2304
2308
|
l = n[a], e.replacer && (l = e.replacer.call(n, String(a), l)), (pe(e, t + 1, l, !0, !0, !1, !0) || typeof l > "u" && pe(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += Xe(e, t)), e.dump && Fe === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
2305
2309
|
e.tag = o, e.dump = r || "[]";
|
|
2306
2310
|
}
|
|
2307
|
-
function
|
|
2311
|
+
function ko(e, t, n) {
|
|
2308
2312
|
var i = "", r = e.tag, o = Object.keys(n), a, s, l, c, d;
|
|
2309
2313
|
for (a = 0, s = o.length; a < s; a += 1)
|
|
2310
2314
|
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'), l = o[a], c = n[l], e.replacer && (c = e.replacer.call(n, l, c)), pe(e, t, l, !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));
|
|
2311
2315
|
e.tag = r, e.dump = "{" + i + "}";
|
|
2312
2316
|
}
|
|
2313
|
-
function
|
|
2317
|
+
function Ao(e, t, n, i) {
|
|
2314
2318
|
var r = "", o = e.tag, a = Object.keys(n), s, l, c, d, u, p;
|
|
2315
2319
|
if (e.sortKeys === !0)
|
|
2316
2320
|
a.sort();
|
|
@@ -2322,14 +2326,14 @@ function xo(e, t, n, i) {
|
|
|
2322
2326
|
p = "", (!i || r !== "") && (p += Xe(e, t)), c = a[s], 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 && Fe === e.dump.charCodeAt(0) ? p += "?" : p += "? "), p += e.dump, u && (p += Xe(e, t)), pe(e, t + 1, d, !0, u) && (e.dump && Fe === e.dump.charCodeAt(0) ? p += ":" : p += ": ", p += e.dump, r += p));
|
|
2323
2327
|
e.tag = o, e.dump = r || "{}";
|
|
2324
2328
|
}
|
|
2325
|
-
function
|
|
2329
|
+
function jt(e, t, n) {
|
|
2326
2330
|
var i, r, o, a, s, l;
|
|
2327
2331
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
2328
2332
|
if (s = r[o], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof t == "object" && t instanceof s.instanceOf) && (!s.predicate || s.predicate(t))) {
|
|
2329
2333
|
if (n ? s.multi && s.representName ? e.tag = s.representName(t) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2330
|
-
if (l = e.styleMap[s.tag] || s.defaultStyle,
|
|
2334
|
+
if (l = e.styleMap[s.tag] || s.defaultStyle, Kn.call(s.represent) === "[object Function]")
|
|
2331
2335
|
i = s.represent(t, l);
|
|
2332
|
-
else if (
|
|
2336
|
+
else if (Rn.call(s.represent, l))
|
|
2333
2337
|
i = s.represent[l](t, l);
|
|
2334
2338
|
else
|
|
2335
2339
|
throw new oe("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
@@ -2340,19 +2344,19 @@ function Nt(e, t, n) {
|
|
|
2340
2344
|
return !1;
|
|
2341
2345
|
}
|
|
2342
2346
|
function pe(e, t, n, i, r, o, a) {
|
|
2343
|
-
e.tag = null, e.dump = n,
|
|
2344
|
-
var s =
|
|
2347
|
+
e.tag = null, e.dump = n, jt(e, n, !1) || jt(e, n, !0);
|
|
2348
|
+
var s = Kn.call(e.dump), l = i, c;
|
|
2345
2349
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2346
2350
|
var d = s === "[object Object]" || s === "[object Array]", u, p;
|
|
2347
2351
|
if (d && (u = e.duplicates.indexOf(n), p = u !== -1), (e.tag !== null && e.tag !== "?" || p || e.indent !== 2 && t > 0) && (r = !1), p && e.usedDuplicates[u])
|
|
2348
2352
|
e.dump = "*ref_" + u;
|
|
2349
2353
|
else {
|
|
2350
2354
|
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2351
|
-
i && Object.keys(e.dump).length !== 0 ? (
|
|
2355
|
+
i && Object.keys(e.dump).length !== 0 ? (Ao(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (ko(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2352
2356
|
else if (s === "[object Array]")
|
|
2353
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ?
|
|
2357
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Mt(e, t - 1, e.dump, r) : Mt(e, t, e.dump, r), p && (e.dump = "&ref_" + u + e.dump)) : (Co(e, t, e.dump), p && (e.dump = "&ref_" + u + " " + e.dump));
|
|
2354
2358
|
else if (s === "[object String]")
|
|
2355
|
-
e.tag !== "?" &&
|
|
2359
|
+
e.tag !== "?" && vo(e, e.dump, t, o, l);
|
|
2356
2360
|
else {
|
|
2357
2361
|
if (s === "[object Undefined]")
|
|
2358
2362
|
return !1;
|
|
@@ -2365,7 +2369,7 @@ function pe(e, t, n, i, r, o, a) {
|
|
|
2365
2369
|
}
|
|
2366
2370
|
return !0;
|
|
2367
2371
|
}
|
|
2368
|
-
function
|
|
2372
|
+
function _o(e, t) {
|
|
2369
2373
|
var n = [], i = [], r, o;
|
|
2370
2374
|
for (tt(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
2371
2375
|
t.duplicates.push(n[i[r]]);
|
|
@@ -2383,53 +2387,53 @@ function tt(e, t, n) {
|
|
|
2383
2387
|
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
2384
2388
|
tt(e[i[r]], t, n);
|
|
2385
2389
|
}
|
|
2386
|
-
function
|
|
2390
|
+
function wo(e, t) {
|
|
2387
2391
|
t = t || {};
|
|
2388
|
-
var n = new
|
|
2389
|
-
n.noRefs ||
|
|
2392
|
+
var n = new po(t);
|
|
2393
|
+
n.noRefs || _o(e, n);
|
|
2390
2394
|
var i = e;
|
|
2391
2395
|
return n.replacer && (i = n.replacer.call({ "": i }, "", i)), pe(n, 0, i, !0, !0) ? n.dump + `
|
|
2392
2396
|
` : "";
|
|
2393
2397
|
}
|
|
2394
|
-
var
|
|
2395
|
-
dump:
|
|
2398
|
+
var So = wo, $o = {
|
|
2399
|
+
dump: So
|
|
2396
2400
|
};
|
|
2397
2401
|
function ut(e, t) {
|
|
2398
2402
|
return function() {
|
|
2399
2403
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2400
2404
|
};
|
|
2401
2405
|
}
|
|
2402
|
-
var
|
|
2403
|
-
binary:
|
|
2404
|
-
float:
|
|
2405
|
-
map:
|
|
2406
|
-
null:
|
|
2407
|
-
pairs:
|
|
2408
|
-
set:
|
|
2409
|
-
timestamp:
|
|
2410
|
-
bool:
|
|
2411
|
-
int:
|
|
2412
|
-
merge:
|
|
2413
|
-
omap:
|
|
2414
|
-
seq:
|
|
2415
|
-
str:
|
|
2416
|
-
},
|
|
2417
|
-
Type:
|
|
2418
|
-
Schema:
|
|
2419
|
-
FAILSAFE_SCHEMA:
|
|
2420
|
-
JSON_SCHEMA:
|
|
2421
|
-
CORE_SCHEMA:
|
|
2422
|
-
DEFAULT_SCHEMA:
|
|
2423
|
-
load:
|
|
2424
|
-
loadAll:
|
|
2425
|
-
dump:
|
|
2426
|
-
YAMLException:
|
|
2427
|
-
types:
|
|
2428
|
-
safeLoad:
|
|
2429
|
-
safeLoadAll:
|
|
2430
|
-
safeDump:
|
|
2406
|
+
var To = ne, Eo = on, Io = un, Fo = gn, Oo = hn, Lo = ot, Bo = Bn.load, Ko = Bn.loadAll, Ro = $o.dump, No = oe, Mo = {
|
|
2407
|
+
binary: Cn,
|
|
2408
|
+
float: mn,
|
|
2409
|
+
map: cn,
|
|
2410
|
+
null: dn,
|
|
2411
|
+
pairs: An,
|
|
2412
|
+
set: _n,
|
|
2413
|
+
timestamp: bn,
|
|
2414
|
+
bool: fn,
|
|
2415
|
+
int: pn,
|
|
2416
|
+
merge: xn,
|
|
2417
|
+
omap: kn,
|
|
2418
|
+
seq: sn,
|
|
2419
|
+
str: ln
|
|
2420
|
+
}, jo = ut("safeLoad", "load"), Do = ut("safeLoadAll", "loadAll"), Po = ut("safeDump", "dump"), Yn = {
|
|
2421
|
+
Type: To,
|
|
2422
|
+
Schema: Eo,
|
|
2423
|
+
FAILSAFE_SCHEMA: Io,
|
|
2424
|
+
JSON_SCHEMA: Fo,
|
|
2425
|
+
CORE_SCHEMA: Oo,
|
|
2426
|
+
DEFAULT_SCHEMA: Lo,
|
|
2427
|
+
load: Bo,
|
|
2428
|
+
loadAll: Ko,
|
|
2429
|
+
dump: Ro,
|
|
2430
|
+
YAMLException: No,
|
|
2431
|
+
types: Mo,
|
|
2432
|
+
safeLoad: jo,
|
|
2433
|
+
safeLoadAll: Do,
|
|
2434
|
+
safeDump: Po
|
|
2431
2435
|
};
|
|
2432
|
-
const
|
|
2436
|
+
const Uo = { class: "yaml-config config-card-code-block" }, Wn = /* @__PURE__ */ z({
|
|
2433
2437
|
__name: "YamlCodeBlock",
|
|
2434
2438
|
props: {
|
|
2435
2439
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2439,24 +2443,24 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2439
2443
|
}
|
|
2440
2444
|
},
|
|
2441
2445
|
setup(e) {
|
|
2442
|
-
const t = e, n =
|
|
2446
|
+
const t = e, n = T(() => {
|
|
2443
2447
|
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2444
|
-
return Object.keys(i).length === 0 && i.constructor === Object ? "" :
|
|
2448
|
+
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Yn.dump(i).trim();
|
|
2445
2449
|
});
|
|
2446
2450
|
return (i, r) => {
|
|
2447
2451
|
const o = D("KCodeBlock");
|
|
2448
|
-
return m(),
|
|
2449
|
-
t.entityRecord ? (m(),
|
|
2452
|
+
return m(), $("div", Uo, [
|
|
2453
|
+
t.entityRecord ? (m(), M(o, {
|
|
2450
2454
|
key: 0,
|
|
2451
2455
|
id: "yaml-codeblock",
|
|
2452
2456
|
code: n.value,
|
|
2453
2457
|
language: "yaml",
|
|
2454
2458
|
theme: "dark"
|
|
2455
|
-
}, null, 8, ["code"])) :
|
|
2459
|
+
}, null, 8, ["code"])) : j("", !0)
|
|
2456
2460
|
]);
|
|
2457
2461
|
};
|
|
2458
2462
|
}
|
|
2459
|
-
}),
|
|
2463
|
+
}), qo = { class: "terraform-config config-card-code-block" }, ie = " ", Jn = /* @__PURE__ */ z({
|
|
2460
2464
|
__name: "TerraformCodeBlock",
|
|
2461
2465
|
props: {
|
|
2462
2466
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2480,7 +2484,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2480
2484
|
}
|
|
2481
2485
|
},
|
|
2482
2486
|
setup(e) {
|
|
2483
|
-
const t = e, n =
|
|
2487
|
+
const t = e, n = T(() => gi.includes(t.entityType)), i = (l, c) => {
|
|
2484
2488
|
const d = ie;
|
|
2485
2489
|
let u = "";
|
|
2486
2490
|
return typeof l == "string" ? u += `${d}${c} = "${l}"
|
|
@@ -2494,12 +2498,12 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2494
2498
|
if (c && (p += `${u}${c} = {
|
|
2495
2499
|
`), l === null)
|
|
2496
2500
|
return c ? p += `${u}}` : p = "{}", p;
|
|
2497
|
-
const
|
|
2498
|
-
let
|
|
2499
|
-
for (const [
|
|
2500
|
-
Array.isArray(
|
|
2501
|
-
`,
|
|
2502
|
-
`,
|
|
2501
|
+
const h = Object.fromEntries(Object.entries(l).filter(([, v]) => v !== null));
|
|
2502
|
+
let g = "";
|
|
2503
|
+
for (const [v, y] of Object.entries(h))
|
|
2504
|
+
Array.isArray(y) ? y.length === 0 ? g = "[]" : (g = `[
|
|
2505
|
+
`, g += o(y, void 0, u), g += `${u}${ie}]`) : y && typeof y == "object" ? (g = `{
|
|
2506
|
+
`, g += r(y, void 0, u), g += `${u}${ie}}`) : g = String(y ?? ""), typeof y == "string" && (g = `"${g}"`), p += `${u}${ie}${v} = ${g}
|
|
2503
2507
|
`;
|
|
2504
2508
|
return c ? p += `${u}}
|
|
2505
2509
|
` : p;
|
|
@@ -2510,10 +2514,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2510
2514
|
let p = "";
|
|
2511
2515
|
c && (l.length === 0 ? p += `${u}${c} = [` : p += `${u}${c} = [
|
|
2512
2516
|
`);
|
|
2513
|
-
for (let
|
|
2514
|
-
const
|
|
2515
|
-
typeof
|
|
2516
|
-
`, p += r(
|
|
2517
|
+
for (let h = 0; h < l.length; h++) {
|
|
2518
|
+
const g = l[h];
|
|
2519
|
+
typeof g == "object" ? (p += `${u}${ie}{
|
|
2520
|
+
`, p += r(g, void 0, u), p += `${u}${ie}}`) : typeof g == "string" ? p += `${u}${ie}"${g}"` : p += `${u}${ie}${String(g ?? "")}`, h < l.length - 1 && (p += ","), p += `
|
|
2517
2521
|
`;
|
|
2518
2522
|
}
|
|
2519
2523
|
return c && (l.length === 0 ? p += `]
|
|
@@ -2524,14 +2528,14 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2524
2528
|
for (const [d, u] of Object.entries(l))
|
|
2525
2529
|
Array.isArray(u) ? c += o(u, d) : typeof u == "object" ? c += r(u, d) : c += i(u, d);
|
|
2526
2530
|
return c;
|
|
2527
|
-
}, s =
|
|
2528
|
-
var p, g,
|
|
2531
|
+
}, s = T(() => {
|
|
2532
|
+
var p, h, g, v, y, k, A;
|
|
2529
2533
|
const l = Object.fromEntries(Object.entries(t.entityRecord).filter(([, E]) => E != null)), c = t.entityRecord.config ? Object.fromEntries(Object.entries((p = t.entityRecord) == null ? void 0 : p.config).filter(([, E]) => E != null)) : void 0;
|
|
2530
2534
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2531
2535
|
return "";
|
|
2532
2536
|
delete l.id;
|
|
2533
2537
|
let d = "", u = "";
|
|
2534
|
-
if ((
|
|
2538
|
+
if ((h = l.service) != null && h.id ? (u = "service", delete l.service) : (g = l.route) != null && g.id ? (u = "route", delete l.route) : (v = l.consumer) != null && v.id ? (u = "consumer", delete l.consumer) : (y = l.consumer_group) != null && y.id ? (u = "consumer_group", delete l.consumer_group) : (k = l.certificate) != null && k.id ? (u = "certificate", delete l.certificate) : (A = l.set) != null && A.id && (u = "set", delete l.set), n.value) {
|
|
2535
2539
|
const E = t.subEntityType ? `${t.entityType}_${t.subEntityType}` : t.entityType;
|
|
2536
2540
|
d += `resource "konnect_event_gateway_${E}" "my_eventgateway${E.replaceAll("_", "")}" {
|
|
2537
2541
|
`, d += `${ie}provider = konnect-beta
|
|
@@ -2552,90 +2556,24 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2552
2556
|
});
|
|
2553
2557
|
return (l, c) => {
|
|
2554
2558
|
const d = D("KCodeBlock");
|
|
2555
|
-
return m(),
|
|
2556
|
-
t.entityRecord ? (m(),
|
|
2559
|
+
return m(), $("div", qo, [
|
|
2560
|
+
t.entityRecord ? (m(), M(d, {
|
|
2557
2561
|
key: 0,
|
|
2558
2562
|
id: "terraform-codeblock",
|
|
2559
2563
|
code: s.value,
|
|
2560
2564
|
language: "terraform",
|
|
2561
2565
|
theme: "dark"
|
|
2562
|
-
}, null, 8, ["code"])) :
|
|
2563
|
-
]);
|
|
2564
|
-
};
|
|
2565
|
-
}
|
|
2566
|
-
}), Do = { class: "deck-config config-card-code-block" }, Wn = /* @__PURE__ */ z({
|
|
2567
|
-
__name: "DeckCodeBlock",
|
|
2568
|
-
props: {
|
|
2569
|
-
entityRecord: {},
|
|
2570
|
-
entityType: {},
|
|
2571
|
-
geoServerUrl: {},
|
|
2572
|
-
controlPlaneName: {}
|
|
2573
|
-
},
|
|
2574
|
-
setup(e) {
|
|
2575
|
-
const t = e, n = $(() => {
|
|
2576
|
-
const o = {
|
|
2577
|
-
_format_version: "3.0"
|
|
2578
|
-
};
|
|
2579
|
-
return t.controlPlaneName && (o._konnect = {
|
|
2580
|
-
control_plane_name: t.controlPlaneName
|
|
2581
|
-
}), o;
|
|
2582
|
-
}), i = $(() => {
|
|
2583
|
-
var s, l, c, d, u;
|
|
2584
|
-
const o = Object.fromEntries(Object.entries(t.entityRecord).filter(([, p]) => p !== null && p !== "" && (Array.isArray(p) ? p.length !== 0 : !0)));
|
|
2585
|
-
t.entityType === Ee.Plugin ? ((s = o.service) != null && s.id && (o.service = o.service.id), (l = o.route) != null && l.id && (o.route = o.route.id), (c = o.consumer) != null && c.id && (o.consumer = o.consumer.id), (d = o.consumer_group) != null && d.id && (o.consumer_group = o.consumer_group.id)) : t.entityType === Ee.Key && (u = o.key_set) != null && u.id && (o.key_set = o.key_set.id);
|
|
2586
|
-
const a = {
|
|
2587
|
-
...n.value,
|
|
2588
|
-
[t.entityType + "s"]: [o]
|
|
2589
|
-
};
|
|
2590
|
-
return Hn.dump(a).trim();
|
|
2591
|
-
}), r = $(() => {
|
|
2592
|
-
let o = "deck gateway apply -";
|
|
2593
|
-
return t.geoServerUrl && (o += ` --konnect-addr ${t.geoServerUrl}`), `echo '${i.value}
|
|
2594
|
-
' | ${o}`;
|
|
2595
|
-
});
|
|
2596
|
-
return (o, a) => {
|
|
2597
|
-
const s = D("KBadge"), l = D("KCodeBlock");
|
|
2598
|
-
return m(), S("div", Do, [
|
|
2599
|
-
B("p", null, [
|
|
2600
|
-
a[1] || (a[1] = U(" The ", -1)),
|
|
2601
|
-
K(s, null, {
|
|
2602
|
-
default: k(() => [...a[0] || (a[0] = [
|
|
2603
|
-
U("DECK_KONNECT_TOKEN", -1)
|
|
2604
|
-
])]),
|
|
2605
|
-
_: 1
|
|
2606
|
-
}),
|
|
2607
|
-
a[2] || (a[2] = U(" environment variable must be added first. See ", -1)),
|
|
2608
|
-
a[3] || (a[3] = B("a", {
|
|
2609
|
-
href: "https://developer.konghq.com/deck/get-started/",
|
|
2610
|
-
target: "_blank"
|
|
2611
|
-
}, "the documentation", -1)),
|
|
2612
|
-
a[4] || (a[4] = U(" for details. ", -1))
|
|
2613
|
-
]),
|
|
2614
|
-
K(l, {
|
|
2615
|
-
id: "deck-env-codeblock",
|
|
2616
|
-
code: "export DECK_KONNECT_TOKEN=<your_konnect_PAT>",
|
|
2617
|
-
language: "shell",
|
|
2618
|
-
"single-line": "",
|
|
2619
|
-
style: { "margin-bottom": "28px" },
|
|
2620
|
-
theme: "dark"
|
|
2621
|
-
}),
|
|
2622
|
-
t.entityRecord ? (m(), j(l, {
|
|
2623
|
-
key: 0,
|
|
2624
|
-
id: "deck-codeblock",
|
|
2625
|
-
code: r.value,
|
|
2626
|
-
language: "shell",
|
|
2627
|
-
theme: "dark"
|
|
2628
|
-
}, null, 8, ["code"])) : M("", !0)
|
|
2566
|
+
}, null, 8, ["code"])) : j("", !0)
|
|
2629
2567
|
]);
|
|
2630
2568
|
};
|
|
2631
2569
|
}
|
|
2632
|
-
}),
|
|
2570
|
+
}), Ho = {
|
|
2633
2571
|
key: 0,
|
|
2634
2572
|
class: "config-card-display-form"
|
|
2635
|
-
},
|
|
2573
|
+
}, Vo = ["data-testid"], Yo = {
|
|
2636
2574
|
key: 0,
|
|
2637
2575
|
class: "config-card-prop-section-title"
|
|
2638
|
-
},
|
|
2576
|
+
}, Wo = /* @__PURE__ */ z({
|
|
2639
2577
|
__name: "ConfigCardDisplay",
|
|
2640
2578
|
props: {
|
|
2641
2579
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2692,31 +2630,31 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2692
2630
|
}
|
|
2693
2631
|
},
|
|
2694
2632
|
setup(e) {
|
|
2695
|
-
const t = e, n =
|
|
2633
|
+
const t = e, n = Pe(), { i18n: { t: i } } = Y.useI18n(), r = (s) => !!(s.tooltip || n[`${s.key}-label-tooltip`]), o = T(() => {
|
|
2696
2634
|
if (!t.record)
|
|
2697
2635
|
return t.record;
|
|
2698
2636
|
let s = t.record;
|
|
2699
2637
|
t.codeBlockRecordFormatter && (s = t.codeBlockRecordFormatter(s, t.format));
|
|
2700
2638
|
const l = JSON.parse(JSON.stringify(s));
|
|
2701
2639
|
return delete l.created_at, delete l.updated_at, l;
|
|
2702
|
-
}), a =
|
|
2703
|
-
return (s, l) => (m(),
|
|
2704
|
-
e.format === "structured" ? (m(),
|
|
2705
|
-
(m(!0),
|
|
2640
|
+
}), a = T(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2641
|
+
return (s, l) => (m(), $(ue, null, [
|
|
2642
|
+
e.format === "structured" ? (m(), $("div", Ho, [
|
|
2643
|
+
(m(!0), $(ue, null, ce(e.propListTypes, (c) => (m(), $("div", {
|
|
2706
2644
|
key: `config-card-details-${c}-props`,
|
|
2707
2645
|
class: fe(`config-card-details-${c}-props`),
|
|
2708
2646
|
"data-testid": `config-card-details-${c}-props`
|
|
2709
2647
|
}, [
|
|
2710
|
-
c !== "basic" ? (m(),
|
|
2711
|
-
(m(!0),
|
|
2648
|
+
c !== "basic" ? (m(), $("div", Yo, L(c === "advanced" ? _(i)("baseConfigCard.sections.advanced") : c === "plugin" ? _(i)("baseConfigCard.sections.plugin") : _(i)("baseConfigCard.sections.policy")), 1)) : j("", !0),
|
|
2649
|
+
(m(!0), $(ue, null, ce(e.propertyCollections[c], (d) => P(s.$slots, `config-card-item-${d.key}`, {
|
|
2712
2650
|
key: d.key,
|
|
2713
2651
|
item: d
|
|
2714
2652
|
}, () => [
|
|
2715
|
-
|
|
2716
|
-
label:
|
|
2653
|
+
R(tn, { item: d }, Se({
|
|
2654
|
+
label: C(() => [
|
|
2717
2655
|
P(s.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2718
2656
|
]),
|
|
2719
|
-
[d.key]:
|
|
2657
|
+
[d.key]: C(({ rowValue: u }) => [
|
|
2720
2658
|
P(s.$slots, d.key, {
|
|
2721
2659
|
row: d,
|
|
2722
2660
|
rowValue: u
|
|
@@ -2726,45 +2664,38 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2726
2664
|
}, [
|
|
2727
2665
|
r(d) ? {
|
|
2728
2666
|
name: "label-tooltip",
|
|
2729
|
-
fn:
|
|
2667
|
+
fn: C(() => [
|
|
2730
2668
|
P(s.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2731
2669
|
]),
|
|
2732
2670
|
key: "0"
|
|
2733
2671
|
} : void 0
|
|
2734
2672
|
]), 1032, ["item"])
|
|
2735
2673
|
], !0)), 128))
|
|
2736
|
-
], 10,
|
|
2737
|
-
])) :
|
|
2738
|
-
e.format === "json" && o.value ? (m(),
|
|
2674
|
+
], 10, Vo))), 128))
|
|
2675
|
+
])) : j("", !0),
|
|
2676
|
+
e.format === "json" && o.value ? (m(), M(nn, {
|
|
2739
2677
|
key: 1,
|
|
2740
2678
|
config: t.config,
|
|
2741
2679
|
"entity-record": o.value,
|
|
2742
2680
|
"fetcher-url": a.value,
|
|
2743
2681
|
"request-method": "get"
|
|
2744
|
-
}, null, 8, ["config", "entity-record", "fetcher-url"])) :
|
|
2745
|
-
e.format === "yaml" && o.value ? (m(),
|
|
2682
|
+
}, null, 8, ["config", "entity-record", "fetcher-url"])) : j("", !0),
|
|
2683
|
+
e.format === "yaml" && o.value ? (m(), M(Wn, {
|
|
2746
2684
|
key: 2,
|
|
2747
2685
|
"entity-record": o.value
|
|
2748
|
-
}, null, 8, ["entity-record"])) :
|
|
2749
|
-
e.format === "terraform" && o.value ? (m(),
|
|
2686
|
+
}, null, 8, ["entity-record"])) : j("", !0),
|
|
2687
|
+
e.format === "terraform" && o.value ? (m(), M(Jn, {
|
|
2750
2688
|
key: 3,
|
|
2751
2689
|
"entity-record": o.value,
|
|
2752
2690
|
"entity-type": t.entityType,
|
|
2753
2691
|
"sub-entity-type": t.subEntityType
|
|
2754
|
-
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) :
|
|
2755
|
-
e.format === "deck" && o.value ? (m(), j(Wn, {
|
|
2756
|
-
key: 4,
|
|
2757
|
-
"control-plane-name": t.config.app === "konnect" ? t.config.controlPlaneName : void 0,
|
|
2758
|
-
"entity-record": o.value,
|
|
2759
|
-
"entity-type": t.entityType,
|
|
2760
|
-
"geo-server-url": t.config.app === "konnect" ? t.config.geoServerUrl : void 0
|
|
2761
|
-
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])) : M("", !0)
|
|
2692
|
+
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])) : j("", !0)
|
|
2762
2693
|
], 64));
|
|
2763
2694
|
}
|
|
2764
|
-
}),
|
|
2695
|
+
}), Jo = /* @__PURE__ */ le(Wo, [["__scopeId", "data-v-a7689049"]]), Go = {
|
|
2765
2696
|
class: "config-card-title",
|
|
2766
2697
|
"data-testid": "config-card-title"
|
|
2767
|
-
},
|
|
2698
|
+
}, zo = { class: "config-card-actions" }, Qo = ["href"], Zo = { class: "config-card-details-section" }, Xo = /* @__PURE__ */ z({
|
|
2768
2699
|
__name: "EntityBaseConfigCard",
|
|
2769
2700
|
props: {
|
|
2770
2701
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2887,9 +2818,9 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2887
2818
|
emits: ["loading", "fetch:success", "fetch:error", "configFormatChange"],
|
|
2888
2819
|
setup(e, { emit: t }) {
|
|
2889
2820
|
var O;
|
|
2890
|
-
const n = t, i = e, { i18n: { t: r } } =
|
|
2891
|
-
|
|
2892
|
-
const { axiosInstance: s } =
|
|
2821
|
+
const n = t, i = e, { i18n: { t: r } } = Y.useI18n(), { getMessageFromError: o } = Y.useErrors(), { convertKeyToTitle: a } = Y.useStringHelpers();
|
|
2822
|
+
Y.useSubSchema(i.pluginConfigKey);
|
|
2823
|
+
const { axiosInstance: s } = Y.useAxios((O = i.config) == null ? void 0 : O.axiosRequestConfig), l = [
|
|
2893
2824
|
{
|
|
2894
2825
|
label: r("baseConfigCard.general.structuredFormat"),
|
|
2895
2826
|
value: "structured",
|
|
@@ -2910,18 +2841,18 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2910
2841
|
});
|
|
2911
2842
|
const c = l[0].value, d = N(c), u = (f) => {
|
|
2912
2843
|
d.value = f == null ? void 0 : f.value, n("configFormatChange", d.value);
|
|
2913
|
-
}, p = (f,
|
|
2914
|
-
localStorage.setItem(f,
|
|
2844
|
+
}, p = (f, b) => {
|
|
2845
|
+
localStorage.setItem(f, b);
|
|
2915
2846
|
};
|
|
2916
2847
|
be(d, (f) => {
|
|
2917
2848
|
i.config.formatPreferenceKey && p(i.config.formatPreferenceKey, f);
|
|
2918
2849
|
}), nt(() => {
|
|
2919
2850
|
if (i.config.formatPreferenceKey) {
|
|
2920
2851
|
const f = localStorage.getItem(i.config.formatPreferenceKey);
|
|
2921
|
-
f && l.some((
|
|
2852
|
+
f && l.some((b) => b.value === f) ? d.value = f : d.value = c, p(i.config.formatPreferenceKey, d.value);
|
|
2922
2853
|
}
|
|
2923
2854
|
});
|
|
2924
|
-
const
|
|
2855
|
+
const h = {
|
|
2925
2856
|
id: {
|
|
2926
2857
|
type: V.ID,
|
|
2927
2858
|
label: r("baseConfigCard.commonFields.id_label"),
|
|
@@ -2962,195 +2893,195 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
2962
2893
|
// the last property displayed
|
|
2963
2894
|
section: ae.Basic
|
|
2964
2895
|
}
|
|
2965
|
-
},
|
|
2966
|
-
var
|
|
2967
|
-
if (!
|
|
2896
|
+
}, g = N(!1), v = N(!1), y = N(""), k = N({}), A = T(() => {
|
|
2897
|
+
var x, H, J;
|
|
2898
|
+
if (!k.value)
|
|
2968
2899
|
return [];
|
|
2969
|
-
const f = [],
|
|
2970
|
-
for (const I in
|
|
2900
|
+
const f = [], b = Object.keys(k.value).length;
|
|
2901
|
+
for (const I in k.value) {
|
|
2971
2902
|
if (I === "__ui_data") continue;
|
|
2972
|
-
const
|
|
2973
|
-
let q =
|
|
2974
|
-
(G || G === 0) && (q = G === -1 ?
|
|
2903
|
+
const K = (H = (x = i.configSchema) == null ? void 0 : x[I]) == null ? void 0 : H.order, G = (J = h[I]) == null ? void 0 : J.order;
|
|
2904
|
+
let q = b;
|
|
2905
|
+
(G || G === 0) && (q = G === -1 ? b + 1 : G), K && (q = K === -1 ? b + 1 : K), f.push([I, q]);
|
|
2975
2906
|
}
|
|
2976
|
-
return f.sort(function(I,
|
|
2977
|
-
return I[1] -
|
|
2907
|
+
return f.sort(function(I, K) {
|
|
2908
|
+
return I[1] - K[1];
|
|
2978
2909
|
}), f.map((I) => {
|
|
2979
2910
|
var dt, ft;
|
|
2980
|
-
const
|
|
2911
|
+
const K = I[0], G = (dt = k.value) == null ? void 0 : dt[K], q = ((ft = i.configSchema) == null ? void 0 : ft[K]) || {}, Q = h[K];
|
|
2981
2912
|
return {
|
|
2982
|
-
key:
|
|
2913
|
+
key: K,
|
|
2983
2914
|
value: G,
|
|
2984
2915
|
hidden: q.hidden || !1,
|
|
2985
2916
|
type: q.type ?? ((Q == null ? void 0 : Q.type) || V.Text),
|
|
2986
|
-
label: q.label ?? ((Q == null ? void 0 : Q.label) || a(
|
|
2917
|
+
label: q.label ?? ((Q == null ? void 0 : Q.label) || a(K)),
|
|
2987
2918
|
tooltip: q.tooltip ?? ((Q == null ? void 0 : Q.tooltip) || void 0),
|
|
2988
2919
|
section: q.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2989
2920
|
};
|
|
2990
2921
|
}).filter((I) => !I.hidden && I.key !== i.pluginConfigKey);
|
|
2991
|
-
}), E =
|
|
2922
|
+
}), E = T(() => {
|
|
2992
2923
|
var H, J;
|
|
2993
|
-
if (!
|
|
2924
|
+
if (!k.value || !i.pluginConfigKey)
|
|
2994
2925
|
return [];
|
|
2995
|
-
const f =
|
|
2926
|
+
const f = k.value[i.pluginConfigKey] || {}, b = Object.keys(f).length, x = [];
|
|
2996
2927
|
for (const I in f) {
|
|
2997
|
-
const
|
|
2998
|
-
let q = G != null && G !== "" ?
|
|
2999
|
-
|
|
2928
|
+
const K = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2929
|
+
let q = G != null && G !== "" ? b - 1 : b;
|
|
2930
|
+
K && (q = K === -1 ? b + 1 : K), x.push([I, q]);
|
|
3000
2931
|
}
|
|
3001
|
-
return
|
|
3002
|
-
return I[1] -
|
|
3003
|
-
}),
|
|
2932
|
+
return x.sort(function(I, K) {
|
|
2933
|
+
return I[1] - K[1];
|
|
2934
|
+
}), x.map((I) => {
|
|
3004
2935
|
var Q;
|
|
3005
|
-
const
|
|
2936
|
+
const K = I[0], G = f[K], q = ((Q = i.pluginConfigSchema) == null ? void 0 : Q[K]) || {};
|
|
3006
2937
|
return {
|
|
3007
|
-
key:
|
|
2938
|
+
key: K,
|
|
3008
2939
|
value: G,
|
|
3009
2940
|
hidden: q.hidden || !1,
|
|
3010
2941
|
type: q.type ?? V.Text,
|
|
3011
|
-
label: q.label ?? a(
|
|
2942
|
+
label: q.label ?? a(K),
|
|
3012
2943
|
tooltip: q.tooltip ?? void 0,
|
|
3013
2944
|
section: ae.Plugin
|
|
3014
2945
|
};
|
|
3015
2946
|
}).filter((I) => !I.hidden);
|
|
3016
|
-
}),
|
|
2947
|
+
}), W = T(() => {
|
|
3017
2948
|
var H, J;
|
|
3018
|
-
if (!
|
|
2949
|
+
if (!k.value || !i.policyConfigKey)
|
|
3019
2950
|
return [];
|
|
3020
|
-
const f =
|
|
2951
|
+
const f = k.value[i.policyConfigKey] || {}, b = Object.keys(f).length, x = [];
|
|
3021
2952
|
for (const I in f) {
|
|
3022
|
-
const
|
|
3023
|
-
let q = G != null && G !== "" ?
|
|
3024
|
-
|
|
2953
|
+
const K = (J = (H = i.policyConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2954
|
+
let q = G != null && G !== "" ? b - 1 : b;
|
|
2955
|
+
K && (q = K === -1 ? b + 1 : K), x.push([I, q]);
|
|
3025
2956
|
}
|
|
3026
|
-
return
|
|
3027
|
-
return I[1] -
|
|
3028
|
-
}),
|
|
2957
|
+
return x.sort(function(I, K) {
|
|
2958
|
+
return I[1] - K[1];
|
|
2959
|
+
}), x.map((I) => {
|
|
3029
2960
|
var Q;
|
|
3030
|
-
const
|
|
2961
|
+
const K = I[0], G = f[K], q = ((Q = i.policyConfigSchema) == null ? void 0 : Q[K]) || {};
|
|
3031
2962
|
return {
|
|
3032
|
-
key:
|
|
2963
|
+
key: K,
|
|
3033
2964
|
value: G,
|
|
3034
2965
|
hidden: q.hidden || !1,
|
|
3035
2966
|
type: q.type ?? V.Text,
|
|
3036
|
-
label: q.label ?? a(
|
|
2967
|
+
label: q.label ?? a(K),
|
|
3037
2968
|
tooltip: q.tooltip ?? void 0,
|
|
3038
2969
|
section: ae.Policy
|
|
3039
2970
|
};
|
|
3040
2971
|
}).filter((I) => !I.hidden);
|
|
3041
|
-
}), X =
|
|
3042
|
-
var f,
|
|
2972
|
+
}), X = T(() => {
|
|
2973
|
+
var f, b, x, H, J, I;
|
|
3043
2974
|
return {
|
|
3044
|
-
basic: (f =
|
|
3045
|
-
advanced: (
|
|
3046
|
-
plugin: (H = E.value) == null ? void 0 : H.concat((
|
|
3047
|
-
policy: (I =
|
|
2975
|
+
basic: (f = A.value) == null ? void 0 : f.filter((K) => K.section === ae.Basic),
|
|
2976
|
+
advanced: (b = A.value) == null ? void 0 : b.filter((K) => K.section === ae.Advanced),
|
|
2977
|
+
plugin: (H = E.value) == null ? void 0 : H.concat((x = A.value) == null ? void 0 : x.filter((K) => K.section === ae.Plugin)),
|
|
2978
|
+
policy: (I = W.value) == null ? void 0 : I.concat((J = A.value) == null ? void 0 : J.filter((K) => K.section === ae.Policy))
|
|
3048
2979
|
};
|
|
3049
|
-
}),
|
|
2980
|
+
}), S = T(() => {
|
|
3050
2981
|
const f = [];
|
|
3051
2982
|
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;
|
|
3052
|
-
}),
|
|
3053
|
-
var
|
|
2983
|
+
}), w = T(() => {
|
|
2984
|
+
var b, x;
|
|
3054
2985
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
3055
|
-
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((
|
|
2986
|
+
return i.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((b = i.config) == null ? void 0 : b.controlPlaneId) || "") : i.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (x = i.config) != null && x.workspace ? `/${i.config.workspace}` : "")), f = f.replace(/{id}/gi, i.config.entityId), f;
|
|
3056
2987
|
});
|
|
3057
|
-
return be(
|
|
2988
|
+
return be(g, (f) => {
|
|
3058
2989
|
n("loading", f);
|
|
3059
2990
|
}, { immediate: !0 }), it(async () => {
|
|
3060
|
-
|
|
2991
|
+
v.value = !1, g.value = !0;
|
|
3061
2992
|
try {
|
|
3062
|
-
const { data: f } = await s.get(
|
|
2993
|
+
const { data: f } = await s.get(w.value);
|
|
3063
2994
|
if (i.dataKey)
|
|
3064
2995
|
if (typeof f[i.dataKey] < "u")
|
|
3065
|
-
|
|
2996
|
+
k.value = { ...f[i.dataKey] };
|
|
3066
2997
|
else
|
|
3067
2998
|
throw new Error(r("errors.dataKeyUndefined", { dataKey: i.dataKey }));
|
|
3068
|
-
else i.recordResolver ?
|
|
3069
|
-
Object.keys(i.configSchema).filter((
|
|
3070
|
-
|
|
2999
|
+
else i.recordResolver ? k.value = { ...i.recordResolver(f) } : k.value = { ...f };
|
|
3000
|
+
Object.keys(i.configSchema).filter((x) => i.configSchema[x].forceShow).forEach((x) => {
|
|
3001
|
+
k.value && typeof k.value[x] > "u" && (k.value[x] = null);
|
|
3071
3002
|
}), n("fetch:success", f);
|
|
3072
3003
|
} catch (f) {
|
|
3073
|
-
const
|
|
3074
|
-
|
|
3004
|
+
const b = o(f);
|
|
3005
|
+
y.value = b.startsWith("code") ? r("baseConfigCard.errors.load") : b, v.value = !0, n("fetch:error", f);
|
|
3075
3006
|
} finally {
|
|
3076
|
-
|
|
3007
|
+
g.value = !1;
|
|
3077
3008
|
}
|
|
3078
|
-
}), (f,
|
|
3079
|
-
const
|
|
3080
|
-
return m(),
|
|
3009
|
+
}), (f, b) => {
|
|
3010
|
+
const x = D("KLabel"), H = D("KSelect"), J = D("KButton"), I = D("KSkeleton"), K = D("KEmptyState"), G = D("KCard");
|
|
3011
|
+
return m(), M(G, {
|
|
3081
3012
|
class: "kong-ui-entity-base-config-card",
|
|
3082
3013
|
"title-tag": e.titleTag
|
|
3083
3014
|
}, Se({
|
|
3084
|
-
actions:
|
|
3085
|
-
B("div",
|
|
3015
|
+
actions: C(() => [
|
|
3016
|
+
B("div", zo, [
|
|
3086
3017
|
P(f.$slots, "actions", {}, void 0, !0),
|
|
3087
|
-
|
|
3018
|
+
R(x, {
|
|
3088
3019
|
class: "config-format-select-label",
|
|
3089
3020
|
"data-testid": "config-format-select-label"
|
|
3090
3021
|
}, {
|
|
3091
|
-
default:
|
|
3022
|
+
default: C(() => [
|
|
3092
3023
|
U(L(e.label), 1)
|
|
3093
3024
|
]),
|
|
3094
3025
|
_: 1
|
|
3095
3026
|
}),
|
|
3096
|
-
|
|
3027
|
+
R(H, {
|
|
3097
3028
|
modelValue: d.value,
|
|
3098
|
-
"onUpdate:modelValue":
|
|
3029
|
+
"onUpdate:modelValue": b[0] || (b[0] = (q) => d.value = q),
|
|
3099
3030
|
"data-testid": "select-config-format",
|
|
3100
3031
|
items: l,
|
|
3101
3032
|
onChange: u
|
|
3102
3033
|
}, null, 8, ["modelValue"]),
|
|
3103
|
-
e.configCardDoc ? (m(),
|
|
3034
|
+
e.configCardDoc ? (m(), M(J, {
|
|
3104
3035
|
key: 0,
|
|
3105
3036
|
appearance: "tertiary",
|
|
3106
3037
|
class: "book-icon",
|
|
3107
3038
|
"data-testid": "book-icon"
|
|
3108
3039
|
}, {
|
|
3109
|
-
default:
|
|
3040
|
+
default: C(() => [
|
|
3110
3041
|
B("a", {
|
|
3111
3042
|
href: e.configCardDoc,
|
|
3112
3043
|
rel: "noopener",
|
|
3113
3044
|
target: "_blank"
|
|
3114
3045
|
}, [
|
|
3115
|
-
|
|
3116
|
-
], 8,
|
|
3046
|
+
R(_(Wt), { size: _(lr) }, null, 8, ["size"])
|
|
3047
|
+
], 8, Qo)
|
|
3117
3048
|
]),
|
|
3118
3049
|
_: 1
|
|
3119
|
-
})) :
|
|
3050
|
+
})) : j("", !0)
|
|
3120
3051
|
])
|
|
3121
3052
|
]),
|
|
3122
|
-
default:
|
|
3123
|
-
|
|
3053
|
+
default: C(() => [
|
|
3054
|
+
g.value ? (m(), M(I, {
|
|
3124
3055
|
key: 0,
|
|
3125
3056
|
"data-testid": "config-card-loader",
|
|
3126
3057
|
"table-columns": 2,
|
|
3127
3058
|
type: "table"
|
|
3128
|
-
})) :
|
|
3059
|
+
})) : v.value ? (m(), M(K, {
|
|
3129
3060
|
key: 1,
|
|
3130
3061
|
"data-testid": "config-card-fetch-error",
|
|
3131
3062
|
"icon-variant": "error"
|
|
3132
3063
|
}, {
|
|
3133
|
-
default:
|
|
3134
|
-
B("h3", null, L(
|
|
3064
|
+
default: C(() => [
|
|
3065
|
+
B("h3", null, L(y.value), 1)
|
|
3135
3066
|
]),
|
|
3136
3067
|
_: 1
|
|
3137
|
-
})) :
|
|
3138
|
-
B("div",
|
|
3139
|
-
|
|
3068
|
+
})) : j("", !0),
|
|
3069
|
+
B("div", Zo, [
|
|
3070
|
+
R(Jo, {
|
|
3140
3071
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3141
3072
|
config: e.config,
|
|
3142
3073
|
"entity-type": e.entityType,
|
|
3143
|
-
"fetcher-url":
|
|
3074
|
+
"fetcher-url": w.value,
|
|
3144
3075
|
format: d.value,
|
|
3145
|
-
"prop-list-types":
|
|
3076
|
+
"prop-list-types": S.value,
|
|
3146
3077
|
"property-collections": X.value,
|
|
3147
|
-
record:
|
|
3078
|
+
record: k.value,
|
|
3148
3079
|
"sub-entity-type": e.subEntityType
|
|
3149
3080
|
}, Se({ _: 2 }, [
|
|
3150
3081
|
ce(Object.keys(f.$slots), (q) => ({
|
|
3151
3082
|
name: q,
|
|
3152
|
-
fn:
|
|
3153
|
-
P(f.$slots, q,
|
|
3083
|
+
fn: C((Q) => [
|
|
3084
|
+
P(f.$slots, q, Vt({ record: k.value }, Q), void 0, !0)
|
|
3154
3085
|
])
|
|
3155
3086
|
}))
|
|
3156
3087
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3160,10 +3091,10 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3160
3091
|
}, [
|
|
3161
3092
|
e.hideTitle ? void 0 : {
|
|
3162
3093
|
name: "title",
|
|
3163
|
-
fn:
|
|
3164
|
-
B("span",
|
|
3094
|
+
fn: C(() => [
|
|
3095
|
+
B("span", Go, [
|
|
3165
3096
|
P(f.$slots, "title", {}, () => [
|
|
3166
|
-
U(L(
|
|
3097
|
+
U(L(_(r)("baseConfigCard.title")), 1)
|
|
3167
3098
|
], !0)
|
|
3168
3099
|
])
|
|
3169
3100
|
]),
|
|
@@ -3172,7 +3103,98 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3172
3103
|
]), 1032, ["title-tag"]);
|
|
3173
3104
|
};
|
|
3174
3105
|
}
|
|
3175
|
-
}),
|
|
3106
|
+
}), ks = /* @__PURE__ */ le(Xo, [["__scopeId", "data-v-f2b42324"]]), el = { class: "deck-config config-card-code-block" }, tl = /* @__PURE__ */ z({
|
|
3107
|
+
__name: "DeckCodeBlock",
|
|
3108
|
+
props: {
|
|
3109
|
+
entityRecord: {},
|
|
3110
|
+
entityType: {},
|
|
3111
|
+
geoApiServerUrl: {},
|
|
3112
|
+
controlPlaneName: {}
|
|
3113
|
+
},
|
|
3114
|
+
setup(e) {
|
|
3115
|
+
const t = e, { i18n: n, i18nT: i } = Y.useI18n(), r = [
|
|
3116
|
+
{ value: "bash", label: "Linux / macOS Bash" },
|
|
3117
|
+
{ value: "pwsh", label: "Windows PowerShell" }
|
|
3118
|
+
], o = N(navigator.userAgent.toLowerCase().includes("windows") ? "pwsh" : "bash"), a = T(() => {
|
|
3119
|
+
const d = {
|
|
3120
|
+
_format_version: "3.0"
|
|
3121
|
+
};
|
|
3122
|
+
return t.controlPlaneName && (d._konnect = {
|
|
3123
|
+
control_plane_name: t.controlPlaneName
|
|
3124
|
+
}), d;
|
|
3125
|
+
}), s = T(() => {
|
|
3126
|
+
var p, h, g, v, y;
|
|
3127
|
+
const d = Object.fromEntries(Object.entries(t.entityRecord).filter(([, k]) => k !== null && k !== "" && (Array.isArray(k) ? k.length !== 0 : !0)));
|
|
3128
|
+
t.entityType === Ee.Plugin ? ((p = d.service) != null && p.id && (d.service = d.service.id), (h = d.route) != null && h.id && (d.route = d.route.id), (g = d.consumer) != null && g.id && (d.consumer = d.consumer.id), (v = d.consumer_group) != null && v.id && (d.consumer_group = d.consumer_group.id)) : t.entityType === Ee.Key && (y = d.key_set) != null && y.id && (d.key_set = d.key_set.id);
|
|
3129
|
+
const u = {
|
|
3130
|
+
...a.value,
|
|
3131
|
+
[t.entityType + "s"]: [d]
|
|
3132
|
+
};
|
|
3133
|
+
return Yn.dump(u, { quotingType: '"' }).trim();
|
|
3134
|
+
}), l = T(() => o.value === "bash" ? "export DECK_KONNECT_TOKEN='YOUR_KONNECT_PAT'" : '$env:DECK_KONNECT_TOKEN = "YOUR_KONNECT_PAT"'), c = T(() => {
|
|
3135
|
+
let d = "deck gateway apply -";
|
|
3136
|
+
return t.geoApiServerUrl && (d += ` --konnect-addr ${t.geoApiServerUrl}`), o.value === "bash" ? `echo '${s.value}
|
|
3137
|
+
' | ${d}` : `@'
|
|
3138
|
+
${s.value}
|
|
3139
|
+
'@ | ${d}`;
|
|
3140
|
+
});
|
|
3141
|
+
return (d, u) => {
|
|
3142
|
+
const p = D("KSelect"), h = D("KBadge"), g = D("KCodeBlock");
|
|
3143
|
+
return m(), $("div", el, [
|
|
3144
|
+
R(p, {
|
|
3145
|
+
modelValue: o.value,
|
|
3146
|
+
"onUpdate:modelValue": u[0] || (u[0] = (v) => o.value = v),
|
|
3147
|
+
items: r
|
|
3148
|
+
}, {
|
|
3149
|
+
"item-template": C(({ item: v }) => [
|
|
3150
|
+
v.value === "pwsh" ? (m(), M(_(gt), { key: 0 })) : (m(), M(_(ht), { key: 1 })),
|
|
3151
|
+
U(" " + L(v.label), 1)
|
|
3152
|
+
]),
|
|
3153
|
+
"selected-item-template": C(({ item: v }) => [
|
|
3154
|
+
v.value === "pwsh" ? (m(), M(_(gt), { key: 0 })) : (m(), M(_(ht), { key: 1 })),
|
|
3155
|
+
U(" " + L(v.label), 1)
|
|
3156
|
+
]),
|
|
3157
|
+
_: 1
|
|
3158
|
+
}, 8, ["modelValue"]),
|
|
3159
|
+
B("p", null, [
|
|
3160
|
+
R(_(i), { keypath: "deckCodeBlock.hint" }, {
|
|
3161
|
+
token: C(() => [
|
|
3162
|
+
R(h, null, {
|
|
3163
|
+
default: C(() => [...u[1] || (u[1] = [
|
|
3164
|
+
U("DECK_KONNECT_TOKEN", -1)
|
|
3165
|
+
])]),
|
|
3166
|
+
_: 1
|
|
3167
|
+
})
|
|
3168
|
+
]),
|
|
3169
|
+
link: C(() => [
|
|
3170
|
+
R(_(ai), { href: "https://developer.konghq.com/deck/get-started/" }, {
|
|
3171
|
+
default: C(() => [
|
|
3172
|
+
U(L(_(n).t("deckCodeBlock.documentation")), 1)
|
|
3173
|
+
]),
|
|
3174
|
+
_: 1
|
|
3175
|
+
})
|
|
3176
|
+
]),
|
|
3177
|
+
_: 1
|
|
3178
|
+
})
|
|
3179
|
+
]),
|
|
3180
|
+
R(g, {
|
|
3181
|
+
id: "deck-env-codeblock",
|
|
3182
|
+
code: l.value,
|
|
3183
|
+
language: "shell",
|
|
3184
|
+
"single-line": "",
|
|
3185
|
+
theme: "dark"
|
|
3186
|
+
}, null, 8, ["code"]),
|
|
3187
|
+
t.entityRecord ? (m(), M(g, {
|
|
3188
|
+
key: 0,
|
|
3189
|
+
id: "deck-codeblock",
|
|
3190
|
+
code: c.value,
|
|
3191
|
+
language: "shell",
|
|
3192
|
+
theme: "dark"
|
|
3193
|
+
}, null, 8, ["code"])) : j("", !0)
|
|
3194
|
+
]);
|
|
3195
|
+
};
|
|
3196
|
+
}
|
|
3197
|
+
}), nl = /* @__PURE__ */ le(tl, [["__scopeId", "data-v-ff6bcf20"]]), il = ["novalidate"], rl = /* @__PURE__ */ z({
|
|
3176
3198
|
__name: "EntityBaseForm",
|
|
3177
3199
|
props: {
|
|
3178
3200
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3296,19 +3318,19 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3296
3318
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3297
3319
|
setup(e, { expose: t, emit: n }) {
|
|
3298
3320
|
var X;
|
|
3299
|
-
const i = n, r = e, o =
|
|
3300
|
-
var
|
|
3301
|
-
let
|
|
3302
|
-
return r.config.app === "konnect" ?
|
|
3303
|
-
}),
|
|
3304
|
-
|
|
3321
|
+
const i = n, r = e, o = di(), { i18n: { t: a } } = Y.useI18n(), { getMessageFromError: s } = Y.useErrors(), { axiosInstance: l } = Y.useAxios((X = r.config) == null ? void 0 : X.axiosRequestConfig), c = N(!1), d = T(() => !!r.editId), u = N(!1), p = N(""), h = T(() => r.canSubmit === !1 || r.isReadonly), g = N(!1), v = T(() => {
|
|
3322
|
+
var w, O;
|
|
3323
|
+
let S = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3324
|
+
return r.config.app === "konnect" ? S = S.replace(/{controlPlaneId}/gi, ((w = r.config) == null ? void 0 : w.controlPlaneId) || "") : r.config.app === "kongManager" && (S = S.replace(/\/{workspace}/gi, (O = r.config) != null && O.workspace ? `/${r.config.workspace}` : "")), r.editId ? (S = S.replace(/{id}/gi, r.editId), S) : (S = S.replace(/\/{id}/gi, ""), S);
|
|
3325
|
+
}), y = () => {
|
|
3326
|
+
g.value = !g.value;
|
|
3327
|
+
}, k = () => {
|
|
3328
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : A();
|
|
3305
3329
|
}, A = () => {
|
|
3306
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) : C();
|
|
3307
|
-
}, C = () => {
|
|
3308
3330
|
i("cancel");
|
|
3309
3331
|
}, E = () => {
|
|
3310
|
-
|
|
3311
|
-
},
|
|
3332
|
+
h.value || i("submit");
|
|
3333
|
+
}, W = N([
|
|
3312
3334
|
{
|
|
3313
3335
|
title: a("baseForm.configuration.json"),
|
|
3314
3336
|
hash: "#json"
|
|
@@ -3318,63 +3340,63 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3318
3340
|
hash: "#yaml"
|
|
3319
3341
|
}
|
|
3320
3342
|
]);
|
|
3321
|
-
return r.config.app === "konnect" && r.entityType !== Ee.Other &&
|
|
3343
|
+
return r.config.app === "konnect" && r.entityType !== Ee.Other && W.value.splice(1, 0, {
|
|
3322
3344
|
title: a("baseForm.configuration.terraform"),
|
|
3323
3345
|
hash: "#terraform"
|
|
3324
|
-
}),
|
|
3346
|
+
}), r.config.app === "konnect" && r.config.enableDeckTab && mi.includes(r.entityType) && W.value.push({
|
|
3325
3347
|
title: a("baseForm.configuration.deck"),
|
|
3326
3348
|
hash: "#deck"
|
|
3327
|
-
}), be(() => c.value, (
|
|
3328
|
-
i("loading",
|
|
3349
|
+
}), be(() => c.value, (S) => {
|
|
3350
|
+
i("loading", S);
|
|
3329
3351
|
}, { immediate: !0 }), it(async () => {
|
|
3330
3352
|
if (r.editId)
|
|
3331
3353
|
try {
|
|
3332
3354
|
u.value = !1, c.value = !0;
|
|
3333
|
-
const { data:
|
|
3334
|
-
i("fetch:success",
|
|
3335
|
-
} catch (
|
|
3336
|
-
const
|
|
3337
|
-
p.value =
|
|
3355
|
+
const { data: S } = await l.get(v.value);
|
|
3356
|
+
i("fetch:success", S);
|
|
3357
|
+
} catch (S) {
|
|
3358
|
+
const w = s(S);
|
|
3359
|
+
p.value = w.startsWith("code") ? a("baseForm.errors.edit") : w, u.value = !0, i("fetch:error", S);
|
|
3338
3360
|
} finally {
|
|
3339
3361
|
c.value = !1;
|
|
3340
3362
|
}
|
|
3341
3363
|
}), t({
|
|
3342
|
-
viewConfig:
|
|
3343
|
-
formCancel:
|
|
3364
|
+
viewConfig: y,
|
|
3365
|
+
formCancel: A,
|
|
3344
3366
|
formSubmit: E
|
|
3345
|
-
}), (
|
|
3346
|
-
const O = D("KSkeleton"), f = D("KEmptyState"),
|
|
3347
|
-
return m(),
|
|
3348
|
-
default:
|
|
3349
|
-
c.value ? (m(),
|
|
3367
|
+
}), (S, w) => {
|
|
3368
|
+
const O = D("KSkeleton"), f = D("KEmptyState"), b = D("KAlert"), x = D("KButton"), H = D("KTabs"), J = D("KSlideout");
|
|
3369
|
+
return m(), M(De(e.wrapperComponent), { class: "kong-ui-entity-base-form" }, {
|
|
3370
|
+
default: C(() => [
|
|
3371
|
+
c.value ? (m(), M(O, {
|
|
3350
3372
|
key: 0,
|
|
3351
3373
|
type: "form"
|
|
3352
|
-
})) : u.value ? (m(),
|
|
3374
|
+
})) : u.value ? (m(), M(f, {
|
|
3353
3375
|
key: 1,
|
|
3354
|
-
"action-button-text":
|
|
3376
|
+
"action-button-text": _(a)("baseForm.actions.back"),
|
|
3355
3377
|
"data-testid": "form-fetch-error",
|
|
3356
3378
|
"icon-variant": "error",
|
|
3357
|
-
onClickAction:
|
|
3379
|
+
onClickAction: k
|
|
3358
3380
|
}, {
|
|
3359
|
-
default:
|
|
3381
|
+
default: C(() => [
|
|
3360
3382
|
B("h3", null, L(p.value), 1)
|
|
3361
3383
|
]),
|
|
3362
3384
|
_: 1
|
|
3363
|
-
}, 8, ["action-button-text"])) : (m(),
|
|
3385
|
+
}, 8, ["action-button-text"])) : (m(), $("form", {
|
|
3364
3386
|
key: 2,
|
|
3365
3387
|
"data-testid": "form-content",
|
|
3366
3388
|
novalidate: r.noValidate,
|
|
3367
|
-
onReset: Be(
|
|
3389
|
+
onReset: Be(A, ["prevent"]),
|
|
3368
3390
|
onSubmit: Be(E, ["prevent"])
|
|
3369
3391
|
}, [
|
|
3370
|
-
P(
|
|
3371
|
-
e.errorMessage ? (m(),
|
|
3392
|
+
P(S.$slots, "default", {}, void 0, !0),
|
|
3393
|
+
e.errorMessage ? (m(), M(b, {
|
|
3372
3394
|
key: 0,
|
|
3373
3395
|
appearance: "danger",
|
|
3374
3396
|
"data-testid": "form-error",
|
|
3375
3397
|
message: e.errorMessage
|
|
3376
|
-
}, null, 8, ["message"])) :
|
|
3377
|
-
e.hideActions ?
|
|
3398
|
+
}, null, 8, ["message"])) : j("", !0),
|
|
3399
|
+
e.hideActions ? j("", !0) : (m(), M(Yt, {
|
|
3378
3400
|
key: 1,
|
|
3379
3401
|
disabled: !e.actionTeleportTarget,
|
|
3380
3402
|
to: e.actionTeleportTarget
|
|
@@ -3383,88 +3405,88 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3383
3405
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3384
3406
|
"data-testid": "form-actions"
|
|
3385
3407
|
}, [
|
|
3386
|
-
P(
|
|
3387
|
-
|
|
3408
|
+
P(S.$slots, "form-actions", {}, () => [
|
|
3409
|
+
R(x, {
|
|
3388
3410
|
appearance: "tertiary",
|
|
3389
3411
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3390
|
-
onClick:
|
|
3412
|
+
onClick: w[0] || (w[0] = (I) => y())
|
|
3391
3413
|
}, {
|
|
3392
|
-
default:
|
|
3393
|
-
U(L(
|
|
3414
|
+
default: C(() => [
|
|
3415
|
+
U(L(_(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3394
3416
|
]),
|
|
3395
3417
|
_: 1
|
|
3396
3418
|
}, 8, ["data-testid"]),
|
|
3397
|
-
|
|
3419
|
+
R(x, {
|
|
3398
3420
|
appearance: "secondary",
|
|
3399
3421
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-cancel`,
|
|
3400
3422
|
disabled: e.isReadonly,
|
|
3401
3423
|
type: "reset",
|
|
3402
|
-
onClick:
|
|
3424
|
+
onClick: w[1] || (w[1] = (I) => !!e.actionTeleportTarget && A())
|
|
3403
3425
|
}, {
|
|
3404
|
-
default:
|
|
3405
|
-
U(L(e.cancelButtonText ??
|
|
3426
|
+
default: C(() => [
|
|
3427
|
+
U(L(e.cancelButtonText ?? _(a)("baseForm.actions.cancel")), 1)
|
|
3406
3428
|
]),
|
|
3407
3429
|
_: 1
|
|
3408
3430
|
}, 8, ["data-testid", "disabled"]),
|
|
3409
|
-
|
|
3431
|
+
R(x, {
|
|
3410
3432
|
appearance: "primary",
|
|
3411
3433
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3412
|
-
disabled:
|
|
3434
|
+
disabled: h.value,
|
|
3413
3435
|
type: "submit",
|
|
3414
|
-
onClick:
|
|
3436
|
+
onClick: w[2] || (w[2] = (I) => !!e.actionTeleportTarget && E())
|
|
3415
3437
|
}, {
|
|
3416
|
-
default:
|
|
3417
|
-
U(L(e.saveButtonText ??
|
|
3438
|
+
default: C(() => [
|
|
3439
|
+
U(L(e.saveButtonText ?? _(a)("baseForm.actions.save")), 1)
|
|
3418
3440
|
]),
|
|
3419
3441
|
_: 1
|
|
3420
3442
|
}, 8, ["data-testid", "disabled"])
|
|
3421
3443
|
], !0)
|
|
3422
3444
|
], 2)
|
|
3423
3445
|
], 8, ["disabled", "to"]))
|
|
3424
|
-
], 40,
|
|
3425
|
-
|
|
3446
|
+
], 40, il)),
|
|
3447
|
+
R(J, {
|
|
3426
3448
|
"close-on-blur": !1,
|
|
3427
3449
|
"data-testid": "form-view-configuration-slideout",
|
|
3428
3450
|
"has-overlay": !1,
|
|
3429
3451
|
"offset-top": e.slidoutTopOffset,
|
|
3430
|
-
title:
|
|
3431
|
-
visible:
|
|
3432
|
-
onClose:
|
|
3452
|
+
title: _(a)("baseForm.configuration.title"),
|
|
3453
|
+
visible: g.value,
|
|
3454
|
+
onClose: w[4] || (w[4] = (I) => y())
|
|
3433
3455
|
}, {
|
|
3434
|
-
default:
|
|
3435
|
-
B("div", null, L(
|
|
3436
|
-
|
|
3456
|
+
default: C(() => [
|
|
3457
|
+
B("div", null, L(_(a)("baseForm.configuration.message")), 1),
|
|
3458
|
+
R(H, {
|
|
3437
3459
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3438
|
-
tabs:
|
|
3439
|
-
onChange:
|
|
3460
|
+
tabs: W.value,
|
|
3461
|
+
onChange: w[3] || (w[3] = (I) => i("codeBlockTabChange", I.replace("#", "")))
|
|
3440
3462
|
}, {
|
|
3441
|
-
json:
|
|
3442
|
-
|
|
3463
|
+
json: C(() => [
|
|
3464
|
+
R(nn, {
|
|
3443
3465
|
config: e.config,
|
|
3444
3466
|
"entity-record": r.formFields,
|
|
3445
|
-
"fetcher-url":
|
|
3467
|
+
"fetcher-url": v.value,
|
|
3446
3468
|
"request-method": r.editId ? "put" : "post"
|
|
3447
3469
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3448
3470
|
]),
|
|
3449
|
-
yaml:
|
|
3450
|
-
|
|
3471
|
+
yaml: C(() => [
|
|
3472
|
+
R(Wn, {
|
|
3451
3473
|
"entity-record": r.formFields
|
|
3452
3474
|
}, null, 8, ["entity-record"])
|
|
3453
3475
|
]),
|
|
3454
|
-
terraform:
|
|
3455
|
-
|
|
3476
|
+
terraform: C(() => [
|
|
3477
|
+
R(Jn, {
|
|
3456
3478
|
"entity-record": r.formFields,
|
|
3457
3479
|
"entity-type": e.entityType,
|
|
3458
3480
|
"sub-entity-type": e.subEntityType
|
|
3459
3481
|
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])
|
|
3460
3482
|
]),
|
|
3461
|
-
deck:
|
|
3462
|
-
|
|
3483
|
+
deck: C(() => [
|
|
3484
|
+
R(nl, {
|
|
3463
3485
|
"control-plane-name": e.config.app === "konnect" ? e.config.controlPlaneName : void 0,
|
|
3464
3486
|
"entity-record": r.formFields,
|
|
3465
3487
|
"entity-type": e.entityType,
|
|
3466
|
-
"geo-server-url": e.config.app === "konnect" ? e.config.
|
|
3467
|
-
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-server-url"])
|
|
3488
|
+
"geo-api-server-url": e.config.app === "konnect" ? e.config.geoApiServerUrl : void 0
|
|
3489
|
+
}, null, 8, ["control-plane-name", "entity-record", "entity-type", "geo-api-server-url"])
|
|
3468
3490
|
]),
|
|
3469
3491
|
_: 1
|
|
3470
3492
|
}, 8, ["tabs"])
|
|
@@ -3476,7 +3498,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3476
3498
|
});
|
|
3477
3499
|
};
|
|
3478
3500
|
}
|
|
3479
|
-
}),
|
|
3501
|
+
}), As = /* @__PURE__ */ le(rl, [["__scopeId", "data-v-23f330b9"]]), al = ["data-truncate"], ol = /* @__PURE__ */ z({
|
|
3480
3502
|
__name: "EntityBaseTableCell",
|
|
3481
3503
|
props: {
|
|
3482
3504
|
keyName: {
|
|
@@ -3493,79 +3515,79 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3493
3515
|
}
|
|
3494
3516
|
},
|
|
3495
3517
|
setup(e) {
|
|
3496
|
-
const t = e, n =
|
|
3497
|
-
var
|
|
3498
|
-
return ((
|
|
3499
|
-
}), i =
|
|
3500
|
-
var
|
|
3501
|
-
return ((
|
|
3502
|
-
}), r =
|
|
3503
|
-
var
|
|
3504
|
-
const
|
|
3505
|
-
return
|
|
3506
|
-
}), o =
|
|
3518
|
+
const t = e, n = T(() => {
|
|
3519
|
+
var y;
|
|
3520
|
+
return ((y = t.rowEl) == null ? void 0 : y.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
3521
|
+
}), i = T(() => {
|
|
3522
|
+
var y;
|
|
3523
|
+
return ((y = n.value) == null ? void 0 : y.querySelector('[data-truncate="true"]')) || null;
|
|
3524
|
+
}), r = T(() => {
|
|
3525
|
+
var k, A;
|
|
3526
|
+
const y = (k = t.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3527
|
+
return y ? ((A = y[0]) == null ? void 0 : A.getAttribute("data-testid")) === t.keyName : !0;
|
|
3528
|
+
}), o = T(() => r.value || t.tooltip);
|
|
3507
3529
|
let a;
|
|
3508
3530
|
const s = () => {
|
|
3509
3531
|
a && (a.disconnect(), a = void 0);
|
|
3510
3532
|
}, l = () => {
|
|
3511
|
-
var
|
|
3512
|
-
let
|
|
3533
|
+
var k, A, E;
|
|
3534
|
+
let y = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3513
3535
|
if (n.value && "getComputedStyle" in window) {
|
|
3514
|
-
const
|
|
3515
|
-
|
|
3536
|
+
const W = window.getComputedStyle(n.value);
|
|
3537
|
+
y -= (parseFloat(W.paddingLeft) || 0) + (parseFloat(W.paddingRight) || 0);
|
|
3516
3538
|
}
|
|
3517
|
-
d.value = ((
|
|
3518
|
-
}, c = N({}), d = N(0), u = N(0), p = N(""),
|
|
3519
|
-
|
|
3520
|
-
(
|
|
3539
|
+
d.value = ((A = i.value) == null ? void 0 : A.getBoundingClientRect().width) || 0, u.value = y, p.value = ((E = c.value) == null ? void 0 : E.innerText) || "";
|
|
3540
|
+
}, c = N({}), d = N(0), u = N(0), p = N(""), h = T(() => [i.value, n.value]), g = be(
|
|
3541
|
+
h,
|
|
3542
|
+
(y) => {
|
|
3521
3543
|
if (o.value && (s(), "ResizeObserver" in window && window)) {
|
|
3522
|
-
a = new ResizeObserver((
|
|
3544
|
+
a = new ResizeObserver((k) => {
|
|
3523
3545
|
window.requestAnimationFrame(() => {
|
|
3524
|
-
!Array.isArray(
|
|
3546
|
+
!Array.isArray(k) || !k.length || l();
|
|
3525
3547
|
});
|
|
3526
3548
|
});
|
|
3527
|
-
for (const
|
|
3528
|
-
|
|
3549
|
+
for (const k of y)
|
|
3550
|
+
k && a.observe(k);
|
|
3529
3551
|
}
|
|
3530
3552
|
},
|
|
3531
3553
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3532
|
-
),
|
|
3554
|
+
), v = T(() => o.value ? d.value > u.value : !1);
|
|
3533
3555
|
return nt(() => {
|
|
3534
3556
|
l();
|
|
3535
|
-
}),
|
|
3536
|
-
|
|
3537
|
-
}), (
|
|
3538
|
-
const
|
|
3539
|
-
return m(),
|
|
3557
|
+
}), Xn(() => {
|
|
3558
|
+
g();
|
|
3559
|
+
}), (y, k) => {
|
|
3560
|
+
const A = D("KTooltip");
|
|
3561
|
+
return m(), $("span", {
|
|
3540
3562
|
ref_key: "contentRef",
|
|
3541
3563
|
ref: c,
|
|
3542
3564
|
class: "content-wrapper"
|
|
3543
3565
|
}, [
|
|
3544
|
-
o.value ? (m(),
|
|
3566
|
+
o.value ? (m(), $("span", {
|
|
3545
3567
|
key: 0,
|
|
3546
3568
|
"data-truncate": o.value || void 0
|
|
3547
3569
|
}, [
|
|
3548
|
-
|
|
3570
|
+
R(A, {
|
|
3549
3571
|
"max-width": "300",
|
|
3550
3572
|
placement: "bottom-start",
|
|
3551
|
-
text:
|
|
3573
|
+
text: v.value ? p.value : ""
|
|
3552
3574
|
}, {
|
|
3553
|
-
default:
|
|
3554
|
-
P(
|
|
3575
|
+
default: C(() => [
|
|
3576
|
+
P(y.$slots, "default", {}, void 0, !0)
|
|
3555
3577
|
]),
|
|
3556
3578
|
_: 3
|
|
3557
3579
|
}, 8, ["text"])
|
|
3558
|
-
], 8,
|
|
3580
|
+
], 8, al)) : P(y.$slots, "default", { key: 1 }, void 0, !0)
|
|
3559
3581
|
], 512);
|
|
3560
3582
|
};
|
|
3561
3583
|
}
|
|
3562
|
-
}),
|
|
3584
|
+
}), ll = /* @__PURE__ */ le(ol, [["__scopeId", "data-v-a3a65cac"]]), sl = { class: "toolbar-container" }, cl = {
|
|
3563
3585
|
key: 0,
|
|
3564
3586
|
class: "toolbar-button-container"
|
|
3565
|
-
},
|
|
3587
|
+
}, ul = {
|
|
3566
3588
|
key: 0,
|
|
3567
3589
|
class: "hidden"
|
|
3568
|
-
},
|
|
3590
|
+
}, dl = /* @__PURE__ */ z({
|
|
3569
3591
|
__name: "EntityBaseTable",
|
|
3570
3592
|
props: {
|
|
3571
3593
|
// table header configuration
|
|
@@ -3710,8 +3732,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3710
3732
|
},
|
|
3711
3733
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3712
3734
|
setup(e, { emit: t }) {
|
|
3713
|
-
const n = e, i = t, { i18n: { t: r } } =
|
|
3714
|
-
var f,
|
|
3735
|
+
const n = e, i = t, { i18n: { t: r } } = Y.useI18n(), o = T(() => {
|
|
3736
|
+
var f, b;
|
|
3715
3737
|
return typeof n.errorMessage == "string" ? {
|
|
3716
3738
|
hasError: !!n.errorMessage,
|
|
3717
3739
|
title: n.errorMessage,
|
|
@@ -3719,15 +3741,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3719
3741
|
} : {
|
|
3720
3742
|
hasError: !!n.errorMessage,
|
|
3721
3743
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3722
|
-
message: (
|
|
3744
|
+
message: (b = n.errorMessage) == null ? void 0 : b.message
|
|
3723
3745
|
};
|
|
3724
|
-
}), a =
|
|
3746
|
+
}), a = T(() => n.cacheIdentifier || n.preferencesStorageKey), s = T(() => {
|
|
3725
3747
|
const f = [];
|
|
3726
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
3727
|
-
const H = n.tableHeaders[
|
|
3748
|
+
return Object.keys(n.tableHeaders).forEach((x) => {
|
|
3749
|
+
const H = n.tableHeaders[x];
|
|
3728
3750
|
f.push({
|
|
3729
|
-
label: H.label ??
|
|
3730
|
-
key:
|
|
3751
|
+
label: H.label ?? x,
|
|
3752
|
+
key: x,
|
|
3731
3753
|
sortable: H.sortable ?? !1,
|
|
3732
3754
|
hidable: H.hidable ?? !0
|
|
3733
3755
|
});
|
|
@@ -3740,62 +3762,62 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3740
3762
|
"data-testid": f.name,
|
|
3741
3763
|
...n.rowAttributes(f)
|
|
3742
3764
|
}), c = N({}), d = (f) => {
|
|
3743
|
-
var
|
|
3744
|
-
return (
|
|
3765
|
+
var b;
|
|
3766
|
+
return (b = c.value) == null ? void 0 : b.$el.querySelector(`[data-rowid="${f.id}"]`);
|
|
3745
3767
|
}, u = (f) => {
|
|
3746
|
-
const
|
|
3768
|
+
const b = {
|
|
3747
3769
|
"data-testid": f.headerKey,
|
|
3748
3770
|
...n.cellAttributes(f)
|
|
3749
3771
|
};
|
|
3750
|
-
return f.colIndex === 0 && (
|
|
3772
|
+
return f.colIndex === 0 && (b.style = {
|
|
3751
3773
|
maxWidth: "250px",
|
|
3752
3774
|
overflowX: "hidden",
|
|
3753
3775
|
textOverflow: "ellipsis"
|
|
3754
|
-
}),
|
|
3776
|
+
}), b;
|
|
3755
3777
|
}, p = (f) => {
|
|
3756
|
-
|
|
3778
|
+
A(f), i("state", f);
|
|
3779
|
+
}, h = () => {
|
|
3780
|
+
i("empty-state-cta-clicked"), g();
|
|
3757
3781
|
}, g = () => {
|
|
3758
|
-
i("empty-state-cta-clicked"), y();
|
|
3759
|
-
}, y = () => {
|
|
3760
3782
|
i("clear-search-input");
|
|
3761
|
-
},
|
|
3762
|
-
i("click:row",
|
|
3763
|
-
}),
|
|
3783
|
+
}, v = T(() => n.disableRowClick ? void 0 : (f, b) => {
|
|
3784
|
+
i("click:row", b);
|
|
3785
|
+
}), y = (f) => {
|
|
3764
3786
|
i("sort", f);
|
|
3765
|
-
}, { hideTableToolbar:
|
|
3766
|
-
const f =
|
|
3787
|
+
}, { hideTableToolbar: k, handleStateChange: A } = Y.useTableState(() => n.query), { setTablePreferences: E, getTablePreferences: W } = bi(), X = N(W(a.value, n.defaultTablePreferences)), S = T(() => {
|
|
3788
|
+
const f = W(a.value);
|
|
3767
3789
|
return {
|
|
3768
3790
|
...n.initialFetcherParams,
|
|
3769
3791
|
...f
|
|
3770
3792
|
};
|
|
3771
|
-
}),
|
|
3772
|
-
X.value = f, s.value.forEach((
|
|
3773
|
-
!("hidable" in
|
|
3793
|
+
}), w = (f) => {
|
|
3794
|
+
X.value = f, s.value.forEach((b) => {
|
|
3795
|
+
!("hidable" in b) || !X.value.columnVisibility || b.hidable === !1 && (X.value.columnVisibility[b.key] = !0);
|
|
3774
3796
|
}), a.value && E(a.value, f);
|
|
3775
|
-
}, O =
|
|
3797
|
+
}, O = T(() => ({
|
|
3776
3798
|
disablePageJump: n.disablePaginationPageJump,
|
|
3777
3799
|
offset: n.paginationType === "offset",
|
|
3778
3800
|
...n.paginationAttributes
|
|
3779
3801
|
}));
|
|
3780
|
-
return (f,
|
|
3781
|
-
const
|
|
3782
|
-
return m(),
|
|
3802
|
+
return (f, b) => {
|
|
3803
|
+
const x = D("KTableData"), H = D("KCard");
|
|
3804
|
+
return m(), M(H, {
|
|
3783
3805
|
class: "kong-ui-entity-base-table",
|
|
3784
3806
|
title: e.title,
|
|
3785
3807
|
"title-tag": e.titleTag
|
|
3786
3808
|
}, {
|
|
3787
|
-
default:
|
|
3788
|
-
|
|
3809
|
+
default: C(() => [
|
|
3810
|
+
R(x, {
|
|
3789
3811
|
ref_key: "tableRefs",
|
|
3790
3812
|
ref: c,
|
|
3791
3813
|
"cache-identifier": a.value,
|
|
3792
3814
|
"cell-attrs": u,
|
|
3793
3815
|
"client-sort": e.enableClientSort,
|
|
3794
|
-
"empty-state-action-message": e.query ?
|
|
3816
|
+
"empty-state-action-message": e.query ? _(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3795
3817
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3796
3818
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3797
|
-
"empty-state-message": e.query ?
|
|
3798
|
-
"empty-state-title": e.query ?
|
|
3819
|
+
"empty-state-message": e.query ? _(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3820
|
+
"empty-state-title": e.query ? _(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3799
3821
|
error: o.value.hasError,
|
|
3800
3822
|
"error-state-message": o.value.message,
|
|
3801
3823
|
"error-state-title": o.value.title,
|
|
@@ -3804,8 +3826,8 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3804
3826
|
headers: s.value,
|
|
3805
3827
|
"hide-pagination": e.hidePagination,
|
|
3806
3828
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3807
|
-
"hide-toolbar": e.hideToolbar ??
|
|
3808
|
-
"initial-fetcher-params":
|
|
3829
|
+
"hide-toolbar": e.hideToolbar ?? _(k),
|
|
3830
|
+
"initial-fetcher-params": S.value,
|
|
3809
3831
|
loading: e.isLoading,
|
|
3810
3832
|
"pagination-attributes": O.value,
|
|
3811
3833
|
"resize-columns": "",
|
|
@@ -3815,43 +3837,43 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3815
3837
|
"sort-handler-function": e.enableClientSort ? e.sortHandlerFunction : void 0,
|
|
3816
3838
|
sortable: !e.disableSorting,
|
|
3817
3839
|
"table-preferences": X.value,
|
|
3818
|
-
onEmptyStateActionClick:
|
|
3819
|
-
"onRow:click":
|
|
3820
|
-
onSort:
|
|
3840
|
+
onEmptyStateActionClick: h,
|
|
3841
|
+
"onRow:click": v.value,
|
|
3842
|
+
onSort: b[0] || (b[0] = (J) => y(J)),
|
|
3821
3843
|
onState: p,
|
|
3822
|
-
"onUpdate:tablePreferences":
|
|
3844
|
+
"onUpdate:tablePreferences": w
|
|
3823
3845
|
}, Se({
|
|
3824
|
-
toolbar:
|
|
3825
|
-
B("div",
|
|
3846
|
+
toolbar: C(() => [
|
|
3847
|
+
B("div", sl, [
|
|
3826
3848
|
P(f.$slots, "toolbar-filter", {}, void 0, !0),
|
|
3827
|
-
f.$slots["toolbar-button"] ? (m(),
|
|
3849
|
+
f.$slots["toolbar-button"] ? (m(), $("div", cl, [
|
|
3828
3850
|
P(f.$slots, "toolbar-button", {}, void 0, !0)
|
|
3829
|
-
])) :
|
|
3851
|
+
])) : j("", !0)
|
|
3830
3852
|
])
|
|
3831
3853
|
]),
|
|
3832
|
-
"action-items":
|
|
3854
|
+
"action-items": C(({ row: J }) => [
|
|
3833
3855
|
P(f.$slots, "actions", { row: J }, void 0, !0)
|
|
3834
3856
|
]),
|
|
3835
3857
|
_: 2
|
|
3836
3858
|
}, [
|
|
3837
3859
|
f.$slots["empty-state"] ? {
|
|
3838
3860
|
name: "empty-state",
|
|
3839
|
-
fn:
|
|
3861
|
+
fn: C(() => [
|
|
3840
3862
|
P(f.$slots, "empty-state", {}, void 0, !0)
|
|
3841
3863
|
]),
|
|
3842
3864
|
key: "0"
|
|
3843
3865
|
} : void 0,
|
|
3844
3866
|
ce(e.tableHeaders, (J, I) => ({
|
|
3845
3867
|
name: I,
|
|
3846
|
-
fn:
|
|
3847
|
-
|
|
3868
|
+
fn: C(({ row: K, rowValue: G }) => [
|
|
3869
|
+
R(ll, {
|
|
3848
3870
|
"key-name": String(I),
|
|
3849
|
-
"row-el": d(
|
|
3871
|
+
"row-el": d(K),
|
|
3850
3872
|
tooltip: J.tooltip
|
|
3851
3873
|
}, {
|
|
3852
|
-
default:
|
|
3874
|
+
default: C(() => [
|
|
3853
3875
|
P(f.$slots, I, {
|
|
3854
|
-
row:
|
|
3876
|
+
row: K,
|
|
3855
3877
|
rowKey: e.rowKey,
|
|
3856
3878
|
rowValue: G
|
|
3857
3879
|
}, () => [
|
|
@@ -3864,27 +3886,27 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3864
3886
|
})),
|
|
3865
3887
|
e.query ? void 0 : {
|
|
3866
3888
|
name: "empty-state-action-icon",
|
|
3867
|
-
fn:
|
|
3868
|
-
|
|
3889
|
+
fn: C(() => [
|
|
3890
|
+
R(_(Jt))
|
|
3869
3891
|
]),
|
|
3870
3892
|
key: "1"
|
|
3871
3893
|
}
|
|
3872
3894
|
]), 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"]),
|
|
3873
|
-
f.$slots["outside-actions"] &&
|
|
3895
|
+
f.$slots["outside-actions"] && _(k) ? (m(), $("div", ul, [
|
|
3874
3896
|
P(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3875
|
-
])) :
|
|
3897
|
+
])) : j("", !0)
|
|
3876
3898
|
]),
|
|
3877
3899
|
_: 3
|
|
3878
3900
|
}, 8, ["title", "title-tag"]);
|
|
3879
3901
|
};
|
|
3880
3902
|
}
|
|
3881
|
-
}),
|
|
3903
|
+
}), _s = /* @__PURE__ */ le(dl, [["__scopeId", "data-v-44153100"]]), fl = {
|
|
3882
3904
|
key: 0,
|
|
3883
3905
|
class: "kong-ui-entity-delete-error"
|
|
3884
|
-
},
|
|
3906
|
+
}, pl = {
|
|
3885
3907
|
key: 1,
|
|
3886
3908
|
class: "description"
|
|
3887
|
-
},
|
|
3909
|
+
}, ml = /* @__PURE__ */ z({
|
|
3888
3910
|
__name: "EntityDeleteModal",
|
|
3889
3911
|
props: {
|
|
3890
3912
|
visible: {
|
|
@@ -3923,14 +3945,14 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3923
3945
|
},
|
|
3924
3946
|
emits: ["cancel", "proceed"],
|
|
3925
3947
|
setup(e, { emit: t }) {
|
|
3926
|
-
const { i18nT: n } =
|
|
3948
|
+
const { i18nT: n } = Y.useI18n(), i = e, r = t, o = T(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
3927
3949
|
r("cancel");
|
|
3928
3950
|
}, s = () => {
|
|
3929
3951
|
r("proceed");
|
|
3930
3952
|
};
|
|
3931
3953
|
return (l, c) => {
|
|
3932
3954
|
const d = D("KAlert"), u = D("KPrompt");
|
|
3933
|
-
return m(),
|
|
3955
|
+
return m(), M(u, {
|
|
3934
3956
|
"action-button-appearance": "danger",
|
|
3935
3957
|
"action-button-disabled": e.actionPending,
|
|
3936
3958
|
"action-button-text": "Yes, delete",
|
|
@@ -3941,50 +3963,50 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3941
3963
|
onCancel: a,
|
|
3942
3964
|
onProceed: s
|
|
3943
3965
|
}, {
|
|
3944
|
-
default:
|
|
3945
|
-
e.error ? (m(),
|
|
3946
|
-
|
|
3947
|
-
default:
|
|
3966
|
+
default: C(() => [
|
|
3967
|
+
e.error ? (m(), $("div", fl, [
|
|
3968
|
+
R(d, { appearance: "danger" }, {
|
|
3969
|
+
default: C(() => [
|
|
3948
3970
|
U(L(e.error), 1)
|
|
3949
3971
|
]),
|
|
3950
3972
|
_: 1
|
|
3951
3973
|
})
|
|
3952
|
-
])) :
|
|
3953
|
-
|
|
3974
|
+
])) : j("", !0),
|
|
3975
|
+
R(_(n), {
|
|
3954
3976
|
class: "message",
|
|
3955
3977
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3956
3978
|
tag: "p"
|
|
3957
3979
|
}, Se({
|
|
3958
|
-
entityType:
|
|
3980
|
+
entityType: C(() => [
|
|
3959
3981
|
U(L(i.entityType), 1)
|
|
3960
3982
|
]),
|
|
3961
3983
|
_: 2
|
|
3962
3984
|
}, [
|
|
3963
3985
|
i.entityName ? {
|
|
3964
3986
|
name: "entityName",
|
|
3965
|
-
fn:
|
|
3987
|
+
fn: C(() => [
|
|
3966
3988
|
B("strong", null, L(i.entityName), 1)
|
|
3967
3989
|
]),
|
|
3968
3990
|
key: "0"
|
|
3969
3991
|
} : void 0
|
|
3970
3992
|
]), 1032, ["keypath"]),
|
|
3971
|
-
i.description || l.$slots.description ? (m(),
|
|
3993
|
+
i.description || l.$slots.description ? (m(), $("div", pl, [
|
|
3972
3994
|
P(l.$slots, "description", {}, () => [
|
|
3973
3995
|
B("p", null, L(i.description), 1)
|
|
3974
3996
|
], !0)
|
|
3975
|
-
])) :
|
|
3997
|
+
])) : j("", !0)
|
|
3976
3998
|
]),
|
|
3977
3999
|
_: 3
|
|
3978
4000
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3979
4001
|
};
|
|
3980
4002
|
}
|
|
3981
|
-
}),
|
|
4003
|
+
}), ws = /* @__PURE__ */ le(ml, [["__scopeId", "data-v-4361d622"]]), gl = {
|
|
3982
4004
|
fill: "none",
|
|
3983
4005
|
height: "20",
|
|
3984
4006
|
viewBox: "0 0 20 20",
|
|
3985
4007
|
width: "20",
|
|
3986
4008
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3987
|
-
},
|
|
4009
|
+
}, hl = {
|
|
3988
4010
|
id: "mask0_180_20349",
|
|
3989
4011
|
height: "20",
|
|
3990
4012
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3992,35 +4014,35 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
3992
4014
|
width: "20",
|
|
3993
4015
|
x: "0",
|
|
3994
4016
|
y: "0"
|
|
3995
|
-
},
|
|
4017
|
+
}, yl = ["fill"], vl = { mask: "url(#mask0_180_20349)" }, bl = ["fill"], Dt = /* @__PURE__ */ z({
|
|
3996
4018
|
__name: "IconFilter",
|
|
3997
4019
|
props: {
|
|
3998
4020
|
color: {
|
|
3999
4021
|
type: String,
|
|
4000
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
4022
|
+
default: `var(--kong-ui-entity-filter-color, ${tr})`
|
|
4001
4023
|
}
|
|
4002
4024
|
},
|
|
4003
4025
|
setup(e) {
|
|
4004
|
-
return (t, n) => (m(),
|
|
4005
|
-
B("mask",
|
|
4026
|
+
return (t, n) => (m(), $("svg", gl, [
|
|
4027
|
+
B("mask", hl, [
|
|
4006
4028
|
B("rect", {
|
|
4007
4029
|
fill: e.color,
|
|
4008
4030
|
height: "20",
|
|
4009
4031
|
width: "20"
|
|
4010
|
-
}, null, 8,
|
|
4032
|
+
}, null, 8, yl)
|
|
4011
4033
|
]),
|
|
4012
|
-
B("g",
|
|
4034
|
+
B("g", vl, [
|
|
4013
4035
|
B("path", {
|
|
4014
4036
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
4015
4037
|
fill: e.color
|
|
4016
|
-
}, null, 8,
|
|
4038
|
+
}, null, 8, bl)
|
|
4017
4039
|
])
|
|
4018
4040
|
]));
|
|
4019
4041
|
}
|
|
4020
|
-
}),
|
|
4042
|
+
}), xl = {
|
|
4021
4043
|
key: 1,
|
|
4022
4044
|
class: "kong-ui-entity-filter"
|
|
4023
|
-
},
|
|
4045
|
+
}, Cl = { class: "kong-ui-entity-filter-menu" }, kl = ["data-testid"], Al = ["onClick", "onKeydown"], _l = { class: "menu-item-indicator" }, wl = { class: "menu-item-body" }, Sl = ["for"], $l = { class: "menu-item-buttons" }, Tl = { class: "filter-clear-button-container" }, El = /* @__PURE__ */ z({
|
|
4024
4046
|
__name: "EntityFilter",
|
|
4025
4047
|
props: {
|
|
4026
4048
|
// filter config, either exact match or fuzzy match
|
|
@@ -4040,62 +4062,62 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4040
4062
|
},
|
|
4041
4063
|
emits: ["update:modelValue"],
|
|
4042
4064
|
setup(e, { emit: t }) {
|
|
4043
|
-
const { i18n: { t: n } } =
|
|
4044
|
-
const
|
|
4045
|
-
return new URLSearchParams(i.modelValue).forEach((
|
|
4046
|
-
|
|
4047
|
-
}),
|
|
4048
|
-
}), c =
|
|
4049
|
-
const
|
|
4050
|
-
return Object.keys(
|
|
4065
|
+
const { i18n: { t: n } } = Y.useI18n(), i = e, r = t, o = N(!1), a = N({}), s = N(/* @__PURE__ */ new Set()), l = T(() => {
|
|
4066
|
+
const S = [];
|
|
4067
|
+
return new URLSearchParams(i.modelValue).forEach((w, O) => {
|
|
4068
|
+
w !== "" && S.push(O);
|
|
4069
|
+
}), S;
|
|
4070
|
+
}), c = T(() => {
|
|
4071
|
+
const S = i.config.fields;
|
|
4072
|
+
return Object.keys(S).filter((w) => {
|
|
4051
4073
|
var O;
|
|
4052
|
-
return (O =
|
|
4053
|
-
}).map((
|
|
4054
|
-
label: w
|
|
4055
|
-
value:
|
|
4074
|
+
return (O = S == null ? void 0 : S[w]) == null ? void 0 : O.searchable;
|
|
4075
|
+
}).map((w) => ({
|
|
4076
|
+
label: S[w].label || w,
|
|
4077
|
+
value: w,
|
|
4056
4078
|
expanded: !1
|
|
4057
4079
|
}));
|
|
4058
4080
|
});
|
|
4059
|
-
be(() => i.modelValue, (
|
|
4060
|
-
a.value = {}, new URLSearchParams(
|
|
4061
|
-
a.value[O] =
|
|
4081
|
+
be(() => i.modelValue, (S) => {
|
|
4082
|
+
a.value = {}, new URLSearchParams(S).forEach((w, O) => {
|
|
4083
|
+
a.value[O] = w;
|
|
4062
4084
|
});
|
|
4063
4085
|
});
|
|
4064
4086
|
const d = () => {
|
|
4065
4087
|
o.value = !o.value;
|
|
4066
|
-
}, u = (
|
|
4067
|
-
s.value.has(
|
|
4068
|
-
}, p = (
|
|
4069
|
-
r("update:modelValue",
|
|
4070
|
-
},
|
|
4088
|
+
}, u = (S) => {
|
|
4089
|
+
s.value.has(S) ? s.value.delete(S) : s.value.add(S);
|
|
4090
|
+
}, p = (S) => {
|
|
4091
|
+
r("update:modelValue", S);
|
|
4092
|
+
}, h = () => {
|
|
4071
4093
|
p("");
|
|
4072
|
-
},
|
|
4073
|
-
var
|
|
4074
|
-
return (((O = (
|
|
4075
|
-
},
|
|
4076
|
-
var
|
|
4077
|
-
return ((O = (
|
|
4078
|
-
},
|
|
4094
|
+
}, g = (S) => `filter-${S}`, v = (S) => {
|
|
4095
|
+
var w, O;
|
|
4096
|
+
return (((O = (w = i.config.schema) == null ? void 0 : w[S]) == null ? void 0 : O.values) ?? []).map((f) => typeof f == "string" ? { value: f, label: f } : f);
|
|
4097
|
+
}, y = (S) => {
|
|
4098
|
+
var w, O;
|
|
4099
|
+
return ((O = (w = i.config.schema) == null ? void 0 : w[S]) == null ? void 0 : O.type) ?? "text";
|
|
4100
|
+
}, k = (S) => {
|
|
4079
4101
|
a.value = {
|
|
4080
4102
|
...a.value,
|
|
4081
|
-
[
|
|
4103
|
+
[S]: ""
|
|
4082
4104
|
}, E();
|
|
4083
|
-
},
|
|
4105
|
+
}, A = () => {
|
|
4084
4106
|
a.value = {}, E(!0);
|
|
4085
|
-
}, E = (
|
|
4086
|
-
const
|
|
4087
|
-
|
|
4088
|
-
},
|
|
4089
|
-
var
|
|
4090
|
-
return !!((O = (
|
|
4091
|
-
}, X = (
|
|
4107
|
+
}, E = (S = !1) => {
|
|
4108
|
+
const w = Object.keys(a.value).reduce((O, f) => (a.value[f] && (O[f] = `${a.value[f]}`), O), {});
|
|
4109
|
+
S && (o.value = !1), r("update:modelValue", new URLSearchParams(w).toString());
|
|
4110
|
+
}, W = (S) => {
|
|
4111
|
+
var w, O;
|
|
4112
|
+
return !!((O = (w = i.config.schema) == null ? void 0 : w[S]) != null && O.filterFunction);
|
|
4113
|
+
}, X = (S, w) => {
|
|
4092
4114
|
var f;
|
|
4093
|
-
const O = (f = i.config.schema) == null ? void 0 : f[
|
|
4094
|
-
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(
|
|
4115
|
+
const O = (f = i.config.schema) == null ? void 0 : f[S];
|
|
4116
|
+
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(w);
|
|
4095
4117
|
};
|
|
4096
|
-
return (
|
|
4097
|
-
const O = D("KInput"), f = D("KButton"),
|
|
4098
|
-
return e.config.isExactMatch ? (m(),
|
|
4118
|
+
return (S, w) => {
|
|
4119
|
+
const O = D("KInput"), f = D("KButton"), b = D("KSelect");
|
|
4120
|
+
return e.config.isExactMatch ? (m(), M(O, {
|
|
4099
4121
|
key: 0,
|
|
4100
4122
|
autocomplete: "off",
|
|
4101
4123
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4104,29 +4126,29 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4104
4126
|
placeholder: e.config.placeholder,
|
|
4105
4127
|
"onUpdate:modelValue": p
|
|
4106
4128
|
}, {
|
|
4107
|
-
before:
|
|
4108
|
-
|
|
4129
|
+
before: C(() => [
|
|
4130
|
+
R(Dt)
|
|
4109
4131
|
]),
|
|
4110
|
-
after:
|
|
4111
|
-
xe(
|
|
4132
|
+
after: C(() => [
|
|
4133
|
+
xe(R(_(si), {
|
|
4112
4134
|
class: "kong-ui-entity-filter-clear",
|
|
4113
4135
|
role: "button",
|
|
4114
4136
|
tabindex: "0",
|
|
4115
|
-
onClick:
|
|
4137
|
+
onClick: h
|
|
4116
4138
|
}, null, 512), [
|
|
4117
4139
|
[Ce, e.modelValue !== ""]
|
|
4118
4140
|
])
|
|
4119
4141
|
]),
|
|
4120
4142
|
_: 1
|
|
4121
|
-
}, 8, ["model-value", "placeholder"])) : (m(),
|
|
4122
|
-
|
|
4143
|
+
}, 8, ["model-value", "placeholder"])) : (m(), $("div", xl, [
|
|
4144
|
+
R(f, {
|
|
4123
4145
|
appearance: "tertiary",
|
|
4124
4146
|
"data-testid": "filter-button",
|
|
4125
4147
|
onClick: d
|
|
4126
4148
|
}, {
|
|
4127
|
-
default:
|
|
4128
|
-
|
|
4129
|
-
U(" " + L(
|
|
4149
|
+
default: C(() => [
|
|
4150
|
+
R(Dt),
|
|
4151
|
+
U(" " + L(_(n)("filter.filterButtonText")) + " " + L(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4130
4152
|
]),
|
|
4131
4153
|
_: 1
|
|
4132
4154
|
}),
|
|
@@ -4136,92 +4158,92 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4136
4158
|
}, null, 512), [
|
|
4137
4159
|
[Ce, o.value]
|
|
4138
4160
|
]),
|
|
4139
|
-
xe(B("div",
|
|
4140
|
-
(m(!0),
|
|
4161
|
+
xe(B("div", Cl, [
|
|
4162
|
+
(m(!0), $(ue, null, ce(c.value, (x) => {
|
|
4141
4163
|
var H, J;
|
|
4142
|
-
return m(),
|
|
4143
|
-
key:
|
|
4164
|
+
return m(), $("div", {
|
|
4165
|
+
key: x.value,
|
|
4144
4166
|
class: "kong-ui-entity-filter-menu-item",
|
|
4145
|
-
"data-testid":
|
|
4167
|
+
"data-testid": x.value
|
|
4146
4168
|
}, [
|
|
4147
4169
|
B("span", {
|
|
4148
|
-
class: fe(["menu-item-title", { expanded: s.value.has(
|
|
4170
|
+
class: fe(["menu-item-title", { expanded: s.value.has(x.value) }]),
|
|
4149
4171
|
role: "button",
|
|
4150
4172
|
tabindex: "0",
|
|
4151
|
-
onClick: (I) => u(
|
|
4152
|
-
onKeydown:
|
|
4173
|
+
onClick: (I) => u(x.value),
|
|
4174
|
+
onKeydown: ei((I) => u(x.value), ["enter"])
|
|
4153
4175
|
}, [
|
|
4154
|
-
U(L(
|
|
4155
|
-
xe(B("span",
|
|
4156
|
-
[Ce, l.value.includes(
|
|
4176
|
+
U(L(x.label) + " ", 1),
|
|
4177
|
+
xe(B("span", _l, null, 512), [
|
|
4178
|
+
[Ce, l.value.includes(x.value)]
|
|
4157
4179
|
]),
|
|
4158
|
-
|
|
4159
|
-
class: fe(["menu-item-expand-icon", { expanded: s.value.has(
|
|
4160
|
-
color:
|
|
4180
|
+
R(_(ci), {
|
|
4181
|
+
class: fe(["menu-item-expand-icon", { expanded: s.value.has(x.value) }]),
|
|
4182
|
+
color: _(ir)
|
|
4161
4183
|
}, null, 8, ["class", "color"])
|
|
4162
|
-
], 42,
|
|
4163
|
-
xe(B("div",
|
|
4184
|
+
], 42, Al),
|
|
4185
|
+
xe(B("div", wl, [
|
|
4164
4186
|
B("label", {
|
|
4165
4187
|
class: "menu-item-label",
|
|
4166
|
-
for:
|
|
4167
|
-
}, L(
|
|
4168
|
-
((J = (H = e.config.schema) == null ? void 0 : H[
|
|
4188
|
+
for: g(x.value)
|
|
4189
|
+
}, L(_(n)("filter.fieldLabel")), 9, Sl),
|
|
4190
|
+
((J = (H = e.config.schema) == null ? void 0 : H[x.value]) == null ? void 0 : J.type) === "select" ? (m(), M(b, {
|
|
4169
4191
|
key: 0,
|
|
4170
|
-
id:
|
|
4171
|
-
modelValue: a.value[
|
|
4172
|
-
"onUpdate:modelValue": (I) => a.value[
|
|
4173
|
-
"enable-filtering":
|
|
4174
|
-
"filter-function": (I) => X(
|
|
4175
|
-
items: x
|
|
4176
|
-
placeholder:
|
|
4177
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(),
|
|
4192
|
+
id: g(x.value),
|
|
4193
|
+
modelValue: a.value[x.value],
|
|
4194
|
+
"onUpdate:modelValue": (I) => a.value[x.value] = I,
|
|
4195
|
+
"enable-filtering": W(x.value),
|
|
4196
|
+
"filter-function": (I) => X(x.value, I),
|
|
4197
|
+
items: v(x.value),
|
|
4198
|
+
placeholder: _(n)("filter.selectPlaceholder")
|
|
4199
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "enable-filtering", "filter-function", "items", "placeholder"])) : (m(), M(O, {
|
|
4178
4200
|
key: 1,
|
|
4179
|
-
id:
|
|
4180
|
-
modelValue: a.value[
|
|
4181
|
-
"onUpdate:modelValue": (I) => a.value[
|
|
4201
|
+
id: g(x.value),
|
|
4202
|
+
modelValue: a.value[x.value],
|
|
4203
|
+
"onUpdate:modelValue": (I) => a.value[x.value] = I,
|
|
4182
4204
|
autocomplete: "off",
|
|
4183
|
-
placeholder:
|
|
4184
|
-
type:
|
|
4205
|
+
placeholder: _(n)("filter.inputPlaceholder"),
|
|
4206
|
+
type: y(x.value)
|
|
4185
4207
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4186
4208
|
], 512), [
|
|
4187
|
-
[Ce, s.value.has(
|
|
4209
|
+
[Ce, s.value.has(x.value)]
|
|
4188
4210
|
]),
|
|
4189
|
-
xe(B("div",
|
|
4190
|
-
|
|
4211
|
+
xe(B("div", $l, [
|
|
4212
|
+
R(f, {
|
|
4191
4213
|
appearance: "tertiary",
|
|
4192
4214
|
"data-testid": "apply-filter",
|
|
4193
4215
|
size: "small",
|
|
4194
|
-
onClick:
|
|
4216
|
+
onClick: w[0] || (w[0] = (I) => E(!0))
|
|
4195
4217
|
}, {
|
|
4196
|
-
default:
|
|
4197
|
-
U(L(
|
|
4218
|
+
default: C(() => [
|
|
4219
|
+
U(L(_(n)("filter.applyButtonText")), 1)
|
|
4198
4220
|
]),
|
|
4199
4221
|
_: 1
|
|
4200
4222
|
}),
|
|
4201
|
-
|
|
4223
|
+
R(f, {
|
|
4202
4224
|
appearance: "tertiary",
|
|
4203
4225
|
"data-testid": "clear-filter",
|
|
4204
4226
|
size: "small",
|
|
4205
|
-
onClick: (I) =>
|
|
4227
|
+
onClick: (I) => k(x.value)
|
|
4206
4228
|
}, {
|
|
4207
|
-
default:
|
|
4208
|
-
U(L(
|
|
4229
|
+
default: C(() => [
|
|
4230
|
+
U(L(_(n)("filter.clearButtonText")), 1)
|
|
4209
4231
|
]),
|
|
4210
4232
|
_: 1
|
|
4211
4233
|
}, 8, ["onClick"])
|
|
4212
4234
|
], 512), [
|
|
4213
|
-
[Ce, s.value.has(
|
|
4235
|
+
[Ce, s.value.has(x.value)]
|
|
4214
4236
|
])
|
|
4215
|
-
], 8,
|
|
4237
|
+
], 8, kl);
|
|
4216
4238
|
}), 128)),
|
|
4217
|
-
B("div",
|
|
4218
|
-
|
|
4239
|
+
B("div", Tl, [
|
|
4240
|
+
R(f, {
|
|
4219
4241
|
appearance: "tertiary",
|
|
4220
4242
|
size: "small",
|
|
4221
|
-
onClick:
|
|
4243
|
+
onClick: A
|
|
4222
4244
|
}, {
|
|
4223
|
-
default:
|
|
4224
|
-
U(L(
|
|
4245
|
+
default: C(() => [
|
|
4246
|
+
U(L(_(n)("filter.clearAllButtonText")), 1)
|
|
4225
4247
|
]),
|
|
4226
4248
|
_: 1
|
|
4227
4249
|
})
|
|
@@ -4232,7 +4254,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4232
4254
|
]));
|
|
4233
4255
|
};
|
|
4234
4256
|
}
|
|
4235
|
-
}),
|
|
4257
|
+
}), Ss = /* @__PURE__ */ le(El, [["__scopeId", "data-v-084f7978"]]), $s = /* @__PURE__ */ z({
|
|
4236
4258
|
__name: "EntityToggleModal",
|
|
4237
4259
|
props: {
|
|
4238
4260
|
visible: {
|
|
@@ -4264,9 +4286,9 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4264
4286
|
},
|
|
4265
4287
|
emits: ["cancel", "proceed"],
|
|
4266
4288
|
setup(e, { emit: t }) {
|
|
4267
|
-
const { i18n: { t: n }, i18nT: i } =
|
|
4289
|
+
const { i18n: { t: n }, i18nT: i } = Y.useI18n(), r = e, o = t, a = N(!1), s = T(
|
|
4268
4290
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4269
|
-
), l =
|
|
4291
|
+
), l = T(
|
|
4270
4292
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4271
4293
|
), c = () => o("cancel"), d = async () => {
|
|
4272
4294
|
if (r.onConfirm) {
|
|
@@ -4281,9 +4303,9 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4281
4303
|
}
|
|
4282
4304
|
};
|
|
4283
4305
|
return (u, p) => {
|
|
4284
|
-
const
|
|
4285
|
-
return m(),
|
|
4286
|
-
|
|
4306
|
+
const h = D("KPrompt");
|
|
4307
|
+
return m(), M(Yt, { to: "body" }, [
|
|
4308
|
+
R(h, {
|
|
4287
4309
|
"action-button-disabled": a.value,
|
|
4288
4310
|
"action-button-text": l.value,
|
|
4289
4311
|
"data-testid": `${e.entityType}-${e.entityId}-toggle-prompt`,
|
|
@@ -4292,15 +4314,15 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4292
4314
|
onCancel: c,
|
|
4293
4315
|
onProceed: d
|
|
4294
4316
|
}, {
|
|
4295
|
-
default:
|
|
4296
|
-
|
|
4317
|
+
default: C(() => [
|
|
4318
|
+
R(_(i), {
|
|
4297
4319
|
keypath: `toggleModal.${r.action}.message`,
|
|
4298
4320
|
scope: "global"
|
|
4299
4321
|
}, {
|
|
4300
|
-
entityType:
|
|
4322
|
+
entityType: C(() => [
|
|
4301
4323
|
U(L(e.entityType), 1)
|
|
4302
4324
|
]),
|
|
4303
|
-
entityName:
|
|
4325
|
+
entityName: C(() => [
|
|
4304
4326
|
B("strong", null, L(e.entityName), 1)
|
|
4305
4327
|
]),
|
|
4306
4328
|
_: 1
|
|
@@ -4311,7 +4333,7 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4311
4333
|
]);
|
|
4312
4334
|
};
|
|
4313
4335
|
}
|
|
4314
|
-
}),
|
|
4336
|
+
}), Ts = /* @__PURE__ */ z({
|
|
4315
4337
|
__name: "PermissionsWrapper",
|
|
4316
4338
|
props: {
|
|
4317
4339
|
/**
|
|
@@ -4333,48 +4355,48 @@ const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */
|
|
|
4333
4355
|
}
|
|
4334
4356
|
},
|
|
4335
4357
|
setup(e) {
|
|
4336
|
-
const t = e, n = N(void 0), i =
|
|
4358
|
+
const t = e, n = N(void 0), i = T(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
4337
4359
|
return be(() => t.authFunction, async () => {
|
|
4338
4360
|
n.value = await t.authFunction();
|
|
4339
4361
|
}, { immediate: !0 }), (r, o) => i.value ? P(r.$slots, "default", {
|
|
4340
4362
|
key: 0,
|
|
4341
4363
|
isAllowed: n.value
|
|
4342
|
-
}) :
|
|
4364
|
+
}) : j("", !0);
|
|
4343
4365
|
}
|
|
4344
4366
|
}), te = [];
|
|
4345
4367
|
for (let e = 0; e < 256; ++e)
|
|
4346
4368
|
te.push((e + 256).toString(16).slice(1));
|
|
4347
|
-
function
|
|
4369
|
+
function Il(e, t = 0) {
|
|
4348
4370
|
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();
|
|
4349
4371
|
}
|
|
4350
4372
|
let Ge;
|
|
4351
|
-
const
|
|
4352
|
-
function
|
|
4373
|
+
const Fl = new Uint8Array(16);
|
|
4374
|
+
function Ol() {
|
|
4353
4375
|
if (!Ge) {
|
|
4354
4376
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
4355
4377
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4356
4378
|
Ge = crypto.getRandomValues.bind(crypto);
|
|
4357
4379
|
}
|
|
4358
|
-
return Ge(
|
|
4380
|
+
return Ge(Fl);
|
|
4359
4381
|
}
|
|
4360
|
-
const
|
|
4361
|
-
function
|
|
4382
|
+
const Ll = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Pt = { randomUUID: Ll };
|
|
4383
|
+
function Bl(e, t, n) {
|
|
4362
4384
|
var r;
|
|
4363
|
-
if (
|
|
4364
|
-
return
|
|
4385
|
+
if (Pt.randomUUID && !e)
|
|
4386
|
+
return Pt.randomUUID();
|
|
4365
4387
|
e = e || {};
|
|
4366
|
-
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ??
|
|
4388
|
+
const i = e.random ?? ((r = e.rng) == null ? void 0 : r.call(e)) ?? Ol();
|
|
4367
4389
|
if (i.length < 16)
|
|
4368
4390
|
throw new Error("Random bytes length must be >= 16");
|
|
4369
|
-
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128,
|
|
4391
|
+
return i[6] = i[6] & 15 | 64, i[8] = i[8] & 63 | 128, Il(i);
|
|
4370
4392
|
}
|
|
4371
|
-
const
|
|
4393
|
+
const Kl = ["aria-labelledby"], Rl = { class: "form-section-wrapper" }, Nl = {
|
|
4372
4394
|
key: 1,
|
|
4373
4395
|
class: "form-section-description"
|
|
4374
|
-
},
|
|
4396
|
+
}, Ml = {
|
|
4375
4397
|
key: 2,
|
|
4376
4398
|
class: "form-section-footer"
|
|
4377
|
-
},
|
|
4399
|
+
}, jl = { class: "form-section-content" }, Dl = /* @__PURE__ */ z({
|
|
4378
4400
|
__name: "EntityFormSection",
|
|
4379
4401
|
props: {
|
|
4380
4402
|
title: {
|
|
@@ -4403,52 +4425,52 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4403
4425
|
}
|
|
4404
4426
|
},
|
|
4405
4427
|
setup(e) {
|
|
4406
|
-
const t =
|
|
4407
|
-
return (i, r) => (m(),
|
|
4408
|
-
"aria-labelledby": e.title ?
|
|
4428
|
+
const t = Pe(), n = Bl();
|
|
4429
|
+
return (i, r) => (m(), $("div", {
|
|
4430
|
+
"aria-labelledby": e.title ? _(n) : void 0,
|
|
4409
4431
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4410
4432
|
role: "group"
|
|
4411
4433
|
}, [
|
|
4412
|
-
B("div",
|
|
4413
|
-
e.hideInfoHeader ?
|
|
4434
|
+
B("div", Rl, [
|
|
4435
|
+
e.hideInfoHeader ? j("", !0) : (m(), $("div", {
|
|
4414
4436
|
key: 0,
|
|
4415
4437
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4416
4438
|
}, [
|
|
4417
|
-
e.title ? (m(),
|
|
4439
|
+
e.title ? (m(), M(De(e.titleTag), {
|
|
4418
4440
|
key: 0,
|
|
4419
|
-
id:
|
|
4441
|
+
id: _(n),
|
|
4420
4442
|
class: "form-section-title"
|
|
4421
4443
|
}, {
|
|
4422
|
-
default:
|
|
4444
|
+
default: C(() => [
|
|
4423
4445
|
U(L(e.title), 1)
|
|
4424
4446
|
]),
|
|
4425
4447
|
_: 1
|
|
4426
|
-
}, 8, ["id"])) :
|
|
4427
|
-
e.description ||
|
|
4448
|
+
}, 8, ["id"])) : j("", !0),
|
|
4449
|
+
e.description || _(t).description ? (m(), $("div", Nl, [
|
|
4428
4450
|
P(i.$slots, "description", {}, () => [
|
|
4429
4451
|
B("p", null, L(e.description), 1)
|
|
4430
4452
|
], !0)
|
|
4431
|
-
])) :
|
|
4432
|
-
|
|
4453
|
+
])) : j("", !0),
|
|
4454
|
+
_(t).footer ? (m(), $("div", Ml, [
|
|
4433
4455
|
P(i.$slots, "footer", {}, void 0, !0)
|
|
4434
|
-
])) :
|
|
4456
|
+
])) : j("", !0)
|
|
4435
4457
|
], 2)),
|
|
4436
|
-
B("div",
|
|
4458
|
+
B("div", jl, [
|
|
4437
4459
|
P(i.$slots, "default", {}, void 0, !0)
|
|
4438
4460
|
])
|
|
4439
4461
|
])
|
|
4440
|
-
], 10,
|
|
4462
|
+
], 10, Kl));
|
|
4441
4463
|
}
|
|
4442
|
-
}),
|
|
4464
|
+
}), Es = /* @__PURE__ */ le(Dl, [["__scopeId", "data-v-b1f74200"]]), Pl = { class: "ff-form-section" }, Ul = { class: "header" }, ql = {
|
|
4443
4465
|
key: 0,
|
|
4444
4466
|
class: "step"
|
|
4445
|
-
},
|
|
4467
|
+
}, Hl = { class: "header-content" }, Vl = { class: "header-title" }, Yl = {
|
|
4446
4468
|
key: 0,
|
|
4447
4469
|
class: "header-description"
|
|
4448
|
-
},
|
|
4470
|
+
}, Wl = {
|
|
4449
4471
|
key: 1,
|
|
4450
4472
|
class: "header-extra"
|
|
4451
|
-
},
|
|
4473
|
+
}, Jl = { class: "content" }, Gl = /* @__PURE__ */ z({
|
|
4452
4474
|
__name: "EntityFormBlock",
|
|
4453
4475
|
props: {
|
|
4454
4476
|
step: {},
|
|
@@ -4456,38 +4478,38 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4456
4478
|
description: { default: "" }
|
|
4457
4479
|
},
|
|
4458
4480
|
setup(e) {
|
|
4459
|
-
const t =
|
|
4460
|
-
return (n, i) => (m(),
|
|
4461
|
-
B("header",
|
|
4462
|
-
e.step != null ? (m(),
|
|
4463
|
-
B("div",
|
|
4464
|
-
B("h2",
|
|
4481
|
+
const t = Pe();
|
|
4482
|
+
return (n, i) => (m(), $("div", Pl, [
|
|
4483
|
+
B("header", Ul, [
|
|
4484
|
+
e.step != null ? (m(), $("div", ql, L(e.step), 1)) : j("", !0),
|
|
4485
|
+
B("div", Hl, [
|
|
4486
|
+
B("h2", Vl, [
|
|
4465
4487
|
P(n.$slots, "title", {}, () => [
|
|
4466
4488
|
U(L(e.title), 1)
|
|
4467
4489
|
], !0)
|
|
4468
4490
|
]),
|
|
4469
|
-
e.description || t.description ? (m(),
|
|
4491
|
+
e.description || t.description ? (m(), $("div", Yl, [
|
|
4470
4492
|
P(n.$slots, "description", {}, () => [
|
|
4471
4493
|
U(L(e.description), 1)
|
|
4472
4494
|
], !0)
|
|
4473
|
-
])) :
|
|
4495
|
+
])) : j("", !0)
|
|
4474
4496
|
]),
|
|
4475
|
-
t.extra ? (m(),
|
|
4497
|
+
t.extra ? (m(), $("div", Wl, [
|
|
4476
4498
|
P(n.$slots, "extra", {}, void 0, !0)
|
|
4477
|
-
])) :
|
|
4499
|
+
])) : j("", !0)
|
|
4478
4500
|
]),
|
|
4479
|
-
B("div",
|
|
4501
|
+
B("div", Jl, [
|
|
4480
4502
|
P(n.$slots, "default", {}, void 0, !0)
|
|
4481
4503
|
])
|
|
4482
4504
|
]));
|
|
4483
4505
|
}
|
|
4484
|
-
}),
|
|
4506
|
+
}), Is = /* @__PURE__ */ le(Gl, [["__scopeId", "data-v-cb6d2e95"]]), zl = {
|
|
4485
4507
|
class: "kong-ui-public-entity-link",
|
|
4486
4508
|
"data-testid": "entity-link-parent"
|
|
4487
|
-
},
|
|
4509
|
+
}, Ql = {
|
|
4488
4510
|
key: 0,
|
|
4489
4511
|
class: "deleted-entity"
|
|
4490
|
-
},
|
|
4512
|
+
}, Zl = { key: 1 }, Xl = ["onClick"], es = /* @__PURE__ */ z({
|
|
4491
4513
|
__name: "EntityLink",
|
|
4492
4514
|
props: {
|
|
4493
4515
|
entityLinkData: {
|
|
@@ -4511,10 +4533,10 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4511
4533
|
}
|
|
4512
4534
|
},
|
|
4513
4535
|
setup(e) {
|
|
4514
|
-
const t = e, n = N(), { isTruncated: i } =
|
|
4536
|
+
const t = e, n = N(), { isTruncated: i } = Y.useTruncationDetector(n), { i18n: { t: r } } = Y.useI18n(), o = r("global.actions.copyId"), a = N(o), s = T(() => t.entityLinkData.deleted ?? !1), l = T(() => {
|
|
4515
4537
|
var u;
|
|
4516
4538
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4517
|
-
}), c =
|
|
4539
|
+
}), c = T(() => {
|
|
4518
4540
|
var u;
|
|
4519
4541
|
return `${(u = l.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4520
4542
|
}), d = async (u) => {
|
|
@@ -4523,20 +4545,20 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4523
4545
|
}, 1800));
|
|
4524
4546
|
};
|
|
4525
4547
|
return (u, p) => {
|
|
4526
|
-
const
|
|
4527
|
-
return m(),
|
|
4528
|
-
s.value ? (m(),
|
|
4548
|
+
const h = D("KTooltip"), g = D("KExternalLink"), v = D("KClipboardProvider");
|
|
4549
|
+
return m(), $("div", zl, [
|
|
4550
|
+
s.value ? (m(), $("div", Ql, L(c.value), 1)) : l.value ? l.value ? (m(), M(g, {
|
|
4529
4551
|
key: 2,
|
|
4530
4552
|
class: "entity-link",
|
|
4531
4553
|
"hide-icon": !e.newWindow,
|
|
4532
4554
|
href: e.externalLink,
|
|
4533
4555
|
target: e.newWindow ? "_blank" : "_self"
|
|
4534
4556
|
}, {
|
|
4535
|
-
default:
|
|
4536
|
-
|
|
4537
|
-
text:
|
|
4557
|
+
default: C(() => [
|
|
4558
|
+
R(h, {
|
|
4559
|
+
text: _(i) && e.entityLinkData.label || ""
|
|
4538
4560
|
}, {
|
|
4539
|
-
default:
|
|
4561
|
+
default: C(() => [
|
|
4540
4562
|
B("span", {
|
|
4541
4563
|
ref_key: "textContent",
|
|
4542
4564
|
ref: n,
|
|
@@ -4547,65 +4569,65 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4547
4569
|
}, 8, ["text"])
|
|
4548
4570
|
]),
|
|
4549
4571
|
_: 1
|
|
4550
|
-
}, 8, ["hide-icon", "href", "target"])) :
|
|
4551
|
-
l.value && e.allowCopy ? (m(),
|
|
4572
|
+
}, 8, ["hide-icon", "href", "target"])) : j("", !0) : (m(), $("div", Zl, L(" – "))),
|
|
4573
|
+
l.value && e.allowCopy ? (m(), M(h, {
|
|
4552
4574
|
key: a.value,
|
|
4553
4575
|
class: "copy-uuid-tooltip",
|
|
4554
4576
|
"max-width": "160",
|
|
4555
4577
|
placement: "bottom-end",
|
|
4556
4578
|
text: a.value
|
|
4557
4579
|
}, {
|
|
4558
|
-
default:
|
|
4559
|
-
|
|
4560
|
-
default:
|
|
4580
|
+
default: C(() => [
|
|
4581
|
+
R(v, null, {
|
|
4582
|
+
default: C(({ copyToClipboard: y }) => [
|
|
4561
4583
|
B("span", {
|
|
4562
4584
|
class: "entity-link-copy-id",
|
|
4563
|
-
onClick: Be((
|
|
4585
|
+
onClick: Be((k) => d(y), ["stop"])
|
|
4564
4586
|
}, [
|
|
4565
|
-
|
|
4587
|
+
R(_(ui), {
|
|
4566
4588
|
class: "copy-icon",
|
|
4567
|
-
color:
|
|
4589
|
+
color: _(rr),
|
|
4568
4590
|
"data-testid": "copy-id",
|
|
4569
|
-
size:
|
|
4591
|
+
size: _(or)
|
|
4570
4592
|
}, null, 8, ["color", "size"])
|
|
4571
|
-
], 8,
|
|
4593
|
+
], 8, Xl)
|
|
4572
4594
|
]),
|
|
4573
4595
|
_: 1
|
|
4574
4596
|
})
|
|
4575
4597
|
]),
|
|
4576
4598
|
_: 1
|
|
4577
|
-
}, 8, ["text"])) :
|
|
4599
|
+
}, 8, ["text"])) : j("", !0)
|
|
4578
4600
|
]);
|
|
4579
4601
|
};
|
|
4580
4602
|
}
|
|
4581
|
-
}),
|
|
4603
|
+
}), Fs = /* @__PURE__ */ le(es, [["__scopeId", "data-v-96efdfa5"]]), ts = { class: "kong-ui-public-entity-empty-state" }, ns = { class: "entity-empty-state-content" }, is = {
|
|
4582
4604
|
key: 0,
|
|
4583
4605
|
class: "empty-state-image"
|
|
4584
|
-
},
|
|
4606
|
+
}, rs = {
|
|
4585
4607
|
key: 1,
|
|
4586
4608
|
class: "entity-empty-state-title"
|
|
4587
|
-
},
|
|
4609
|
+
}, as = {
|
|
4588
4610
|
key: 2,
|
|
4589
4611
|
class: "entity-empty-state-description"
|
|
4590
|
-
},
|
|
4612
|
+
}, os = {
|
|
4591
4613
|
key: 3,
|
|
4592
4614
|
class: "entity-empty-state-pricing"
|
|
4593
|
-
},
|
|
4615
|
+
}, ls = {
|
|
4594
4616
|
key: 0,
|
|
4595
4617
|
class: "entity-empty-state-message"
|
|
4596
|
-
},
|
|
4618
|
+
}, ss = {
|
|
4597
4619
|
key: 1,
|
|
4598
4620
|
class: "entity-empty-state-action"
|
|
4599
|
-
},
|
|
4621
|
+
}, cs = {
|
|
4600
4622
|
key: 2,
|
|
4601
4623
|
class: "entity-empty-state-card-container"
|
|
4602
|
-
},
|
|
4624
|
+
}, us = {
|
|
4603
4625
|
key: 0,
|
|
4604
4626
|
class: "feature-icon"
|
|
4605
|
-
},
|
|
4627
|
+
}, ds = { class: "card-header" }, fs = ["title"], ps = {
|
|
4606
4628
|
key: 3,
|
|
4607
4629
|
class: "entity-empty-state-bottom-container"
|
|
4608
|
-
},
|
|
4630
|
+
}, ms = /* @__PURE__ */ z({
|
|
4609
4631
|
__name: "EntityEmptyState",
|
|
4610
4632
|
props: {
|
|
4611
4633
|
appearance: {
|
|
@@ -4646,18 +4668,18 @@ const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
|
4646
4668
|
},
|
|
4647
4669
|
emits: ["click:create", "click:learn-more"],
|
|
4648
4670
|
setup(e) {
|
|
4649
|
-
const t = e, { i18n: { t: n } } =
|
|
4671
|
+
const t = e, { i18n: { t: n } } = Y.useI18n(), i = N(!1), r = T(() => i.value && !!t.actionButtonText), o = T(() => yt.includes(t.appearance) ? t.appearance : ["primary", t.appearance]);
|
|
4650
4672
|
return it(async () => {
|
|
4651
4673
|
i.value = await t.canCreate();
|
|
4652
|
-
}), nt(() =>
|
|
4674
|
+
}), nt(() => ti(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4653
4675
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) => {
|
|
4654
4676
|
const l = D("KCard");
|
|
4655
|
-
return m(),
|
|
4656
|
-
B("div",
|
|
4657
|
-
a.$slots.image ? (m(),
|
|
4677
|
+
return m(), $("div", ts, [
|
|
4678
|
+
B("div", ns, [
|
|
4679
|
+
a.$slots.image ? (m(), $("div", is, [
|
|
4658
4680
|
P(a.$slots, "image", {}, void 0, !0)
|
|
4659
|
-
])) :
|
|
4660
|
-
e.title || a.$slots.title ? (m(),
|
|
4681
|
+
])) : j("", !0),
|
|
4682
|
+
e.title || a.$slots.title ? (m(), $("div", rs, [
|
|
4661
4683
|
B("h1", {
|
|
4662
4684
|
class: fe(o.value)
|
|
4663
4685
|
}, [
|
|
@@ -4665,81 +4687,81 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4665
4687
|
U(L(e.title), 1)
|
|
4666
4688
|
], !0)
|
|
4667
4689
|
], 2)
|
|
4668
|
-
])) :
|
|
4669
|
-
e.description || a.$slots.default ? (m(),
|
|
4690
|
+
])) : j("", !0),
|
|
4691
|
+
e.description || a.$slots.default ? (m(), $("div", as, [
|
|
4670
4692
|
P(a.$slots, "default", {}, () => [
|
|
4671
4693
|
B("p", null, L(e.description), 1)
|
|
4672
4694
|
], !0)
|
|
4673
|
-
])) :
|
|
4674
|
-
e.pricing || a.$slots.pricing ? (m(),
|
|
4695
|
+
])) : j("", !0),
|
|
4696
|
+
e.pricing || a.$slots.pricing ? (m(), $("div", os, [
|
|
4675
4697
|
B("p", null, [
|
|
4676
|
-
B("b", null, L(
|
|
4698
|
+
B("b", null, L(_(n)("emptyState.pricingTitle")), 1),
|
|
4677
4699
|
s[2] || (s[2] = U()),
|
|
4678
4700
|
P(a.$slots, "pricing", {}, () => [
|
|
4679
4701
|
U(L(e.pricing), 1)
|
|
4680
4702
|
], !0)
|
|
4681
4703
|
])
|
|
4682
|
-
])) :
|
|
4704
|
+
])) : j("", !0)
|
|
4683
4705
|
]),
|
|
4684
|
-
a.$slots.message ? (m(),
|
|
4706
|
+
a.$slots.message ? (m(), $("div", ls, [
|
|
4685
4707
|
P(a.$slots, "message", {}, void 0, !0)
|
|
4686
|
-
])) :
|
|
4687
|
-
r.value || e.learnMore || a.$slots.actions ? (m(),
|
|
4708
|
+
])) : j("", !0),
|
|
4709
|
+
r.value || e.learnMore || a.$slots.actions ? (m(), $("div", ss, [
|
|
4688
4710
|
P(a.$slots, "actions", {}, () => [
|
|
4689
|
-
r.value ? (m(),
|
|
4711
|
+
r.value ? (m(), M(_(mt), {
|
|
4690
4712
|
key: 0,
|
|
4691
4713
|
appearance: "primary",
|
|
4692
4714
|
"data-testid": "entity-create-button",
|
|
4693
4715
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4694
4716
|
onClick: s[0] || (s[0] = (c) => a.$emit("click:create"))
|
|
4695
4717
|
}, {
|
|
4696
|
-
default:
|
|
4697
|
-
|
|
4718
|
+
default: C(() => [
|
|
4719
|
+
R(_(Jt)),
|
|
4698
4720
|
U(" " + L(e.actionButtonText), 1)
|
|
4699
4721
|
]),
|
|
4700
4722
|
_: 1
|
|
4701
|
-
}, 8, ["size"])) :
|
|
4702
|
-
e.learnMore ? (m(),
|
|
4723
|
+
}, 8, ["size"])) : j("", !0),
|
|
4724
|
+
e.learnMore ? (m(), M(_(mt), {
|
|
4703
4725
|
key: 1,
|
|
4704
4726
|
appearance: "secondary",
|
|
4705
4727
|
"data-testid": "entity-learn-more-button",
|
|
4706
4728
|
size: e.appearance === "secondary" ? "medium" : "large",
|
|
4707
4729
|
onClick: s[1] || (s[1] = (c) => a.$emit("click:learn-more"))
|
|
4708
4730
|
}, {
|
|
4709
|
-
default:
|
|
4710
|
-
|
|
4711
|
-
U(" " + L(
|
|
4731
|
+
default: C(() => [
|
|
4732
|
+
R(_(Wt), { decorative: "" }),
|
|
4733
|
+
U(" " + L(_(n)("emptyState.learnMore")), 1)
|
|
4712
4734
|
]),
|
|
4713
4735
|
_: 1
|
|
4714
|
-
}, 8, ["size"])) :
|
|
4736
|
+
}, 8, ["size"])) : j("", !0)
|
|
4715
4737
|
], !0)
|
|
4716
|
-
])) :
|
|
4717
|
-
e.features.length ? (m(),
|
|
4718
|
-
(m(!0),
|
|
4738
|
+
])) : j("", !0),
|
|
4739
|
+
e.features.length ? (m(), $("div", cs, [
|
|
4740
|
+
(m(!0), $(ue, null, ce(e.features, (c, d) => (m(), M(l, {
|
|
4719
4741
|
key: c,
|
|
4720
4742
|
class: "entity-empty-state-card"
|
|
4721
4743
|
}, {
|
|
4722
|
-
title:
|
|
4723
|
-
a.$slots[`feature-${d}-icon`] ? (m(),
|
|
4744
|
+
title: C(() => [
|
|
4745
|
+
a.$slots[`feature-${d}-icon`] ? (m(), $("div", us, [
|
|
4724
4746
|
P(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4725
|
-
])) :
|
|
4726
|
-
B("div",
|
|
4747
|
+
])) : j("", !0),
|
|
4748
|
+
B("div", ds, L(c.title), 1)
|
|
4727
4749
|
]),
|
|
4728
|
-
default:
|
|
4750
|
+
default: C(() => [
|
|
4729
4751
|
B("div", {
|
|
4730
4752
|
title: c.description
|
|
4731
|
-
}, L(c.description), 9,
|
|
4753
|
+
}, L(c.description), 9, fs)
|
|
4732
4754
|
]),
|
|
4733
4755
|
_: 2
|
|
4734
4756
|
}, 1024))), 128))
|
|
4735
|
-
])) :
|
|
4736
|
-
a.$slots.bottom ? (m(),
|
|
4757
|
+
])) : j("", !0),
|
|
4758
|
+
a.$slots.bottom ? (m(), $("div", ps, [
|
|
4737
4759
|
P(a.$slots, "bottom", {}, void 0, !0)
|
|
4738
|
-
])) :
|
|
4760
|
+
])) : j("", !0)
|
|
4739
4761
|
]);
|
|
4740
4762
|
};
|
|
4741
4763
|
}
|
|
4742
|
-
}),
|
|
4764
|
+
}), Os = /* @__PURE__ */ le(ms, [["__scopeId", "data-v-645aae54"]]), gs = { key: 1 }, Ls = /* @__PURE__ */ z({
|
|
4743
4765
|
__name: "TableTags",
|
|
4744
4766
|
props: {
|
|
4745
4767
|
/** The tags to display in the table */
|
|
@@ -4753,7 +4775,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4753
4775
|
}
|
|
4754
4776
|
},
|
|
4755
4777
|
setup(e) {
|
|
4756
|
-
const t = e, n =
|
|
4778
|
+
const t = e, n = T(() => {
|
|
4757
4779
|
if (Array.isArray(t.tags))
|
|
4758
4780
|
return t.tags;
|
|
4759
4781
|
if (typeof t.tags == "string")
|
|
@@ -4767,68 +4789,68 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4767
4789
|
});
|
|
4768
4790
|
return (i, r) => {
|
|
4769
4791
|
var o;
|
|
4770
|
-
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(),
|
|
4771
|
-
default:
|
|
4772
|
-
(m(!0),
|
|
4792
|
+
return ((o = n.value) == null ? void 0 : o.length) > 0 ? (m(), M(_(oi), { key: 0 }, {
|
|
4793
|
+
default: C(() => [
|
|
4794
|
+
(m(!0), $(ue, null, ce(n.value, (a) => (m(), M(_(li), {
|
|
4773
4795
|
key: a,
|
|
4774
4796
|
"max-width": e.tagMaxWidth,
|
|
4775
4797
|
onClick: r[0] || (r[0] = Be(() => {
|
|
4776
4798
|
}, ["stop"]))
|
|
4777
4799
|
}, {
|
|
4778
|
-
default:
|
|
4800
|
+
default: C(() => [
|
|
4779
4801
|
U(L(a), 1)
|
|
4780
4802
|
]),
|
|
4781
4803
|
_: 2
|
|
4782
4804
|
}, 1032, ["max-width"]))), 128))
|
|
4783
4805
|
]),
|
|
4784
4806
|
_: 1
|
|
4785
|
-
})) : (m(),
|
|
4807
|
+
})) : (m(), $("span", gs, "-"));
|
|
4786
4808
|
};
|
|
4787
4809
|
}
|
|
4788
|
-
}), { useAxios:
|
|
4810
|
+
}), { useAxios: Bs, useDeleteUrlBuilder: Ks, useErrors: Rs, useExternalLinkCreator: Ns, useFetchUrlBuilder: Ms, useFetcher: js, useFetcherCacheKey: Ds, useDebouncedFilter: Ps, useStringHelpers: Us, useHelpers: qs, useGatewayFeatureSupported: Hs, useTruncationDetector: Vs, useValidators: Ys, useSchemaProvider: Ws, useTableState: Js } = Y;
|
|
4789
4811
|
export {
|
|
4790
4812
|
yt as Appearances,
|
|
4791
|
-
|
|
4792
|
-
|
|
4813
|
+
Jo as ConfigCardDisplay,
|
|
4814
|
+
tn as ConfigCardItem,
|
|
4793
4815
|
ae as ConfigurationSchemaSection,
|
|
4794
4816
|
V as ConfigurationSchemaType,
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
|
|
4803
|
-
|
|
4804
|
-
|
|
4805
|
-
|
|
4806
|
-
|
|
4807
|
-
|
|
4808
|
-
|
|
4817
|
+
nl as DeckCodeBlock,
|
|
4818
|
+
ks as EntityBaseConfigCard,
|
|
4819
|
+
As as EntityBaseForm,
|
|
4820
|
+
pi as EntityBaseFormType,
|
|
4821
|
+
_s as EntityBaseTable,
|
|
4822
|
+
ws as EntityDeleteModal,
|
|
4823
|
+
Os as EntityEmptyState,
|
|
4824
|
+
Ss as EntityFilter,
|
|
4825
|
+
Is as EntityFormBlock,
|
|
4826
|
+
Es as EntityFormSection,
|
|
4827
|
+
Fs as EntityLink,
|
|
4828
|
+
$s as EntityToggleModal,
|
|
4829
|
+
fi as EntityTypes,
|
|
4830
|
+
gi as EventGatewayTypesArray,
|
|
4809
4831
|
me as FetcherStatus,
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
|
|
4813
|
-
|
|
4832
|
+
Xi as InternalLinkItem,
|
|
4833
|
+
nn as JsonCodeBlock,
|
|
4834
|
+
Ts as PermissionsWrapper,
|
|
4835
|
+
mi as SupportedEntityDeckArray,
|
|
4814
4836
|
Ee as SupportedEntityType,
|
|
4815
4837
|
Ue as SupportedEntityTypesArray,
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
|
|
4822
|
-
|
|
4823
|
-
|
|
4824
|
-
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4838
|
+
Ls as TableTags,
|
|
4839
|
+
Jn as TerraformCodeBlock,
|
|
4840
|
+
Wn as YamlCodeBlock,
|
|
4841
|
+
Bs as useAxios,
|
|
4842
|
+
Ps as useDebouncedFilter,
|
|
4843
|
+
Ks as useDeleteUrlBuilder,
|
|
4844
|
+
Rs as useErrors,
|
|
4845
|
+
Ns as useExternalLinkCreator,
|
|
4846
|
+
Ms as useFetchUrlBuilder,
|
|
4847
|
+
js as useFetcher,
|
|
4848
|
+
Ds as useFetcherCacheKey,
|
|
4849
|
+
Hs as useGatewayFeatureSupported,
|
|
4850
|
+
qs as useHelpers,
|
|
4851
|
+
Ws as useSchemaProvider,
|
|
4852
|
+
Us as useStringHelpers,
|
|
4853
|
+
Js as useTableState,
|
|
4854
|
+
Vs as useTruncationDetector,
|
|
4855
|
+
Ys as useValidators
|
|
4834
4856
|
};
|