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