@kong-ui-public/entities-shared 3.33.2-pr.2640.fb8bab909.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 -957
- 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 di() {
|
|
|
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 fi() {
|
|
|
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 mi() {
|
|
|
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 hi = {
|
|
|
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 hi = {
|
|
|
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 hi = {
|
|
|
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 hi = {
|
|
|
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 $i(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 $i(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 Ii() {
|
|
|
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 Ei(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 Mi(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 = Gn(), o = De(), { i18n: { t: a, formatIsoDate: s, formatUnixTimeStamp: l } } = W.useI18n(), c =
|
|
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 }),
|
|
@@ -1082,55 +1098,55 @@ const W = {
|
|
|
1082
1098
|
}
|
|
1083
1099
|
});
|
|
1084
1100
|
/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */
|
|
1085
|
-
function
|
|
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 $r(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 Tr = $r, Ir = [
|
|
|
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 Fr(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 Lr() {
|
|
|
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 qr(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 qr(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 qr(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 Hr(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 zr(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 Xr(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 na(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 sa(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,27 +1673,27 @@ 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
|
-
function
|
|
1696
|
+
function $n(e, t, n) {
|
|
1681
1697
|
t === "__proto__" ? Object.defineProperty(e, t, {
|
|
1682
1698
|
configurable: !0,
|
|
1683
1699
|
enumerable: !0,
|
|
@@ -1685,13 +1701,13 @@ function In(e, t, n) {
|
|
|
1685
1701
|
value: n
|
|
1686
1702
|
}) : e[t] = n;
|
|
1687
1703
|
}
|
|
1688
|
-
var
|
|
1704
|
+
var Tn = new Array(256), En = new Array(256);
|
|
1689
1705
|
for (var ke = 0; ke < 256; ke++)
|
|
1690
|
-
|
|
1691
|
-
function
|
|
1706
|
+
Tn[ke] = St(ke) ? 1 : 0, En[ke] = St(ke);
|
|
1707
|
+
function $a(e, t) {
|
|
1692
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 = [];
|
|
1693
1709
|
}
|
|
1694
|
-
function
|
|
1710
|
+
function In(e, t) {
|
|
1695
1711
|
var n = {
|
|
1696
1712
|
name: e.filename,
|
|
1697
1713
|
buffer: e.input.slice(0, -1),
|
|
@@ -1700,26 +1716,26 @@ function On(e, t) {
|
|
|
1700
1716
|
line: e.line,
|
|
1701
1717
|
column: e.position - e.lineStart
|
|
1702
1718
|
};
|
|
1703
|
-
return n.snippet =
|
|
1719
|
+
return n.snippet = Fr(n), new oe(t, n);
|
|
1704
1720
|
}
|
|
1705
|
-
function
|
|
1706
|
-
throw
|
|
1721
|
+
function F(e, t) {
|
|
1722
|
+
throw In(e, t);
|
|
1707
1723
|
}
|
|
1708
|
-
function
|
|
1709
|
-
e.onWarning && e.onWarning.call(null,
|
|
1724
|
+
function Ne(e, t) {
|
|
1725
|
+
e.onWarning && e.onWarning.call(null, In(e, t));
|
|
1710
1726
|
}
|
|
1711
1727
|
var $t = {
|
|
1712
1728
|
YAML: function(t, n, i) {
|
|
1713
1729
|
var r, o, a;
|
|
1714
|
-
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");
|
|
1715
1731
|
},
|
|
1716
1732
|
TAG: function(t, n, i) {
|
|
1717
1733
|
var r, o;
|
|
1718
|
-
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");
|
|
1719
1735
|
try {
|
|
1720
1736
|
o = decodeURIComponent(o);
|
|
1721
1737
|
} catch {
|
|
1722
|
-
|
|
1738
|
+
F(t, "tag prefix is malformed: " + o);
|
|
1723
1739
|
}
|
|
1724
1740
|
t.tagMap[r] = o;
|
|
1725
1741
|
}
|
|
@@ -1729,21 +1745,21 @@ function ge(e, t, n, i) {
|
|
|
1729
1745
|
if (t < n) {
|
|
1730
1746
|
if (s = e.input.slice(t, n), i)
|
|
1731
1747
|
for (r = 0, o = s.length; r < o; r += 1)
|
|
1732
|
-
a = s.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1733
|
-
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");
|
|
1734
1750
|
e.result += s;
|
|
1735
1751
|
}
|
|
1736
1752
|
}
|
|
1737
1753
|
function Tt(e, t, n, i) {
|
|
1738
1754
|
var r, o, a, s;
|
|
1739
|
-
for (ee.isObject(n) ||
|
|
1740
|
-
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);
|
|
1741
1757
|
}
|
|
1742
1758
|
function we(e, t, n, i, r, o, a, s, l) {
|
|
1743
1759
|
var c, d;
|
|
1744
1760
|
if (Array.isArray(r))
|
|
1745
1761
|
for (r = Array.prototype.slice.call(r), c = 0, d = r.length; c < d; c += 1)
|
|
1746
|
-
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]");
|
|
1747
1763
|
if (typeof r == "object" && wt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1748
1764
|
if (Array.isArray(o))
|
|
1749
1765
|
for (c = 0, d = o.length; c < d; c += 1)
|
|
@@ -1751,12 +1767,12 @@ function we(e, t, n, i, r, o, a, s, l) {
|
|
|
1751
1767
|
else
|
|
1752
1768
|
Tt(e, t, o, n);
|
|
1753
1769
|
else
|
|
1754
|
-
!e.json && !
|
|
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];
|
|
1755
1771
|
return t;
|
|
1756
1772
|
}
|
|
1757
1773
|
function lt(e) {
|
|
1758
1774
|
var t;
|
|
1759
|
-
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;
|
|
1760
1776
|
}
|
|
1761
1777
|
function Z(e, t, n) {
|
|
1762
1778
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
@@ -1772,9 +1788,9 @@ function Z(e, t, n) {
|
|
|
1772
1788
|
else
|
|
1773
1789
|
break;
|
|
1774
1790
|
}
|
|
1775
|
-
return n !== -1 && i !== 0 && e.lineIndent < n &&
|
|
1791
|
+
return n !== -1 && i !== 0 && e.lineIndent < n && Ne(e, "deficient indentation"), i;
|
|
1776
1792
|
}
|
|
1777
|
-
function
|
|
1793
|
+
function He(e) {
|
|
1778
1794
|
var t = e.position, n;
|
|
1779
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)));
|
|
1780
1796
|
}
|
|
@@ -1782,7 +1798,7 @@ function st(e, t) {
|
|
|
1782
1798
|
t === 1 ? e.result += " " : t > 1 && (e.result += ee.repeat(`
|
|
1783
1799
|
`, t - 1));
|
|
1784
1800
|
}
|
|
1785
|
-
function
|
|
1801
|
+
function Ta(e, t, n) {
|
|
1786
1802
|
var i, r, o, a, s, l, c, d, u = e.kind, p = e.result, g;
|
|
1787
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)))
|
|
1788
1804
|
return !1;
|
|
@@ -1794,7 +1810,7 @@ function wa(e, t, n) {
|
|
|
1794
1810
|
if (i = e.input.charCodeAt(e.position - 1), le(i))
|
|
1795
1811
|
break;
|
|
1796
1812
|
} else {
|
|
1797
|
-
if (e.position === e.lineStart &&
|
|
1813
|
+
if (e.position === e.lineStart && He(e) || n && _e(g))
|
|
1798
1814
|
break;
|
|
1799
1815
|
if (de(g))
|
|
1800
1816
|
if (l = e.line, c = e.lineStart, d = e.lineIndent, Z(e, !1, -1), e.lineIndent >= t) {
|
|
@@ -1809,7 +1825,7 @@ function wa(e, t, n) {
|
|
|
1809
1825
|
}
|
|
1810
1826
|
return ge(e, o, a, !1), e.result ? !0 : (e.kind = u, e.result = p, !1);
|
|
1811
1827
|
}
|
|
1812
|
-
function
|
|
1828
|
+
function Ea(e, t) {
|
|
1813
1829
|
var n, i, r;
|
|
1814
1830
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1815
1831
|
return !1;
|
|
@@ -1819,10 +1835,10 @@ function Sa(e, t) {
|
|
|
1819
1835
|
i = e.position, e.position++, r = e.position;
|
|
1820
1836
|
else
|
|
1821
1837
|
return !0;
|
|
1822
|
-
else de(n) ? (ge(e, i, r, !0), st(e, Z(e, !1, t)), i = r = e.position) : e.position === e.lineStart &&
|
|
1823
|
-
|
|
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");
|
|
1824
1840
|
}
|
|
1825
|
-
function
|
|
1841
|
+
function Ia(e, t) {
|
|
1826
1842
|
var n, i, r, o, a, s;
|
|
1827
1843
|
if (s = e.input.charCodeAt(e.position), s !== 34)
|
|
1828
1844
|
return !1;
|
|
@@ -1832,21 +1848,21 @@ function $a(e, t) {
|
|
|
1832
1848
|
if (s === 92) {
|
|
1833
1849
|
if (ge(e, n, e.position, !0), s = e.input.charCodeAt(++e.position), de(s))
|
|
1834
1850
|
Z(e, !1, t);
|
|
1835
|
-
else if (s < 256 &&
|
|
1836
|
-
e.result +=
|
|
1837
|
-
else if ((a =
|
|
1851
|
+
else if (s < 256 && Tn[s])
|
|
1852
|
+
e.result += En[s], e.position++;
|
|
1853
|
+
else if ((a = _a(s)) > 0) {
|
|
1838
1854
|
for (r = a, o = 0; r > 0; r--)
|
|
1839
|
-
s = e.input.charCodeAt(++e.position), (a =
|
|
1840
|
-
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++;
|
|
1841
1857
|
} else
|
|
1842
|
-
|
|
1858
|
+
F(e, "unknown escape sequence");
|
|
1843
1859
|
n = i = e.position;
|
|
1844
|
-
} 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);
|
|
1845
1861
|
}
|
|
1846
|
-
|
|
1862
|
+
F(e, "unexpected end of the stream within a double quoted scalar");
|
|
1847
1863
|
}
|
|
1848
|
-
function
|
|
1849
|
-
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;
|
|
1850
1866
|
if (C = e.input.charCodeAt(e.position), C === 91)
|
|
1851
1867
|
d = 93, g = !1, s = [];
|
|
1852
1868
|
else if (C === 123)
|
|
@@ -1856,12 +1872,12 @@ function Ta(e, t) {
|
|
|
1856
1872
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = s), C = e.input.charCodeAt(++e.position); C !== 0; ) {
|
|
1857
1873
|
if (Z(e, !0, t), C = e.input.charCodeAt(e.position), C === d)
|
|
1858
1874
|
return e.position++, e.tag = a, e.anchor = l, e.kind = g ? "mapping" : "sequence", e.result = s, !0;
|
|
1859
|
-
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;
|
|
1860
1876
|
}
|
|
1861
|
-
|
|
1877
|
+
F(e, "unexpected end of the stream within a flow collection");
|
|
1862
1878
|
}
|
|
1863
|
-
function
|
|
1864
|
-
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;
|
|
1865
1881
|
if (u = e.input.charCodeAt(e.position), u === 124)
|
|
1866
1882
|
i = !1;
|
|
1867
1883
|
else if (u === 62)
|
|
@@ -1870,9 +1886,9 @@ function Ia(e, t) {
|
|
|
1870
1886
|
return !1;
|
|
1871
1887
|
for (e.kind = "scalar", e.result = ""; u !== 0; )
|
|
1872
1888
|
if (u = e.input.charCodeAt(++e.position), u === 43 || u === 45)
|
|
1873
|
-
|
|
1874
|
-
else if ((d =
|
|
1875
|
-
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);
|
|
1876
1892
|
else
|
|
1877
1893
|
break;
|
|
1878
1894
|
if (ve(u)) {
|
|
@@ -1893,7 +1909,7 @@ function Ia(e, t) {
|
|
|
1893
1909
|
}
|
|
1894
1910
|
if (e.lineIndent < s) {
|
|
1895
1911
|
r === _t ? e.result += ee.repeat(`
|
|
1896
|
-
`, o ? 1 + l : l) : r ===
|
|
1912
|
+
`, o ? 1 + l : l) : r === Je && o && (e.result += `
|
|
1897
1913
|
`);
|
|
1898
1914
|
break;
|
|
1899
1915
|
}
|
|
@@ -1907,118 +1923,118 @@ function Ia(e, t) {
|
|
|
1907
1923
|
}
|
|
1908
1924
|
return !0;
|
|
1909
1925
|
}
|
|
1910
|
-
function
|
|
1926
|
+
function Et(e, t) {
|
|
1911
1927
|
var n, i = e.tag, r = e.anchor, o = [], a, s = !1, l;
|
|
1912
1928
|
if (e.firstTabInLine !== -1) return !1;
|
|
1913
|
-
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)))); ) {
|
|
1914
1930
|
if (s = !0, e.position++, Z(e, !0, -1) && e.lineIndent <= t) {
|
|
1915
1931
|
o.push(null), l = e.input.charCodeAt(e.position);
|
|
1916
1932
|
continue;
|
|
1917
1933
|
}
|
|
1918
|
-
if (n = e.line, $e(e, t,
|
|
1919
|
-
|
|
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");
|
|
1920
1936
|
else if (e.lineIndent < t)
|
|
1921
1937
|
break;
|
|
1922
1938
|
}
|
|
1923
1939
|
return s ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1924
1940
|
}
|
|
1925
|
-
function
|
|
1926
|
-
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;
|
|
1927
1943
|
if (e.firstTabInLine !== -1) return !1;
|
|
1928
1944
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = u), C = e.input.charCodeAt(e.position); C !== 0; ) {
|
|
1929
|
-
if (!
|
|
1930
|
-
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;
|
|
1931
1947
|
else {
|
|
1932
|
-
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))
|
|
1933
1949
|
break;
|
|
1934
1950
|
if (e.line === o) {
|
|
1935
1951
|
for (C = e.input.charCodeAt(e.position); ve(C); )
|
|
1936
1952
|
C = e.input.charCodeAt(++e.position);
|
|
1937
1953
|
if (C === 58)
|
|
1938
|
-
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;
|
|
1939
1955
|
else if (k)
|
|
1940
|
-
|
|
1956
|
+
F(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1941
1957
|
else
|
|
1942
1958
|
return e.tag = c, e.anchor = d, !0;
|
|
1943
1959
|
} else if (k)
|
|
1944
|
-
|
|
1960
|
+
F(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1945
1961
|
else
|
|
1946
1962
|
return e.tag = c, e.anchor = d, !0;
|
|
1947
1963
|
}
|
|
1948
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1949
|
-
|
|
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");
|
|
1950
1966
|
else if (e.lineIndent < t)
|
|
1951
1967
|
break;
|
|
1952
1968
|
}
|
|
1953
|
-
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;
|
|
1954
1970
|
}
|
|
1955
|
-
function
|
|
1971
|
+
function Ba(e) {
|
|
1956
1972
|
var t, n = !1, i = !1, r, o, a;
|
|
1957
1973
|
if (a = e.input.charCodeAt(e.position), a !== 33) return !1;
|
|
1958
|
-
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) {
|
|
1959
1975
|
do
|
|
1960
1976
|
a = e.input.charCodeAt(++e.position);
|
|
1961
1977
|
while (a !== 0 && a !== 62);
|
|
1962
|
-
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");
|
|
1963
1979
|
} else {
|
|
1964
1980
|
for (; a !== 0 && !le(a); )
|
|
1965
|
-
a === 33 && (i ?
|
|
1966
|
-
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");
|
|
1967
1983
|
}
|
|
1968
|
-
o && !
|
|
1984
|
+
o && !Sn.test(o) && F(e, "tag name cannot contain such characters: " + o);
|
|
1969
1985
|
try {
|
|
1970
1986
|
o = decodeURIComponent(o);
|
|
1971
1987
|
} catch {
|
|
1972
|
-
|
|
1988
|
+
F(e, "tag name is malformed: " + o);
|
|
1973
1989
|
}
|
|
1974
|
-
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;
|
|
1975
1991
|
}
|
|
1976
|
-
function
|
|
1992
|
+
function Ra(e) {
|
|
1977
1993
|
var t, n;
|
|
1978
1994
|
if (n = e.input.charCodeAt(e.position), n !== 38) return !1;
|
|
1979
|
-
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); )
|
|
1980
1996
|
n = e.input.charCodeAt(++e.position);
|
|
1981
|
-
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;
|
|
1982
1998
|
}
|
|
1983
|
-
function
|
|
1999
|
+
function Ka(e) {
|
|
1984
2000
|
var t, n, i;
|
|
1985
2001
|
if (i = e.input.charCodeAt(e.position), i !== 42) return !1;
|
|
1986
2002
|
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !le(i) && !_e(i); )
|
|
1987
2003
|
i = e.input.charCodeAt(++e.position);
|
|
1988
|
-
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;
|
|
1989
2005
|
}
|
|
1990
2006
|
function $e(e, t, n, i, r) {
|
|
1991
|
-
var o, a, s, l = 1, c = !1, d = !1, u, p, g,
|
|
1992
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = s =
|
|
1993
|
-
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); )
|
|
1994
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;
|
|
1995
|
-
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)
|
|
1996
2012
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1997
2013
|
else if (e.tag === "?") {
|
|
1998
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1999
|
-
if (
|
|
2000
|
-
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);
|
|
2001
2017
|
break;
|
|
2002
2018
|
}
|
|
2003
2019
|
} else if (e.tag !== "!") {
|
|
2004
|
-
if (
|
|
2005
|
-
|
|
2020
|
+
if (he.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
2021
|
+
y = e.typeMap[e.kind || "fallback"][e.tag];
|
|
2006
2022
|
else
|
|
2007
|
-
for (
|
|
2023
|
+
for (y = null, g = e.typeMap.multi[e.kind || "fallback"], u = 0, p = g.length; u < p; u += 1)
|
|
2008
2024
|
if (e.tag.slice(0, g[u].tag.length) === g[u].tag) {
|
|
2009
|
-
|
|
2025
|
+
y = g[u];
|
|
2010
2026
|
break;
|
|
2011
2027
|
}
|
|
2012
|
-
|
|
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");
|
|
2013
2029
|
}
|
|
2014
2030
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
2015
2031
|
}
|
|
2016
|
-
function
|
|
2032
|
+
function Na(e) {
|
|
2017
2033
|
var t = e.position, n, i, r, o = !1, a;
|
|
2018
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)); ) {
|
|
2019
2035
|
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !le(a); )
|
|
2020
2036
|
a = e.input.charCodeAt(++e.position);
|
|
2021
|
-
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; ) {
|
|
2022
2038
|
for (; ve(a); )
|
|
2023
2039
|
a = e.input.charCodeAt(++e.position);
|
|
2024
2040
|
if (a === 35) {
|
|
@@ -2032,47 +2048,47 @@ function Ba(e) {
|
|
|
2032
2048
|
a = e.input.charCodeAt(++e.position);
|
|
2033
2049
|
r.push(e.input.slice(n, e.position));
|
|
2034
2050
|
}
|
|
2035
|
-
a !== 0 && lt(e),
|
|
2051
|
+
a !== 0 && lt(e), he.call($t, i) ? $t[i](e, i, r) : Ne(e, 'unknown document directive "' + i + '"');
|
|
2036
2052
|
}
|
|
2037
|
-
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)) {
|
|
2038
2054
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Z(e, !0, -1));
|
|
2039
2055
|
return;
|
|
2040
2056
|
}
|
|
2041
2057
|
if (e.position < e.length - 1)
|
|
2042
|
-
|
|
2058
|
+
F(e, "end of the stream or a document separator is expected");
|
|
2043
2059
|
else
|
|
2044
2060
|
return;
|
|
2045
2061
|
}
|
|
2046
|
-
function
|
|
2062
|
+
function Fn(e, t) {
|
|
2047
2063
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2048
2064
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2049
|
-
var n = new
|
|
2050
|
-
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; )
|
|
2051
2067
|
n.lineIndent += 1, n.position += 1;
|
|
2052
2068
|
for (; n.position < n.length - 1; )
|
|
2053
|
-
|
|
2069
|
+
Na(n);
|
|
2054
2070
|
return n.documents;
|
|
2055
2071
|
}
|
|
2056
|
-
function
|
|
2072
|
+
function Ma(e, t, n) {
|
|
2057
2073
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
2058
|
-
var i =
|
|
2074
|
+
var i = Fn(e, n);
|
|
2059
2075
|
if (typeof t != "function")
|
|
2060
2076
|
return i;
|
|
2061
2077
|
for (var r = 0, o = i.length; r < o; r += 1)
|
|
2062
2078
|
t(i[r]);
|
|
2063
2079
|
}
|
|
2064
|
-
function
|
|
2065
|
-
var n =
|
|
2080
|
+
function ja(e, t) {
|
|
2081
|
+
var n = Fn(e, t);
|
|
2066
2082
|
if (n.length !== 0) {
|
|
2067
2083
|
if (n.length === 1)
|
|
2068
2084
|
return n[0];
|
|
2069
2085
|
throw new oe("expected a single document in the stream, but found more");
|
|
2070
2086
|
}
|
|
2071
2087
|
}
|
|
2072
|
-
var
|
|
2073
|
-
loadAll:
|
|
2074
|
-
load:
|
|
2075
|
-
},
|
|
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 = {};
|
|
2076
2092
|
re[0] = "\\0";
|
|
2077
2093
|
re[7] = "\\a";
|
|
2078
2094
|
re[8] = "\\b";
|
|
@@ -2088,7 +2104,7 @@ re[133] = "\\N";
|
|
|
2088
2104
|
re[160] = "\\_";
|
|
2089
2105
|
re[8232] = "\\L";
|
|
2090
2106
|
re[8233] = "\\P";
|
|
2091
|
-
var
|
|
2107
|
+
var ro = [
|
|
2092
2108
|
"y",
|
|
2093
2109
|
"Y",
|
|
2094
2110
|
"yes",
|
|
@@ -2105,15 +2121,15 @@ var to = [
|
|
|
2105
2121
|
"off",
|
|
2106
2122
|
"Off",
|
|
2107
2123
|
"OFF"
|
|
2108
|
-
],
|
|
2109
|
-
function
|
|
2124
|
+
], ao = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2125
|
+
function oo(e, t) {
|
|
2110
2126
|
var n, i, r, o, a, s, l;
|
|
2111
2127
|
if (t === null) return {};
|
|
2112
2128
|
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
2113
|
-
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;
|
|
2114
2130
|
return n;
|
|
2115
2131
|
}
|
|
2116
|
-
function
|
|
2132
|
+
function lo(e) {
|
|
2117
2133
|
var t, n, i;
|
|
2118
2134
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
2119
2135
|
n = "x", i = 2;
|
|
@@ -2125,94 +2141,94 @@ function ro(e) {
|
|
|
2125
2141
|
throw new oe("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2126
2142
|
return "\\" + n + ee.repeat("0", i - t.length) + t;
|
|
2127
2143
|
}
|
|
2128
|
-
var
|
|
2129
|
-
function
|
|
2130
|
-
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;
|
|
2131
2147
|
}
|
|
2132
|
-
function
|
|
2148
|
+
function It(e, t) {
|
|
2133
2149
|
for (var n = ee.repeat(" ", t), i = 0, r = -1, o = "", a, s = e.length; i < s; )
|
|
2134
2150
|
r = e.indexOf(`
|
|
2135
2151
|
`, i), r === -1 ? (a = e.slice(i), i = s) : (a = e.slice(i, r + 1), i = r + 1), a.length && a !== `
|
|
2136
2152
|
` && (o += n), o += a;
|
|
2137
2153
|
return o;
|
|
2138
2154
|
}
|
|
2139
|
-
function
|
|
2155
|
+
function Xe(e, t) {
|
|
2140
2156
|
return `
|
|
2141
2157
|
` + ee.repeat(" ", e.indent * t);
|
|
2142
2158
|
}
|
|
2143
|
-
function
|
|
2159
|
+
function uo(e, t) {
|
|
2144
2160
|
var n, i, r;
|
|
2145
2161
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
2146
2162
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
2147
2163
|
return !0;
|
|
2148
2164
|
return !1;
|
|
2149
2165
|
}
|
|
2150
|
-
function
|
|
2151
|
-
return e ===
|
|
2166
|
+
function je(e) {
|
|
2167
|
+
return e === Ha || e === Ua;
|
|
2152
2168
|
}
|
|
2153
|
-
function
|
|
2169
|
+
function Le(e) {
|
|
2154
2170
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== ct || 65536 <= e && e <= 1114111;
|
|
2155
2171
|
}
|
|
2156
2172
|
function Ft(e) {
|
|
2157
|
-
return
|
|
2173
|
+
return Le(e) && e !== ct && e !== qa && e !== Fe;
|
|
2158
2174
|
}
|
|
2159
2175
|
function Ot(e, t, n) {
|
|
2160
|
-
var i = Ft(e), r = i && !
|
|
2176
|
+
var i = Ft(e), r = i && !je(e);
|
|
2161
2177
|
return (
|
|
2162
2178
|
// ns-plain-safe
|
|
2163
2179
|
(n ? (
|
|
2164
2180
|
// c = flow-in
|
|
2165
2181
|
i
|
|
2166
|
-
) : 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
|
|
2167
2183
|
);
|
|
2168
2184
|
}
|
|
2169
|
-
function
|
|
2170
|
-
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;
|
|
2171
2187
|
}
|
|
2172
|
-
function
|
|
2173
|
-
return !
|
|
2188
|
+
function po(e) {
|
|
2189
|
+
return !je(e) && e !== Me;
|
|
2174
2190
|
}
|
|
2175
2191
|
function Te(e, t) {
|
|
2176
2192
|
var n = e.charCodeAt(t), i;
|
|
2177
2193
|
return n >= 55296 && n <= 56319 && t + 1 < e.length && (i = e.charCodeAt(t + 1), i >= 56320 && i <= 57343) ? (n - 55296) * 1024 + i - 56320 + 65536 : n;
|
|
2178
2194
|
}
|
|
2179
|
-
function
|
|
2195
|
+
function Pn(e) {
|
|
2180
2196
|
var t = /^\n* /;
|
|
2181
2197
|
return t.test(e);
|
|
2182
2198
|
}
|
|
2183
|
-
var
|
|
2184
|
-
function
|
|
2185
|
-
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));
|
|
2186
2202
|
if (t || a)
|
|
2187
2203
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2188
|
-
if (c = Te(e, l), !
|
|
2204
|
+
if (c = Te(e, l), !Le(c))
|
|
2189
2205
|
return Ae;
|
|
2190
2206
|
x = x && Ot(c, d, s), d = c;
|
|
2191
2207
|
}
|
|
2192
2208
|
else {
|
|
2193
2209
|
for (l = 0; l < e.length; c >= 65536 ? l += 2 : l++) {
|
|
2194
|
-
if (c = Te(e, l), c ===
|
|
2210
|
+
if (c = Te(e, l), c === Fe)
|
|
2195
2211
|
u = !0, g && (p = p || // Foldable line = too long, and not more-indented.
|
|
2196
|
-
l -
|
|
2197
|
-
else if (!
|
|
2212
|
+
l - y - 1 > i && e[y + 1] !== " ", y = l);
|
|
2213
|
+
else if (!Le(c))
|
|
2198
2214
|
return Ae;
|
|
2199
2215
|
x = x && Ot(c, d, s), d = c;
|
|
2200
2216
|
}
|
|
2201
|
-
p = p || g && l -
|
|
2217
|
+
p = p || g && l - y - 1 > i && e[y + 1] !== " ";
|
|
2202
2218
|
}
|
|
2203
|
-
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;
|
|
2204
2220
|
}
|
|
2205
|
-
function
|
|
2221
|
+
function yo(e, t, n, i, r) {
|
|
2206
2222
|
e.dump = function() {
|
|
2207
2223
|
if (t.length === 0)
|
|
2208
|
-
return e.quotingType ===
|
|
2209
|
-
if (!e.noCompatMode && (
|
|
2210
|
-
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 + "'";
|
|
2211
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;
|
|
2212
2228
|
function l(c) {
|
|
2213
|
-
return
|
|
2229
|
+
return uo(e, c);
|
|
2214
2230
|
}
|
|
2215
|
-
switch (
|
|
2231
|
+
switch (mo(
|
|
2216
2232
|
t,
|
|
2217
2233
|
s,
|
|
2218
2234
|
e.indent,
|
|
@@ -2222,23 +2238,23 @@ function fo(e, t, n, i, r) {
|
|
|
2222
2238
|
e.forceQuotes && !i,
|
|
2223
2239
|
r
|
|
2224
2240
|
)) {
|
|
2225
|
-
case
|
|
2241
|
+
case Dn:
|
|
2226
2242
|
return t;
|
|
2227
|
-
case
|
|
2243
|
+
case et:
|
|
2228
2244
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
2229
|
-
case
|
|
2230
|
-
return "|" + Lt(t, e.indent) + Bt(
|
|
2231
|
-
case
|
|
2232
|
-
return ">" + Lt(t, e.indent) + Bt(
|
|
2245
|
+
case Un:
|
|
2246
|
+
return "|" + Lt(t, e.indent) + Bt(It(t, o));
|
|
2247
|
+
case qn:
|
|
2248
|
+
return ">" + Lt(t, e.indent) + Bt(It(go(t, a), o));
|
|
2233
2249
|
case Ae:
|
|
2234
|
-
return '"' +
|
|
2250
|
+
return '"' + ho(t) + '"';
|
|
2235
2251
|
default:
|
|
2236
2252
|
throw new oe("impossible error: invalid scalar style");
|
|
2237
2253
|
}
|
|
2238
2254
|
}();
|
|
2239
2255
|
}
|
|
2240
2256
|
function Lt(e, t) {
|
|
2241
|
-
var n =
|
|
2257
|
+
var n = Pn(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
2242
2258
|
`, r = i && (e[e.length - 2] === `
|
|
2243
2259
|
` || e === `
|
|
2244
2260
|
`), o = r ? "+" : i ? "" : "-";
|
|
@@ -2249,7 +2265,7 @@ function Bt(e) {
|
|
|
2249
2265
|
return e[e.length - 1] === `
|
|
2250
2266
|
` ? e.slice(0, -1) : e;
|
|
2251
2267
|
}
|
|
2252
|
-
function
|
|
2268
|
+
function go(e, t) {
|
|
2253
2269
|
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
2254
2270
|
var c = e.indexOf(`
|
|
2255
2271
|
`);
|
|
@@ -2271,12 +2287,12 @@ function Rt(e, t) {
|
|
|
2271
2287
|
`, e.length - r > t && a > r ? l += e.slice(r, a) + `
|
|
2272
2288
|
` + e.slice(a + 1) : l += e.slice(r), l.slice(1);
|
|
2273
2289
|
}
|
|
2274
|
-
function
|
|
2290
|
+
function ho(e) {
|
|
2275
2291
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
2276
|
-
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);
|
|
2277
2293
|
return t;
|
|
2278
2294
|
}
|
|
2279
|
-
function
|
|
2295
|
+
function vo(e, t, n) {
|
|
2280
2296
|
var i = "", r = e.tag, o, a, s;
|
|
2281
2297
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
2282
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);
|
|
@@ -2285,16 +2301,16 @@ function ho(e, t, n) {
|
|
|
2285
2301
|
function Kt(e, t, n, i) {
|
|
2286
2302
|
var r = "", o = e.tag, a, s, l;
|
|
2287
2303
|
for (a = 0, s = n.length; a < s; a += 1)
|
|
2288
|
-
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);
|
|
2289
2305
|
e.tag = o, e.dump = r || "[]";
|
|
2290
2306
|
}
|
|
2291
|
-
function
|
|
2307
|
+
function bo(e, t, n) {
|
|
2292
2308
|
var i = "", r = e.tag, o = Object.keys(n), a, s, l, c, d;
|
|
2293
2309
|
for (a = 0, s = o.length; a < s; a += 1)
|
|
2294
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));
|
|
2295
2311
|
e.tag = r, e.dump = "{" + i + "}";
|
|
2296
2312
|
}
|
|
2297
|
-
function
|
|
2313
|
+
function xo(e, t, n, i) {
|
|
2298
2314
|
var r = "", o = e.tag, a = Object.keys(n), s, l, c, d, u, p;
|
|
2299
2315
|
if (e.sortKeys === !0)
|
|
2300
2316
|
a.sort();
|
|
@@ -2303,7 +2319,7 @@ function yo(e, t, n, i) {
|
|
|
2303
2319
|
else if (e.sortKeys)
|
|
2304
2320
|
throw new oe("sortKeys must be a boolean or a function");
|
|
2305
2321
|
for (s = 0, l = a.length; s < l; s += 1)
|
|
2306
|
-
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));
|
|
2307
2323
|
e.tag = o, e.dump = r || "{}";
|
|
2308
2324
|
}
|
|
2309
2325
|
function Nt(e, t, n) {
|
|
@@ -2311,9 +2327,9 @@ function Nt(e, t, n) {
|
|
|
2311
2327
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
2312
2328
|
if (s = r[o], (s.instanceOf || s.predicate) && (!s.instanceOf || typeof t == "object" && t instanceof s.instanceOf) && (!s.predicate || s.predicate(t))) {
|
|
2313
2329
|
if (n ? s.multi && s.representName ? e.tag = s.representName(t) : e.tag = s.tag : e.tag = "?", s.represent) {
|
|
2314
|
-
if (l = e.styleMap[s.tag] || s.defaultStyle,
|
|
2330
|
+
if (l = e.styleMap[s.tag] || s.defaultStyle, Ln.call(s.represent) === "[object Function]")
|
|
2315
2331
|
i = s.represent(t, l);
|
|
2316
|
-
else if (
|
|
2332
|
+
else if (Bn.call(s.represent, l))
|
|
2317
2333
|
i = s.represent[l](t, l);
|
|
2318
2334
|
else
|
|
2319
2335
|
throw new oe("!<" + s.tag + '> tag resolver accepts not "' + l + '" style');
|
|
@@ -2325,18 +2341,18 @@ function Nt(e, t, n) {
|
|
|
2325
2341
|
}
|
|
2326
2342
|
function pe(e, t, n, i, r, o, a) {
|
|
2327
2343
|
e.tag = null, e.dump = n, Nt(e, n, !1) || Nt(e, n, !0);
|
|
2328
|
-
var s =
|
|
2344
|
+
var s = Ln.call(e.dump), l = i, c;
|
|
2329
2345
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
2330
2346
|
var d = s === "[object Object]" || s === "[object Array]", u, p;
|
|
2331
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])
|
|
2332
2348
|
e.dump = "*ref_" + u;
|
|
2333
2349
|
else {
|
|
2334
2350
|
if (d && p && !e.usedDuplicates[u] && (e.usedDuplicates[u] = !0), s === "[object Object]")
|
|
2335
|
-
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));
|
|
2336
2352
|
else if (s === "[object Array]")
|
|
2337
|
-
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));
|
|
2338
2354
|
else if (s === "[object String]")
|
|
2339
|
-
e.tag !== "?" &&
|
|
2355
|
+
e.tag !== "?" && yo(e, e.dump, t, o, l);
|
|
2340
2356
|
else {
|
|
2341
2357
|
if (s === "[object Undefined]")
|
|
2342
2358
|
return !1;
|
|
@@ -2349,71 +2365,71 @@ function pe(e, t, n, i, r, o, a) {
|
|
|
2349
2365
|
}
|
|
2350
2366
|
return !0;
|
|
2351
2367
|
}
|
|
2352
|
-
function
|
|
2368
|
+
function Co(e, t) {
|
|
2353
2369
|
var n = [], i = [], r, o;
|
|
2354
|
-
for (
|
|
2370
|
+
for (tt(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
2355
2371
|
t.duplicates.push(n[i[r]]);
|
|
2356
2372
|
t.usedDuplicates = new Array(o);
|
|
2357
2373
|
}
|
|
2358
|
-
function
|
|
2374
|
+
function tt(e, t, n) {
|
|
2359
2375
|
var i, r, o;
|
|
2360
2376
|
if (e !== null && typeof e == "object")
|
|
2361
2377
|
if (r = t.indexOf(e), r !== -1)
|
|
2362
2378
|
n.indexOf(r) === -1 && n.push(r);
|
|
2363
2379
|
else if (t.push(e), Array.isArray(e))
|
|
2364
2380
|
for (r = 0, o = e.length; r < o; r += 1)
|
|
2365
|
-
|
|
2381
|
+
tt(e[r], t, n);
|
|
2366
2382
|
else
|
|
2367
2383
|
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
2368
|
-
|
|
2384
|
+
tt(e[i[r]], t, n);
|
|
2369
2385
|
}
|
|
2370
|
-
function
|
|
2386
|
+
function ko(e, t) {
|
|
2371
2387
|
t = t || {};
|
|
2372
|
-
var n = new
|
|
2373
|
-
n.noRefs ||
|
|
2388
|
+
var n = new co(t);
|
|
2389
|
+
n.noRefs || Co(e, n);
|
|
2374
2390
|
var i = e;
|
|
2375
2391
|
return n.replacer && (i = n.replacer.call({ "": i }, "", i)), pe(n, 0, i, !0, !0) ? n.dump + `
|
|
2376
2392
|
` : "";
|
|
2377
2393
|
}
|
|
2378
|
-
var
|
|
2379
|
-
dump:
|
|
2394
|
+
var Ao = ko, _o = {
|
|
2395
|
+
dump: Ao
|
|
2380
2396
|
};
|
|
2381
2397
|
function ut(e, t) {
|
|
2382
2398
|
return function() {
|
|
2383
2399
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2384
2400
|
};
|
|
2385
2401
|
}
|
|
2386
|
-
var
|
|
2387
|
-
binary:
|
|
2388
|
-
float:
|
|
2389
|
-
map:
|
|
2390
|
-
null:
|
|
2391
|
-
pairs:
|
|
2392
|
-
set:
|
|
2393
|
-
timestamp:
|
|
2394
|
-
bool:
|
|
2395
|
-
int:
|
|
2396
|
-
merge:
|
|
2397
|
-
omap:
|
|
2398
|
-
seq:
|
|
2399
|
-
str:
|
|
2400
|
-
},
|
|
2401
|
-
Type:
|
|
2402
|
-
Schema:
|
|
2403
|
-
FAILSAFE_SCHEMA:
|
|
2404
|
-
JSON_SCHEMA:
|
|
2405
|
-
CORE_SCHEMA:
|
|
2406
|
-
DEFAULT_SCHEMA:
|
|
2407
|
-
load:
|
|
2408
|
-
loadAll:
|
|
2409
|
-
dump:
|
|
2410
|
-
YAMLException:
|
|
2411
|
-
types:
|
|
2412
|
-
safeLoad:
|
|
2413
|
-
safeLoadAll:
|
|
2414
|
-
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
|
|
2415
2431
|
};
|
|
2416
|
-
const
|
|
2432
|
+
const jo = { class: "yaml-config config-card-code-block" }, Vn = /* @__PURE__ */ z({
|
|
2417
2433
|
__name: "YamlCodeBlock",
|
|
2418
2434
|
props: {
|
|
2419
2435
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2423,14 +2439,14 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2423
2439
|
}
|
|
2424
2440
|
},
|
|
2425
2441
|
setup(e) {
|
|
2426
|
-
const t = e, n =
|
|
2442
|
+
const t = e, n = $(() => {
|
|
2427
2443
|
const i = Object.fromEntries(Object.entries(t.entityRecord).filter(([, r]) => r !== null && r !== "" && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2428
|
-
return Object.keys(i).length === 0 && i.constructor === Object ? "" :
|
|
2444
|
+
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Hn.dump(i).trim();
|
|
2429
2445
|
});
|
|
2430
2446
|
return (i, r) => {
|
|
2431
|
-
const o =
|
|
2432
|
-
return m(), S("div",
|
|
2433
|
-
t.entityRecord ? (m(),
|
|
2447
|
+
const o = D("KCodeBlock");
|
|
2448
|
+
return m(), S("div", jo, [
|
|
2449
|
+
t.entityRecord ? (m(), j(o, {
|
|
2434
2450
|
key: 0,
|
|
2435
2451
|
id: "yaml-codeblock",
|
|
2436
2452
|
code: n.value,
|
|
@@ -2440,7 +2456,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2440
2456
|
]);
|
|
2441
2457
|
};
|
|
2442
2458
|
}
|
|
2443
|
-
}),
|
|
2459
|
+
}), Po = { class: "terraform-config config-card-code-block" }, ie = " ", Yn = /* @__PURE__ */ z({
|
|
2444
2460
|
__name: "TerraformCodeBlock",
|
|
2445
2461
|
props: {
|
|
2446
2462
|
/** A record to indicate the entity's configuration, used to populate the Terraform code block */
|
|
@@ -2451,7 +2467,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2451
2467
|
entityType: {
|
|
2452
2468
|
type: String,
|
|
2453
2469
|
required: !0,
|
|
2454
|
-
validator: (e) =>
|
|
2470
|
+
validator: (e) => Ue.includes(e)
|
|
2455
2471
|
},
|
|
2456
2472
|
credentialType: {
|
|
2457
2473
|
type: String,
|
|
@@ -2464,7 +2480,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2464
2480
|
}
|
|
2465
2481
|
},
|
|
2466
2482
|
setup(e) {
|
|
2467
|
-
const t = e, n =
|
|
2483
|
+
const t = e, n = $(() => pi.includes(t.entityType)), i = (l, c) => {
|
|
2468
2484
|
const d = ie;
|
|
2469
2485
|
let u = "";
|
|
2470
2486
|
return typeof l == "string" ? u += `${d}${c} = "${l}"
|
|
@@ -2479,11 +2495,11 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2479
2495
|
`), l === null)
|
|
2480
2496
|
return c ? p += `${u}}` : p = "{}", p;
|
|
2481
2497
|
const g = Object.fromEntries(Object.entries(l).filter(([, x]) => x !== null));
|
|
2482
|
-
let
|
|
2483
|
-
for (const [x,
|
|
2484
|
-
Array.isArray(
|
|
2485
|
-
`,
|
|
2486
|
-
`,
|
|
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}
|
|
2487
2503
|
`;
|
|
2488
2504
|
return c ? p += `${u}}
|
|
2489
2505
|
` : p;
|
|
@@ -2495,9 +2511,9 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2495
2511
|
c && (l.length === 0 ? p += `${u}${c} = [` : p += `${u}${c} = [
|
|
2496
2512
|
`);
|
|
2497
2513
|
for (let g = 0; g < l.length; g++) {
|
|
2498
|
-
const
|
|
2499
|
-
typeof
|
|
2500
|
-
`, 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 += `
|
|
2501
2517
|
`;
|
|
2502
2518
|
}
|
|
2503
2519
|
return c && (l.length === 0 ? p += `]
|
|
@@ -2508,21 +2524,21 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2508
2524
|
for (const [d, u] of Object.entries(l))
|
|
2509
2525
|
Array.isArray(u) ? c += o(u, d) : typeof u == "object" ? c += r(u, d) : c += i(u, d);
|
|
2510
2526
|
return c;
|
|
2511
|
-
}, s =
|
|
2512
|
-
var p, g,
|
|
2513
|
-
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;
|
|
2514
2530
|
if (c && (l.config = c), Object.keys(l).length === 0)
|
|
2515
2531
|
return "";
|
|
2516
2532
|
delete l.id;
|
|
2517
2533
|
let d = "", u = "";
|
|
2518
|
-
if ((g = l.service) != null && g.id ? (u = "service", delete l.service) : (
|
|
2519
|
-
const
|
|
2520
|
-
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("_", "")}" {
|
|
2521
2537
|
`, d += `${ie}provider = konnect-beta
|
|
2522
2538
|
`;
|
|
2523
2539
|
} else if (t.entityType === "plugin") {
|
|
2524
|
-
const
|
|
2525
|
-
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}" {
|
|
2526
2542
|
`;
|
|
2527
2543
|
} else
|
|
2528
2544
|
d += `resource "konnect_gateway_${t.entityType}" "my_${t.entityType}" {
|
|
@@ -2535,9 +2551,9 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2535
2551
|
`, d;
|
|
2536
2552
|
});
|
|
2537
2553
|
return (l, c) => {
|
|
2538
|
-
const d =
|
|
2539
|
-
return m(), S("div",
|
|
2540
|
-
t.entityRecord ? (m(),
|
|
2554
|
+
const d = D("KCodeBlock");
|
|
2555
|
+
return m(), S("div", Po, [
|
|
2556
|
+
t.entityRecord ? (m(), j(d, {
|
|
2541
2557
|
key: 0,
|
|
2542
2558
|
id: "terraform-codeblock",
|
|
2543
2559
|
code: s.value,
|
|
@@ -2547,13 +2563,58 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2547
2563
|
]);
|
|
2548
2564
|
};
|
|
2549
2565
|
}
|
|
2550
|
-
}),
|
|
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 = {
|
|
2551
2612
|
key: 0,
|
|
2552
2613
|
class: "config-card-display-form"
|
|
2553
|
-
},
|
|
2614
|
+
}, qo = ["data-testid"], Ho = {
|
|
2554
2615
|
key: 0,
|
|
2555
2616
|
class: "config-card-prop-section-title"
|
|
2556
|
-
},
|
|
2617
|
+
}, Vo = /* @__PURE__ */ z({
|
|
2557
2618
|
__name: "ConfigCardDisplay",
|
|
2558
2619
|
props: {
|
|
2559
2620
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2565,7 +2626,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2565
2626
|
entityType: {
|
|
2566
2627
|
type: String,
|
|
2567
2628
|
required: !0,
|
|
2568
|
-
validator: (e) =>
|
|
2629
|
+
validator: (e) => Ue.includes(e)
|
|
2569
2630
|
},
|
|
2570
2631
|
subEntityType: {
|
|
2571
2632
|
// only for event gateway entities
|
|
@@ -2610,32 +2671,32 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2610
2671
|
}
|
|
2611
2672
|
},
|
|
2612
2673
|
setup(e) {
|
|
2613
|
-
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 = $(() => {
|
|
2614
2675
|
if (!t.record)
|
|
2615
2676
|
return t.record;
|
|
2616
2677
|
let s = t.record;
|
|
2617
2678
|
t.codeBlockRecordFormatter && (s = t.codeBlockRecordFormatter(s, t.format));
|
|
2618
2679
|
const l = JSON.parse(JSON.stringify(s));
|
|
2619
2680
|
return delete l.created_at, delete l.updated_at, l;
|
|
2620
|
-
}), a =
|
|
2681
|
+
}), a = $(() => t.fetcherUrl.replace(/(\?|&)__ui_data=true/, ""));
|
|
2621
2682
|
return (s, l) => (m(), S(ue, null, [
|
|
2622
|
-
e.format === "structured" ? (m(), S("div",
|
|
2683
|
+
e.format === "structured" ? (m(), S("div", Uo, [
|
|
2623
2684
|
(m(!0), S(ue, null, ce(e.propListTypes, (c) => (m(), S("div", {
|
|
2624
2685
|
key: `config-card-details-${c}-props`,
|
|
2625
2686
|
class: fe(`config-card-details-${c}-props`),
|
|
2626
2687
|
"data-testid": `config-card-details-${c}-props`
|
|
2627
2688
|
}, [
|
|
2628
|
-
c !== "basic" ? (m(), S("div",
|
|
2629
|
-
(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}`, {
|
|
2630
2691
|
key: d.key,
|
|
2631
2692
|
item: d
|
|
2632
2693
|
}, () => [
|
|
2633
|
-
M(
|
|
2694
|
+
M(Xt, { item: d }, Se({
|
|
2634
2695
|
label: _(() => [
|
|
2635
|
-
|
|
2696
|
+
P(s.$slots, `${d.key}-label`, { row: d }, void 0, !0)
|
|
2636
2697
|
]),
|
|
2637
2698
|
[d.key]: _(({ rowValue: u }) => [
|
|
2638
|
-
|
|
2699
|
+
P(s.$slots, d.key, {
|
|
2639
2700
|
row: d,
|
|
2640
2701
|
rowValue: u
|
|
2641
2702
|
}, void 0, !0)
|
|
@@ -2645,37 +2706,44 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2645
2706
|
r(d) ? {
|
|
2646
2707
|
name: "label-tooltip",
|
|
2647
2708
|
fn: _(() => [
|
|
2648
|
-
|
|
2709
|
+
P(s.$slots, `${d.key}-label-tooltip`, { row: d }, void 0, !0)
|
|
2649
2710
|
]),
|
|
2650
2711
|
key: "0"
|
|
2651
2712
|
} : void 0
|
|
2652
2713
|
]), 1032, ["item"])
|
|
2653
2714
|
], !0)), 128))
|
|
2654
|
-
], 10,
|
|
2715
|
+
], 10, qo))), 128))
|
|
2655
2716
|
])) : N("", !0),
|
|
2656
|
-
e.format === "json" && o.value ? (m(),
|
|
2717
|
+
e.format === "json" && o.value ? (m(), j(en, {
|
|
2657
2718
|
key: 1,
|
|
2658
2719
|
config: t.config,
|
|
2659
2720
|
"entity-record": o.value,
|
|
2660
2721
|
"fetcher-url": a.value,
|
|
2661
2722
|
"request-method": "get"
|
|
2662
2723
|
}, null, 8, ["config", "entity-record", "fetcher-url"])) : N("", !0),
|
|
2663
|
-
e.format === "yaml" && o.value ? (m(),
|
|
2724
|
+
e.format === "yaml" && o.value ? (m(), j(Vn, {
|
|
2664
2725
|
key: 2,
|
|
2665
2726
|
"entity-record": o.value
|
|
2666
2727
|
}, null, 8, ["entity-record"])) : N("", !0),
|
|
2667
|
-
e.format === "terraform" && o.value ? (m(),
|
|
2728
|
+
e.format === "terraform" && o.value ? (m(), j(Yn, {
|
|
2668
2729
|
key: 3,
|
|
2669
2730
|
"entity-record": o.value,
|
|
2670
2731
|
"entity-type": t.entityType,
|
|
2671
2732
|
"sub-entity-type": t.subEntityType
|
|
2672
|
-
}, 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)
|
|
2673
2741
|
], 64));
|
|
2674
2742
|
}
|
|
2675
|
-
}),
|
|
2743
|
+
}), Yo = /* @__PURE__ */ se(Vo, [["__scopeId", "data-v-2104198c"]]), Wo = {
|
|
2676
2744
|
class: "config-card-title",
|
|
2677
2745
|
"data-testid": "config-card-title"
|
|
2678
|
-
},
|
|
2746
|
+
}, Jo = { class: "config-card-actions" }, Go = ["href"], zo = { class: "config-card-details-section" }, Qo = /* @__PURE__ */ z({
|
|
2679
2747
|
__name: "EntityBaseConfigCard",
|
|
2680
2748
|
props: {
|
|
2681
2749
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2696,7 +2764,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2696
2764
|
entityType: {
|
|
2697
2765
|
type: String,
|
|
2698
2766
|
required: !0,
|
|
2699
|
-
validator: (e) =>
|
|
2767
|
+
validator: (e) => Ue.includes(e)
|
|
2700
2768
|
},
|
|
2701
2769
|
/**
|
|
2702
2770
|
* Sub Entity type, required to generate terraform code for event gateway entities
|
|
@@ -2826,7 +2894,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2826
2894
|
};
|
|
2827
2895
|
be(d, (f) => {
|
|
2828
2896
|
i.config.formatPreferenceKey && p(i.config.formatPreferenceKey, f);
|
|
2829
|
-
}),
|
|
2897
|
+
}), nt(() => {
|
|
2830
2898
|
if (i.config.formatPreferenceKey) {
|
|
2831
2899
|
const f = localStorage.getItem(i.config.formatPreferenceKey);
|
|
2832
2900
|
f && l.some((v) => v.value === f) ? d.value = f : d.value = c, p(i.config.formatPreferenceKey, d.value);
|
|
@@ -2873,14 +2941,14 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2873
2941
|
// the last property displayed
|
|
2874
2942
|
section: ae.Basic
|
|
2875
2943
|
}
|
|
2876
|
-
},
|
|
2877
|
-
var b, H,
|
|
2944
|
+
}, y = K(!1), x = K(!1), h = K(""), k = K({}), C = $(() => {
|
|
2945
|
+
var b, H, J;
|
|
2878
2946
|
if (!k.value)
|
|
2879
2947
|
return [];
|
|
2880
2948
|
const f = [], v = Object.keys(k.value).length;
|
|
2881
2949
|
for (const I in k.value) {
|
|
2882
2950
|
if (I === "__ui_data") continue;
|
|
2883
|
-
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;
|
|
2884
2952
|
let U = v;
|
|
2885
2953
|
(G || G === 0) && (U = G === -1 ? v + 1 : G), B && (U = B === -1 ? v + 1 : B), f.push([I, U]);
|
|
2886
2954
|
}
|
|
@@ -2899,13 +2967,13 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2899
2967
|
section: U.section ?? ((Q == null ? void 0 : Q.section) || ae.Advanced)
|
|
2900
2968
|
};
|
|
2901
2969
|
}).filter((I) => !I.hidden && I.key !== i.pluginConfigKey);
|
|
2902
|
-
}),
|
|
2903
|
-
var H,
|
|
2970
|
+
}), E = $(() => {
|
|
2971
|
+
var H, J;
|
|
2904
2972
|
if (!k.value || !i.pluginConfigKey)
|
|
2905
2973
|
return [];
|
|
2906
2974
|
const f = k.value[i.pluginConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2907
2975
|
for (const I in f) {
|
|
2908
|
-
const B = (
|
|
2976
|
+
const B = (J = (H = i.pluginConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2909
2977
|
let U = G != null && G !== "" ? v - 1 : v;
|
|
2910
2978
|
B && (U = B === -1 ? v + 1 : B), b.push([I, U]);
|
|
2911
2979
|
}
|
|
@@ -2924,13 +2992,13 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2924
2992
|
section: ae.Plugin
|
|
2925
2993
|
};
|
|
2926
2994
|
}).filter((I) => !I.hidden);
|
|
2927
|
-
}),
|
|
2928
|
-
var H,
|
|
2995
|
+
}), Y = $(() => {
|
|
2996
|
+
var H, J;
|
|
2929
2997
|
if (!k.value || !i.policyConfigKey)
|
|
2930
2998
|
return [];
|
|
2931
2999
|
const f = k.value[i.policyConfigKey] || {}, v = Object.keys(f).length, b = [];
|
|
2932
3000
|
for (const I in f) {
|
|
2933
|
-
const B = (
|
|
3001
|
+
const B = (J = (H = i.policyConfigSchema) == null ? void 0 : H[I]) == null ? void 0 : J.order, G = f[I];
|
|
2934
3002
|
let U = G != null && G !== "" ? v - 1 : v;
|
|
2935
3003
|
B && (U = B === -1 ? v + 1 : B), b.push([I, U]);
|
|
2936
3004
|
}
|
|
@@ -2949,26 +3017,26 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2949
3017
|
section: ae.Policy
|
|
2950
3018
|
};
|
|
2951
3019
|
}).filter((I) => !I.hidden);
|
|
2952
|
-
}), X =
|
|
2953
|
-
var f, v, b, H,
|
|
3020
|
+
}), X = $(() => {
|
|
3021
|
+
var f, v, b, H, J, I;
|
|
2954
3022
|
return {
|
|
2955
3023
|
basic: (f = C.value) == null ? void 0 : f.filter((B) => B.section === ae.Basic),
|
|
2956
3024
|
advanced: (v = C.value) == null ? void 0 : v.filter((B) => B.section === ae.Advanced),
|
|
2957
|
-
plugin: (H =
|
|
2958
|
-
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))
|
|
2959
3027
|
};
|
|
2960
|
-
}), w =
|
|
3028
|
+
}), w = $(() => {
|
|
2961
3029
|
const f = [];
|
|
2962
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;
|
|
2963
|
-
}), A =
|
|
3031
|
+
}), A = $(() => {
|
|
2964
3032
|
var v, b;
|
|
2965
3033
|
let f = `${i.config.apiBaseUrl}${i.fetchUrl}`;
|
|
2966
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;
|
|
2967
3035
|
});
|
|
2968
|
-
return be(
|
|
3036
|
+
return be(y, (f) => {
|
|
2969
3037
|
n("loading", f);
|
|
2970
|
-
}, { immediate: !0 }),
|
|
2971
|
-
x.value = !1,
|
|
3038
|
+
}, { immediate: !0 }), it(async () => {
|
|
3039
|
+
x.value = !1, y.value = !0;
|
|
2972
3040
|
try {
|
|
2973
3041
|
const { data: f } = await s.get(A.value);
|
|
2974
3042
|
if (i.dataKey)
|
|
@@ -2982,19 +3050,19 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
2982
3050
|
}), n("fetch:success", f);
|
|
2983
3051
|
} catch (f) {
|
|
2984
3052
|
const v = o(f);
|
|
2985
|
-
|
|
3053
|
+
h.value = v.startsWith("code") ? r("baseConfigCard.errors.load") : v, x.value = !0, n("fetch:error", f);
|
|
2986
3054
|
} finally {
|
|
2987
|
-
|
|
3055
|
+
y.value = !1;
|
|
2988
3056
|
}
|
|
2989
3057
|
}), (f, v) => {
|
|
2990
|
-
const b =
|
|
2991
|
-
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, {
|
|
2992
3060
|
class: "kong-ui-entity-base-config-card",
|
|
2993
3061
|
"title-tag": e.titleTag
|
|
2994
3062
|
}, Se({
|
|
2995
3063
|
actions: _(() => [
|
|
2996
|
-
R("div",
|
|
2997
|
-
|
|
3064
|
+
R("div", Jo, [
|
|
3065
|
+
P(f.$slots, "actions", {}, void 0, !0),
|
|
2998
3066
|
M(b, {
|
|
2999
3067
|
class: "config-format-select-label",
|
|
3000
3068
|
"data-testid": "config-format-select-label"
|
|
@@ -3011,7 +3079,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3011
3079
|
items: l,
|
|
3012
3080
|
onChange: u
|
|
3013
3081
|
}, null, 8, ["modelValue"]),
|
|
3014
|
-
e.configCardDoc ? (m(),
|
|
3082
|
+
e.configCardDoc ? (m(), j(J, {
|
|
3015
3083
|
key: 0,
|
|
3016
3084
|
appearance: "tertiary",
|
|
3017
3085
|
class: "book-icon",
|
|
@@ -3023,31 +3091,31 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3023
3091
|
rel: "noopener",
|
|
3024
3092
|
target: "_blank"
|
|
3025
3093
|
}, [
|
|
3026
|
-
M(
|
|
3027
|
-
], 8,
|
|
3094
|
+
M(T(Vt), { size: T(rr) }, null, 8, ["size"])
|
|
3095
|
+
], 8, Go)
|
|
3028
3096
|
]),
|
|
3029
3097
|
_: 1
|
|
3030
3098
|
})) : N("", !0)
|
|
3031
3099
|
])
|
|
3032
3100
|
]),
|
|
3033
3101
|
default: _(() => [
|
|
3034
|
-
|
|
3102
|
+
y.value ? (m(), j(I, {
|
|
3035
3103
|
key: 0,
|
|
3036
3104
|
"data-testid": "config-card-loader",
|
|
3037
3105
|
"table-columns": 2,
|
|
3038
3106
|
type: "table"
|
|
3039
|
-
})) : x.value ? (m(),
|
|
3107
|
+
})) : x.value ? (m(), j(B, {
|
|
3040
3108
|
key: 1,
|
|
3041
3109
|
"data-testid": "config-card-fetch-error",
|
|
3042
3110
|
"icon-variant": "error"
|
|
3043
3111
|
}, {
|
|
3044
3112
|
default: _(() => [
|
|
3045
|
-
R("h3", null, L(
|
|
3113
|
+
R("h3", null, L(h.value), 1)
|
|
3046
3114
|
]),
|
|
3047
3115
|
_: 1
|
|
3048
3116
|
})) : N("", !0),
|
|
3049
|
-
R("div",
|
|
3050
|
-
M(
|
|
3117
|
+
R("div", zo, [
|
|
3118
|
+
M(Yo, {
|
|
3051
3119
|
"code-block-record-formatter": e.codeBlockRecordFormatter,
|
|
3052
3120
|
config: e.config,
|
|
3053
3121
|
"entity-type": e.entityType,
|
|
@@ -3061,7 +3129,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3061
3129
|
ce(Object.keys(f.$slots), (U) => ({
|
|
3062
3130
|
name: U,
|
|
3063
3131
|
fn: _((Q) => [
|
|
3064
|
-
|
|
3132
|
+
P(f.$slots, U, qt({ record: k.value }, Q), void 0, !0)
|
|
3065
3133
|
])
|
|
3066
3134
|
}))
|
|
3067
3135
|
]), 1032, ["code-block-record-formatter", "config", "entity-type", "fetcher-url", "format", "prop-list-types", "property-collections", "record", "sub-entity-type"])
|
|
@@ -3072,9 +3140,9 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3072
3140
|
e.hideTitle ? void 0 : {
|
|
3073
3141
|
name: "title",
|
|
3074
3142
|
fn: _(() => [
|
|
3075
|
-
R("span",
|
|
3076
|
-
|
|
3077
|
-
q(L(
|
|
3143
|
+
R("span", Wo, [
|
|
3144
|
+
P(f.$slots, "title", {}, () => [
|
|
3145
|
+
q(L(T(r)("baseConfigCard.title")), 1)
|
|
3078
3146
|
], !0)
|
|
3079
3147
|
])
|
|
3080
3148
|
]),
|
|
@@ -3083,7 +3151,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3083
3151
|
]), 1032, ["title-tag"]);
|
|
3084
3152
|
};
|
|
3085
3153
|
}
|
|
3086
|
-
}),
|
|
3154
|
+
}), hs = /* @__PURE__ */ se(Qo, [["__scopeId", "data-v-f2b42324"]]), Zo = ["novalidate"], Xo = /* @__PURE__ */ z({
|
|
3087
3155
|
__name: "EntityBaseForm",
|
|
3088
3156
|
props: {
|
|
3089
3157
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3104,7 +3172,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3104
3172
|
entityType: {
|
|
3105
3173
|
type: String,
|
|
3106
3174
|
required: !0,
|
|
3107
|
-
validator: (e) =>
|
|
3175
|
+
validator: (e) => Ue.includes(e)
|
|
3108
3176
|
},
|
|
3109
3177
|
/**
|
|
3110
3178
|
* Sub entity type, required for event gateway entities to generate terraform code
|
|
@@ -3207,19 +3275,19 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3207
3275
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel", "codeBlockTabChange"],
|
|
3208
3276
|
setup(e, { expose: t, emit: n }) {
|
|
3209
3277
|
var X;
|
|
3210
|
-
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 = $(() => {
|
|
3211
3279
|
var A, O;
|
|
3212
3280
|
let w = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3213
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);
|
|
3214
|
-
}),
|
|
3215
|
-
|
|
3282
|
+
}), h = () => {
|
|
3283
|
+
y.value = !y.value;
|
|
3216
3284
|
}, k = () => {
|
|
3217
3285
|
r.config.cancelRoute ? o.push(r.config.cancelRoute) : C();
|
|
3218
3286
|
}, C = () => {
|
|
3219
3287
|
i("cancel");
|
|
3220
|
-
},
|
|
3288
|
+
}, E = () => {
|
|
3221
3289
|
g.value || i("submit");
|
|
3222
|
-
},
|
|
3290
|
+
}, Y = K([
|
|
3223
3291
|
{
|
|
3224
3292
|
title: a("baseForm.configuration.json"),
|
|
3225
3293
|
hash: "#json"
|
|
@@ -3229,12 +3297,15 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3229
3297
|
hash: "#yaml"
|
|
3230
3298
|
}
|
|
3231
3299
|
]);
|
|
3232
|
-
return r.config.app === "konnect" && r.entityType !==
|
|
3300
|
+
return r.config.app === "konnect" && r.entityType !== Ee.Other && Y.value.splice(1, 0, {
|
|
3233
3301
|
title: a("baseForm.configuration.terraform"),
|
|
3234
3302
|
hash: "#terraform"
|
|
3303
|
+
}), fi.includes(r.entityType) && Y.value.push({
|
|
3304
|
+
title: a("baseForm.configuration.deck"),
|
|
3305
|
+
hash: "#deck"
|
|
3235
3306
|
}), be(() => c.value, (w) => {
|
|
3236
3307
|
i("loading", w);
|
|
3237
|
-
}, { immediate: !0 }),
|
|
3308
|
+
}, { immediate: !0 }), it(async () => {
|
|
3238
3309
|
if (r.editId)
|
|
3239
3310
|
try {
|
|
3240
3311
|
u.value = !1, c.value = !0;
|
|
@@ -3247,19 +3318,19 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3247
3318
|
c.value = !1;
|
|
3248
3319
|
}
|
|
3249
3320
|
}), t({
|
|
3250
|
-
viewConfig:
|
|
3321
|
+
viewConfig: h,
|
|
3251
3322
|
formCancel: C,
|
|
3252
|
-
formSubmit:
|
|
3323
|
+
formSubmit: E
|
|
3253
3324
|
}), (w, A) => {
|
|
3254
|
-
const O =
|
|
3255
|
-
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" }, {
|
|
3256
3327
|
default: _(() => [
|
|
3257
|
-
c.value ? (m(),
|
|
3328
|
+
c.value ? (m(), j(O, {
|
|
3258
3329
|
key: 0,
|
|
3259
3330
|
type: "form"
|
|
3260
|
-
})) : u.value ? (m(),
|
|
3331
|
+
})) : u.value ? (m(), j(f, {
|
|
3261
3332
|
key: 1,
|
|
3262
|
-
"action-button-text":
|
|
3333
|
+
"action-button-text": T(a)("baseForm.actions.back"),
|
|
3263
3334
|
"data-testid": "form-fetch-error",
|
|
3264
3335
|
"icon-variant": "error",
|
|
3265
3336
|
onClickAction: k
|
|
@@ -3272,17 +3343,17 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3272
3343
|
key: 2,
|
|
3273
3344
|
"data-testid": "form-content",
|
|
3274
3345
|
novalidate: r.noValidate,
|
|
3275
|
-
onReset:
|
|
3276
|
-
onSubmit:
|
|
3346
|
+
onReset: Be(C, ["prevent"]),
|
|
3347
|
+
onSubmit: Be(E, ["prevent"])
|
|
3277
3348
|
}, [
|
|
3278
|
-
|
|
3279
|
-
e.errorMessage ? (m(),
|
|
3349
|
+
P(w.$slots, "default", {}, void 0, !0),
|
|
3350
|
+
e.errorMessage ? (m(), j(v, {
|
|
3280
3351
|
key: 0,
|
|
3281
3352
|
appearance: "danger",
|
|
3282
3353
|
"data-testid": "form-error",
|
|
3283
3354
|
message: e.errorMessage
|
|
3284
3355
|
}, null, 8, ["message"])) : N("", !0),
|
|
3285
|
-
e.hideActions ? N("", !0) : (m(),
|
|
3356
|
+
e.hideActions ? N("", !0) : (m(), j(Ht, {
|
|
3286
3357
|
key: 1,
|
|
3287
3358
|
disabled: !e.actionTeleportTarget,
|
|
3288
3359
|
to: e.actionTeleportTarget
|
|
@@ -3291,14 +3362,14 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3291
3362
|
class: fe(["form-actions", { "form-actions-reverted": e.alignActionButtonToLeft }]),
|
|
3292
3363
|
"data-testid": "form-actions"
|
|
3293
3364
|
}, [
|
|
3294
|
-
|
|
3365
|
+
P(w.$slots, "form-actions", {}, () => [
|
|
3295
3366
|
M(b, {
|
|
3296
3367
|
appearance: "tertiary",
|
|
3297
3368
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-view-configuration`,
|
|
3298
|
-
onClick: A[0] || (A[0] = (I) =>
|
|
3369
|
+
onClick: A[0] || (A[0] = (I) => h())
|
|
3299
3370
|
}, {
|
|
3300
3371
|
default: _(() => [
|
|
3301
|
-
q(L(
|
|
3372
|
+
q(L(T(a)("baseForm.actions.viewConfiguration")), 1)
|
|
3302
3373
|
]),
|
|
3303
3374
|
_: 1
|
|
3304
3375
|
}, 8, ["data-testid"]),
|
|
@@ -3310,7 +3381,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3310
3381
|
onClick: A[1] || (A[1] = (I) => !!e.actionTeleportTarget && C())
|
|
3311
3382
|
}, {
|
|
3312
3383
|
default: _(() => [
|
|
3313
|
-
q(L(e.cancelButtonText ??
|
|
3384
|
+
q(L(e.cancelButtonText ?? T(a)("baseForm.actions.cancel")), 1)
|
|
3314
3385
|
]),
|
|
3315
3386
|
_: 1
|
|
3316
3387
|
}, 8, ["data-testid", "disabled"]),
|
|
@@ -3319,35 +3390,35 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3319
3390
|
"data-testid": `${e.entityType}-${d.value ? "edit" : "create"}-form-submit`,
|
|
3320
3391
|
disabled: g.value,
|
|
3321
3392
|
type: "submit",
|
|
3322
|
-
onClick: A[2] || (A[2] = (I) => !!e.actionTeleportTarget &&
|
|
3393
|
+
onClick: A[2] || (A[2] = (I) => !!e.actionTeleportTarget && E())
|
|
3323
3394
|
}, {
|
|
3324
3395
|
default: _(() => [
|
|
3325
|
-
q(L(e.saveButtonText ??
|
|
3396
|
+
q(L(e.saveButtonText ?? T(a)("baseForm.actions.save")), 1)
|
|
3326
3397
|
]),
|
|
3327
3398
|
_: 1
|
|
3328
3399
|
}, 8, ["data-testid", "disabled"])
|
|
3329
3400
|
], !0)
|
|
3330
3401
|
], 2)
|
|
3331
3402
|
], 8, ["disabled", "to"]))
|
|
3332
|
-
], 40,
|
|
3333
|
-
M(
|
|
3403
|
+
], 40, Zo)),
|
|
3404
|
+
M(J, {
|
|
3334
3405
|
"close-on-blur": !1,
|
|
3335
3406
|
"data-testid": "form-view-configuration-slideout",
|
|
3336
3407
|
"has-overlay": !1,
|
|
3337
3408
|
"offset-top": e.slidoutTopOffset,
|
|
3338
|
-
title:
|
|
3339
|
-
visible:
|
|
3340
|
-
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())
|
|
3341
3412
|
}, {
|
|
3342
3413
|
default: _(() => [
|
|
3343
|
-
R("div", null, L(
|
|
3414
|
+
R("div", null, L(T(a)("baseForm.configuration.message")), 1),
|
|
3344
3415
|
M(H, {
|
|
3345
3416
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
3346
|
-
tabs:
|
|
3417
|
+
tabs: Y.value,
|
|
3347
3418
|
onChange: A[3] || (A[3] = (I) => i("codeBlockTabChange", I.replace("#", "")))
|
|
3348
3419
|
}, {
|
|
3349
3420
|
json: _(() => [
|
|
3350
|
-
M(
|
|
3421
|
+
M(en, {
|
|
3351
3422
|
config: e.config,
|
|
3352
3423
|
"entity-record": r.formFields,
|
|
3353
3424
|
"fetcher-url": x.value,
|
|
@@ -3355,17 +3426,24 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3355
3426
|
}, null, 8, ["config", "entity-record", "fetcher-url", "request-method"])
|
|
3356
3427
|
]),
|
|
3357
3428
|
yaml: _(() => [
|
|
3358
|
-
M(
|
|
3429
|
+
M(Vn, {
|
|
3359
3430
|
"entity-record": r.formFields
|
|
3360
3431
|
}, null, 8, ["entity-record"])
|
|
3361
3432
|
]),
|
|
3362
3433
|
terraform: _(() => [
|
|
3363
|
-
M(
|
|
3434
|
+
M(Yn, {
|
|
3364
3435
|
"entity-record": r.formFields,
|
|
3365
3436
|
"entity-type": e.entityType,
|
|
3366
3437
|
"sub-entity-type": e.subEntityType
|
|
3367
3438
|
}, null, 8, ["entity-record", "entity-type", "sub-entity-type"])
|
|
3368
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
|
+
]),
|
|
3369
3447
|
_: 1
|
|
3370
3448
|
}, 8, ["tabs"])
|
|
3371
3449
|
]),
|
|
@@ -3376,7 +3454,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3376
3454
|
});
|
|
3377
3455
|
};
|
|
3378
3456
|
}
|
|
3379
|
-
}),
|
|
3457
|
+
}), vs = /* @__PURE__ */ se(Xo, [["__scopeId", "data-v-b732b5bb"]]), el = ["data-truncate"], tl = /* @__PURE__ */ z({
|
|
3380
3458
|
__name: "EntityBaseTableCell",
|
|
3381
3459
|
props: {
|
|
3382
3460
|
keyName: {
|
|
@@ -3393,49 +3471,49 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3393
3471
|
}
|
|
3394
3472
|
},
|
|
3395
3473
|
setup(e) {
|
|
3396
|
-
const t = e, n =
|
|
3397
|
-
var
|
|
3398
|
-
return ((
|
|
3399
|
-
}), i =
|
|
3400
|
-
var
|
|
3401
|
-
return ((
|
|
3402
|
-
}), 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 = $(() => {
|
|
3403
3481
|
var k, C;
|
|
3404
|
-
const
|
|
3405
|
-
return
|
|
3406
|
-
}), 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);
|
|
3407
3485
|
let a;
|
|
3408
3486
|
const s = () => {
|
|
3409
3487
|
a && (a.disconnect(), a = void 0);
|
|
3410
3488
|
}, l = () => {
|
|
3411
|
-
var k, C,
|
|
3412
|
-
let
|
|
3489
|
+
var k, C, E;
|
|
3490
|
+
let h = ((k = n.value) == null ? void 0 : k.clientWidth) || 0;
|
|
3413
3491
|
if (n.value && "getComputedStyle" in window) {
|
|
3414
|
-
const
|
|
3415
|
-
|
|
3492
|
+
const Y = window.getComputedStyle(n.value);
|
|
3493
|
+
h -= (parseFloat(Y.paddingLeft) || 0) + (parseFloat(Y.paddingRight) || 0);
|
|
3416
3494
|
}
|
|
3417
|
-
d.value = ((C = i.value) == null ? void 0 : C.getBoundingClientRect().width) || 0, u.value =
|
|
3418
|
-
}, 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(
|
|
3419
3497
|
g,
|
|
3420
|
-
(
|
|
3498
|
+
(h) => {
|
|
3421
3499
|
if (o.value && (s(), "ResizeObserver" in window && window)) {
|
|
3422
3500
|
a = new ResizeObserver((k) => {
|
|
3423
3501
|
window.requestAnimationFrame(() => {
|
|
3424
3502
|
!Array.isArray(k) || !k.length || l();
|
|
3425
3503
|
});
|
|
3426
3504
|
});
|
|
3427
|
-
for (const k of
|
|
3505
|
+
for (const k of h)
|
|
3428
3506
|
k && a.observe(k);
|
|
3429
3507
|
}
|
|
3430
3508
|
},
|
|
3431
3509
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3432
|
-
), x =
|
|
3433
|
-
return
|
|
3510
|
+
), x = $(() => o.value ? d.value > u.value : !1);
|
|
3511
|
+
return nt(() => {
|
|
3434
3512
|
l();
|
|
3435
|
-
}),
|
|
3436
|
-
|
|
3437
|
-
}), (
|
|
3438
|
-
const C =
|
|
3513
|
+
}), Zn(() => {
|
|
3514
|
+
y();
|
|
3515
|
+
}), (h, k) => {
|
|
3516
|
+
const C = D("KTooltip");
|
|
3439
3517
|
return m(), S("span", {
|
|
3440
3518
|
ref_key: "contentRef",
|
|
3441
3519
|
ref: c,
|
|
@@ -3451,21 +3529,21 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3451
3529
|
text: x.value ? p.value : ""
|
|
3452
3530
|
}, {
|
|
3453
3531
|
default: _(() => [
|
|
3454
|
-
|
|
3532
|
+
P(h.$slots, "default", {}, void 0, !0)
|
|
3455
3533
|
]),
|
|
3456
3534
|
_: 3
|
|
3457
3535
|
}, 8, ["text"])
|
|
3458
|
-
], 8,
|
|
3536
|
+
], 8, el)) : P(h.$slots, "default", { key: 1 }, void 0, !0)
|
|
3459
3537
|
], 512);
|
|
3460
3538
|
};
|
|
3461
3539
|
}
|
|
3462
|
-
}),
|
|
3540
|
+
}), nl = /* @__PURE__ */ se(tl, [["__scopeId", "data-v-a3a65cac"]]), il = { class: "toolbar-container" }, rl = {
|
|
3463
3541
|
key: 0,
|
|
3464
3542
|
class: "toolbar-button-container"
|
|
3465
|
-
},
|
|
3543
|
+
}, al = {
|
|
3466
3544
|
key: 0,
|
|
3467
3545
|
class: "hidden"
|
|
3468
|
-
},
|
|
3546
|
+
}, ol = /* @__PURE__ */ z({
|
|
3469
3547
|
__name: "EntityBaseTable",
|
|
3470
3548
|
props: {
|
|
3471
3549
|
// table header configuration
|
|
@@ -3610,7 +3688,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3610
3688
|
},
|
|
3611
3689
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked", "state"],
|
|
3612
3690
|
setup(e, { emit: t }) {
|
|
3613
|
-
const n = e, i = t, { i18n: { t: r } } = W.useI18n(), o =
|
|
3691
|
+
const n = e, i = t, { i18n: { t: r } } = W.useI18n(), o = $(() => {
|
|
3614
3692
|
var f, v;
|
|
3615
3693
|
return typeof n.errorMessage == "string" ? {
|
|
3616
3694
|
hasError: !!n.errorMessage,
|
|
@@ -3621,7 +3699,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3621
3699
|
title: (f = n.errorMessage) == null ? void 0 : f.title,
|
|
3622
3700
|
message: (v = n.errorMessage) == null ? void 0 : v.message
|
|
3623
3701
|
};
|
|
3624
|
-
}), a =
|
|
3702
|
+
}), a = $(() => n.cacheIdentifier || n.preferencesStorageKey), s = $(() => {
|
|
3625
3703
|
const f = [];
|
|
3626
3704
|
return Object.keys(n.tableHeaders).forEach((b) => {
|
|
3627
3705
|
const H = n.tableHeaders[b];
|
|
@@ -3655,15 +3733,15 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3655
3733
|
}, p = (f) => {
|
|
3656
3734
|
C(f), i("state", f);
|
|
3657
3735
|
}, g = () => {
|
|
3658
|
-
i("empty-state-cta-clicked"),
|
|
3659
|
-
},
|
|
3736
|
+
i("empty-state-cta-clicked"), y();
|
|
3737
|
+
}, y = () => {
|
|
3660
3738
|
i("clear-search-input");
|
|
3661
|
-
}, x =
|
|
3739
|
+
}, x = $(() => n.disableRowClick ? void 0 : (f, v) => {
|
|
3662
3740
|
i("click:row", v);
|
|
3663
|
-
}),
|
|
3741
|
+
}), h = (f) => {
|
|
3664
3742
|
i("sort", f);
|
|
3665
|
-
}, { hideTableToolbar: k, handleStateChange: C } = W.useTableState(() => n.query), { setTablePreferences:
|
|
3666
|
-
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);
|
|
3667
3745
|
return {
|
|
3668
3746
|
...n.initialFetcherParams,
|
|
3669
3747
|
...f
|
|
@@ -3671,15 +3749,15 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3671
3749
|
}), A = (f) => {
|
|
3672
3750
|
X.value = f, s.value.forEach((v) => {
|
|
3673
3751
|
!("hidable" in v) || !X.value.columnVisibility || v.hidable === !1 && (X.value.columnVisibility[v.key] = !0);
|
|
3674
|
-
}), a.value &&
|
|
3675
|
-
}, O =
|
|
3752
|
+
}), a.value && E(a.value, f);
|
|
3753
|
+
}, O = $(() => ({
|
|
3676
3754
|
disablePageJump: n.disablePaginationPageJump,
|
|
3677
3755
|
offset: n.paginationType === "offset",
|
|
3678
3756
|
...n.paginationAttributes
|
|
3679
3757
|
}));
|
|
3680
3758
|
return (f, v) => {
|
|
3681
|
-
const b =
|
|
3682
|
-
return m(),
|
|
3759
|
+
const b = D("KTableData"), H = D("KCard");
|
|
3760
|
+
return m(), j(H, {
|
|
3683
3761
|
class: "kong-ui-entity-base-table",
|
|
3684
3762
|
title: e.title,
|
|
3685
3763
|
"title-tag": e.titleTag
|
|
@@ -3691,11 +3769,11 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3691
3769
|
"cache-identifier": a.value,
|
|
3692
3770
|
"cell-attrs": u,
|
|
3693
3771
|
"client-sort": e.enableClientSort,
|
|
3694
|
-
"empty-state-action-message": e.query ?
|
|
3772
|
+
"empty-state-action-message": e.query ? T(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3695
3773
|
"empty-state-action-route": e.query ? void 0 : e.emptyStateOptions.ctaPath,
|
|
3696
3774
|
"empty-state-icon-variant": e.query ? "search" : "kong",
|
|
3697
|
-
"empty-state-message": e.query ?
|
|
3698
|
-
"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,
|
|
3699
3777
|
error: o.value.hasError,
|
|
3700
3778
|
"error-state-message": o.value.message,
|
|
3701
3779
|
"error-state-title": o.value.title,
|
|
@@ -3704,7 +3782,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3704
3782
|
headers: s.value,
|
|
3705
3783
|
"hide-pagination": e.hidePagination,
|
|
3706
3784
|
"hide-pagination-when-optional": e.hidePaginationWhenOptional,
|
|
3707
|
-
"hide-toolbar": e.hideToolbar ??
|
|
3785
|
+
"hide-toolbar": e.hideToolbar ?? T(k),
|
|
3708
3786
|
"initial-fetcher-params": w.value,
|
|
3709
3787
|
loading: e.isLoading,
|
|
3710
3788
|
"pagination-attributes": O.value,
|
|
@@ -3717,40 +3795,40 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3717
3795
|
"table-preferences": X.value,
|
|
3718
3796
|
onEmptyStateActionClick: g,
|
|
3719
3797
|
"onRow:click": x.value,
|
|
3720
|
-
onSort: v[0] || (v[0] = (
|
|
3798
|
+
onSort: v[0] || (v[0] = (J) => h(J)),
|
|
3721
3799
|
onState: p,
|
|
3722
3800
|
"onUpdate:tablePreferences": A
|
|
3723
3801
|
}, Se({
|
|
3724
3802
|
toolbar: _(() => [
|
|
3725
|
-
R("div",
|
|
3726
|
-
|
|
3727
|
-
f.$slots["toolbar-button"] ? (m(), S("div",
|
|
3728
|
-
|
|
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)
|
|
3729
3807
|
])) : N("", !0)
|
|
3730
3808
|
])
|
|
3731
3809
|
]),
|
|
3732
|
-
"action-items": _(({ row:
|
|
3733
|
-
|
|
3810
|
+
"action-items": _(({ row: J }) => [
|
|
3811
|
+
P(f.$slots, "actions", { row: J }, void 0, !0)
|
|
3734
3812
|
]),
|
|
3735
3813
|
_: 2
|
|
3736
3814
|
}, [
|
|
3737
3815
|
f.$slots["empty-state"] ? {
|
|
3738
3816
|
name: "empty-state",
|
|
3739
3817
|
fn: _(() => [
|
|
3740
|
-
|
|
3818
|
+
P(f.$slots, "empty-state", {}, void 0, !0)
|
|
3741
3819
|
]),
|
|
3742
3820
|
key: "0"
|
|
3743
3821
|
} : void 0,
|
|
3744
|
-
ce(e.tableHeaders, (
|
|
3822
|
+
ce(e.tableHeaders, (J, I) => ({
|
|
3745
3823
|
name: I,
|
|
3746
3824
|
fn: _(({ row: B, rowValue: G }) => [
|
|
3747
|
-
M(
|
|
3825
|
+
M(nl, {
|
|
3748
3826
|
"key-name": String(I),
|
|
3749
3827
|
"row-el": d(B),
|
|
3750
|
-
tooltip:
|
|
3828
|
+
tooltip: J.tooltip
|
|
3751
3829
|
}, {
|
|
3752
3830
|
default: _(() => [
|
|
3753
|
-
|
|
3831
|
+
P(f.$slots, I, {
|
|
3754
3832
|
row: B,
|
|
3755
3833
|
rowKey: e.rowKey,
|
|
3756
3834
|
rowValue: G
|
|
@@ -3762,36 +3840,29 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3762
3840
|
}, 1032, ["key-name", "row-el", "tooltip"])
|
|
3763
3841
|
])
|
|
3764
3842
|
})),
|
|
3765
|
-
f.$slots["bulk-actions"] ? {
|
|
3766
|
-
name: "bulk-actions",
|
|
3767
|
-
fn: _((Y) => [
|
|
3768
|
-
j(f.$slots, "bulk-actions", qt(Ht(Y)), void 0, !0)
|
|
3769
|
-
]),
|
|
3770
|
-
key: "1"
|
|
3771
|
-
} : void 0,
|
|
3772
3843
|
e.query ? void 0 : {
|
|
3773
3844
|
name: "empty-state-action-icon",
|
|
3774
3845
|
fn: _(() => [
|
|
3775
|
-
M(
|
|
3846
|
+
M(T(Yt))
|
|
3776
3847
|
]),
|
|
3777
|
-
key: "
|
|
3848
|
+
key: "1"
|
|
3778
3849
|
}
|
|
3779
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"]),
|
|
3780
|
-
f.$slots["outside-actions"] &&
|
|
3781
|
-
|
|
3851
|
+
f.$slots["outside-actions"] && T(k) ? (m(), S("div", al, [
|
|
3852
|
+
P(f.$slots, "outside-actions", {}, void 0, !0)
|
|
3782
3853
|
])) : N("", !0)
|
|
3783
3854
|
]),
|
|
3784
3855
|
_: 3
|
|
3785
3856
|
}, 8, ["title", "title-tag"]);
|
|
3786
3857
|
};
|
|
3787
3858
|
}
|
|
3788
|
-
}),
|
|
3859
|
+
}), bs = /* @__PURE__ */ se(ol, [["__scopeId", "data-v-44153100"]]), ll = {
|
|
3789
3860
|
key: 0,
|
|
3790
3861
|
class: "kong-ui-entity-delete-error"
|
|
3791
|
-
},
|
|
3862
|
+
}, sl = {
|
|
3792
3863
|
key: 1,
|
|
3793
3864
|
class: "description"
|
|
3794
|
-
},
|
|
3865
|
+
}, cl = /* @__PURE__ */ z({
|
|
3795
3866
|
__name: "EntityDeleteModal",
|
|
3796
3867
|
props: {
|
|
3797
3868
|
visible: {
|
|
@@ -3830,14 +3901,14 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3830
3901
|
},
|
|
3831
3902
|
emits: ["cancel", "proceed"],
|
|
3832
3903
|
setup(e, { emit: t }) {
|
|
3833
|
-
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 = () => {
|
|
3834
3905
|
r("cancel");
|
|
3835
3906
|
}, s = () => {
|
|
3836
3907
|
r("proceed");
|
|
3837
3908
|
};
|
|
3838
3909
|
return (l, c) => {
|
|
3839
|
-
const d =
|
|
3840
|
-
return m(),
|
|
3910
|
+
const d = D("KAlert"), u = D("KPrompt");
|
|
3911
|
+
return m(), j(u, {
|
|
3841
3912
|
"action-button-appearance": "danger",
|
|
3842
3913
|
"action-button-disabled": e.actionPending,
|
|
3843
3914
|
"action-button-text": "Yes, delete",
|
|
@@ -3849,7 +3920,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3849
3920
|
onProceed: s
|
|
3850
3921
|
}, {
|
|
3851
3922
|
default: _(() => [
|
|
3852
|
-
e.error ? (m(), S("div",
|
|
3923
|
+
e.error ? (m(), S("div", ll, [
|
|
3853
3924
|
M(d, { appearance: "danger" }, {
|
|
3854
3925
|
default: _(() => [
|
|
3855
3926
|
q(L(e.error), 1)
|
|
@@ -3857,7 +3928,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3857
3928
|
_: 1
|
|
3858
3929
|
})
|
|
3859
3930
|
])) : N("", !0),
|
|
3860
|
-
M(
|
|
3931
|
+
M(T(n), {
|
|
3861
3932
|
class: "message",
|
|
3862
3933
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3863
3934
|
tag: "p"
|
|
@@ -3875,8 +3946,8 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3875
3946
|
key: "0"
|
|
3876
3947
|
} : void 0
|
|
3877
3948
|
]), 1032, ["keypath"]),
|
|
3878
|
-
i.description || l.$slots.description ? (m(), S("div",
|
|
3879
|
-
|
|
3949
|
+
i.description || l.$slots.description ? (m(), S("div", sl, [
|
|
3950
|
+
P(l.$slots, "description", {}, () => [
|
|
3880
3951
|
R("p", null, L(i.description), 1)
|
|
3881
3952
|
], !0)
|
|
3882
3953
|
])) : N("", !0)
|
|
@@ -3885,13 +3956,13 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3885
3956
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
3886
3957
|
};
|
|
3887
3958
|
}
|
|
3888
|
-
}),
|
|
3959
|
+
}), xs = /* @__PURE__ */ se(cl, [["__scopeId", "data-v-4361d622"]]), ul = {
|
|
3889
3960
|
fill: "none",
|
|
3890
3961
|
height: "20",
|
|
3891
3962
|
viewBox: "0 0 20 20",
|
|
3892
3963
|
width: "20",
|
|
3893
3964
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3894
|
-
},
|
|
3965
|
+
}, dl = {
|
|
3895
3966
|
id: "mask0_180_20349",
|
|
3896
3967
|
height: "20",
|
|
3897
3968
|
maskUnits: "userSpaceOnUse",
|
|
@@ -3899,35 +3970,35 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3899
3970
|
width: "20",
|
|
3900
3971
|
x: "0",
|
|
3901
3972
|
y: "0"
|
|
3902
|
-
},
|
|
3973
|
+
}, fl = ["fill"], pl = { mask: "url(#mask0_180_20349)" }, ml = ["fill"], Mt = /* @__PURE__ */ z({
|
|
3903
3974
|
__name: "IconFilter",
|
|
3904
3975
|
props: {
|
|
3905
3976
|
color: {
|
|
3906
3977
|
type: String,
|
|
3907
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3978
|
+
default: `var(--kong-ui-entity-filter-color, ${Zi})`
|
|
3908
3979
|
}
|
|
3909
3980
|
},
|
|
3910
3981
|
setup(e) {
|
|
3911
|
-
return (t, n) => (m(), S("svg",
|
|
3912
|
-
R("mask",
|
|
3982
|
+
return (t, n) => (m(), S("svg", ul, [
|
|
3983
|
+
R("mask", dl, [
|
|
3913
3984
|
R("rect", {
|
|
3914
3985
|
fill: e.color,
|
|
3915
3986
|
height: "20",
|
|
3916
3987
|
width: "20"
|
|
3917
|
-
}, null, 8,
|
|
3988
|
+
}, null, 8, fl)
|
|
3918
3989
|
]),
|
|
3919
|
-
R("g",
|
|
3990
|
+
R("g", pl, [
|
|
3920
3991
|
R("path", {
|
|
3921
3992
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
3922
3993
|
fill: e.color
|
|
3923
|
-
}, null, 8,
|
|
3994
|
+
}, null, 8, ml)
|
|
3924
3995
|
])
|
|
3925
3996
|
]));
|
|
3926
3997
|
}
|
|
3927
|
-
}),
|
|
3998
|
+
}), yl = {
|
|
3928
3999
|
key: 1,
|
|
3929
4000
|
class: "kong-ui-entity-filter"
|
|
3930
|
-
},
|
|
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({
|
|
3931
4002
|
__name: "EntityFilter",
|
|
3932
4003
|
props: {
|
|
3933
4004
|
// filter config, either exact match or fuzzy match
|
|
@@ -3947,12 +4018,12 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3947
4018
|
},
|
|
3948
4019
|
emits: ["update:modelValue"],
|
|
3949
4020
|
setup(e, { emit: t }) {
|
|
3950
|
-
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 = $(() => {
|
|
3951
4022
|
const w = [];
|
|
3952
4023
|
return new URLSearchParams(i.modelValue).forEach((A, O) => {
|
|
3953
4024
|
A !== "" && w.push(O);
|
|
3954
4025
|
}), w;
|
|
3955
|
-
}), c =
|
|
4026
|
+
}), c = $(() => {
|
|
3956
4027
|
const w = i.config.fields;
|
|
3957
4028
|
return Object.keys(w).filter((A) => {
|
|
3958
4029
|
var O;
|
|
@@ -3976,23 +4047,23 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
3976
4047
|
r("update:modelValue", w);
|
|
3977
4048
|
}, g = () => {
|
|
3978
4049
|
p("");
|
|
3979
|
-
},
|
|
4050
|
+
}, y = (w) => `filter-${w}`, x = (w) => {
|
|
3980
4051
|
var A, O;
|
|
3981
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);
|
|
3982
|
-
},
|
|
4053
|
+
}, h = (w) => {
|
|
3983
4054
|
var A, O;
|
|
3984
4055
|
return ((O = (A = i.config.schema) == null ? void 0 : A[w]) == null ? void 0 : O.type) ?? "text";
|
|
3985
4056
|
}, k = (w) => {
|
|
3986
4057
|
a.value = {
|
|
3987
4058
|
...a.value,
|
|
3988
4059
|
[w]: ""
|
|
3989
|
-
},
|
|
4060
|
+
}, E();
|
|
3990
4061
|
}, C = () => {
|
|
3991
|
-
a.value = {},
|
|
3992
|
-
},
|
|
4062
|
+
a.value = {}, E(!0);
|
|
4063
|
+
}, E = (w = !1) => {
|
|
3993
4064
|
const A = Object.keys(a.value).reduce((O, f) => (a.value[f] && (O[f] = `${a.value[f]}`), O), {});
|
|
3994
4065
|
w && (o.value = !1), r("update:modelValue", new URLSearchParams(A).toString());
|
|
3995
|
-
},
|
|
4066
|
+
}, Y = (w) => {
|
|
3996
4067
|
var A, O;
|
|
3997
4068
|
return !!((O = (A = i.config.schema) == null ? void 0 : A[w]) != null && O.filterFunction);
|
|
3998
4069
|
}, X = (w, A) => {
|
|
@@ -4001,8 +4072,8 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4001
4072
|
return (O == null ? void 0 : O.filterFunction) === void 0 ? !0 : O.filterFunction(A);
|
|
4002
4073
|
};
|
|
4003
4074
|
return (w, A) => {
|
|
4004
|
-
const O =
|
|
4005
|
-
return e.config.isExactMatch ? (m(),
|
|
4075
|
+
const O = D("KInput"), f = D("KButton"), v = D("KSelect");
|
|
4076
|
+
return e.config.isExactMatch ? (m(), j(O, {
|
|
4006
4077
|
key: 0,
|
|
4007
4078
|
autocomplete: "off",
|
|
4008
4079
|
class: "kong-ui-entity-filter-input",
|
|
@@ -4015,7 +4086,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4015
4086
|
M(Mt)
|
|
4016
4087
|
]),
|
|
4017
4088
|
after: _(() => [
|
|
4018
|
-
xe(M(
|
|
4089
|
+
xe(M(T(oi), {
|
|
4019
4090
|
class: "kong-ui-entity-filter-clear",
|
|
4020
4091
|
role: "button",
|
|
4021
4092
|
tabindex: "0",
|
|
@@ -4025,7 +4096,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4025
4096
|
])
|
|
4026
4097
|
]),
|
|
4027
4098
|
_: 1
|
|
4028
|
-
}, 8, ["model-value", "placeholder"])) : (m(), S("div",
|
|
4099
|
+
}, 8, ["model-value", "placeholder"])) : (m(), S("div", yl, [
|
|
4029
4100
|
M(f, {
|
|
4030
4101
|
appearance: "tertiary",
|
|
4031
4102
|
"data-testid": "filter-button",
|
|
@@ -4033,7 +4104,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4033
4104
|
}, {
|
|
4034
4105
|
default: _(() => [
|
|
4035
4106
|
M(Mt),
|
|
4036
|
-
q(" " + L(
|
|
4107
|
+
q(" " + L(T(n)("filter.filterButtonText")) + " " + L(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
4037
4108
|
]),
|
|
4038
4109
|
_: 1
|
|
4039
4110
|
}),
|
|
@@ -4043,9 +4114,9 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4043
4114
|
}, null, 512), [
|
|
4044
4115
|
[Ce, o.value]
|
|
4045
4116
|
]),
|
|
4046
|
-
xe(R("div",
|
|
4117
|
+
xe(R("div", gl, [
|
|
4047
4118
|
(m(!0), S(ue, null, ce(c.value, (b) => {
|
|
4048
|
-
var H,
|
|
4119
|
+
var H, J;
|
|
4049
4120
|
return m(), S("div", {
|
|
4050
4121
|
key: b.value,
|
|
4051
4122
|
class: "kong-ui-entity-filter-menu-item",
|
|
@@ -4056,52 +4127,52 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4056
4127
|
role: "button",
|
|
4057
4128
|
tabindex: "0",
|
|
4058
4129
|
onClick: (I) => u(b.value),
|
|
4059
|
-
onKeydown:
|
|
4130
|
+
onKeydown: Xn((I) => u(b.value), ["enter"])
|
|
4060
4131
|
}, [
|
|
4061
4132
|
q(L(b.label) + " ", 1),
|
|
4062
|
-
xe(R("span",
|
|
4133
|
+
xe(R("span", bl, null, 512), [
|
|
4063
4134
|
[Ce, l.value.includes(b.value)]
|
|
4064
4135
|
]),
|
|
4065
|
-
M(
|
|
4136
|
+
M(T(li), {
|
|
4066
4137
|
class: fe(["menu-item-expand-icon", { expanded: s.value.has(b.value) }]),
|
|
4067
|
-
color:
|
|
4138
|
+
color: T(er)
|
|
4068
4139
|
}, null, 8, ["class", "color"])
|
|
4069
|
-
], 42,
|
|
4070
|
-
xe(R("div",
|
|
4140
|
+
], 42, vl),
|
|
4141
|
+
xe(R("div", xl, [
|
|
4071
4142
|
R("label", {
|
|
4072
4143
|
class: "menu-item-label",
|
|
4073
|
-
for:
|
|
4074
|
-
}, L(
|
|
4075
|
-
((
|
|
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, {
|
|
4076
4147
|
key: 0,
|
|
4077
|
-
id:
|
|
4148
|
+
id: y(b.value),
|
|
4078
4149
|
modelValue: a.value[b.value],
|
|
4079
4150
|
"onUpdate:modelValue": (I) => a.value[b.value] = I,
|
|
4080
|
-
"enable-filtering":
|
|
4151
|
+
"enable-filtering": Y(b.value),
|
|
4081
4152
|
"filter-function": (I) => X(b.value, I),
|
|
4082
4153
|
items: x(b.value),
|
|
4083
|
-
placeholder:
|
|
4084
|
-
}, 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, {
|
|
4085
4156
|
key: 1,
|
|
4086
|
-
id:
|
|
4157
|
+
id: y(b.value),
|
|
4087
4158
|
modelValue: a.value[b.value],
|
|
4088
4159
|
"onUpdate:modelValue": (I) => a.value[b.value] = I,
|
|
4089
4160
|
autocomplete: "off",
|
|
4090
|
-
placeholder:
|
|
4091
|
-
type:
|
|
4161
|
+
placeholder: T(n)("filter.inputPlaceholder"),
|
|
4162
|
+
type: h(b.value)
|
|
4092
4163
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4093
4164
|
], 512), [
|
|
4094
4165
|
[Ce, s.value.has(b.value)]
|
|
4095
4166
|
]),
|
|
4096
|
-
xe(R("div",
|
|
4167
|
+
xe(R("div", kl, [
|
|
4097
4168
|
M(f, {
|
|
4098
4169
|
appearance: "tertiary",
|
|
4099
4170
|
"data-testid": "apply-filter",
|
|
4100
4171
|
size: "small",
|
|
4101
|
-
onClick: A[0] || (A[0] = (I) =>
|
|
4172
|
+
onClick: A[0] || (A[0] = (I) => E(!0))
|
|
4102
4173
|
}, {
|
|
4103
4174
|
default: _(() => [
|
|
4104
|
-
q(L(
|
|
4175
|
+
q(L(T(n)("filter.applyButtonText")), 1)
|
|
4105
4176
|
]),
|
|
4106
4177
|
_: 1
|
|
4107
4178
|
}),
|
|
@@ -4112,23 +4183,23 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4112
4183
|
onClick: (I) => k(b.value)
|
|
4113
4184
|
}, {
|
|
4114
4185
|
default: _(() => [
|
|
4115
|
-
q(L(
|
|
4186
|
+
q(L(T(n)("filter.clearButtonText")), 1)
|
|
4116
4187
|
]),
|
|
4117
4188
|
_: 1
|
|
4118
4189
|
}, 8, ["onClick"])
|
|
4119
4190
|
], 512), [
|
|
4120
4191
|
[Ce, s.value.has(b.value)]
|
|
4121
4192
|
])
|
|
4122
|
-
], 8,
|
|
4193
|
+
], 8, hl);
|
|
4123
4194
|
}), 128)),
|
|
4124
|
-
R("div",
|
|
4195
|
+
R("div", Al, [
|
|
4125
4196
|
M(f, {
|
|
4126
4197
|
appearance: "tertiary",
|
|
4127
4198
|
size: "small",
|
|
4128
4199
|
onClick: C
|
|
4129
4200
|
}, {
|
|
4130
4201
|
default: _(() => [
|
|
4131
|
-
q(L(
|
|
4202
|
+
q(L(T(n)("filter.clearAllButtonText")), 1)
|
|
4132
4203
|
]),
|
|
4133
4204
|
_: 1
|
|
4134
4205
|
})
|
|
@@ -4139,7 +4210,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4139
4210
|
]));
|
|
4140
4211
|
};
|
|
4141
4212
|
}
|
|
4142
|
-
}),
|
|
4213
|
+
}), Cs = /* @__PURE__ */ se(_l, [["__scopeId", "data-v-084f7978"]]), ks = /* @__PURE__ */ z({
|
|
4143
4214
|
__name: "EntityToggleModal",
|
|
4144
4215
|
props: {
|
|
4145
4216
|
visible: {
|
|
@@ -4171,9 +4242,9 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4171
4242
|
},
|
|
4172
4243
|
emits: ["cancel", "proceed"],
|
|
4173
4244
|
setup(e, { emit: t }) {
|
|
4174
|
-
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 = $(
|
|
4175
4246
|
() => r.action === "enable" ? n("toggleModal.enable.title", { entityType: r.entityType }) : n("toggleModal.disable.title", { entityType: r.entityType })
|
|
4176
|
-
), l =
|
|
4247
|
+
), l = $(
|
|
4177
4248
|
() => r.action === "enable" ? n("toggleModal.enable.confirmText") : n("toggleModal.disable.confirmText")
|
|
4178
4249
|
), c = () => o("cancel"), d = async () => {
|
|
4179
4250
|
if (r.onConfirm) {
|
|
@@ -4188,8 +4259,8 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4188
4259
|
}
|
|
4189
4260
|
};
|
|
4190
4261
|
return (u, p) => {
|
|
4191
|
-
const g =
|
|
4192
|
-
return m(),
|
|
4262
|
+
const g = D("KPrompt");
|
|
4263
|
+
return m(), j(Ht, { to: "body" }, [
|
|
4193
4264
|
M(g, {
|
|
4194
4265
|
"action-button-disabled": a.value,
|
|
4195
4266
|
"action-button-text": l.value,
|
|
@@ -4200,7 +4271,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4200
4271
|
onProceed: d
|
|
4201
4272
|
}, {
|
|
4202
4273
|
default: _(() => [
|
|
4203
|
-
M(
|
|
4274
|
+
M(T(i), {
|
|
4204
4275
|
keypath: `toggleModal.${r.action}.message`,
|
|
4205
4276
|
scope: "global"
|
|
4206
4277
|
}, {
|
|
@@ -4218,7 +4289,7 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4218
4289
|
]);
|
|
4219
4290
|
};
|
|
4220
4291
|
}
|
|
4221
|
-
}),
|
|
4292
|
+
}), As = /* @__PURE__ */ z({
|
|
4222
4293
|
__name: "PermissionsWrapper",
|
|
4223
4294
|
props: {
|
|
4224
4295
|
/**
|
|
@@ -4240,10 +4311,10 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4240
4311
|
}
|
|
4241
4312
|
},
|
|
4242
4313
|
setup(e) {
|
|
4243
|
-
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);
|
|
4244
4315
|
return be(() => t.authFunction, async () => {
|
|
4245
4316
|
n.value = await t.authFunction();
|
|
4246
|
-
}, { immediate: !0 }), (r, o) => i.value ?
|
|
4317
|
+
}, { immediate: !0 }), (r, o) => i.value ? P(r.$slots, "default", {
|
|
4247
4318
|
key: 0,
|
|
4248
4319
|
isAllowed: n.value
|
|
4249
4320
|
}) : N("", !0);
|
|
@@ -4251,37 +4322,37 @@ const No = { class: "yaml-config config-card-code-block" }, Yn = /* @__PURE__ */
|
|
|
4251
4322
|
}), te = [];
|
|
4252
4323
|
for (let e = 0; e < 256; ++e)
|
|
4253
4324
|
te.push((e + 256).toString(16).slice(1));
|
|
4254
|
-
function
|
|
4325
|
+
function wl(e, t = 0) {
|
|
4255
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();
|
|
4256
4327
|
}
|
|
4257
|
-
let
|
|
4258
|
-
const
|
|
4259
|
-
function
|
|
4260
|
-
if (!
|
|
4328
|
+
let Ge;
|
|
4329
|
+
const Sl = new Uint8Array(16);
|
|
4330
|
+
function $l() {
|
|
4331
|
+
if (!Ge) {
|
|
4261
4332
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
4262
4333
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
4263
|
-
|
|
4334
|
+
Ge = crypto.getRandomValues.bind(crypto);
|
|
4264
4335
|
}
|
|
4265
|
-
return
|
|
4336
|
+
return Ge(Sl);
|
|
4266
4337
|
}
|
|
4267
|
-
const
|
|
4268
|
-
function
|
|
4338
|
+
const Tl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), jt = { randomUUID: Tl };
|
|
4339
|
+
function El(e, t, n) {
|
|
4269
4340
|
var r;
|
|
4270
4341
|
if (jt.randomUUID && !e)
|
|
4271
4342
|
return jt.randomUUID();
|
|
4272
4343
|
e = e || {};
|
|
4273
|
-
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();
|
|
4274
4345
|
if (i.length < 16)
|
|
4275
4346
|
throw new Error("Random bytes length must be >= 16");
|
|
4276
|
-
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);
|
|
4277
4348
|
}
|
|
4278
|
-
const
|
|
4349
|
+
const Il = ["aria-labelledby"], Fl = { class: "form-section-wrapper" }, Ol = {
|
|
4279
4350
|
key: 1,
|
|
4280
4351
|
class: "form-section-description"
|
|
4281
|
-
},
|
|
4352
|
+
}, Ll = {
|
|
4282
4353
|
key: 2,
|
|
4283
4354
|
class: "form-section-footer"
|
|
4284
|
-
},
|
|
4355
|
+
}, Bl = { class: "form-section-content" }, Rl = /* @__PURE__ */ z({
|
|
4285
4356
|
__name: "EntityFormSection",
|
|
4286
4357
|
props: {
|
|
4287
4358
|
title: {
|
|
@@ -4310,20 +4381,20 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4310
4381
|
}
|
|
4311
4382
|
},
|
|
4312
4383
|
setup(e) {
|
|
4313
|
-
const t = De(), n =
|
|
4384
|
+
const t = De(), n = El();
|
|
4314
4385
|
return (i, r) => (m(), S("div", {
|
|
4315
|
-
"aria-labelledby": e.title ?
|
|
4386
|
+
"aria-labelledby": e.title ? T(n) : void 0,
|
|
4316
4387
|
class: fe(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }]),
|
|
4317
4388
|
role: "group"
|
|
4318
4389
|
}, [
|
|
4319
|
-
R("div",
|
|
4390
|
+
R("div", Fl, [
|
|
4320
4391
|
e.hideInfoHeader ? N("", !0) : (m(), S("div", {
|
|
4321
4392
|
key: 0,
|
|
4322
4393
|
class: fe(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
4323
4394
|
}, [
|
|
4324
|
-
e.title ? (m(),
|
|
4395
|
+
e.title ? (m(), j(Pe(e.titleTag), {
|
|
4325
4396
|
key: 0,
|
|
4326
|
-
id:
|
|
4397
|
+
id: T(n),
|
|
4327
4398
|
class: "form-section-title"
|
|
4328
4399
|
}, {
|
|
4329
4400
|
default: _(() => [
|
|
@@ -4331,31 +4402,31 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4331
4402
|
]),
|
|
4332
4403
|
_: 1
|
|
4333
4404
|
}, 8, ["id"])) : N("", !0),
|
|
4334
|
-
e.description ||
|
|
4335
|
-
|
|
4405
|
+
e.description || T(t).description ? (m(), S("div", Ol, [
|
|
4406
|
+
P(i.$slots, "description", {}, () => [
|
|
4336
4407
|
R("p", null, L(e.description), 1)
|
|
4337
4408
|
], !0)
|
|
4338
4409
|
])) : N("", !0),
|
|
4339
|
-
|
|
4340
|
-
|
|
4410
|
+
T(t).footer ? (m(), S("div", Ll, [
|
|
4411
|
+
P(i.$slots, "footer", {}, void 0, !0)
|
|
4341
4412
|
])) : N("", !0)
|
|
4342
4413
|
], 2)),
|
|
4343
|
-
R("div",
|
|
4344
|
-
|
|
4414
|
+
R("div", Bl, [
|
|
4415
|
+
P(i.$slots, "default", {}, void 0, !0)
|
|
4345
4416
|
])
|
|
4346
4417
|
])
|
|
4347
|
-
], 10,
|
|
4418
|
+
], 10, Il));
|
|
4348
4419
|
}
|
|
4349
|
-
}),
|
|
4420
|
+
}), _s = /* @__PURE__ */ se(Rl, [["__scopeId", "data-v-b1f74200"]]), Kl = { class: "ff-form-section" }, Nl = { class: "header" }, Ml = {
|
|
4350
4421
|
key: 0,
|
|
4351
4422
|
class: "step"
|
|
4352
|
-
},
|
|
4423
|
+
}, jl = { class: "header-content" }, Pl = { class: "header-title" }, Dl = {
|
|
4353
4424
|
key: 0,
|
|
4354
4425
|
class: "header-description"
|
|
4355
|
-
},
|
|
4426
|
+
}, Ul = {
|
|
4356
4427
|
key: 1,
|
|
4357
4428
|
class: "header-extra"
|
|
4358
|
-
},
|
|
4429
|
+
}, ql = { class: "content" }, Hl = /* @__PURE__ */ z({
|
|
4359
4430
|
__name: "EntityFormBlock",
|
|
4360
4431
|
props: {
|
|
4361
4432
|
step: {},
|
|
@@ -4364,37 +4435,37 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4364
4435
|
},
|
|
4365
4436
|
setup(e) {
|
|
4366
4437
|
const t = De();
|
|
4367
|
-
return (n, i) => (m(), S("div",
|
|
4368
|
-
R("header",
|
|
4369
|
-
e.step != null ? (m(), S("div",
|
|
4370
|
-
R("div",
|
|
4371
|
-
R("h2",
|
|
4372
|
-
|
|
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", {}, () => [
|
|
4373
4444
|
q(L(e.title), 1)
|
|
4374
4445
|
], !0)
|
|
4375
4446
|
]),
|
|
4376
|
-
e.description || t.description ? (m(), S("div",
|
|
4377
|
-
|
|
4447
|
+
e.description || t.description ? (m(), S("div", Dl, [
|
|
4448
|
+
P(n.$slots, "description", {}, () => [
|
|
4378
4449
|
q(L(e.description), 1)
|
|
4379
4450
|
], !0)
|
|
4380
4451
|
])) : N("", !0)
|
|
4381
4452
|
]),
|
|
4382
|
-
t.extra ? (m(), S("div",
|
|
4383
|
-
|
|
4453
|
+
t.extra ? (m(), S("div", Ul, [
|
|
4454
|
+
P(n.$slots, "extra", {}, void 0, !0)
|
|
4384
4455
|
])) : N("", !0)
|
|
4385
4456
|
]),
|
|
4386
|
-
R("div",
|
|
4387
|
-
|
|
4457
|
+
R("div", ql, [
|
|
4458
|
+
P(n.$slots, "default", {}, void 0, !0)
|
|
4388
4459
|
])
|
|
4389
4460
|
]));
|
|
4390
4461
|
}
|
|
4391
|
-
}),
|
|
4462
|
+
}), ws = /* @__PURE__ */ se(Hl, [["__scopeId", "data-v-cb6d2e95"]]), Vl = {
|
|
4392
4463
|
class: "kong-ui-public-entity-link",
|
|
4393
4464
|
"data-testid": "entity-link-parent"
|
|
4394
|
-
},
|
|
4465
|
+
}, Yl = {
|
|
4395
4466
|
key: 0,
|
|
4396
4467
|
class: "deleted-entity"
|
|
4397
|
-
},
|
|
4468
|
+
}, Wl = { key: 1 }, Jl = ["onClick"], Gl = /* @__PURE__ */ z({
|
|
4398
4469
|
__name: "EntityLink",
|
|
4399
4470
|
props: {
|
|
4400
4471
|
entityLinkData: {
|
|
@@ -4418,10 +4489,10 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4418
4489
|
}
|
|
4419
4490
|
},
|
|
4420
4491
|
setup(e) {
|
|
4421
|
-
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 = $(() => {
|
|
4422
4493
|
var u;
|
|
4423
4494
|
return (u = t.entityLinkData.id) != null && u.toString().includes(":") ? t.entityLinkData.id.toString().split(":")[1] : t.entityLinkData.id;
|
|
4424
|
-
}), c =
|
|
4495
|
+
}), c = $(() => {
|
|
4425
4496
|
var u;
|
|
4426
4497
|
return `${(u = l.value) == null ? void 0 : u.toString().slice(0, 5)} (deleted)`;
|
|
4427
4498
|
}), d = async (u) => {
|
|
@@ -4430,9 +4501,9 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4430
4501
|
}, 1800));
|
|
4431
4502
|
};
|
|
4432
4503
|
return (u, p) => {
|
|
4433
|
-
const g =
|
|
4434
|
-
return m(), S("div",
|
|
4435
|
-
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, {
|
|
4436
4507
|
key: 2,
|
|
4437
4508
|
class: "entity-link",
|
|
4438
4509
|
"hide-icon": !e.newWindow,
|
|
@@ -4441,7 +4512,7 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4441
4512
|
}, {
|
|
4442
4513
|
default: _(() => [
|
|
4443
4514
|
M(g, {
|
|
4444
|
-
text:
|
|
4515
|
+
text: T(i) && e.entityLinkData.label || ""
|
|
4445
4516
|
}, {
|
|
4446
4517
|
default: _(() => [
|
|
4447
4518
|
R("span", {
|
|
@@ -4454,8 +4525,8 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4454
4525
|
}, 8, ["text"])
|
|
4455
4526
|
]),
|
|
4456
4527
|
_: 1
|
|
4457
|
-
}, 8, ["hide-icon", "href", "target"])) : N("", !0) : (m(), S("div",
|
|
4458
|
-
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, {
|
|
4459
4530
|
key: a.value,
|
|
4460
4531
|
class: "copy-uuid-tooltip",
|
|
4461
4532
|
"max-width": "160",
|
|
@@ -4464,18 +4535,18 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4464
4535
|
}, {
|
|
4465
4536
|
default: _(() => [
|
|
4466
4537
|
M(x, null, {
|
|
4467
|
-
default: _(({ copyToClipboard:
|
|
4538
|
+
default: _(({ copyToClipboard: h }) => [
|
|
4468
4539
|
R("span", {
|
|
4469
4540
|
class: "entity-link-copy-id",
|
|
4470
|
-
onClick:
|
|
4541
|
+
onClick: Be((k) => d(h), ["stop"])
|
|
4471
4542
|
}, [
|
|
4472
|
-
M(
|
|
4543
|
+
M(T(si), {
|
|
4473
4544
|
class: "copy-icon",
|
|
4474
|
-
color:
|
|
4545
|
+
color: T(tr),
|
|
4475
4546
|
"data-testid": "copy-id",
|
|
4476
|
-
size:
|
|
4547
|
+
size: T(ir)
|
|
4477
4548
|
}, null, 8, ["color", "size"])
|
|
4478
|
-
], 8,
|
|
4549
|
+
], 8, Jl)
|
|
4479
4550
|
]),
|
|
4480
4551
|
_: 1
|
|
4481
4552
|
})
|
|
@@ -4485,40 +4556,40 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4485
4556
|
]);
|
|
4486
4557
|
};
|
|
4487
4558
|
}
|
|
4488
|
-
}),
|
|
4559
|
+
}), Ss = /* @__PURE__ */ se(Gl, [["__scopeId", "data-v-96efdfa5"]]), zl = { class: "kong-ui-public-entity-empty-state" }, Ql = { class: "entity-empty-state-content" }, Zl = {
|
|
4489
4560
|
key: 0,
|
|
4490
4561
|
class: "empty-state-image"
|
|
4491
|
-
},
|
|
4562
|
+
}, Xl = {
|
|
4492
4563
|
key: 1,
|
|
4493
4564
|
class: "entity-empty-state-title"
|
|
4494
|
-
},
|
|
4565
|
+
}, es = {
|
|
4495
4566
|
key: 2,
|
|
4496
4567
|
class: "entity-empty-state-description"
|
|
4497
|
-
},
|
|
4568
|
+
}, ts = {
|
|
4498
4569
|
key: 3,
|
|
4499
4570
|
class: "entity-empty-state-pricing"
|
|
4500
|
-
},
|
|
4571
|
+
}, ns = {
|
|
4501
4572
|
key: 0,
|
|
4502
4573
|
class: "entity-empty-state-message"
|
|
4503
|
-
},
|
|
4574
|
+
}, is = {
|
|
4504
4575
|
key: 1,
|
|
4505
4576
|
class: "entity-empty-state-action"
|
|
4506
|
-
},
|
|
4577
|
+
}, rs = {
|
|
4507
4578
|
key: 2,
|
|
4508
4579
|
class: "entity-empty-state-card-container"
|
|
4509
|
-
},
|
|
4580
|
+
}, as = {
|
|
4510
4581
|
key: 0,
|
|
4511
4582
|
class: "feature-icon"
|
|
4512
|
-
},
|
|
4583
|
+
}, os = { class: "card-header" }, ls = ["title"], ss = {
|
|
4513
4584
|
key: 3,
|
|
4514
4585
|
class: "entity-empty-state-bottom-container"
|
|
4515
|
-
},
|
|
4586
|
+
}, cs = /* @__PURE__ */ z({
|
|
4516
4587
|
__name: "EntityEmptyState",
|
|
4517
4588
|
props: {
|
|
4518
4589
|
appearance: {
|
|
4519
4590
|
type: String,
|
|
4520
4591
|
default: () => "primary",
|
|
4521
|
-
validator: (e) =>
|
|
4592
|
+
validator: (e) => yt.includes(e)
|
|
4522
4593
|
},
|
|
4523
4594
|
title: {
|
|
4524
4595
|
type: String,
|
|
@@ -4553,47 +4624,47 @@ const $l = ["aria-labelledby"], Tl = { class: "form-section-wrapper" }, Il = {
|
|
|
4553
4624
|
},
|
|
4554
4625
|
emits: ["click:create", "click:learn-more"],
|
|
4555
4626
|
setup(e) {
|
|
4556
|
-
const t = e, { i18n: { t: n } } = W.useI18n(), i = K(!1), r =
|
|
4557
|
-
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 () => {
|
|
4558
4629
|
i.value = await t.canCreate();
|
|
4559
|
-
}),
|
|
4630
|
+
}), nt(() => ei(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
|
|
4560
4631
|
Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) => {
|
|
4561
|
-
const l =
|
|
4562
|
-
return m(), S("div",
|
|
4563
|
-
R("div",
|
|
4564
|
-
a.$slots.image ? (m(), S("div",
|
|
4565
|
-
|
|
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)
|
|
4566
4637
|
])) : N("", !0),
|
|
4567
|
-
e.title || a.$slots.title ? (m(), S("div",
|
|
4638
|
+
e.title || a.$slots.title ? (m(), S("div", Xl, [
|
|
4568
4639
|
R("h1", {
|
|
4569
4640
|
class: fe(o.value)
|
|
4570
4641
|
}, [
|
|
4571
|
-
|
|
4642
|
+
P(a.$slots, "title", {}, () => [
|
|
4572
4643
|
q(L(e.title), 1)
|
|
4573
4644
|
], !0)
|
|
4574
4645
|
], 2)
|
|
4575
4646
|
])) : N("", !0),
|
|
4576
|
-
e.description || a.$slots.default ? (m(), S("div",
|
|
4577
|
-
|
|
4647
|
+
e.description || a.$slots.default ? (m(), S("div", es, [
|
|
4648
|
+
P(a.$slots, "default", {}, () => [
|
|
4578
4649
|
R("p", null, L(e.description), 1)
|
|
4579
4650
|
], !0)
|
|
4580
4651
|
])) : N("", !0),
|
|
4581
|
-
e.pricing || a.$slots.pricing ? (m(), S("div",
|
|
4652
|
+
e.pricing || a.$slots.pricing ? (m(), S("div", ts, [
|
|
4582
4653
|
R("p", null, [
|
|
4583
|
-
R("b", null, L(
|
|
4654
|
+
R("b", null, L(T(n)("emptyState.pricingTitle")), 1),
|
|
4584
4655
|
s[2] || (s[2] = q()),
|
|
4585
|
-
|
|
4656
|
+
P(a.$slots, "pricing", {}, () => [
|
|
4586
4657
|
q(L(e.pricing), 1)
|
|
4587
4658
|
], !0)
|
|
4588
4659
|
])
|
|
4589
4660
|
])) : N("", !0)
|
|
4590
4661
|
]),
|
|
4591
|
-
a.$slots.message ? (m(), S("div",
|
|
4592
|
-
|
|
4662
|
+
a.$slots.message ? (m(), S("div", ns, [
|
|
4663
|
+
P(a.$slots, "message", {}, void 0, !0)
|
|
4593
4664
|
])) : N("", !0),
|
|
4594
|
-
r.value || e.learnMore || a.$slots.actions ? (m(), S("div",
|
|
4595
|
-
|
|
4596
|
-
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), {
|
|
4597
4668
|
key: 0,
|
|
4598
4669
|
appearance: "primary",
|
|
4599
4670
|
"data-testid": "entity-create-button",
|
|
@@ -4601,12 +4672,12 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4601
4672
|
onClick: s[0] || (s[0] = (c) => a.$emit("click:create"))
|
|
4602
4673
|
}, {
|
|
4603
4674
|
default: _(() => [
|
|
4604
|
-
M(
|
|
4675
|
+
M(T(Yt)),
|
|
4605
4676
|
q(" " + L(e.actionButtonText), 1)
|
|
4606
4677
|
]),
|
|
4607
4678
|
_: 1
|
|
4608
4679
|
}, 8, ["size"])) : N("", !0),
|
|
4609
|
-
e.learnMore ? (m(),
|
|
4680
|
+
e.learnMore ? (m(), j(T(mt), {
|
|
4610
4681
|
key: 1,
|
|
4611
4682
|
appearance: "secondary",
|
|
4612
4683
|
"data-testid": "entity-learn-more-button",
|
|
@@ -4614,39 +4685,39 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4614
4685
|
onClick: s[1] || (s[1] = (c) => a.$emit("click:learn-more"))
|
|
4615
4686
|
}, {
|
|
4616
4687
|
default: _(() => [
|
|
4617
|
-
M(
|
|
4618
|
-
q(" " + L(
|
|
4688
|
+
M(T(Vt), { decorative: "" }),
|
|
4689
|
+
q(" " + L(T(n)("emptyState.learnMore")), 1)
|
|
4619
4690
|
]),
|
|
4620
4691
|
_: 1
|
|
4621
4692
|
}, 8, ["size"])) : N("", !0)
|
|
4622
4693
|
], !0)
|
|
4623
4694
|
])) : N("", !0),
|
|
4624
|
-
e.features.length ? (m(), S("div",
|
|
4625
|
-
(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, {
|
|
4626
4697
|
key: c,
|
|
4627
4698
|
class: "entity-empty-state-card"
|
|
4628
4699
|
}, {
|
|
4629
4700
|
title: _(() => [
|
|
4630
|
-
a.$slots[`feature-${d}-icon`] ? (m(), S("div",
|
|
4631
|
-
|
|
4701
|
+
a.$slots[`feature-${d}-icon`] ? (m(), S("div", as, [
|
|
4702
|
+
P(a.$slots, `feature-${d}-icon`, {}, void 0, !0)
|
|
4632
4703
|
])) : N("", !0),
|
|
4633
|
-
R("div",
|
|
4704
|
+
R("div", os, L(c.title), 1)
|
|
4634
4705
|
]),
|
|
4635
4706
|
default: _(() => [
|
|
4636
4707
|
R("div", {
|
|
4637
4708
|
title: c.description
|
|
4638
|
-
}, L(c.description), 9,
|
|
4709
|
+
}, L(c.description), 9, ls)
|
|
4639
4710
|
]),
|
|
4640
4711
|
_: 2
|
|
4641
4712
|
}, 1024))), 128))
|
|
4642
4713
|
])) : N("", !0),
|
|
4643
|
-
a.$slots.bottom ? (m(), S("div",
|
|
4644
|
-
|
|
4714
|
+
a.$slots.bottom ? (m(), S("div", ss, [
|
|
4715
|
+
P(a.$slots, "bottom", {}, void 0, !0)
|
|
4645
4716
|
])) : N("", !0)
|
|
4646
4717
|
]);
|
|
4647
4718
|
};
|
|
4648
4719
|
}
|
|
4649
|
-
}),
|
|
4720
|
+
}), $s = /* @__PURE__ */ se(cs, [["__scopeId", "data-v-645aae54"]]), us = { key: 1 }, Ts = /* @__PURE__ */ z({
|
|
4650
4721
|
__name: "TableTags",
|
|
4651
4722
|
props: {
|
|
4652
4723
|
/** The tags to display in the table */
|
|
@@ -4660,7 +4731,7 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4660
4731
|
}
|
|
4661
4732
|
},
|
|
4662
4733
|
setup(e) {
|
|
4663
|
-
const t = e, n =
|
|
4734
|
+
const t = e, n = $(() => {
|
|
4664
4735
|
if (Array.isArray(t.tags))
|
|
4665
4736
|
return t.tags;
|
|
4666
4737
|
if (typeof t.tags == "string")
|
|
@@ -4674,12 +4745,12 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4674
4745
|
});
|
|
4675
4746
|
return (i, r) => {
|
|
4676
4747
|
var o;
|
|
4677
|
-
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 }, {
|
|
4678
4749
|
default: _(() => [
|
|
4679
|
-
(m(!0), S(ue, null, ce(n.value, (a) => (m(),
|
|
4750
|
+
(m(!0), S(ue, null, ce(n.value, (a) => (m(), j(T(ai), {
|
|
4680
4751
|
key: a,
|
|
4681
4752
|
"max-width": e.tagMaxWidth,
|
|
4682
|
-
onClick: r[0] || (r[0] =
|
|
4753
|
+
onClick: r[0] || (r[0] = Be(() => {
|
|
4683
4754
|
}, ["stop"]))
|
|
4684
4755
|
}, {
|
|
4685
4756
|
default: _(() => [
|
|
@@ -4689,51 +4760,53 @@ Docs: https://kongponents.konghq.com/components/empty-state.html.`)), (a, s) =>
|
|
|
4689
4760
|
}, 1032, ["max-width"]))), 128))
|
|
4690
4761
|
]),
|
|
4691
4762
|
_: 1
|
|
4692
|
-
})) : (m(), S("span",
|
|
4763
|
+
})) : (m(), S("span", us, "-"));
|
|
4693
4764
|
};
|
|
4694
4765
|
}
|
|
4695
|
-
}), { 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;
|
|
4696
4767
|
export {
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4768
|
+
yt as Appearances,
|
|
4769
|
+
Yo as ConfigCardDisplay,
|
|
4770
|
+
Xt as ConfigCardItem,
|
|
4700
4771
|
ae as ConfigurationSchemaSection,
|
|
4701
4772
|
V as ConfigurationSchemaType,
|
|
4702
|
-
|
|
4703
|
-
hs as
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
ui as
|
|
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,
|
|
4715
4787
|
me as FetcherStatus,
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
Yn as
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
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,
|
|
4795
|
+
Yn as TerraformCodeBlock,
|
|
4796
|
+
Vn as YamlCodeBlock,
|
|
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
|
|
4739
4812
|
};
|