@kong-ui-public/entities-snis 2.3.28 → 2.3.29
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-snis.es.js +1230 -1116
- package/dist/entities-snis.umd.js +20 -20
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/entities-snis.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { createI18n as tt, i18nTComponent as
|
|
1
|
+
import { defineComponent as ie, ref as F, computed as x, watch as pe, renderSlot as ae, createCommentVNode as Z, unref as h, onBeforeMount as Xe, resolveComponent as $, openBlock as S, createBlock as H, withCtx as b, createElementVNode as K, toDisplayString as E, createElementBlock as q, withModifiers as $e, createVNode as I, createTextVNode as G, createSlots as Rt, withDirectives as be, vShow as ke, renderList as et, Fragment as Bt, useSlots as Vn, normalizeClass as Le, useCssVars as zn, inject as Ut, onMounted as Hn, onUnmounted as Yn, resolveDynamicComponent as je, normalizeStyle as Pt, pushScopeId as Dt, popScopeId as Vt, mergeProps as ut, reactive as dt } from "vue";
|
|
2
|
+
import { createI18n as tt, i18nTComponent as zt } from "@kong-ui-public/i18n";
|
|
3
3
|
import pt from "axios";
|
|
4
4
|
import "@kong/kongponents";
|
|
5
|
-
import { useRouter as
|
|
6
|
-
const
|
|
5
|
+
import { useRouter as Ht } from "vue-router";
|
|
6
|
+
const Wn = {
|
|
7
7
|
create: "New SNI",
|
|
8
8
|
copy_id: "Copy ID",
|
|
9
9
|
copy_json: "Copy JSON",
|
|
@@ -11,10 +11,10 @@ const Yn = {
|
|
|
11
11
|
delete: "Delete",
|
|
12
12
|
clear: "Clear",
|
|
13
13
|
loading: "Loading..."
|
|
14
|
-
},
|
|
14
|
+
}, Jn = {
|
|
15
15
|
placeholder: "Filter by exact name or ID",
|
|
16
16
|
no_results: "No results found"
|
|
17
|
-
},
|
|
17
|
+
}, Gn = {
|
|
18
18
|
title: "SNIs",
|
|
19
19
|
list: {
|
|
20
20
|
toolbar_actions: {
|
|
@@ -31,7 +31,7 @@ const Yn = {
|
|
|
31
31
|
description: "SNIs are used to map hostnames to a certificate."
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
},
|
|
34
|
+
}, Zn = {
|
|
35
35
|
sections: {
|
|
36
36
|
general: {
|
|
37
37
|
title: "General Information",
|
|
@@ -59,7 +59,7 @@ const Yn = {
|
|
|
59
59
|
footer: "Search by exact ID to find certificates not included in the list"
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
-
},
|
|
62
|
+
}, Qn = {
|
|
63
63
|
delete: "The SNI could not be deleted at this time.",
|
|
64
64
|
general: "SNIs could not be retrieved",
|
|
65
65
|
certificates: {
|
|
@@ -67,32 +67,32 @@ const Yn = {
|
|
|
67
67
|
invalid: "Please select a valid certificate ID"
|
|
68
68
|
},
|
|
69
69
|
copy: "Failed to copy to clipboard"
|
|
70
|
-
},
|
|
70
|
+
}, Xn = {
|
|
71
71
|
success: "Copied {val} to clipboard",
|
|
72
72
|
success_brief: "Successfully copied to clipboard"
|
|
73
|
-
},
|
|
74
|
-
actions:
|
|
75
|
-
search:
|
|
76
|
-
snis:
|
|
77
|
-
form:
|
|
73
|
+
}, ei = {
|
|
74
|
+
actions: Wn,
|
|
75
|
+
search: Jn,
|
|
76
|
+
snis: Gn,
|
|
77
|
+
form: Zn,
|
|
78
78
|
delete: {
|
|
79
79
|
title: "Delete an SNI",
|
|
80
80
|
description: "This action cannot be reversed so make sure to check the SNI usage before deleting."
|
|
81
81
|
},
|
|
82
|
-
errors:
|
|
83
|
-
copy:
|
|
82
|
+
errors: Qn,
|
|
83
|
+
copy: Xn
|
|
84
84
|
};
|
|
85
|
-
function
|
|
86
|
-
const e = tt("en-us",
|
|
85
|
+
function ti() {
|
|
86
|
+
const e = tt("en-us", ei);
|
|
87
87
|
return {
|
|
88
88
|
i18n: e,
|
|
89
|
-
i18nT:
|
|
89
|
+
i18nT: zt(e)
|
|
90
90
|
// Translation component <i18n-t>
|
|
91
91
|
};
|
|
92
92
|
}
|
|
93
|
-
const
|
|
94
|
-
useI18n:
|
|
95
|
-
},
|
|
93
|
+
const Yt = {
|
|
94
|
+
useI18n: ti
|
|
95
|
+
}, _e = {
|
|
96
96
|
list: {
|
|
97
97
|
konnect: {
|
|
98
98
|
all: "/api/runtime_groups/{controlPlaneId}/snis"
|
|
@@ -116,8 +116,8 @@ const Dt = {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
};
|
|
119
|
-
var
|
|
120
|
-
function
|
|
119
|
+
var Wt = /* @__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))(Wt || {}), Ee = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(Ee || {}), me = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(me || {});
|
|
120
|
+
function ni() {
|
|
121
121
|
return {
|
|
122
122
|
getAxiosInstance: (e = {}) => {
|
|
123
123
|
try {
|
|
@@ -141,7 +141,7 @@ function ti() {
|
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
|
-
function
|
|
144
|
+
function ii() {
|
|
145
145
|
return {
|
|
146
146
|
debounce: (e, t) => {
|
|
147
147
|
let n;
|
|
@@ -153,12 +153,12 @@ function ni() {
|
|
|
153
153
|
}
|
|
154
154
|
};
|
|
155
155
|
}
|
|
156
|
-
const De = "khcp-user-table-preferences",
|
|
156
|
+
const De = "khcp-user-table-preferences", ri = {
|
|
157
157
|
pageSize: 30,
|
|
158
158
|
sortColumnKey: void 0,
|
|
159
159
|
sortColumnOrder: void 0
|
|
160
160
|
};
|
|
161
|
-
function
|
|
161
|
+
function ai() {
|
|
162
162
|
const e = (n) => {
|
|
163
163
|
if (typeof n == "string")
|
|
164
164
|
try {
|
|
@@ -182,7 +182,7 @@ function ri() {
|
|
|
182
182
|
},
|
|
183
183
|
getTablePreferences: (n) => {
|
|
184
184
|
const i = t();
|
|
185
|
-
return (i == null ? void 0 : i.get(n)) || void 0 ||
|
|
185
|
+
return (i == null ? void 0 : i.get(n)) || void 0 || ri;
|
|
186
186
|
},
|
|
187
187
|
deleteAllTablePreferences: () => {
|
|
188
188
|
localStorage.removeItem(De);
|
|
@@ -190,22 +190,22 @@ function ri() {
|
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
192
|
function nt(e = {}) {
|
|
193
|
-
const { getAxiosInstance: t } =
|
|
193
|
+
const { getAxiosInstance: t } = ni();
|
|
194
194
|
return {
|
|
195
195
|
axiosInstance: t(e)
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
|
-
const
|
|
198
|
+
const oi = {
|
|
199
199
|
actions: {
|
|
200
200
|
copyId: "Copy ID",
|
|
201
201
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
202
202
|
copyToClipboard: "Copied successfully!",
|
|
203
203
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
204
204
|
}
|
|
205
|
-
},
|
|
205
|
+
}, li = {
|
|
206
206
|
message: "Are you sure you want to delete this {entityType}?",
|
|
207
207
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
208
|
-
},
|
|
208
|
+
}, si = {
|
|
209
209
|
actions: {
|
|
210
210
|
viewConfiguration: "View Configuration",
|
|
211
211
|
save: "Save",
|
|
@@ -221,13 +221,13 @@ const ai = {
|
|
|
221
221
|
errors: {
|
|
222
222
|
edit: "The entity could not be edited at this time."
|
|
223
223
|
}
|
|
224
|
-
},
|
|
224
|
+
}, ci = {
|
|
225
225
|
emptyState: {
|
|
226
226
|
noSearchResultsTitle: "No results found",
|
|
227
227
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
228
228
|
noSearchResultsCtaText: "Clear"
|
|
229
229
|
}
|
|
230
|
-
},
|
|
230
|
+
}, ui = {
|
|
231
231
|
title: "Configuration",
|
|
232
232
|
actions: {
|
|
233
233
|
copy: "Copy JSON"
|
|
@@ -262,7 +262,7 @@ const ai = {
|
|
|
262
262
|
entryTitle: "Entry {index}",
|
|
263
263
|
structuredFormat: "Structured"
|
|
264
264
|
}
|
|
265
|
-
},
|
|
265
|
+
}, di = {
|
|
266
266
|
filterButtonText: "Filter",
|
|
267
267
|
fieldLabel: "Filter by:",
|
|
268
268
|
inputPlaceholder: "Enter a value",
|
|
@@ -270,15 +270,15 @@ const ai = {
|
|
|
270
270
|
applyButtonText: "Apply",
|
|
271
271
|
clearButtonText: "Clear",
|
|
272
272
|
clearAllButtonText: "Clear all filters"
|
|
273
|
-
},
|
|
273
|
+
}, pi = {
|
|
274
274
|
errors: {
|
|
275
275
|
fetch: "Could not fetch available items",
|
|
276
276
|
invalid: "Please select a valid value"
|
|
277
277
|
}
|
|
278
|
-
},
|
|
278
|
+
}, fi = {
|
|
279
279
|
unexpected: "An unexpected error has occurred",
|
|
280
280
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
281
|
-
},
|
|
281
|
+
}, mi = {
|
|
282
282
|
enable: {
|
|
283
283
|
title: "Enable {entityType}",
|
|
284
284
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -289,26 +289,26 @@ const ai = {
|
|
|
289
289
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
290
290
|
confirmText: "Yes, disable"
|
|
291
291
|
}
|
|
292
|
-
},
|
|
293
|
-
global:
|
|
294
|
-
deleteModal:
|
|
295
|
-
baseForm:
|
|
296
|
-
baseTable:
|
|
297
|
-
baseConfigCard:
|
|
298
|
-
filter:
|
|
299
|
-
debouncedFilter:
|
|
300
|
-
errors:
|
|
301
|
-
toggleModal:
|
|
292
|
+
}, gi = {
|
|
293
|
+
global: oi,
|
|
294
|
+
deleteModal: li,
|
|
295
|
+
baseForm: si,
|
|
296
|
+
baseTable: ci,
|
|
297
|
+
baseConfigCard: ui,
|
|
298
|
+
filter: di,
|
|
299
|
+
debouncedFilter: pi,
|
|
300
|
+
errors: fi,
|
|
301
|
+
toggleModal: mi
|
|
302
302
|
};
|
|
303
303
|
function it() {
|
|
304
|
-
const e = tt("en-us",
|
|
304
|
+
const e = tt("en-us", gi);
|
|
305
305
|
return {
|
|
306
306
|
i18n: e,
|
|
307
|
-
i18nT:
|
|
307
|
+
i18nT: zt(e)
|
|
308
308
|
// Translation component <i18n-t>
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Jt() {
|
|
312
312
|
const e = (n, i) => (i == null ? void 0 : i[n]) ?? void 0, t = (n, i) => {
|
|
313
313
|
if (n.length !== i.length)
|
|
314
314
|
return !1;
|
|
@@ -352,72 +352,72 @@ function Ht() {
|
|
|
352
352
|
isValidUuid: (n) => n ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(n) : !1
|
|
353
353
|
};
|
|
354
354
|
}
|
|
355
|
-
function
|
|
355
|
+
function hi(e, t, n, i = {
|
|
356
356
|
fetchedItemsKey: "data",
|
|
357
357
|
searchKeys: ["id"]
|
|
358
358
|
}) {
|
|
359
359
|
n || (n = "100");
|
|
360
360
|
const { axiosInstance: r } = nt({
|
|
361
361
|
headers: e.requestHeaders
|
|
362
|
-
}), { i18n: { t: o } } = it(), { debounce: a } =
|
|
363
|
-
await
|
|
364
|
-
}, 200), s =
|
|
365
|
-
let
|
|
366
|
-
e.app === "konnect" ?
|
|
367
|
-
const { isValidUuid:
|
|
362
|
+
}), { i18n: { t: o } } = it(), { debounce: a } = ii(), l = a(async (k) => {
|
|
363
|
+
await M(k);
|
|
364
|
+
}, 200), s = F(!1), u = F(""), d = F(""), c = F([]), f = F([]), p = F(void 0), C = h(t);
|
|
365
|
+
let m = `${e.apiBaseUrl}${C}`;
|
|
366
|
+
e.app === "konnect" ? m = m.replace(/{controlPlaneId}/gi, (e == null ? void 0 : e.controlPlaneId) || "") : e.app === "kongManager" && (m = m.replace(/\/{workspace}/gi, e != null && e.workspace ? `/${e.workspace}` : ""));
|
|
367
|
+
const { isValidUuid: A } = Jt(), O = async () => {
|
|
368
368
|
try {
|
|
369
369
|
s.value = !0;
|
|
370
|
-
const { data:
|
|
371
|
-
|
|
370
|
+
const { data: k } = await r.get(`${m}?size=${n}`);
|
|
371
|
+
k != null && k.next || (p.value = i.fetchedItemsKey in k ? k[i.fetchedItemsKey] : []), f.value = i.fetchedItemsKey in k ? k[i.fetchedItemsKey] : [], c.value = f.value;
|
|
372
372
|
} catch {
|
|
373
373
|
c.value = [], u.value = o("debouncedFilter.errors.fetch");
|
|
374
374
|
} finally {
|
|
375
375
|
s.value = !1;
|
|
376
376
|
}
|
|
377
|
-
},
|
|
378
|
-
var
|
|
379
|
-
if (
|
|
380
|
-
if (
|
|
377
|
+
}, g = F(""), M = async (k) => {
|
|
378
|
+
var y, N, ee;
|
|
379
|
+
if (g.value !== k)
|
|
380
|
+
if (g.value = k || "", p.value === void 0)
|
|
381
381
|
try {
|
|
382
382
|
if (s.value = !0, u.value = "", d.value = "", e.app === "konnect") {
|
|
383
|
-
let
|
|
384
|
-
|
|
385
|
-
const { data:
|
|
386
|
-
i.fetchedItemsKey in
|
|
387
|
-
} else if (
|
|
388
|
-
const
|
|
389
|
-
|
|
390
|
-
const { data: B } = await r.get(`${
|
|
383
|
+
let L = m + "";
|
|
384
|
+
k && (L += `/${k}`);
|
|
385
|
+
const { data: j } = await r.get(`${L}?size=${n}`);
|
|
386
|
+
i.fetchedItemsKey in j ? c.value = j[i.fetchedItemsKey] : j != null && j.id ? c.value = [j] : c.value = [];
|
|
387
|
+
} else if (k) {
|
|
388
|
+
const L = [];
|
|
389
|
+
A(k) && i.searchKeys.includes("id") ? L.push((async () => {
|
|
390
|
+
const { data: B } = await r.get(`${m}/${k}`);
|
|
391
391
|
return [B[i.fetchedItemsKey] ?? B];
|
|
392
|
-
})()) :
|
|
392
|
+
})()) : L.push(
|
|
393
393
|
...i.searchKeys.filter((B) => B !== "id").map(async (B) => {
|
|
394
|
-
const { data:
|
|
395
|
-
return
|
|
394
|
+
const { data: P } = await r.get(`${m}?${B}=${k}`);
|
|
395
|
+
return P[i.fetchedItemsKey];
|
|
396
396
|
})
|
|
397
397
|
);
|
|
398
|
-
const
|
|
399
|
-
c.value = [], (
|
|
400
|
-
var
|
|
401
|
-
(
|
|
402
|
-
|
|
398
|
+
const j = await Promise.all(L), J = /* @__PURE__ */ new Set();
|
|
399
|
+
c.value = [], (y = j == null ? void 0 : j.forEach) == null || y.call(j, (B) => {
|
|
400
|
+
var P;
|
|
401
|
+
(P = B == null ? void 0 : B.forEach) == null || P.call(B, (z) => {
|
|
402
|
+
J.has(z.id) || (J.add(z.id), c.value.push(z));
|
|
403
403
|
});
|
|
404
404
|
});
|
|
405
405
|
} else
|
|
406
406
|
c.value = f.value;
|
|
407
|
-
} catch (
|
|
408
|
-
((
|
|
407
|
+
} catch (L) {
|
|
408
|
+
((N = L == null ? void 0 : L.response) == null ? void 0 : N.status) === 404 ? d.value = o("debouncedFilter.errors.invalid") : (c.value = [], u.value = o("debouncedFilter.errors.fetch"));
|
|
409
409
|
} finally {
|
|
410
410
|
s.value = !1;
|
|
411
411
|
}
|
|
412
412
|
else
|
|
413
|
-
s.value = !0, d.value = "",
|
|
414
|
-
var
|
|
415
|
-
let
|
|
413
|
+
s.value = !0, d.value = "", k ? (c.value = (ee = p.value) == null ? void 0 : ee.filter((L) => {
|
|
414
|
+
var j;
|
|
415
|
+
let J = !1;
|
|
416
416
|
for (const B of i.searchKeys) {
|
|
417
|
-
const
|
|
418
|
-
|
|
417
|
+
const P = typeof L[B] == "string" ? (j = L[B]) == null ? void 0 : j.toLowerCase() : L[B];
|
|
418
|
+
P != null && P.includes(k.toLowerCase()) && (J = !0);
|
|
419
419
|
}
|
|
420
|
-
return
|
|
420
|
+
return J;
|
|
421
421
|
}), (!c.value || !c.value.length) && (d.value = o("debouncedFilter.errors.invalid"))) : c.value = p.value, s.value = !1;
|
|
422
422
|
};
|
|
423
423
|
return {
|
|
@@ -426,17 +426,17 @@ function mi(e, t, n, i = {
|
|
|
426
426
|
validationError: d,
|
|
427
427
|
results: c,
|
|
428
428
|
allRecords: p,
|
|
429
|
-
loadItems:
|
|
429
|
+
loadItems: O,
|
|
430
430
|
debouncedQueryChange: l
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
const n =
|
|
433
|
+
function yi(e, t) {
|
|
434
|
+
const n = h(t), i = x(
|
|
435
435
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${n}`) : new URL(n)
|
|
436
436
|
);
|
|
437
437
|
return i.value.search = "", (r) => `${i.value.href}/${r}`;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function vi() {
|
|
440
440
|
const { i18n: { t: e } } = it();
|
|
441
441
|
return {
|
|
442
442
|
getMessageFromError: (t) => {
|
|
@@ -466,7 +466,7 @@ function yi() {
|
|
|
466
466
|
}
|
|
467
467
|
};
|
|
468
468
|
}
|
|
469
|
-
function
|
|
469
|
+
function bi(e) {
|
|
470
470
|
const t = window.location.origin, n = t.endsWith("/") ? t : `${t}/`;
|
|
471
471
|
try {
|
|
472
472
|
const i = e.join("/"), r = `${n}${i}`, o = e.some((a) => a.trim() === "");
|
|
@@ -477,33 +477,33 @@ function vi(e) {
|
|
|
477
477
|
return console.warn("Failed to build valid URL:", i), "";
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
const n =
|
|
480
|
+
function Gt(e, t) {
|
|
481
|
+
const n = F(h(e)), i = F(h(t)), r = x(
|
|
482
482
|
() => !!(n.value.app === "konnect" || n.value.isExactMatch)
|
|
483
|
-
), o =
|
|
483
|
+
), o = x(
|
|
484
484
|
() => i.value.startsWith("/") ? new URL(`${window.location.origin}${i.value}`) : new URL(i.value)
|
|
485
485
|
);
|
|
486
486
|
return (a) => {
|
|
487
487
|
const { page: l, pageSize: s, offset: u, sortColumnKey: d, sortColumnOrder: c, query: f } = a;
|
|
488
488
|
try {
|
|
489
489
|
let p = new URL(o.value.href);
|
|
490
|
-
return r.value && f ? (p.search = "", p = n.value.app === "konnect" ? new URL(`${p.href}?filter[name][contains]=${f}`) : new URL(`${p.href}/${f}/`)) : (r.value || new URLSearchParams(f).forEach((
|
|
491
|
-
p.searchParams.append(
|
|
490
|
+
return r.value && f ? (p.search = "", p = n.value.app === "konnect" ? new URL(`${p.href}?filter[name][contains]=${f}`) : new URL(`${p.href}/${f}/`)) : (r.value || new URLSearchParams(f).forEach((C, m) => {
|
|
491
|
+
p.searchParams.append(m, C);
|
|
492
492
|
}), d && p.searchParams.append("sort_by", d), c === "desc" && p.searchParams.append("sort_desc", "1"), p.searchParams.append("size", String(s))), u && l !== 1 && p.searchParams.append("offset", String(u)), p.href;
|
|
493
493
|
} catch (p) {
|
|
494
494
|
return console.error("RouteList(fetcher)", p), i.value;
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
}
|
|
498
|
-
function
|
|
499
|
-
const i =
|
|
498
|
+
function ki(e, t, n = "data") {
|
|
499
|
+
const i = h(t), { axiosInstance: r } = nt({
|
|
500
500
|
headers: e.requestHeaders
|
|
501
|
-
}), o =
|
|
502
|
-
status:
|
|
501
|
+
}), o = Gt(e, i), a = F({
|
|
502
|
+
status: me.Idle
|
|
503
503
|
});
|
|
504
504
|
return { fetcher: async (l) => {
|
|
505
505
|
try {
|
|
506
|
-
a.value = { status:
|
|
506
|
+
a.value = { status: me.Loading };
|
|
507
507
|
let s = o(l);
|
|
508
508
|
s.includes("filter[name]") && (s = `${s}&page[size]=${l.pageSize}&page[number]=${l.page}`);
|
|
509
509
|
const { data: u } = await r.get(s), d = n && n.replace(/[^\w-_]/gi, "");
|
|
@@ -519,7 +519,7 @@ function bi(e, t, n = "data") {
|
|
|
519
519
|
} : null
|
|
520
520
|
};
|
|
521
521
|
return a.value = {
|
|
522
|
-
status:
|
|
522
|
+
status: me.Idle,
|
|
523
523
|
response: f
|
|
524
524
|
}, f;
|
|
525
525
|
} catch (s) {
|
|
@@ -528,72 +528,72 @@ function bi(e, t, n = "data") {
|
|
|
528
528
|
total: 0
|
|
529
529
|
};
|
|
530
530
|
return l.query && s.response.status === 404 ? (a.value = {
|
|
531
|
-
status:
|
|
531
|
+
status: me.NoResults,
|
|
532
532
|
response: u,
|
|
533
533
|
error: s
|
|
534
534
|
}, u) : (a.value = {
|
|
535
|
-
status:
|
|
535
|
+
status: me.Error,
|
|
536
536
|
response: u,
|
|
537
537
|
error: s
|
|
538
538
|
}, u);
|
|
539
539
|
}
|
|
540
540
|
}, fetcherState: a };
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function wi() {
|
|
543
543
|
const e = (n, i = "_") => n ? n.split(i).map((r) => r.toLowerCase() === "id" ? r.toUpperCase() : r.charAt(0).toUpperCase() + r.substring(1)).join(" ") : "", t = /(?:^|[\s-:'"])\w/g;
|
|
544
544
|
return {
|
|
545
545
|
capitalize: (n) => n ? n.replace(t, (i) => i.toUpperCase()) : "",
|
|
546
546
|
convertKeyToTitle: e
|
|
547
547
|
};
|
|
548
548
|
}
|
|
549
|
-
const
|
|
549
|
+
const Zt = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i, ft = (e) => {
|
|
550
550
|
if (typeof e != "string")
|
|
551
551
|
throw new TypeError("Invalid argument expected string");
|
|
552
|
-
const t = e.match(
|
|
552
|
+
const t = e.match(Zt);
|
|
553
553
|
if (!t)
|
|
554
554
|
throw new Error(`Invalid argument not valid semver ('${e}' received)`);
|
|
555
555
|
return t.shift(), t;
|
|
556
|
-
},
|
|
556
|
+
}, mt = (e) => e === "*" || e === "x" || e === "X", gt = (e) => {
|
|
557
557
|
const t = parseInt(e, 10);
|
|
558
558
|
return isNaN(t) ? e : t;
|
|
559
|
-
},
|
|
560
|
-
if (
|
|
559
|
+
}, Ci = (e, t) => typeof e != typeof t ? [String(e), String(t)] : [e, t], Si = (e, t) => {
|
|
560
|
+
if (mt(e) || mt(t))
|
|
561
561
|
return 0;
|
|
562
|
-
const [n, i] =
|
|
562
|
+
const [n, i] = Ci(gt(e), gt(t));
|
|
563
563
|
return n > i ? 1 : n < i ? -1 : 0;
|
|
564
|
-
},
|
|
564
|
+
}, ht = (e, t) => {
|
|
565
565
|
for (let n = 0; n < Math.max(e.length, t.length); n++) {
|
|
566
|
-
const i =
|
|
566
|
+
const i = Si(e[n] || "0", t[n] || "0");
|
|
567
567
|
if (i !== 0)
|
|
568
568
|
return i;
|
|
569
569
|
}
|
|
570
570
|
return 0;
|
|
571
|
-
},
|
|
572
|
-
const n = ft(e), i = ft(t), r = n.pop(), o = i.pop(), a =
|
|
573
|
-
return a !== 0 ? a : r && o ?
|
|
571
|
+
}, Ai = (e, t) => {
|
|
572
|
+
const n = ft(e), i = ft(t), r = n.pop(), o = i.pop(), a = ht(n, i);
|
|
573
|
+
return a !== 0 ? a : r && o ? ht(r.split("."), o.split(".")) : r || o ? r ? -1 : 1 : 0;
|
|
574
574
|
}, yt = (e, t, n) => {
|
|
575
|
-
|
|
576
|
-
const i =
|
|
577
|
-
return
|
|
578
|
-
},
|
|
575
|
+
Ii(n);
|
|
576
|
+
const i = Ai(e, t);
|
|
577
|
+
return Qt[n].includes(i);
|
|
578
|
+
}, Qt = {
|
|
579
579
|
">": [1],
|
|
580
580
|
">=": [0, 1],
|
|
581
581
|
"=": [0],
|
|
582
582
|
"<=": [-1, 0],
|
|
583
583
|
"<": [-1],
|
|
584
584
|
"!=": [-1, 1]
|
|
585
|
-
}, vt = Object.keys(
|
|
585
|
+
}, vt = Object.keys(Qt), Ii = (e) => {
|
|
586
586
|
if (typeof e != "string")
|
|
587
587
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
588
588
|
if (vt.indexOf(e) === -1)
|
|
589
589
|
throw new Error(`Invalid operator, expected one of ${vt.join("|")}`);
|
|
590
|
-
},
|
|
591
|
-
function
|
|
590
|
+
}, xi = (e) => typeof e == "string" && /^[v\d]/.test(e) && Zt.test(e);
|
|
591
|
+
function _i(e) {
|
|
592
592
|
const { gatewayInfo: t, supportedRange: n } = e;
|
|
593
593
|
if (!t)
|
|
594
594
|
return !0;
|
|
595
595
|
const { edition: i, version: r } = t;
|
|
596
|
-
if (!
|
|
596
|
+
if (!xi(r))
|
|
597
597
|
return console.error("Invalid version"), !1;
|
|
598
598
|
const o = n[i];
|
|
599
599
|
if (!o)
|
|
@@ -601,36 +601,36 @@ function xi(e) {
|
|
|
601
601
|
const [a, l] = o;
|
|
602
602
|
return !(a && yt(r, a, "<") || l && yt(r, l, ">"));
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
const t =
|
|
604
|
+
function Ti(e) {
|
|
605
|
+
const t = F(0), n = F(0), i = F(!1);
|
|
606
606
|
return pe(e, (r) => {
|
|
607
607
|
r && !i.value && (t.value = r.offsetWidth, n.value = r.scrollWidth, i.value = !0);
|
|
608
608
|
}), {
|
|
609
|
-
isTruncated:
|
|
609
|
+
isTruncated: x(() => t.value < n.value)
|
|
610
610
|
};
|
|
611
611
|
}
|
|
612
|
-
const
|
|
612
|
+
const ge = {
|
|
613
613
|
useAxios: nt,
|
|
614
|
-
useDebouncedFilter:
|
|
615
|
-
useDeleteUrlBuilder:
|
|
616
|
-
useErrors:
|
|
617
|
-
useExternalLinkCreator:
|
|
618
|
-
useFetcher:
|
|
619
|
-
useFetchUrlBuilder:
|
|
620
|
-
useHelpers:
|
|
621
|
-
useStringHelpers:
|
|
614
|
+
useDebouncedFilter: hi,
|
|
615
|
+
useDeleteUrlBuilder: yi,
|
|
616
|
+
useErrors: vi,
|
|
617
|
+
useExternalLinkCreator: bi,
|
|
618
|
+
useFetcher: ki,
|
|
619
|
+
useFetchUrlBuilder: Gt,
|
|
620
|
+
useHelpers: Jt,
|
|
621
|
+
useStringHelpers: wi,
|
|
622
622
|
useI18n: it,
|
|
623
|
-
useGatewayFeatureSupported:
|
|
624
|
-
useTruncationDetector:
|
|
625
|
-
},
|
|
623
|
+
useGatewayFeatureSupported: _i,
|
|
624
|
+
useTruncationDetector: Ti
|
|
625
|
+
}, Ae = (e, t) => {
|
|
626
626
|
const n = e.__vccOpts || e;
|
|
627
627
|
for (const [i, r] of t)
|
|
628
628
|
n[i] = r;
|
|
629
629
|
return n;
|
|
630
|
-
},
|
|
630
|
+
}, ji = "#0044f4", Oi = "#3a3f51", Ni = { class: "json-config" }, Fi = {
|
|
631
631
|
key: 0,
|
|
632
632
|
class: "json-endpoint"
|
|
633
|
-
},
|
|
633
|
+
}, Mi = /* @__PURE__ */ ie({
|
|
634
634
|
__name: "JsonCodeBlock",
|
|
635
635
|
props: {
|
|
636
636
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -658,10 +658,10 @@ const me = {
|
|
|
658
658
|
}
|
|
659
659
|
},
|
|
660
660
|
setup(e) {
|
|
661
|
-
|
|
661
|
+
zn((r) => ({
|
|
662
662
|
"2d178975": `${i.value}ch`
|
|
663
663
|
}));
|
|
664
|
-
const t = e, n =
|
|
664
|
+
const t = e, n = x(() => t.jsonRecord), i = x(() => {
|
|
665
665
|
var r;
|
|
666
666
|
if (!t.fetcherUrl)
|
|
667
667
|
return 0;
|
|
@@ -670,86 +670,86 @@ const me = {
|
|
|
670
670
|
});
|
|
671
671
|
return (r, o) => {
|
|
672
672
|
var a;
|
|
673
|
-
const l =
|
|
674
|
-
return
|
|
675
|
-
t.fetcherUrl && (a = t.config) != null && a.jsonYamlFormsEnabled ? (
|
|
676
|
-
|
|
673
|
+
const l = $("KBadge"), s = $("KCodeBlock");
|
|
674
|
+
return S(), q("div", Ni, [
|
|
675
|
+
t.fetcherUrl && (a = t.config) != null && a.jsonYamlFormsEnabled ? (S(), q("div", Fi, [
|
|
676
|
+
I(l, {
|
|
677
677
|
appearance: t.requestMethod
|
|
678
678
|
}, {
|
|
679
|
-
default:
|
|
680
|
-
|
|
679
|
+
default: b(() => [
|
|
680
|
+
G(E(t.requestMethod), 1)
|
|
681
681
|
]),
|
|
682
682
|
_: 1
|
|
683
683
|
}, 8, ["appearance"]),
|
|
684
|
-
|
|
684
|
+
I(s, {
|
|
685
685
|
id: "json-endpoint-codeblock",
|
|
686
686
|
code: t.fetcherUrl,
|
|
687
687
|
"is-single-line": "",
|
|
688
688
|
language: "json",
|
|
689
689
|
theme: "dark"
|
|
690
690
|
}, null, 8, ["code"])
|
|
691
|
-
])) :
|
|
692
|
-
t.jsonRecord ? (
|
|
691
|
+
])) : Z("", !0),
|
|
692
|
+
t.jsonRecord ? (S(), H(s, {
|
|
693
693
|
key: 1,
|
|
694
694
|
id: "json-codeblock",
|
|
695
|
-
class:
|
|
695
|
+
class: Le({ "json-content": t.fetcherUrl }),
|
|
696
696
|
code: JSON.stringify(n.value, null, 2),
|
|
697
697
|
language: "json",
|
|
698
698
|
theme: "dark"
|
|
699
|
-
}, null, 8, ["class", "code"])) :
|
|
699
|
+
}, null, 8, ["class", "code"])) : Z("", !0)
|
|
700
700
|
]);
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
703
|
});
|
|
704
704
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
705
|
-
function
|
|
705
|
+
function Xt(e) {
|
|
706
706
|
return typeof e > "u" || e === null;
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Ei(e) {
|
|
709
709
|
return typeof e == "object" && e !== null;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
return Array.isArray(e) ? e :
|
|
711
|
+
function $i(e) {
|
|
712
|
+
return Array.isArray(e) ? e : Xt(e) ? [] : [e];
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function Li(e, t) {
|
|
715
715
|
var n, i, r, o;
|
|
716
716
|
if (t)
|
|
717
717
|
for (o = Object.keys(t), n = 0, i = o.length; n < i; n += 1)
|
|
718
718
|
r = o[n], e[r] = t[r];
|
|
719
719
|
return e;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function qi(e, t) {
|
|
722
722
|
var n = "", i;
|
|
723
723
|
for (i = 0; i < t; i += 1)
|
|
724
724
|
n += e;
|
|
725
725
|
return n;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function Ki(e) {
|
|
728
728
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
729
729
|
}
|
|
730
|
-
var
|
|
731
|
-
isNothing:
|
|
732
|
-
isObject:
|
|
730
|
+
var Ri = Xt, Bi = Ei, Ui = $i, Pi = qi, Di = Ki, Vi = Li, W = {
|
|
731
|
+
isNothing: Ri,
|
|
732
|
+
isObject: Bi,
|
|
733
733
|
toArray: Ui,
|
|
734
|
-
repeat:
|
|
735
|
-
isNegativeZero:
|
|
736
|
-
extend:
|
|
734
|
+
repeat: Pi,
|
|
735
|
+
isNegativeZero: Di,
|
|
736
|
+
extend: Vi
|
|
737
737
|
};
|
|
738
|
-
function
|
|
738
|
+
function en(e, t) {
|
|
739
739
|
var n = "", i = e.reason || "(unknown reason)";
|
|
740
740
|
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 += `
|
|
741
741
|
|
|
742
742
|
` + e.mark.snippet), i + " " + n) : i;
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message =
|
|
744
|
+
function Oe(e, t) {
|
|
745
|
+
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = t, this.message = en(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
746
746
|
}
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
return this.name + ": " +
|
|
747
|
+
Oe.prototype = Object.create(Error.prototype);
|
|
748
|
+
Oe.prototype.constructor = Oe;
|
|
749
|
+
Oe.prototype.toString = function(e) {
|
|
750
|
+
return this.name + ": " + en(this, e);
|
|
751
751
|
};
|
|
752
|
-
var ne =
|
|
752
|
+
var ne = Oe;
|
|
753
753
|
function Ve(e, t, n, i, r) {
|
|
754
754
|
var o = "", a = "", l = Math.floor(r / 2) - 1;
|
|
755
755
|
return i - t > l && (o = " ... ", t = i - l + o.length), n - i > l && (a = " ...", n = i + l - a.length), {
|
|
@@ -758,10 +758,10 @@ function Ve(e, t, n, i, r) {
|
|
|
758
758
|
// relative position
|
|
759
759
|
};
|
|
760
760
|
}
|
|
761
|
-
function
|
|
761
|
+
function ze(e, t) {
|
|
762
762
|
return W.repeat(" ", t - e.length) + e;
|
|
763
763
|
}
|
|
764
|
-
function
|
|
764
|
+
function zi(e, t) {
|
|
765
765
|
if (t = Object.create(t || null), !e.buffer)
|
|
766
766
|
return null;
|
|
767
767
|
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);
|
|
@@ -776,9 +776,9 @@ function Vi(e, t) {
|
|
|
776
776
|
r[a - s],
|
|
777
777
|
e.position - (i[a] - i[a - s]),
|
|
778
778
|
c
|
|
779
|
-
), l = W.repeat(" ", t.indent) +
|
|
779
|
+
), l = W.repeat(" ", t.indent) + ze((e.line - s + 1).toString(), d) + " | " + u.str + `
|
|
780
780
|
` + l;
|
|
781
|
-
for (u = Ve(e.buffer, i[a], r[a], e.position, c), l += W.repeat(" ", t.indent) +
|
|
781
|
+
for (u = Ve(e.buffer, i[a], r[a], e.position, c), l += W.repeat(" ", t.indent) + ze((e.line + 1).toString(), d) + " | " + u.str + `
|
|
782
782
|
`, l += W.repeat("-", t.indent + d + 3 + u.pos) + `^
|
|
783
783
|
`, s = 1; s <= t.linesAfter && !(a + s >= r.length); s++)
|
|
784
784
|
u = Ve(
|
|
@@ -787,11 +787,11 @@ function Vi(e, t) {
|
|
|
787
787
|
r[a + s],
|
|
788
788
|
e.position - (i[a] - i[a + s]),
|
|
789
789
|
c
|
|
790
|
-
), l += W.repeat(" ", t.indent) +
|
|
790
|
+
), l += W.repeat(" ", t.indent) + ze((e.line + s + 1).toString(), d) + " | " + u.str + `
|
|
791
791
|
`;
|
|
792
792
|
return l.replace(/\n$/, "");
|
|
793
793
|
}
|
|
794
|
-
var Hi =
|
|
794
|
+
var Hi = zi, Yi = [
|
|
795
795
|
"kind",
|
|
796
796
|
"multi",
|
|
797
797
|
"resolve",
|
|
@@ -802,12 +802,12 @@ var Hi = Vi, zi = [
|
|
|
802
802
|
"representName",
|
|
803
803
|
"defaultStyle",
|
|
804
804
|
"styleAliases"
|
|
805
|
-
],
|
|
805
|
+
], Wi = [
|
|
806
806
|
"scalar",
|
|
807
807
|
"sequence",
|
|
808
808
|
"mapping"
|
|
809
809
|
];
|
|
810
|
-
function
|
|
810
|
+
function Ji(e) {
|
|
811
811
|
var t = {};
|
|
812
812
|
return e !== null && Object.keys(e).forEach(function(n) {
|
|
813
813
|
e[n].forEach(function(i) {
|
|
@@ -815,18 +815,18 @@ function Wi(e) {
|
|
|
815
815
|
});
|
|
816
816
|
}), t;
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Gi(e, t) {
|
|
819
819
|
if (t = t || {}, Object.keys(t).forEach(function(n) {
|
|
820
|
-
if (
|
|
820
|
+
if (Yi.indexOf(n) === -1)
|
|
821
821
|
throw new ne('Unknown option "' + n + '" is met in definition of "' + e + '" YAML type.');
|
|
822
822
|
}), this.options = t, this.tag = e, this.kind = t.kind || null, this.resolve = t.resolve || function() {
|
|
823
823
|
return !0;
|
|
824
824
|
}, this.construct = t.construct || function(n) {
|
|
825
825
|
return n;
|
|
826
|
-
}, 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 =
|
|
826
|
+
}, 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 = Ji(t.styleAliases || null), Wi.indexOf(this.kind) === -1)
|
|
827
827
|
throw new ne('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
828
828
|
}
|
|
829
|
-
var
|
|
829
|
+
var Q = Gi;
|
|
830
830
|
function bt(e, t) {
|
|
831
831
|
var n = [];
|
|
832
832
|
return e[t].forEach(function(i) {
|
|
@@ -836,7 +836,7 @@ function bt(e, t) {
|
|
|
836
836
|
}), n[r] = i;
|
|
837
837
|
}), n;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Zi() {
|
|
840
840
|
var e = {
|
|
841
841
|
scalar: {},
|
|
842
842
|
sequence: {},
|
|
@@ -861,7 +861,7 @@ function We(e) {
|
|
|
861
861
|
}
|
|
862
862
|
We.prototype.extend = function(e) {
|
|
863
863
|
var t = [], n = [];
|
|
864
|
-
if (e instanceof
|
|
864
|
+
if (e instanceof Q)
|
|
865
865
|
n.push(e);
|
|
866
866
|
else if (Array.isArray(e))
|
|
867
867
|
n = n.concat(e);
|
|
@@ -870,58 +870,58 @@ We.prototype.extend = function(e) {
|
|
|
870
870
|
else
|
|
871
871
|
throw new ne("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
872
872
|
t.forEach(function(r) {
|
|
873
|
-
if (!(r instanceof
|
|
873
|
+
if (!(r instanceof Q))
|
|
874
874
|
throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
875
875
|
if (r.loadKind && r.loadKind !== "scalar")
|
|
876
876
|
throw new ne("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
877
877
|
if (r.multi)
|
|
878
878
|
throw new ne("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
879
879
|
}), n.forEach(function(r) {
|
|
880
|
-
if (!(r instanceof
|
|
880
|
+
if (!(r instanceof Q))
|
|
881
881
|
throw new ne("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
882
882
|
});
|
|
883
883
|
var i = Object.create(We.prototype);
|
|
884
|
-
return i.implicit = (this.implicit || []).concat(t), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = bt(i, "implicit"), i.compiledExplicit = bt(i, "explicit"), i.compiledTypeMap =
|
|
884
|
+
return i.implicit = (this.implicit || []).concat(t), i.explicit = (this.explicit || []).concat(n), i.compiledImplicit = bt(i, "implicit"), i.compiledExplicit = bt(i, "explicit"), i.compiledTypeMap = Zi(i.compiledImplicit, i.compiledExplicit), i;
|
|
885
885
|
};
|
|
886
|
-
var
|
|
886
|
+
var tn = We, nn = new Q("tag:yaml.org,2002:str", {
|
|
887
887
|
kind: "scalar",
|
|
888
888
|
construct: function(e) {
|
|
889
889
|
return e !== null ? e : "";
|
|
890
890
|
}
|
|
891
|
-
}),
|
|
891
|
+
}), rn = new Q("tag:yaml.org,2002:seq", {
|
|
892
892
|
kind: "sequence",
|
|
893
893
|
construct: function(e) {
|
|
894
894
|
return e !== null ? e : [];
|
|
895
895
|
}
|
|
896
|
-
}),
|
|
896
|
+
}), an = new Q("tag:yaml.org,2002:map", {
|
|
897
897
|
kind: "mapping",
|
|
898
898
|
construct: function(e) {
|
|
899
899
|
return e !== null ? e : {};
|
|
900
900
|
}
|
|
901
|
-
}),
|
|
901
|
+
}), on = new tn({
|
|
902
902
|
explicit: [
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
903
|
+
nn,
|
|
904
|
+
rn,
|
|
905
|
+
an
|
|
906
906
|
]
|
|
907
907
|
});
|
|
908
|
-
function
|
|
908
|
+
function Qi(e) {
|
|
909
909
|
if (e === null)
|
|
910
910
|
return !0;
|
|
911
911
|
var t = e.length;
|
|
912
912
|
return t === 1 && e === "~" || t === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
913
913
|
}
|
|
914
|
-
function
|
|
914
|
+
function Xi() {
|
|
915
915
|
return null;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function er(e) {
|
|
918
918
|
return e === null;
|
|
919
919
|
}
|
|
920
|
-
var
|
|
920
|
+
var ln = new Q("tag:yaml.org,2002:null", {
|
|
921
921
|
kind: "scalar",
|
|
922
|
-
resolve:
|
|
923
|
-
construct:
|
|
924
|
-
predicate:
|
|
922
|
+
resolve: Qi,
|
|
923
|
+
construct: Xi,
|
|
924
|
+
predicate: er,
|
|
925
925
|
represent: {
|
|
926
926
|
canonical: function() {
|
|
927
927
|
return "~";
|
|
@@ -941,23 +941,23 @@ var nn = new G("tag:yaml.org,2002:null", {
|
|
|
941
941
|
},
|
|
942
942
|
defaultStyle: "lowercase"
|
|
943
943
|
});
|
|
944
|
-
function
|
|
944
|
+
function tr(e) {
|
|
945
945
|
if (e === null)
|
|
946
946
|
return !1;
|
|
947
947
|
var t = e.length;
|
|
948
948
|
return t === 4 && (e === "true" || e === "True" || e === "TRUE") || t === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function nr(e) {
|
|
951
951
|
return e === "true" || e === "True" || e === "TRUE";
|
|
952
952
|
}
|
|
953
|
-
function
|
|
953
|
+
function ir(e) {
|
|
954
954
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
955
955
|
}
|
|
956
|
-
var
|
|
956
|
+
var sn = new Q("tag:yaml.org,2002:bool", {
|
|
957
957
|
kind: "scalar",
|
|
958
|
-
resolve:
|
|
959
|
-
construct:
|
|
960
|
-
predicate:
|
|
958
|
+
resolve: tr,
|
|
959
|
+
construct: nr,
|
|
960
|
+
predicate: ir,
|
|
961
961
|
represent: {
|
|
962
962
|
lowercase: function(e) {
|
|
963
963
|
return e ? "true" : "false";
|
|
@@ -971,16 +971,16 @@ var rn = new G("tag:yaml.org,2002:bool", {
|
|
|
971
971
|
},
|
|
972
972
|
defaultStyle: "lowercase"
|
|
973
973
|
});
|
|
974
|
-
function
|
|
974
|
+
function rr(e) {
|
|
975
975
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
976
976
|
}
|
|
977
|
-
function
|
|
977
|
+
function ar(e) {
|
|
978
978
|
return 48 <= e && e <= 55;
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function or(e) {
|
|
981
981
|
return 48 <= e && e <= 57;
|
|
982
982
|
}
|
|
983
|
-
function
|
|
983
|
+
function lr(e) {
|
|
984
984
|
if (e === null)
|
|
985
985
|
return !1;
|
|
986
986
|
var t = e.length, n = 0, i = !1, r;
|
|
@@ -1001,7 +1001,7 @@ function or(e) {
|
|
|
1001
1001
|
if (r === "x") {
|
|
1002
1002
|
for (n++; n < t; n++)
|
|
1003
1003
|
if (r = e[n], r !== "_") {
|
|
1004
|
-
if (!
|
|
1004
|
+
if (!rr(e.charCodeAt(n)))
|
|
1005
1005
|
return !1;
|
|
1006
1006
|
i = !0;
|
|
1007
1007
|
}
|
|
@@ -1010,7 +1010,7 @@ function or(e) {
|
|
|
1010
1010
|
if (r === "o") {
|
|
1011
1011
|
for (n++; n < t; n++)
|
|
1012
1012
|
if (r = e[n], r !== "_") {
|
|
1013
|
-
if (!
|
|
1013
|
+
if (!ar(e.charCodeAt(n)))
|
|
1014
1014
|
return !1;
|
|
1015
1015
|
i = !0;
|
|
1016
1016
|
}
|
|
@@ -1021,13 +1021,13 @@ function or(e) {
|
|
|
1021
1021
|
return !1;
|
|
1022
1022
|
for (; n < t; n++)
|
|
1023
1023
|
if (r = e[n], r !== "_") {
|
|
1024
|
-
if (!
|
|
1024
|
+
if (!or(e.charCodeAt(n)))
|
|
1025
1025
|
return !1;
|
|
1026
1026
|
i = !0;
|
|
1027
1027
|
}
|
|
1028
1028
|
return !(!i || r === "_");
|
|
1029
1029
|
}
|
|
1030
|
-
function
|
|
1030
|
+
function sr(e) {
|
|
1031
1031
|
var t = e, n = 1, i;
|
|
1032
1032
|
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")
|
|
1033
1033
|
return 0;
|
|
@@ -1041,14 +1041,14 @@ function lr(e) {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
return n * parseInt(t, 10);
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function cr(e) {
|
|
1045
1045
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !W.isNegativeZero(e);
|
|
1046
1046
|
}
|
|
1047
|
-
var
|
|
1047
|
+
var cn = new Q("tag:yaml.org,2002:int", {
|
|
1048
1048
|
kind: "scalar",
|
|
1049
|
-
resolve:
|
|
1050
|
-
construct:
|
|
1051
|
-
predicate:
|
|
1049
|
+
resolve: lr,
|
|
1050
|
+
construct: sr,
|
|
1051
|
+
predicate: cr,
|
|
1052
1052
|
represent: {
|
|
1053
1053
|
binary: function(e) {
|
|
1054
1054
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1071,21 +1071,21 @@ var an = new G("tag:yaml.org,2002:int", {
|
|
|
1071
1071
|
decimal: [10, "dec"],
|
|
1072
1072
|
hexadecimal: [16, "hex"]
|
|
1073
1073
|
}
|
|
1074
|
-
}),
|
|
1074
|
+
}), ur = new RegExp(
|
|
1075
1075
|
// 2.5e4, 2.5 and integers
|
|
1076
1076
|
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
1077
1077
|
);
|
|
1078
|
-
function
|
|
1079
|
-
return !(e === null || !
|
|
1078
|
+
function dr(e) {
|
|
1079
|
+
return !(e === null || !ur.test(e) || // Quick hack to not allow integers end with `_`
|
|
1080
1080
|
// Probably should update regexp & check speed
|
|
1081
1081
|
e[e.length - 1] === "_");
|
|
1082
1082
|
}
|
|
1083
|
-
function
|
|
1083
|
+
function pr(e) {
|
|
1084
1084
|
var t, n;
|
|
1085
1085
|
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);
|
|
1086
1086
|
}
|
|
1087
|
-
var
|
|
1088
|
-
function
|
|
1087
|
+
var fr = /^[-+]?[0-9]+e/;
|
|
1088
|
+
function mr(e, t) {
|
|
1089
1089
|
var n;
|
|
1090
1090
|
if (isNaN(e))
|
|
1091
1091
|
switch (t) {
|
|
@@ -1116,36 +1116,36 @@ function fr(e, t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
else if (W.isNegativeZero(e))
|
|
1118
1118
|
return "-0.0";
|
|
1119
|
-
return n = e.toString(10),
|
|
1119
|
+
return n = e.toString(10), fr.test(n) ? n.replace("e", ".e") : n;
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1121
|
+
function gr(e) {
|
|
1122
1122
|
return Object.prototype.toString.call(e) === "[object Number]" && (e % 1 !== 0 || W.isNegativeZero(e));
|
|
1123
1123
|
}
|
|
1124
|
-
var
|
|
1124
|
+
var un = new Q("tag:yaml.org,2002:float", {
|
|
1125
1125
|
kind: "scalar",
|
|
1126
|
-
resolve:
|
|
1127
|
-
construct:
|
|
1128
|
-
predicate:
|
|
1129
|
-
represent:
|
|
1126
|
+
resolve: dr,
|
|
1127
|
+
construct: pr,
|
|
1128
|
+
predicate: gr,
|
|
1129
|
+
represent: mr,
|
|
1130
1130
|
defaultStyle: "lowercase"
|
|
1131
|
-
}),
|
|
1131
|
+
}), dn = on.extend({
|
|
1132
1132
|
implicit: [
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1133
|
+
ln,
|
|
1134
|
+
sn,
|
|
1135
|
+
cn,
|
|
1136
|
+
un
|
|
1137
1137
|
]
|
|
1138
|
-
}),
|
|
1138
|
+
}), pn = dn, fn = new RegExp(
|
|
1139
1139
|
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
1140
|
-
),
|
|
1140
|
+
), mn = new RegExp(
|
|
1141
1141
|
"^([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]))?))?$"
|
|
1142
1142
|
);
|
|
1143
|
-
function
|
|
1144
|
-
return e === null ? !1 :
|
|
1143
|
+
function hr(e) {
|
|
1144
|
+
return e === null ? !1 : fn.exec(e) !== null || mn.exec(e) !== null;
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function yr(e) {
|
|
1147
1147
|
var t, n, i, r, o, a, l, s = 0, u = null, d, c, f;
|
|
1148
|
-
if (t =
|
|
1148
|
+
if (t = fn.exec(e), t === null && (t = mn.exec(e)), t === null)
|
|
1149
1149
|
throw new Error("Date resolve error");
|
|
1150
1150
|
if (n = +t[1], i = +t[2] - 1, r = +t[3], !t[4])
|
|
1151
1151
|
return new Date(Date.UTC(n, i, r));
|
|
@@ -1156,25 +1156,25 @@ function gr(e) {
|
|
|
1156
1156
|
}
|
|
1157
1157
|
return t[9] && (d = +t[10], c = +(t[11] || 0), u = (d * 60 + c) * 6e4, t[9] === "-" && (u = -u)), f = new Date(Date.UTC(n, i, r, o, a, l, s)), u && f.setTime(f.getTime() - u), f;
|
|
1158
1158
|
}
|
|
1159
|
-
function
|
|
1159
|
+
function vr(e) {
|
|
1160
1160
|
return e.toISOString();
|
|
1161
1161
|
}
|
|
1162
|
-
var
|
|
1162
|
+
var gn = new Q("tag:yaml.org,2002:timestamp", {
|
|
1163
1163
|
kind: "scalar",
|
|
1164
|
-
resolve:
|
|
1165
|
-
construct:
|
|
1164
|
+
resolve: hr,
|
|
1165
|
+
construct: yr,
|
|
1166
1166
|
instanceOf: Date,
|
|
1167
|
-
represent:
|
|
1167
|
+
represent: vr
|
|
1168
1168
|
});
|
|
1169
|
-
function
|
|
1169
|
+
function br(e) {
|
|
1170
1170
|
return e === "<<" || e === null;
|
|
1171
1171
|
}
|
|
1172
|
-
var
|
|
1172
|
+
var hn = new Q("tag:yaml.org,2002:merge", {
|
|
1173
1173
|
kind: "scalar",
|
|
1174
|
-
resolve:
|
|
1174
|
+
resolve: br
|
|
1175
1175
|
}), rt = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
1176
1176
|
\r`;
|
|
1177
|
-
function
|
|
1177
|
+
function kr(e) {
|
|
1178
1178
|
if (e === null)
|
|
1179
1179
|
return !1;
|
|
1180
1180
|
var t, n, i = 0, r = e.length, o = rt;
|
|
@@ -1186,37 +1186,37 @@ function br(e) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
return i % 8 === 0;
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1189
|
+
function wr(e) {
|
|
1190
1190
|
var t, n, i = e.replace(/[\r\n=]/g, ""), r = i.length, o = rt, a = 0, l = [];
|
|
1191
1191
|
for (t = 0; t < r; t++)
|
|
1192
1192
|
t % 4 === 0 && t && (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)), a = a << 6 | o.indexOf(i.charAt(t));
|
|
1193
1193
|
return n = r % 4 * 6, n === 0 ? (l.push(a >> 16 & 255), l.push(a >> 8 & 255), l.push(a & 255)) : n === 18 ? (l.push(a >> 10 & 255), l.push(a >> 2 & 255)) : n === 12 && l.push(a >> 4 & 255), new Uint8Array(l);
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Cr(e) {
|
|
1196
1196
|
var t = "", n = 0, i, r, o = e.length, a = rt;
|
|
1197
1197
|
for (i = 0; i < o; i++)
|
|
1198
1198
|
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];
|
|
1199
1199
|
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;
|
|
1200
1200
|
}
|
|
1201
|
-
function
|
|
1201
|
+
function Sr(e) {
|
|
1202
1202
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
1203
1203
|
}
|
|
1204
|
-
var
|
|
1204
|
+
var yn = new Q("tag:yaml.org,2002:binary", {
|
|
1205
1205
|
kind: "scalar",
|
|
1206
|
-
resolve:
|
|
1207
|
-
construct:
|
|
1208
|
-
predicate:
|
|
1209
|
-
represent:
|
|
1210
|
-
}),
|
|
1211
|
-
function
|
|
1206
|
+
resolve: kr,
|
|
1207
|
+
construct: wr,
|
|
1208
|
+
predicate: Sr,
|
|
1209
|
+
represent: Cr
|
|
1210
|
+
}), Ar = Object.prototype.hasOwnProperty, Ir = Object.prototype.toString;
|
|
1211
|
+
function xr(e) {
|
|
1212
1212
|
if (e === null)
|
|
1213
1213
|
return !0;
|
|
1214
1214
|
var t = [], n, i, r, o, a, l = e;
|
|
1215
1215
|
for (n = 0, i = l.length; n < i; n += 1) {
|
|
1216
|
-
if (r = l[n], a = !1,
|
|
1216
|
+
if (r = l[n], a = !1, Ir.call(r) !== "[object Object]")
|
|
1217
1217
|
return !1;
|
|
1218
1218
|
for (o in r)
|
|
1219
|
-
if (
|
|
1219
|
+
if (Ar.call(r, o))
|
|
1220
1220
|
if (!a)
|
|
1221
1221
|
a = !0;
|
|
1222
1222
|
else
|
|
@@ -1230,26 +1230,26 @@ function Ir(e) {
|
|
|
1230
1230
|
}
|
|
1231
1231
|
return !0;
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1233
|
+
function _r(e) {
|
|
1234
1234
|
return e !== null ? e : [];
|
|
1235
1235
|
}
|
|
1236
|
-
var
|
|
1236
|
+
var vn = new Q("tag:yaml.org,2002:omap", {
|
|
1237
1237
|
kind: "sequence",
|
|
1238
|
-
resolve:
|
|
1239
|
-
construct:
|
|
1240
|
-
}),
|
|
1241
|
-
function
|
|
1238
|
+
resolve: xr,
|
|
1239
|
+
construct: _r
|
|
1240
|
+
}), Tr = Object.prototype.toString;
|
|
1241
|
+
function jr(e) {
|
|
1242
1242
|
if (e === null)
|
|
1243
1243
|
return !0;
|
|
1244
1244
|
var t, n, i, r, o, a = e;
|
|
1245
1245
|
for (o = new Array(a.length), t = 0, n = a.length; t < n; t += 1) {
|
|
1246
|
-
if (i = a[t],
|
|
1246
|
+
if (i = a[t], Tr.call(i) !== "[object Object]" || (r = Object.keys(i), r.length !== 1))
|
|
1247
1247
|
return !1;
|
|
1248
1248
|
o[t] = [r[0], i[r[0]]];
|
|
1249
1249
|
}
|
|
1250
1250
|
return !0;
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function Or(e) {
|
|
1253
1253
|
if (e === null)
|
|
1254
1254
|
return [];
|
|
1255
1255
|
var t, n, i, r, o, a = e;
|
|
@@ -1257,62 +1257,62 @@ function jr(e) {
|
|
|
1257
1257
|
i = a[t], r = Object.keys(i), o[t] = [r[0], i[r[0]]];
|
|
1258
1258
|
return o;
|
|
1259
1259
|
}
|
|
1260
|
-
var
|
|
1260
|
+
var bn = new Q("tag:yaml.org,2002:pairs", {
|
|
1261
1261
|
kind: "sequence",
|
|
1262
|
-
resolve:
|
|
1263
|
-
construct:
|
|
1264
|
-
}),
|
|
1265
|
-
function
|
|
1262
|
+
resolve: jr,
|
|
1263
|
+
construct: Or
|
|
1264
|
+
}), Nr = Object.prototype.hasOwnProperty;
|
|
1265
|
+
function Fr(e) {
|
|
1266
1266
|
if (e === null)
|
|
1267
1267
|
return !0;
|
|
1268
1268
|
var t, n = e;
|
|
1269
1269
|
for (t in n)
|
|
1270
|
-
if (
|
|
1270
|
+
if (Nr.call(n, t) && n[t] !== null)
|
|
1271
1271
|
return !1;
|
|
1272
1272
|
return !0;
|
|
1273
1273
|
}
|
|
1274
|
-
function
|
|
1274
|
+
function Mr(e) {
|
|
1275
1275
|
return e !== null ? e : {};
|
|
1276
1276
|
}
|
|
1277
|
-
var
|
|
1277
|
+
var kn = new Q("tag:yaml.org,2002:set", {
|
|
1278
1278
|
kind: "mapping",
|
|
1279
|
-
resolve:
|
|
1280
|
-
construct:
|
|
1281
|
-
}), at =
|
|
1279
|
+
resolve: Fr,
|
|
1280
|
+
construct: Mr
|
|
1281
|
+
}), at = pn.extend({
|
|
1282
1282
|
implicit: [
|
|
1283
|
-
|
|
1284
|
-
|
|
1283
|
+
gn,
|
|
1284
|
+
hn
|
|
1285
1285
|
],
|
|
1286
1286
|
explicit: [
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1287
|
+
yn,
|
|
1288
|
+
vn,
|
|
1289
|
+
bn,
|
|
1290
|
+
kn
|
|
1291
1291
|
]
|
|
1292
|
-
}), fe = Object.prototype.hasOwnProperty, qe = 1,
|
|
1292
|
+
}), fe = Object.prototype.hasOwnProperty, qe = 1, wn = 2, Cn = 3, Ke = 4, He = 1, Er = 2, kt = 3, $r = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/, Lr = /[\x85\u2028\u2029]/, qr = /[,\[\]\{\}]/, Sn = /^(?:!|!!|![a-z\-]+!)$/i, An = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
1293
1293
|
function wt(e) {
|
|
1294
1294
|
return Object.prototype.toString.call(e);
|
|
1295
1295
|
}
|
|
1296
1296
|
function oe(e) {
|
|
1297
1297
|
return e === 10 || e === 13;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function he(e) {
|
|
1300
1300
|
return e === 9 || e === 32;
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function re(e) {
|
|
1303
1303
|
return e === 9 || e === 32 || e === 10 || e === 13;
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function we(e) {
|
|
1306
1306
|
return e === 44 || e === 91 || e === 93 || e === 123 || e === 125;
|
|
1307
1307
|
}
|
|
1308
|
-
function
|
|
1308
|
+
function Kr(e) {
|
|
1309
1309
|
var t;
|
|
1310
1310
|
return 48 <= e && e <= 57 ? e - 48 : (t = e | 32, 97 <= t && t <= 102 ? t - 97 + 10 : -1);
|
|
1311
1311
|
}
|
|
1312
|
-
function
|
|
1312
|
+
function Rr(e) {
|
|
1313
1313
|
return e === 120 ? 2 : e === 117 ? 4 : e === 85 ? 8 : 0;
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function Br(e) {
|
|
1316
1316
|
return 48 <= e && e <= 57 ? e - 48 : -1;
|
|
1317
1317
|
}
|
|
1318
1318
|
function Ct(e) {
|
|
@@ -1325,13 +1325,13 @@ function Ur(e) {
|
|
|
1325
1325
|
(e - 65536 & 1023) + 56320
|
|
1326
1326
|
);
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1328
|
+
var In = new Array(256), xn = new Array(256);
|
|
1329
1329
|
for (var ye = 0; ye < 256; ye++)
|
|
1330
|
-
|
|
1331
|
-
function
|
|
1330
|
+
In[ye] = Ct(ye) ? 1 : 0, xn[ye] = Ct(ye);
|
|
1331
|
+
function Pr(e, t) {
|
|
1332
1332
|
this.input = e, this.filename = t.filename || null, this.schema = t.schema || at, 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 = [];
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1334
|
+
function _n(e, t) {
|
|
1335
1335
|
var n = {
|
|
1336
1336
|
name: e.filename,
|
|
1337
1337
|
buffer: e.input.slice(0, -1),
|
|
@@ -1342,24 +1342,24 @@ function Sn(e, t) {
|
|
|
1342
1342
|
};
|
|
1343
1343
|
return n.snippet = Hi(n), new ne(t, n);
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1346
|
-
throw
|
|
1345
|
+
function w(e, t) {
|
|
1346
|
+
throw _n(e, t);
|
|
1347
1347
|
}
|
|
1348
1348
|
function Re(e, t) {
|
|
1349
|
-
e.onWarning && e.onWarning.call(null,
|
|
1349
|
+
e.onWarning && e.onWarning.call(null, _n(e, t));
|
|
1350
1350
|
}
|
|
1351
1351
|
var St = {
|
|
1352
1352
|
YAML: function(e, t, n) {
|
|
1353
1353
|
var i, r, o;
|
|
1354
|
-
e.version !== null &&
|
|
1354
|
+
e.version !== null && w(e, "duplication of %YAML directive"), n.length !== 1 && w(e, "YAML directive accepts exactly one argument"), i = /^([0-9]+)\.([0-9]+)$/.exec(n[0]), i === null && w(e, "ill-formed argument of the YAML directive"), r = parseInt(i[1], 10), o = parseInt(i[2], 10), r !== 1 && w(e, "unacceptable YAML version of the document"), e.version = n[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Re(e, "unsupported YAML version of the document");
|
|
1355
1355
|
},
|
|
1356
1356
|
TAG: function(e, t, n) {
|
|
1357
1357
|
var i, r;
|
|
1358
|
-
n.length !== 2 &&
|
|
1358
|
+
n.length !== 2 && w(e, "TAG directive accepts exactly two arguments"), i = n[0], r = n[1], Sn.test(i) || w(e, "ill-formed tag handle (first argument) of the TAG directive"), fe.call(e.tagMap, i) && w(e, 'there is a previously declared suffix for "' + i + '" tag handle'), An.test(r) || w(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1359
1359
|
try {
|
|
1360
1360
|
r = decodeURIComponent(r);
|
|
1361
1361
|
} catch {
|
|
1362
|
-
|
|
1362
|
+
w(e, "tag prefix is malformed: " + r);
|
|
1363
1363
|
}
|
|
1364
1364
|
e.tagMap[i] = r;
|
|
1365
1365
|
}
|
|
@@ -1369,22 +1369,22 @@ function de(e, t, n, i) {
|
|
|
1369
1369
|
if (t < n) {
|
|
1370
1370
|
if (l = e.input.slice(t, n), i)
|
|
1371
1371
|
for (r = 0, o = l.length; r < o; r += 1)
|
|
1372
|
-
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 ||
|
|
1372
|
+
a = l.charCodeAt(r), a === 9 || 32 <= a && a <= 1114111 || w(e, "expected valid JSON character");
|
|
1373
1373
|
else
|
|
1374
|
-
|
|
1374
|
+
$r.test(l) && w(e, "the stream contains non-printable characters");
|
|
1375
1375
|
e.result += l;
|
|
1376
1376
|
}
|
|
1377
1377
|
}
|
|
1378
1378
|
function At(e, t, n, i) {
|
|
1379
1379
|
var r, o, a, l;
|
|
1380
|
-
for (W.isObject(n) ||
|
|
1380
|
+
for (W.isObject(n) || w(e, "cannot merge mappings; the provided source object is unacceptable"), r = Object.keys(n), a = 0, l = r.length; a < l; a += 1)
|
|
1381
1381
|
o = r[a], fe.call(t, o) || (t[o] = n[o], i[o] = !0);
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1383
|
+
function Ce(e, t, n, i, r, o, a, l, s) {
|
|
1384
1384
|
var u, d;
|
|
1385
1385
|
if (Array.isArray(r))
|
|
1386
1386
|
for (r = Array.prototype.slice.call(r), u = 0, d = r.length; u < d; u += 1)
|
|
1387
|
-
Array.isArray(r[u]) &&
|
|
1387
|
+
Array.isArray(r[u]) && w(e, "nested arrays are not supported inside keys"), typeof r == "object" && wt(r[u]) === "[object Object]" && (r[u] = "[object Object]");
|
|
1388
1388
|
if (typeof r == "object" && wt(r) === "[object Object]" && (r = "[object Object]"), r = String(r), t === null && (t = {}), i === "tag:yaml.org,2002:merge")
|
|
1389
1389
|
if (Array.isArray(o))
|
|
1390
1390
|
for (u = 0, d = o.length; u < d; u += 1)
|
|
@@ -1392,7 +1392,7 @@ function ke(e, t, n, i, r, o, a, l, s) {
|
|
|
1392
1392
|
else
|
|
1393
1393
|
At(e, t, o, n);
|
|
1394
1394
|
else
|
|
1395
|
-
!e.json && !fe.call(n, r) && fe.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position,
|
|
1395
|
+
!e.json && !fe.call(n, r) && fe.call(t, r) && (e.line = a || e.line, e.lineStart = l || e.lineStart, e.position = s || e.position, w(e, "duplicated mapping key")), r === "__proto__" ? Object.defineProperty(t, r, {
|
|
1396
1396
|
configurable: !0,
|
|
1397
1397
|
enumerable: !0,
|
|
1398
1398
|
writable: !0,
|
|
@@ -1402,11 +1402,11 @@ function ke(e, t, n, i, r, o, a, l, s) {
|
|
|
1402
1402
|
}
|
|
1403
1403
|
function ot(e) {
|
|
1404
1404
|
var t;
|
|
1405
|
-
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) :
|
|
1405
|
+
t = e.input.charCodeAt(e.position), t === 10 ? e.position++ : t === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : w(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function Y(e, t, n) {
|
|
1408
1408
|
for (var i = 0, r = e.input.charCodeAt(e.position); r !== 0; ) {
|
|
1409
|
-
for (;
|
|
1409
|
+
for (; he(r); )
|
|
1410
1410
|
r === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), r = e.input.charCodeAt(++e.position);
|
|
1411
1411
|
if (t && r === 35)
|
|
1412
1412
|
do
|
|
@@ -1422,28 +1422,28 @@ function z(e, t, n) {
|
|
|
1422
1422
|
}
|
|
1423
1423
|
function Pe(e) {
|
|
1424
1424
|
var t = e.position, n;
|
|
1425
|
-
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 ||
|
|
1425
|
+
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 || re(n)));
|
|
1426
1426
|
}
|
|
1427
1427
|
function lt(e, t) {
|
|
1428
1428
|
t === 1 ? e.result += " " : t > 1 && (e.result += W.repeat(`
|
|
1429
1429
|
`, t - 1));
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function Dr(e, t, n) {
|
|
1432
1432
|
var i, r, o, a, l, s, u, d, c = e.kind, f = e.result, p;
|
|
1433
|
-
if (p = e.input.charCodeAt(e.position),
|
|
1433
|
+
if (p = e.input.charCodeAt(e.position), re(p) || we(p) || p === 35 || p === 38 || p === 42 || p === 33 || p === 124 || p === 62 || p === 39 || p === 34 || p === 37 || p === 64 || p === 96 || (p === 63 || p === 45) && (r = e.input.charCodeAt(e.position + 1), re(r) || n && we(r)))
|
|
1434
1434
|
return !1;
|
|
1435
1435
|
for (e.kind = "scalar", e.result = "", o = a = e.position, l = !1; p !== 0; ) {
|
|
1436
1436
|
if (p === 58) {
|
|
1437
|
-
if (r = e.input.charCodeAt(e.position + 1),
|
|
1437
|
+
if (r = e.input.charCodeAt(e.position + 1), re(r) || n && we(r))
|
|
1438
1438
|
break;
|
|
1439
1439
|
} else if (p === 35) {
|
|
1440
|
-
if (i = e.input.charCodeAt(e.position - 1),
|
|
1440
|
+
if (i = e.input.charCodeAt(e.position - 1), re(i))
|
|
1441
1441
|
break;
|
|
1442
1442
|
} else {
|
|
1443
|
-
if (e.position === e.lineStart && Pe(e) || n &&
|
|
1443
|
+
if (e.position === e.lineStart && Pe(e) || n && we(p))
|
|
1444
1444
|
break;
|
|
1445
1445
|
if (oe(p))
|
|
1446
|
-
if (s = e.line, u = e.lineStart, d = e.lineIndent,
|
|
1446
|
+
if (s = e.line, u = e.lineStart, d = e.lineIndent, Y(e, !1, -1), e.lineIndent >= t) {
|
|
1447
1447
|
l = !0, p = e.input.charCodeAt(e.position);
|
|
1448
1448
|
continue;
|
|
1449
1449
|
} else {
|
|
@@ -1451,11 +1451,11 @@ function Pr(e, t, n) {
|
|
|
1451
1451
|
break;
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
l && (de(e, o, a, !1), lt(e, e.line - s), o = a = e.position, l = !1),
|
|
1454
|
+
l && (de(e, o, a, !1), lt(e, e.line - s), o = a = e.position, l = !1), he(p) || (a = e.position + 1), p = e.input.charCodeAt(++e.position);
|
|
1455
1455
|
}
|
|
1456
1456
|
return de(e, o, a, !1), e.result ? !0 : (e.kind = c, e.result = f, !1);
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function Vr(e, t) {
|
|
1459
1459
|
var n, i, r;
|
|
1460
1460
|
if (n = e.input.charCodeAt(e.position), n !== 39)
|
|
1461
1461
|
return !1;
|
|
@@ -1466,10 +1466,10 @@ function Dr(e, t) {
|
|
|
1466
1466
|
else
|
|
1467
1467
|
return !0;
|
|
1468
1468
|
else
|
|
1469
|
-
oe(n) ? (de(e, i, r, !0), lt(e,
|
|
1470
|
-
|
|
1469
|
+
oe(n) ? (de(e, i, r, !0), lt(e, Y(e, !1, t)), i = r = e.position) : e.position === e.lineStart && Pe(e) ? w(e, "unexpected end of the document within a single quoted scalar") : (e.position++, r = e.position);
|
|
1470
|
+
w(e, "unexpected end of the stream within a single quoted scalar");
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function zr(e, t) {
|
|
1473
1473
|
var n, i, r, o, a, l;
|
|
1474
1474
|
if (l = e.input.charCodeAt(e.position), l !== 34)
|
|
1475
1475
|
return !1;
|
|
@@ -1478,38 +1478,38 @@ function Vr(e, t) {
|
|
|
1478
1478
|
return de(e, n, e.position, !0), e.position++, !0;
|
|
1479
1479
|
if (l === 92) {
|
|
1480
1480
|
if (de(e, n, e.position, !0), l = e.input.charCodeAt(++e.position), oe(l))
|
|
1481
|
-
|
|
1482
|
-
else if (l < 256 &&
|
|
1483
|
-
e.result +=
|
|
1484
|
-
else if ((a =
|
|
1481
|
+
Y(e, !1, t);
|
|
1482
|
+
else if (l < 256 && In[l])
|
|
1483
|
+
e.result += xn[l], e.position++;
|
|
1484
|
+
else if ((a = Rr(l)) > 0) {
|
|
1485
1485
|
for (r = a, o = 0; r > 0; r--)
|
|
1486
|
-
l = e.input.charCodeAt(++e.position), (a =
|
|
1486
|
+
l = e.input.charCodeAt(++e.position), (a = Kr(l)) >= 0 ? o = (o << 4) + a : w(e, "expected hexadecimal character");
|
|
1487
1487
|
e.result += Ur(o), e.position++;
|
|
1488
1488
|
} else
|
|
1489
|
-
|
|
1489
|
+
w(e, "unknown escape sequence");
|
|
1490
1490
|
n = i = e.position;
|
|
1491
1491
|
} else
|
|
1492
|
-
oe(l) ? (de(e, n, i, !0), lt(e,
|
|
1492
|
+
oe(l) ? (de(e, n, i, !0), lt(e, Y(e, !1, t)), n = i = e.position) : e.position === e.lineStart && Pe(e) ? w(e, "unexpected end of the document within a double quoted scalar") : (e.position++, i = e.position);
|
|
1493
1493
|
}
|
|
1494
|
-
|
|
1494
|
+
w(e, "unexpected end of the stream within a double quoted scalar");
|
|
1495
1495
|
}
|
|
1496
1496
|
function Hr(e, t) {
|
|
1497
|
-
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, u, d, c, f, p,
|
|
1498
|
-
if (
|
|
1497
|
+
var n = !0, i, r, o, a = e.tag, l, s = e.anchor, u, d, c, f, p, C = /* @__PURE__ */ Object.create(null), m, A, O, g;
|
|
1498
|
+
if (g = e.input.charCodeAt(e.position), g === 91)
|
|
1499
1499
|
d = 93, p = !1, l = [];
|
|
1500
|
-
else if (
|
|
1500
|
+
else if (g === 123)
|
|
1501
1501
|
d = 125, p = !0, l = {};
|
|
1502
1502
|
else
|
|
1503
1503
|
return !1;
|
|
1504
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = l),
|
|
1505
|
-
if (
|
|
1504
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = l), g = e.input.charCodeAt(++e.position); g !== 0; ) {
|
|
1505
|
+
if (Y(e, !0, t), g = e.input.charCodeAt(e.position), g === d)
|
|
1506
1506
|
return e.position++, e.tag = a, e.anchor = s, e.kind = p ? "mapping" : "sequence", e.result = l, !0;
|
|
1507
|
-
n ?
|
|
1507
|
+
n ? g === 44 && w(e, "expected the node content, but found ','") : w(e, "missed comma between flow collection entries"), A = m = O = null, c = f = !1, g === 63 && (u = e.input.charCodeAt(e.position + 1), re(u) && (c = f = !0, e.position++, Y(e, !0, t))), i = e.line, r = e.lineStart, o = e.position, Se(e, t, qe, !1, !0), A = e.tag, m = e.result, Y(e, !0, t), g = e.input.charCodeAt(e.position), (f || e.line === i) && g === 58 && (c = !0, g = e.input.charCodeAt(++e.position), Y(e, !0, t), Se(e, t, qe, !1, !0), O = e.result), p ? Ce(e, l, C, A, m, O, i, r, o) : c ? l.push(Ce(e, null, C, A, m, O, i, r, o)) : l.push(m), Y(e, !0, t), g = e.input.charCodeAt(e.position), g === 44 ? (n = !0, g = e.input.charCodeAt(++e.position)) : n = !1;
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
w(e, "unexpected end of the stream within a flow collection");
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1512
|
-
var n, i, r =
|
|
1511
|
+
function Yr(e, t) {
|
|
1512
|
+
var n, i, r = He, o = !1, a = !1, l = t, s = 0, u = !1, d, c;
|
|
1513
1513
|
if (c = e.input.charCodeAt(e.position), c === 124)
|
|
1514
1514
|
i = !1;
|
|
1515
1515
|
else if (c === 62)
|
|
@@ -1518,15 +1518,15 @@ function zr(e, t) {
|
|
|
1518
1518
|
return !1;
|
|
1519
1519
|
for (e.kind = "scalar", e.result = ""; c !== 0; )
|
|
1520
1520
|
if (c = e.input.charCodeAt(++e.position), c === 43 || c === 45)
|
|
1521
|
-
|
|
1522
|
-
else if ((d =
|
|
1523
|
-
d === 0 ?
|
|
1521
|
+
He === r ? r = c === 43 ? kt : Er : w(e, "repeat of a chomping mode identifier");
|
|
1522
|
+
else if ((d = Br(c)) >= 0)
|
|
1523
|
+
d === 0 ? w(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : a ? w(e, "repeat of an indentation width identifier") : (l = t + d - 1, a = !0);
|
|
1524
1524
|
else
|
|
1525
1525
|
break;
|
|
1526
|
-
if (
|
|
1526
|
+
if (he(c)) {
|
|
1527
1527
|
do
|
|
1528
1528
|
c = e.input.charCodeAt(++e.position);
|
|
1529
|
-
while (
|
|
1529
|
+
while (he(c));
|
|
1530
1530
|
if (c === 35)
|
|
1531
1531
|
do
|
|
1532
1532
|
c = e.input.charCodeAt(++e.position);
|
|
@@ -1541,11 +1541,11 @@ function zr(e, t) {
|
|
|
1541
1541
|
}
|
|
1542
1542
|
if (e.lineIndent < l) {
|
|
1543
1543
|
r === kt ? e.result += W.repeat(`
|
|
1544
|
-
`, o ? 1 + s : s) : r ===
|
|
1544
|
+
`, o ? 1 + s : s) : r === He && o && (e.result += `
|
|
1545
1545
|
`);
|
|
1546
1546
|
break;
|
|
1547
1547
|
}
|
|
1548
|
-
for (i ?
|
|
1548
|
+
for (i ? he(c) ? (u = !0, e.result += W.repeat(`
|
|
1549
1549
|
`, o ? 1 + s : s)) : u ? (u = !1, e.result += W.repeat(`
|
|
1550
1550
|
`, s + 1)) : s === 0 ? o && (e.result += " ") : e.result += W.repeat(`
|
|
1551
1551
|
`, s) : e.result += W.repeat(`
|
|
@@ -1559,120 +1559,120 @@ function It(e, t) {
|
|
|
1559
1559
|
var n, i = e.tag, r = e.anchor, o = [], a, l = !1, s;
|
|
1560
1560
|
if (e.firstTabInLine !== -1)
|
|
1561
1561
|
return !1;
|
|
1562
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine,
|
|
1563
|
-
if (l = !0, e.position++,
|
|
1562
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), s = e.input.charCodeAt(e.position); s !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, w(e, "tab characters must not be used in indentation")), !(s !== 45 || (a = e.input.charCodeAt(e.position + 1), !re(a)))); ) {
|
|
1563
|
+
if (l = !0, e.position++, Y(e, !0, -1) && e.lineIndent <= t) {
|
|
1564
1564
|
o.push(null), s = e.input.charCodeAt(e.position);
|
|
1565
1565
|
continue;
|
|
1566
1566
|
}
|
|
1567
|
-
if (n = e.line,
|
|
1568
|
-
|
|
1567
|
+
if (n = e.line, Se(e, t, Cn, !1, !0), o.push(e.result), Y(e, !0, -1), s = e.input.charCodeAt(e.position), (e.line === n || e.lineIndent > t) && s !== 0)
|
|
1568
|
+
w(e, "bad indentation of a sequence entry");
|
|
1569
1569
|
else if (e.lineIndent < t)
|
|
1570
1570
|
break;
|
|
1571
1571
|
}
|
|
1572
1572
|
return l ? (e.tag = i, e.anchor = r, e.kind = "sequence", e.result = o, !0) : !1;
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1575
|
-
var i, r, o, a, l, s, u = e.tag, d = e.anchor, c = {}, f = /* @__PURE__ */ Object.create(null), p = null,
|
|
1574
|
+
function Wr(e, t, n) {
|
|
1575
|
+
var i, r, o, a, l, s, u = e.tag, d = e.anchor, c = {}, f = /* @__PURE__ */ Object.create(null), p = null, C = null, m = null, A = !1, O = !1, g;
|
|
1576
1576
|
if (e.firstTabInLine !== -1)
|
|
1577
1577
|
return !1;
|
|
1578
|
-
for (e.anchor !== null && (e.anchorMap[e.anchor] = c),
|
|
1579
|
-
if (!
|
|
1580
|
-
|
|
1578
|
+
for (e.anchor !== null && (e.anchorMap[e.anchor] = c), g = e.input.charCodeAt(e.position); g !== 0; ) {
|
|
1579
|
+
if (!A && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, w(e, "tab characters must not be used in indentation")), i = e.input.charCodeAt(e.position + 1), o = e.line, (g === 63 || g === 58) && re(i))
|
|
1580
|
+
g === 63 ? (A && (Ce(e, c, f, p, C, null, a, l, s), p = C = m = null), O = !0, A = !0, r = !0) : A ? (A = !1, r = !0) : w(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, g = i;
|
|
1581
1581
|
else {
|
|
1582
|
-
if (a = e.line, l = e.lineStart, s = e.position, !
|
|
1582
|
+
if (a = e.line, l = e.lineStart, s = e.position, !Se(e, n, wn, !1, !0))
|
|
1583
1583
|
break;
|
|
1584
1584
|
if (e.line === o) {
|
|
1585
|
-
for (
|
|
1586
|
-
|
|
1587
|
-
if (
|
|
1588
|
-
|
|
1589
|
-
else if (
|
|
1590
|
-
|
|
1585
|
+
for (g = e.input.charCodeAt(e.position); he(g); )
|
|
1586
|
+
g = e.input.charCodeAt(++e.position);
|
|
1587
|
+
if (g === 58)
|
|
1588
|
+
g = e.input.charCodeAt(++e.position), re(g) || w(e, "a whitespace character is expected after the key-value separator within a block mapping"), A && (Ce(e, c, f, p, C, null, a, l, s), p = C = m = null), O = !0, A = !1, r = !1, p = e.tag, C = e.result;
|
|
1589
|
+
else if (O)
|
|
1590
|
+
w(e, "can not read an implicit mapping pair; a colon is missed");
|
|
1591
1591
|
else
|
|
1592
1592
|
return e.tag = u, e.anchor = d, !0;
|
|
1593
|
-
} else if (
|
|
1594
|
-
|
|
1593
|
+
} else if (O)
|
|
1594
|
+
w(e, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
1595
1595
|
else
|
|
1596
1596
|
return e.tag = u, e.anchor = d, !0;
|
|
1597
1597
|
}
|
|
1598
|
-
if ((e.line === o || e.lineIndent > t) && (
|
|
1599
|
-
|
|
1598
|
+
if ((e.line === o || e.lineIndent > t) && (A && (a = e.line, l = e.lineStart, s = e.position), Se(e, t, Ke, !0, r) && (A ? C = e.result : m = e.result), A || (Ce(e, c, f, p, C, m, a, l, s), p = C = m = null), Y(e, !0, -1), g = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > t) && g !== 0)
|
|
1599
|
+
w(e, "bad indentation of a mapping entry");
|
|
1600
1600
|
else if (e.lineIndent < t)
|
|
1601
1601
|
break;
|
|
1602
1602
|
}
|
|
1603
|
-
return
|
|
1603
|
+
return A && Ce(e, c, f, p, C, null, a, l, s), O && (e.tag = u, e.anchor = d, e.kind = "mapping", e.result = c), O;
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function Jr(e) {
|
|
1606
1606
|
var t, n = !1, i = !1, r, o, a;
|
|
1607
1607
|
if (a = e.input.charCodeAt(e.position), a !== 33)
|
|
1608
1608
|
return !1;
|
|
1609
|
-
if (e.tag !== null &&
|
|
1609
|
+
if (e.tag !== null && w(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) {
|
|
1610
1610
|
do
|
|
1611
1611
|
a = e.input.charCodeAt(++e.position);
|
|
1612
1612
|
while (a !== 0 && a !== 62);
|
|
1613
|
-
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) :
|
|
1613
|
+
e.position < e.length ? (o = e.input.slice(t, e.position), a = e.input.charCodeAt(++e.position)) : w(e, "unexpected end of the stream within a verbatim tag");
|
|
1614
1614
|
} else {
|
|
1615
|
-
for (; a !== 0 && !
|
|
1616
|
-
a === 33 && (i ?
|
|
1617
|
-
o = e.input.slice(t, e.position),
|
|
1615
|
+
for (; a !== 0 && !re(a); )
|
|
1616
|
+
a === 33 && (i ? w(e, "tag suffix cannot contain exclamation marks") : (r = e.input.slice(t - 1, e.position + 1), Sn.test(r) || w(e, "named tag handle cannot contain such characters"), i = !0, t = e.position + 1)), a = e.input.charCodeAt(++e.position);
|
|
1617
|
+
o = e.input.slice(t, e.position), qr.test(o) && w(e, "tag suffix cannot contain flow indicator characters");
|
|
1618
1618
|
}
|
|
1619
|
-
o && !
|
|
1619
|
+
o && !An.test(o) && w(e, "tag name cannot contain such characters: " + o);
|
|
1620
1620
|
try {
|
|
1621
1621
|
o = decodeURIComponent(o);
|
|
1622
1622
|
} catch {
|
|
1623
|
-
|
|
1623
|
+
w(e, "tag name is malformed: " + o);
|
|
1624
1624
|
}
|
|
1625
|
-
return n ? e.tag = o : fe.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o :
|
|
1625
|
+
return n ? e.tag = o : fe.call(e.tagMap, r) ? e.tag = e.tagMap[r] + o : r === "!" ? e.tag = "!" + o : r === "!!" ? e.tag = "tag:yaml.org,2002:" + o : w(e, 'undeclared tag handle "' + r + '"'), !0;
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function Gr(e) {
|
|
1628
1628
|
var t, n;
|
|
1629
1629
|
if (n = e.input.charCodeAt(e.position), n !== 38)
|
|
1630
1630
|
return !1;
|
|
1631
|
-
for (e.anchor !== null &&
|
|
1631
|
+
for (e.anchor !== null && w(e, "duplication of an anchor property"), n = e.input.charCodeAt(++e.position), t = e.position; n !== 0 && !re(n) && !we(n); )
|
|
1632
1632
|
n = e.input.charCodeAt(++e.position);
|
|
1633
|
-
return e.position === t &&
|
|
1633
|
+
return e.position === t && w(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(t, e.position), !0;
|
|
1634
1634
|
}
|
|
1635
|
-
function
|
|
1635
|
+
function Zr(e) {
|
|
1636
1636
|
var t, n, i;
|
|
1637
1637
|
if (i = e.input.charCodeAt(e.position), i !== 42)
|
|
1638
1638
|
return !1;
|
|
1639
|
-
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !
|
|
1639
|
+
for (i = e.input.charCodeAt(++e.position), t = e.position; i !== 0 && !re(i) && !we(i); )
|
|
1640
1640
|
i = e.input.charCodeAt(++e.position);
|
|
1641
|
-
return e.position === t &&
|
|
1642
|
-
}
|
|
1643
|
-
function
|
|
1644
|
-
var o, a, l, s = 1, u = !1, d = !1, c, f, p,
|
|
1645
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Ke === n ||
|
|
1646
|
-
for (;
|
|
1647
|
-
|
|
1648
|
-
if (l && (l = u || r), (s === 1 || Ke === n) && (qe === n ||
|
|
1641
|
+
return e.position === t && w(e, "name of an alias node must contain at least one character"), n = e.input.slice(t, e.position), fe.call(e.anchorMap, n) || w(e, 'unidentified alias "' + n + '"'), e.result = e.anchorMap[n], Y(e, !0, -1), !0;
|
|
1642
|
+
}
|
|
1643
|
+
function Se(e, t, n, i, r) {
|
|
1644
|
+
var o, a, l, s = 1, u = !1, d = !1, c, f, p, C, m, A;
|
|
1645
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = a = l = Ke === n || Cn === n, i && Y(e, !0, -1) && (u = !0, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)), s === 1)
|
|
1646
|
+
for (; Jr(e) || Gr(e); )
|
|
1647
|
+
Y(e, !0, -1) ? (u = !0, l = o, e.lineIndent > t ? s = 1 : e.lineIndent === t ? s = 0 : e.lineIndent < t && (s = -1)) : l = !1;
|
|
1648
|
+
if (l && (l = u || r), (s === 1 || Ke === n) && (qe === n || wn === n ? m = t : m = t + 1, A = e.position - e.lineStart, s === 1 ? l && (It(e, A) || Wr(e, A, m)) || Hr(e, m) ? d = !0 : (a && Yr(e, m) || Vr(e, m) || zr(e, m) ? d = !0 : Zr(e) ? (d = !0, (e.tag !== null || e.anchor !== null) && w(e, "alias node should not have any properties")) : Dr(e, m, qe === n) && (d = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : s === 0 && (d = l && It(e, A))), e.tag === null)
|
|
1649
1649
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1650
1650
|
else if (e.tag === "?") {
|
|
1651
|
-
for (e.result !== null && e.kind !== "scalar" &&
|
|
1652
|
-
if (
|
|
1653
|
-
e.result =
|
|
1651
|
+
for (e.result !== null && e.kind !== "scalar" && w(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), c = 0, f = e.implicitTypes.length; c < f; c += 1)
|
|
1652
|
+
if (C = e.implicitTypes[c], C.resolve(e.result)) {
|
|
1653
|
+
e.result = C.construct(e.result), e.tag = C.tag, e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
1654
1654
|
break;
|
|
1655
1655
|
}
|
|
1656
1656
|
} else if (e.tag !== "!") {
|
|
1657
1657
|
if (fe.call(e.typeMap[e.kind || "fallback"], e.tag))
|
|
1658
|
-
|
|
1658
|
+
C = e.typeMap[e.kind || "fallback"][e.tag];
|
|
1659
1659
|
else
|
|
1660
|
-
for (
|
|
1660
|
+
for (C = null, p = e.typeMap.multi[e.kind || "fallback"], c = 0, f = p.length; c < f; c += 1)
|
|
1661
1661
|
if (e.tag.slice(0, p[c].tag.length) === p[c].tag) {
|
|
1662
|
-
|
|
1662
|
+
C = p[c];
|
|
1663
1663
|
break;
|
|
1664
1664
|
}
|
|
1665
|
-
|
|
1665
|
+
C || w(e, "unknown tag !<" + e.tag + ">"), e.result !== null && C.kind !== e.kind && w(e, "unacceptable node kind for !<" + e.tag + '> tag; it should be "' + C.kind + '", not "' + e.kind + '"'), C.resolve(e.result, e.tag) ? (e.result = C.construct(e.result, e.tag), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : w(e, "cannot resolve a node with !<" + e.tag + "> explicit tag");
|
|
1666
1666
|
}
|
|
1667
1667
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || d;
|
|
1668
1668
|
}
|
|
1669
|
-
function
|
|
1669
|
+
function Qr(e) {
|
|
1670
1670
|
var t = e.position, n, i, r, o = !1, a;
|
|
1671
|
-
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 && (
|
|
1672
|
-
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !
|
|
1671
|
+
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 && (Y(e, !0, -1), a = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || a !== 37)); ) {
|
|
1672
|
+
for (o = !0, a = e.input.charCodeAt(++e.position), n = e.position; a !== 0 && !re(a); )
|
|
1673
1673
|
a = e.input.charCodeAt(++e.position);
|
|
1674
|
-
for (i = e.input.slice(n, e.position), r = [], i.length < 1 &&
|
|
1675
|
-
for (;
|
|
1674
|
+
for (i = e.input.slice(n, e.position), r = [], i.length < 1 && w(e, "directive name must not be less than one character in length"); a !== 0; ) {
|
|
1675
|
+
for (; he(a); )
|
|
1676
1676
|
a = e.input.charCodeAt(++e.position);
|
|
1677
1677
|
if (a === 35) {
|
|
1678
1678
|
do
|
|
@@ -1682,51 +1682,51 @@ function Zr(e) {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
if (oe(a))
|
|
1684
1684
|
break;
|
|
1685
|
-
for (n = e.position; a !== 0 && !
|
|
1685
|
+
for (n = e.position; a !== 0 && !re(a); )
|
|
1686
1686
|
a = e.input.charCodeAt(++e.position);
|
|
1687
1687
|
r.push(e.input.slice(n, e.position));
|
|
1688
1688
|
}
|
|
1689
1689
|
a !== 0 && ot(e), fe.call(St, i) ? St[i](e, i, r) : Re(e, 'unknown document directive "' + i + '"');
|
|
1690
1690
|
}
|
|
1691
|
-
if (
|
|
1692
|
-
e.input.charCodeAt(e.position) === 46 && (e.position += 3,
|
|
1691
|
+
if (Y(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, Y(e, !0, -1)) : o && w(e, "directives end mark is expected"), Se(e, e.lineIndent - 1, Ke, !1, !0), Y(e, !0, -1), e.checkLineBreaks && Lr.test(e.input.slice(t, e.position)) && Re(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && Pe(e)) {
|
|
1692
|
+
e.input.charCodeAt(e.position) === 46 && (e.position += 3, Y(e, !0, -1));
|
|
1693
1693
|
return;
|
|
1694
1694
|
}
|
|
1695
1695
|
if (e.position < e.length - 1)
|
|
1696
|
-
|
|
1696
|
+
w(e, "end of the stream or a document separator is expected");
|
|
1697
1697
|
else
|
|
1698
1698
|
return;
|
|
1699
1699
|
}
|
|
1700
|
-
function
|
|
1700
|
+
function Tn(e, t) {
|
|
1701
1701
|
e = String(e), t = t || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
1702
1702
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
1703
|
-
var n = new
|
|
1704
|
-
for (i !== -1 && (n.position = i,
|
|
1703
|
+
var n = new Pr(e, t), i = e.indexOf("\0");
|
|
1704
|
+
for (i !== -1 && (n.position = i, w(n, "null byte is not allowed in input")), n.input += "\0"; n.input.charCodeAt(n.position) === 32; )
|
|
1705
1705
|
n.lineIndent += 1, n.position += 1;
|
|
1706
1706
|
for (; n.position < n.length - 1; )
|
|
1707
|
-
|
|
1707
|
+
Qr(n);
|
|
1708
1708
|
return n.documents;
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function Xr(e, t, n) {
|
|
1711
1711
|
t !== null && typeof t == "object" && typeof n > "u" && (n = t, t = null);
|
|
1712
|
-
var i =
|
|
1712
|
+
var i = Tn(e, n);
|
|
1713
1713
|
if (typeof t != "function")
|
|
1714
1714
|
return i;
|
|
1715
1715
|
for (var r = 0, o = i.length; r < o; r += 1)
|
|
1716
1716
|
t(i[r]);
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1719
|
-
var n =
|
|
1718
|
+
function ea(e, t) {
|
|
1719
|
+
var n = Tn(e, t);
|
|
1720
1720
|
if (n.length !== 0) {
|
|
1721
1721
|
if (n.length === 1)
|
|
1722
1722
|
return n[0];
|
|
1723
1723
|
throw new ne("expected a single document in the stream, but found more");
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
|
-
var
|
|
1727
|
-
loadAll:
|
|
1728
|
-
load:
|
|
1729
|
-
},
|
|
1726
|
+
var ta = Xr, na = ea, jn = {
|
|
1727
|
+
loadAll: ta,
|
|
1728
|
+
load: na
|
|
1729
|
+
}, On = Object.prototype.toString, Nn = Object.prototype.hasOwnProperty, st = 65279, ia = 9, Ne = 10, ra = 13, aa = 32, oa = 33, la = 34, Je = 35, sa = 37, ca = 38, ua = 39, da = 42, Fn = 44, pa = 45, Be = 58, fa = 61, ma = 62, ga = 63, ha = 64, Mn = 91, En = 93, ya = 96, $n = 123, va = 124, Ln = 125, X = {};
|
|
1730
1730
|
X[0] = "\\0";
|
|
1731
1731
|
X[7] = "\\a";
|
|
1732
1732
|
X[8] = "\\b";
|
|
@@ -1742,7 +1742,7 @@ X[133] = "\\N";
|
|
|
1742
1742
|
X[160] = "\\_";
|
|
1743
1743
|
X[8232] = "\\L";
|
|
1744
1744
|
X[8233] = "\\P";
|
|
1745
|
-
var
|
|
1745
|
+
var ba = [
|
|
1746
1746
|
"y",
|
|
1747
1747
|
"Y",
|
|
1748
1748
|
"yes",
|
|
@@ -1759,16 +1759,16 @@ var va = [
|
|
|
1759
1759
|
"off",
|
|
1760
1760
|
"Off",
|
|
1761
1761
|
"OFF"
|
|
1762
|
-
],
|
|
1763
|
-
function
|
|
1762
|
+
], ka = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
1763
|
+
function wa(e, t) {
|
|
1764
1764
|
var n, i, r, o, a, l, s;
|
|
1765
1765
|
if (t === null)
|
|
1766
1766
|
return {};
|
|
1767
1767
|
for (n = {}, i = Object.keys(t), r = 0, o = i.length; r < o; r += 1)
|
|
1768
|
-
a = i[r], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s &&
|
|
1768
|
+
a = i[r], l = String(t[a]), a.slice(0, 2) === "!!" && (a = "tag:yaml.org,2002:" + a.slice(2)), s = e.compiledTypeMap.fallback[a], s && Nn.call(s.styleAliases, l) && (l = s.styleAliases[l]), n[a] = l;
|
|
1769
1769
|
return n;
|
|
1770
1770
|
}
|
|
1771
|
-
function
|
|
1771
|
+
function Ca(e) {
|
|
1772
1772
|
var t, n, i;
|
|
1773
1773
|
if (t = e.toString(16).toUpperCase(), e <= 255)
|
|
1774
1774
|
n = "x", i = 2;
|
|
@@ -1780,9 +1780,9 @@ function wa(e) {
|
|
|
1780
1780
|
throw new ne("code point within a string may not be greater than 0xFFFFFFFF");
|
|
1781
1781
|
return "\\" + n + W.repeat("0", i - t.length) + t;
|
|
1782
1782
|
}
|
|
1783
|
-
var
|
|
1784
|
-
function
|
|
1785
|
-
this.schema = e.schema || at, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = W.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap =
|
|
1783
|
+
var Sa = 1, Fe = 2;
|
|
1784
|
+
function Aa(e) {
|
|
1785
|
+
this.schema = e.schema || at, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = W.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = wa(this.schema, e.styles || null), this.sortKeys = e.sortKeys || !1, this.lineWidth = e.lineWidth || 80, this.noRefs = e.noRefs || !1, this.noCompatMode = e.noCompatMode || !1, this.condenseFlow = e.condenseFlow || !1, this.quotingType = e.quotingType === '"' ? Fe : Sa, 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;
|
|
1786
1786
|
}
|
|
1787
1787
|
function xt(e, t) {
|
|
1788
1788
|
for (var n = W.repeat(" ", t), i = 0, r = -1, o = "", a, l = e.length; i < l; )
|
|
@@ -1795,79 +1795,79 @@ function Ge(e, t) {
|
|
|
1795
1795
|
return `
|
|
1796
1796
|
` + W.repeat(" ", e.indent * t);
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1798
|
+
function Ia(e, t) {
|
|
1799
1799
|
var n, i, r;
|
|
1800
1800
|
for (n = 0, i = e.implicitTypes.length; n < i; n += 1)
|
|
1801
1801
|
if (r = e.implicitTypes[n], r.resolve(t))
|
|
1802
1802
|
return !0;
|
|
1803
1803
|
return !1;
|
|
1804
1804
|
}
|
|
1805
|
-
function
|
|
1806
|
-
return e ===
|
|
1805
|
+
function Ue(e) {
|
|
1806
|
+
return e === aa || e === ia;
|
|
1807
1807
|
}
|
|
1808
|
-
function
|
|
1808
|
+
function Me(e) {
|
|
1809
1809
|
return 32 <= e && e <= 126 || 161 <= e && e <= 55295 && e !== 8232 && e !== 8233 || 57344 <= e && e <= 65533 && e !== st || 65536 <= e && e <= 1114111;
|
|
1810
1810
|
}
|
|
1811
1811
|
function _t(e) {
|
|
1812
|
-
return
|
|
1812
|
+
return Me(e) && e !== st && e !== ra && e !== Ne;
|
|
1813
1813
|
}
|
|
1814
1814
|
function Tt(e, t, n) {
|
|
1815
|
-
var i = _t(e), r = i && !
|
|
1815
|
+
var i = _t(e), r = i && !Ue(e);
|
|
1816
1816
|
return (
|
|
1817
1817
|
// ns-plain-safe
|
|
1818
1818
|
(n ? (
|
|
1819
1819
|
// c = flow-in
|
|
1820
1820
|
i
|
|
1821
|
-
) : i && e !==
|
|
1821
|
+
) : i && e !== Fn && e !== Mn && e !== En && e !== $n && e !== Ln) && e !== Je && !(t === Be && !r) || _t(t) && !Ue(t) && e === Je || t === Be && r
|
|
1822
1822
|
);
|
|
1823
1823
|
}
|
|
1824
|
-
function Ia(e) {
|
|
1825
|
-
return Ee(e) && e !== st && !Be(e) && e !== da && e !== ha && e !== Ue && e !== Tn && e !== jn && e !== On && e !== Mn && e !== En && e !== Je && e !== sa && e !== ua && e !== aa && e !== ya && e !== pa && e !== fa && e !== ca && e !== oa && e !== la && e !== ma && e !== ga;
|
|
1826
|
-
}
|
|
1827
1824
|
function xa(e) {
|
|
1828
|
-
return !
|
|
1825
|
+
return Me(e) && e !== st && !Ue(e) && e !== pa && e !== ga && e !== Be && e !== Fn && e !== Mn && e !== En && e !== $n && e !== Ln && e !== Je && e !== ca && e !== da && e !== oa && e !== va && e !== fa && e !== ma && e !== ua && e !== la && e !== sa && e !== ha && e !== ya;
|
|
1826
|
+
}
|
|
1827
|
+
function _a(e) {
|
|
1828
|
+
return !Ue(e) && e !== Be;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function Te(e, t) {
|
|
1831
1831
|
var n = e.charCodeAt(t), i;
|
|
1832
1832
|
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;
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function qn(e) {
|
|
1835
1835
|
var t = /^\n* /;
|
|
1836
1836
|
return t.test(e);
|
|
1837
1837
|
}
|
|
1838
|
-
var
|
|
1839
|
-
function
|
|
1840
|
-
var s, u = 0, d = null, c = !1, f = !1, p = i !== -1,
|
|
1838
|
+
var Kn = 1, Ze = 2, Rn = 3, Bn = 4, ve = 5;
|
|
1839
|
+
function Ta(e, t, n, i, r, o, a, l) {
|
|
1840
|
+
var s, u = 0, d = null, c = !1, f = !1, p = i !== -1, C = -1, m = xa(Te(e, 0)) && _a(Te(e, e.length - 1));
|
|
1841
1841
|
if (t || a)
|
|
1842
1842
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
1843
|
-
if (u =
|
|
1843
|
+
if (u = Te(e, s), !Me(u))
|
|
1844
1844
|
return ve;
|
|
1845
|
-
|
|
1845
|
+
m = m && Tt(u, d, l), d = u;
|
|
1846
1846
|
}
|
|
1847
1847
|
else {
|
|
1848
1848
|
for (s = 0; s < e.length; u >= 65536 ? s += 2 : s++) {
|
|
1849
|
-
if (u =
|
|
1849
|
+
if (u = Te(e, s), u === Ne)
|
|
1850
1850
|
c = !0, p && (f = f || // Foldable line = too long, and not more-indented.
|
|
1851
|
-
s -
|
|
1852
|
-
else if (!
|
|
1851
|
+
s - C - 1 > i && e[C + 1] !== " ", C = s);
|
|
1852
|
+
else if (!Me(u))
|
|
1853
1853
|
return ve;
|
|
1854
|
-
|
|
1854
|
+
m = m && Tt(u, d, l), d = u;
|
|
1855
1855
|
}
|
|
1856
|
-
f = f || p && s -
|
|
1856
|
+
f = f || p && s - C - 1 > i && e[C + 1] !== " ";
|
|
1857
1857
|
}
|
|
1858
|
-
return !c && !f ?
|
|
1858
|
+
return !c && !f ? m && !a && !r(e) ? Kn : o === Fe ? ve : Ze : n > 9 && qn(e) ? ve : a ? o === Fe ? ve : Ze : f ? Bn : Rn;
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function ja(e, t, n, i, r) {
|
|
1861
1861
|
e.dump = function() {
|
|
1862
1862
|
if (t.length === 0)
|
|
1863
|
-
return e.quotingType ===
|
|
1864
|
-
if (!e.noCompatMode && (
|
|
1865
|
-
return e.quotingType ===
|
|
1863
|
+
return e.quotingType === Fe ? '""' : "''";
|
|
1864
|
+
if (!e.noCompatMode && (ba.indexOf(t) !== -1 || ka.test(t)))
|
|
1865
|
+
return e.quotingType === Fe ? '"' + t + '"' : "'" + t + "'";
|
|
1866
1866
|
var o = e.indent * Math.max(1, n), a = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), l = i || e.flowLevel > -1 && n >= e.flowLevel;
|
|
1867
1867
|
function s(u) {
|
|
1868
|
-
return
|
|
1868
|
+
return Ia(e, u);
|
|
1869
1869
|
}
|
|
1870
|
-
switch (
|
|
1870
|
+
switch (Ta(
|
|
1871
1871
|
t,
|
|
1872
1872
|
l,
|
|
1873
1873
|
e.indent,
|
|
@@ -1877,23 +1877,23 @@ function Ta(e, t, n, i, r) {
|
|
|
1877
1877
|
e.forceQuotes && !i,
|
|
1878
1878
|
r
|
|
1879
1879
|
)) {
|
|
1880
|
-
case
|
|
1880
|
+
case Kn:
|
|
1881
1881
|
return t;
|
|
1882
1882
|
case Ze:
|
|
1883
1883
|
return "'" + t.replace(/'/g, "''") + "'";
|
|
1884
|
-
case
|
|
1884
|
+
case Rn:
|
|
1885
1885
|
return "|" + jt(t, e.indent) + Ot(xt(t, o));
|
|
1886
|
-
case
|
|
1887
|
-
return ">" + jt(t, e.indent) + Ot(xt(
|
|
1886
|
+
case Bn:
|
|
1887
|
+
return ">" + jt(t, e.indent) + Ot(xt(Oa(t, a), o));
|
|
1888
1888
|
case ve:
|
|
1889
|
-
return '"' +
|
|
1889
|
+
return '"' + Na(t) + '"';
|
|
1890
1890
|
default:
|
|
1891
1891
|
throw new ne("impossible error: invalid scalar style");
|
|
1892
1892
|
}
|
|
1893
1893
|
}();
|
|
1894
1894
|
}
|
|
1895
1895
|
function jt(e, t) {
|
|
1896
|
-
var n =
|
|
1896
|
+
var n = qn(e) ? String(t) : "", i = e[e.length - 1] === `
|
|
1897
1897
|
`, r = i && (e[e.length - 2] === `
|
|
1898
1898
|
` || e === `
|
|
1899
1899
|
`), o = r ? "+" : i ? "" : "-";
|
|
@@ -1904,20 +1904,20 @@ function Ot(e) {
|
|
|
1904
1904
|
return e[e.length - 1] === `
|
|
1905
1905
|
` ? e.slice(0, -1) : e;
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function Oa(e, t) {
|
|
1908
1908
|
for (var n = /(\n+)([^\n]*)/g, i = function() {
|
|
1909
1909
|
var u = e.indexOf(`
|
|
1910
1910
|
`);
|
|
1911
|
-
return u = u !== -1 ? u : e.length, n.lastIndex = u,
|
|
1911
|
+
return u = u !== -1 ? u : e.length, n.lastIndex = u, Nt(e.slice(0, u), t);
|
|
1912
1912
|
}(), r = e[0] === `
|
|
1913
1913
|
` || e[0] === " ", o, a; a = n.exec(e); ) {
|
|
1914
1914
|
var l = a[1], s = a[2];
|
|
1915
1915
|
o = s[0] === " ", i += l + (!r && !o && s !== "" ? `
|
|
1916
|
-
` : "") +
|
|
1916
|
+
` : "") + Nt(s, t), r = o;
|
|
1917
1917
|
}
|
|
1918
1918
|
return i;
|
|
1919
1919
|
}
|
|
1920
|
-
function
|
|
1920
|
+
function Nt(e, t) {
|
|
1921
1921
|
if (e === "" || e[0] === " ")
|
|
1922
1922
|
return e;
|
|
1923
1923
|
for (var n = / [^ ]/g, i, r = 0, o, a = 0, l = 0, s = ""; i = n.exec(e); )
|
|
@@ -1927,30 +1927,30 @@ function Mt(e, t) {
|
|
|
1927
1927
|
`, e.length - r > t && a > r ? s += e.slice(r, a) + `
|
|
1928
1928
|
` + e.slice(a + 1) : s += e.slice(r), s.slice(1);
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function Na(e) {
|
|
1931
1931
|
for (var t = "", n = 0, i, r = 0; r < e.length; n >= 65536 ? r += 2 : r++)
|
|
1932
|
-
n =
|
|
1932
|
+
n = Te(e, r), i = X[n], !i && Me(n) ? (t += e[r], n >= 65536 && (t += e[r + 1])) : t += i || Ca(n);
|
|
1933
1933
|
return t;
|
|
1934
1934
|
}
|
|
1935
|
-
function
|
|
1935
|
+
function Fa(e, t, n) {
|
|
1936
1936
|
var i = "", r = e.tag, o, a, l;
|
|
1937
1937
|
for (o = 0, a = n.length; o < a; o += 1)
|
|
1938
1938
|
l = n[o], e.replacer && (l = e.replacer.call(n, String(o), l)), (ue(e, t, l, !1, !1) || typeof l > "u" && ue(e, t, null, !1, !1)) && (i !== "" && (i += "," + (e.condenseFlow ? "" : " ")), i += e.dump);
|
|
1939
1939
|
e.tag = r, e.dump = "[" + i + "]";
|
|
1940
1940
|
}
|
|
1941
|
-
function
|
|
1941
|
+
function Ft(e, t, n, i) {
|
|
1942
1942
|
var r = "", o = e.tag, a, l, s;
|
|
1943
1943
|
for (a = 0, l = n.length; a < l; a += 1)
|
|
1944
|
-
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (ue(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ue(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += Ge(e, t)), e.dump &&
|
|
1944
|
+
s = n[a], e.replacer && (s = e.replacer.call(n, String(a), s)), (ue(e, t + 1, s, !0, !0, !1, !0) || typeof s > "u" && ue(e, t + 1, null, !0, !0, !1, !0)) && ((!i || r !== "") && (r += Ge(e, t)), e.dump && Ne === e.dump.charCodeAt(0) ? r += "-" : r += "- ", r += e.dump);
|
|
1945
1945
|
e.tag = o, e.dump = r || "[]";
|
|
1946
1946
|
}
|
|
1947
|
-
function
|
|
1947
|
+
function Ma(e, t, n) {
|
|
1948
1948
|
var i = "", r = e.tag, o = Object.keys(n), a, l, s, u, d;
|
|
1949
1949
|
for (a = 0, l = o.length; a < l; a += 1)
|
|
1950
1950
|
d = "", i !== "" && (d += ", "), e.condenseFlow && (d += '"'), s = o[a], u = n[s], e.replacer && (u = e.replacer.call(n, s, u)), ue(e, t, s, !1, !1) && (e.dump.length > 1024 && (d += "? "), d += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ue(e, t, u, !1, !1) && (d += e.dump, i += d));
|
|
1951
1951
|
e.tag = r, e.dump = "{" + i + "}";
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1953
|
+
function Ea(e, t, n, i) {
|
|
1954
1954
|
var r = "", o = e.tag, a = Object.keys(n), l, s, u, d, c, f;
|
|
1955
1955
|
if (e.sortKeys === !0)
|
|
1956
1956
|
a.sort();
|
|
@@ -1959,17 +1959,17 @@ function Fa(e, t, n, i) {
|
|
|
1959
1959
|
else if (e.sortKeys)
|
|
1960
1960
|
throw new ne("sortKeys must be a boolean or a function");
|
|
1961
1961
|
for (l = 0, s = a.length; l < s; l += 1)
|
|
1962
|
-
f = "", (!i || r !== "") && (f += Ge(e, t)), u = a[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), ue(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump &&
|
|
1962
|
+
f = "", (!i || r !== "") && (f += Ge(e, t)), u = a[l], d = n[u], e.replacer && (d = e.replacer.call(n, u, d)), ue(e, t + 1, u, !0, !0, !0) && (c = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, c && (e.dump && Ne === e.dump.charCodeAt(0) ? f += "?" : f += "? "), f += e.dump, c && (f += Ge(e, t)), ue(e, t + 1, d, !0, c) && (e.dump && Ne === e.dump.charCodeAt(0) ? f += ":" : f += ": ", f += e.dump, r += f));
|
|
1963
1963
|
e.tag = o, e.dump = r || "{}";
|
|
1964
1964
|
}
|
|
1965
|
-
function
|
|
1965
|
+
function Mt(e, t, n) {
|
|
1966
1966
|
var i, r, o, a, l, s;
|
|
1967
1967
|
for (r = n ? e.explicitTypes : e.implicitTypes, o = 0, a = r.length; o < a; o += 1)
|
|
1968
1968
|
if (l = r[o], (l.instanceOf || l.predicate) && (!l.instanceOf || typeof t == "object" && t instanceof l.instanceOf) && (!l.predicate || l.predicate(t))) {
|
|
1969
1969
|
if (n ? l.multi && l.representName ? e.tag = l.representName(t) : e.tag = l.tag : e.tag = "?", l.represent) {
|
|
1970
|
-
if (s = e.styleMap[l.tag] || l.defaultStyle,
|
|
1970
|
+
if (s = e.styleMap[l.tag] || l.defaultStyle, On.call(l.represent) === "[object Function]")
|
|
1971
1971
|
i = l.represent(t, s);
|
|
1972
|
-
else if (
|
|
1972
|
+
else if (Nn.call(l.represent, s))
|
|
1973
1973
|
i = l.represent[s](t, s);
|
|
1974
1974
|
else
|
|
1975
1975
|
throw new ne("!<" + l.tag + '> tag resolver accepts not "' + s + '" style');
|
|
@@ -1980,19 +1980,19 @@ function Ft(e, t, n) {
|
|
|
1980
1980
|
return !1;
|
|
1981
1981
|
}
|
|
1982
1982
|
function ue(e, t, n, i, r, o, a) {
|
|
1983
|
-
e.tag = null, e.dump = n,
|
|
1984
|
-
var l =
|
|
1983
|
+
e.tag = null, e.dump = n, Mt(e, n, !1) || Mt(e, n, !0);
|
|
1984
|
+
var l = On.call(e.dump), s = i, u;
|
|
1985
1985
|
i && (i = e.flowLevel < 0 || e.flowLevel > t);
|
|
1986
1986
|
var d = l === "[object Object]" || l === "[object Array]", c, f;
|
|
1987
1987
|
if (d && (c = e.duplicates.indexOf(n), f = c !== -1), (e.tag !== null && e.tag !== "?" || f || e.indent !== 2 && t > 0) && (r = !1), f && e.usedDuplicates[c])
|
|
1988
1988
|
e.dump = "*ref_" + c;
|
|
1989
1989
|
else {
|
|
1990
1990
|
if (d && f && !e.usedDuplicates[c] && (e.usedDuplicates[c] = !0), l === "[object Object]")
|
|
1991
|
-
i && Object.keys(e.dump).length !== 0 ? (
|
|
1991
|
+
i && Object.keys(e.dump).length !== 0 ? (Ea(e, t, e.dump, r), f && (e.dump = "&ref_" + c + e.dump)) : (Ma(e, t, e.dump), f && (e.dump = "&ref_" + c + " " + e.dump));
|
|
1992
1992
|
else if (l === "[object Array]")
|
|
1993
|
-
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ?
|
|
1993
|
+
i && e.dump.length !== 0 ? (e.noArrayIndent && !a && t > 0 ? Ft(e, t - 1, e.dump, r) : Ft(e, t, e.dump, r), f && (e.dump = "&ref_" + c + e.dump)) : (Fa(e, t, e.dump), f && (e.dump = "&ref_" + c + " " + e.dump));
|
|
1994
1994
|
else if (l === "[object String]")
|
|
1995
|
-
e.tag !== "?" &&
|
|
1995
|
+
e.tag !== "?" && ja(e, e.dump, t, o, s);
|
|
1996
1996
|
else {
|
|
1997
1997
|
if (l === "[object Undefined]" || e.skipInvalid)
|
|
1998
1998
|
return !1;
|
|
@@ -2004,7 +2004,7 @@ function ue(e, t, n, i, r, o, a) {
|
|
|
2004
2004
|
}
|
|
2005
2005
|
return !0;
|
|
2006
2006
|
}
|
|
2007
|
-
function
|
|
2007
|
+
function $a(e, t) {
|
|
2008
2008
|
var n = [], i = [], r, o;
|
|
2009
2009
|
for (Qe(e, n, i), r = 0, o = i.length; r < o; r += 1)
|
|
2010
2010
|
t.duplicates.push(n[i[r]]);
|
|
@@ -2022,53 +2022,53 @@ function Qe(e, t, n) {
|
|
|
2022
2022
|
for (i = Object.keys(e), r = 0, o = i.length; r < o; r += 1)
|
|
2023
2023
|
Qe(e[i[r]], t, n);
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function La(e, t) {
|
|
2026
2026
|
t = t || {};
|
|
2027
|
-
var n = new
|
|
2028
|
-
n.noRefs ||
|
|
2027
|
+
var n = new Aa(t);
|
|
2028
|
+
n.noRefs || $a(e, n);
|
|
2029
2029
|
var i = e;
|
|
2030
2030
|
return n.replacer && (i = n.replacer.call({ "": i }, "", i)), ue(n, 0, i, !0, !0) ? n.dump + `
|
|
2031
2031
|
` : "";
|
|
2032
2032
|
}
|
|
2033
|
-
var
|
|
2034
|
-
dump:
|
|
2033
|
+
var qa = La, Ka = {
|
|
2034
|
+
dump: qa
|
|
2035
2035
|
};
|
|
2036
2036
|
function ct(e, t) {
|
|
2037
2037
|
return function() {
|
|
2038
2038
|
throw new Error("Function yaml." + e + " is removed in js-yaml 4. Use yaml." + t + " instead, which is now safe by default.");
|
|
2039
2039
|
};
|
|
2040
2040
|
}
|
|
2041
|
-
var
|
|
2042
|
-
binary:
|
|
2043
|
-
float:
|
|
2044
|
-
map:
|
|
2045
|
-
null:
|
|
2046
|
-
pairs:
|
|
2047
|
-
set:
|
|
2048
|
-
timestamp:
|
|
2049
|
-
bool:
|
|
2050
|
-
int:
|
|
2051
|
-
merge:
|
|
2052
|
-
omap:
|
|
2053
|
-
seq:
|
|
2054
|
-
str:
|
|
2055
|
-
},
|
|
2056
|
-
Type:
|
|
2057
|
-
Schema:
|
|
2041
|
+
var Ra = Q, Ba = tn, Ua = on, Pa = dn, Da = pn, Va = at, za = jn.load, Ha = jn.loadAll, Ya = Ka.dump, Wa = ne, Ja = {
|
|
2042
|
+
binary: yn,
|
|
2043
|
+
float: un,
|
|
2044
|
+
map: an,
|
|
2045
|
+
null: ln,
|
|
2046
|
+
pairs: bn,
|
|
2047
|
+
set: kn,
|
|
2048
|
+
timestamp: gn,
|
|
2049
|
+
bool: sn,
|
|
2050
|
+
int: cn,
|
|
2051
|
+
merge: hn,
|
|
2052
|
+
omap: vn,
|
|
2053
|
+
seq: rn,
|
|
2054
|
+
str: nn
|
|
2055
|
+
}, Ga = ct("safeLoad", "load"), Za = ct("safeLoadAll", "loadAll"), Qa = ct("safeDump", "dump"), Xa = {
|
|
2056
|
+
Type: Ra,
|
|
2057
|
+
Schema: Ba,
|
|
2058
2058
|
FAILSAFE_SCHEMA: Ua,
|
|
2059
|
-
JSON_SCHEMA:
|
|
2060
|
-
CORE_SCHEMA:
|
|
2061
|
-
DEFAULT_SCHEMA:
|
|
2062
|
-
load:
|
|
2059
|
+
JSON_SCHEMA: Pa,
|
|
2060
|
+
CORE_SCHEMA: Da,
|
|
2061
|
+
DEFAULT_SCHEMA: Va,
|
|
2062
|
+
load: za,
|
|
2063
2063
|
loadAll: Ha,
|
|
2064
|
-
dump:
|
|
2065
|
-
YAMLException:
|
|
2066
|
-
types:
|
|
2067
|
-
safeLoad:
|
|
2068
|
-
safeLoadAll:
|
|
2069
|
-
safeDump:
|
|
2064
|
+
dump: Ya,
|
|
2065
|
+
YAMLException: Wa,
|
|
2066
|
+
types: Ja,
|
|
2067
|
+
safeLoad: Ga,
|
|
2068
|
+
safeLoadAll: Za,
|
|
2069
|
+
safeDump: Qa
|
|
2070
2070
|
};
|
|
2071
|
-
const
|
|
2071
|
+
const eo = { class: "yaml-config" }, to = /* @__PURE__ */ ie({
|
|
2072
2072
|
__name: "YamlCodeBlock",
|
|
2073
2073
|
props: {
|
|
2074
2074
|
/** A record to indicate the entity's configuration, used to populate the YAML code block */
|
|
@@ -2078,27 +2078,131 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2078
2078
|
}
|
|
2079
2079
|
},
|
|
2080
2080
|
setup(e) {
|
|
2081
|
-
const t = e, n =
|
|
2081
|
+
const t = e, n = x(() => {
|
|
2082
2082
|
const i = Object.fromEntries(Object.entries(t.yamlRecord).filter(([, r]) => r && (Array.isArray(r) ? r.length !== 0 : !0)));
|
|
2083
|
-
return Object.keys(i).length === 0 && i.constructor === Object ? "" :
|
|
2083
|
+
return Object.keys(i).length === 0 && i.constructor === Object ? "" : Xa.dump(i).trim();
|
|
2084
2084
|
});
|
|
2085
2085
|
return (i, r) => {
|
|
2086
|
-
const o =
|
|
2087
|
-
return
|
|
2088
|
-
t.yamlRecord ? (
|
|
2086
|
+
const o = $("KCodeBlock");
|
|
2087
|
+
return S(), q("div", eo, [
|
|
2088
|
+
t.yamlRecord ? (S(), H(o, {
|
|
2089
2089
|
key: 0,
|
|
2090
2090
|
id: "yaml-codeblock",
|
|
2091
2091
|
code: n.value,
|
|
2092
2092
|
language: "yaml",
|
|
2093
2093
|
theme: "dark"
|
|
2094
|
-
}, null, 8, ["code"])) :
|
|
2094
|
+
}, null, 8, ["code"])) : Z("", !0)
|
|
2095
2095
|
]);
|
|
2096
2096
|
};
|
|
2097
2097
|
}
|
|
2098
|
-
}),
|
|
2098
|
+
}), Et = "24px", no = (e, t) => {
|
|
2099
|
+
const n = e.__vccOpts || e;
|
|
2100
|
+
for (const [i, r] of t)
|
|
2101
|
+
n[i] = r;
|
|
2102
|
+
return n;
|
|
2103
|
+
}, io = (e) => (Dt("data-v-19f4cbbe"), e = e(), Vt(), e), ro = ["aria-hidden"], ao = {
|
|
2104
|
+
key: 0,
|
|
2105
|
+
"data-testid": "kui-icon-svg-title"
|
|
2106
|
+
}, oo = /* @__PURE__ */ io(() => /* @__PURE__ */ K("path", {
|
|
2107
|
+
d: "M6.4 19L5 17.6L10.6 12L5 6.4L6.4 5L12 10.6L17.6 5L19 6.4L13.4 12L19 17.6L17.6 19L12 13.4L6.4 19Z",
|
|
2108
|
+
fill: "currentColor"
|
|
2109
|
+
}, null, -1)), lo = /* @__PURE__ */ ie({
|
|
2110
|
+
__name: "CloseIcon",
|
|
2111
|
+
props: {
|
|
2112
|
+
/** The accessibility text provided to screen readers */
|
|
2113
|
+
title: {
|
|
2114
|
+
type: String,
|
|
2115
|
+
required: !1,
|
|
2116
|
+
default: ""
|
|
2117
|
+
},
|
|
2118
|
+
/** The icon color. Defaults to `currentColor` which inherits text color from the parent element */
|
|
2119
|
+
color: {
|
|
2120
|
+
type: String,
|
|
2121
|
+
required: !1,
|
|
2122
|
+
default: "currentColor"
|
|
2123
|
+
},
|
|
2124
|
+
/** The CSS display property for the icon. Defaults to `block` */
|
|
2125
|
+
display: {
|
|
2126
|
+
type: String,
|
|
2127
|
+
required: !1,
|
|
2128
|
+
default: "block"
|
|
2129
|
+
},
|
|
2130
|
+
/** Whether the icon is just eye-candy or is meaningful to the page (should screen-readers ignore the icon?) */
|
|
2131
|
+
decorative: {
|
|
2132
|
+
type: Boolean,
|
|
2133
|
+
required: !1,
|
|
2134
|
+
default: !1
|
|
2135
|
+
},
|
|
2136
|
+
/** The icon size */
|
|
2137
|
+
size: {
|
|
2138
|
+
type: [Number, String],
|
|
2139
|
+
required: !1,
|
|
2140
|
+
default: Et,
|
|
2141
|
+
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
2142
|
+
validator: (e) => {
|
|
2143
|
+
if (typeof e == "number" && e > 0)
|
|
2144
|
+
return !0;
|
|
2145
|
+
if (typeof e == "string") {
|
|
2146
|
+
const t = String(e).replace(/px/gi, ""), n = Number(t);
|
|
2147
|
+
if (n && !isNaN(n) && Number.isInteger(n) && n > 0)
|
|
2148
|
+
return !0;
|
|
2149
|
+
}
|
|
2150
|
+
return !1;
|
|
2151
|
+
}
|
|
2152
|
+
},
|
|
2153
|
+
/** The HTML tag to utilize for the icon's wrapper element. Defaults to `span` */
|
|
2154
|
+
as: {
|
|
2155
|
+
type: String,
|
|
2156
|
+
required: !1,
|
|
2157
|
+
default: "span"
|
|
2158
|
+
}
|
|
2159
|
+
},
|
|
2160
|
+
setup(e) {
|
|
2161
|
+
const t = e, n = x(() => {
|
|
2162
|
+
if (typeof t.size == "number" && t.size > 0)
|
|
2163
|
+
return `${t.size}px`;
|
|
2164
|
+
if (typeof t.size == "string") {
|
|
2165
|
+
const r = String(t.size).replace(/px/gi, ""), o = Number(r);
|
|
2166
|
+
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2167
|
+
return `${o}px`;
|
|
2168
|
+
}
|
|
2169
|
+
return Et;
|
|
2170
|
+
}), i = x(() => ({
|
|
2171
|
+
boxSizing: "border-box",
|
|
2172
|
+
color: t.color,
|
|
2173
|
+
display: t.display,
|
|
2174
|
+
height: n.value,
|
|
2175
|
+
lineHeight: "0",
|
|
2176
|
+
width: n.value
|
|
2177
|
+
}));
|
|
2178
|
+
return (r, o) => (S(), H(je(e.as), {
|
|
2179
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2180
|
+
class: "kui-icon close-icon",
|
|
2181
|
+
"data-testid": "kui-icon-wrapper-close-icon",
|
|
2182
|
+
style: Pt(i.value)
|
|
2183
|
+
}, {
|
|
2184
|
+
default: b(() => [
|
|
2185
|
+
(S(), q("svg", {
|
|
2186
|
+
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2187
|
+
"data-testid": "kui-icon-svg-close-icon",
|
|
2188
|
+
fill: "none",
|
|
2189
|
+
height: "100%",
|
|
2190
|
+
role: "img",
|
|
2191
|
+
viewBox: "0 0 24 24",
|
|
2192
|
+
width: "100%",
|
|
2193
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2194
|
+
}, [
|
|
2195
|
+
e.title ? (S(), q("title", ao, E(e.title), 1)) : Z("", !0),
|
|
2196
|
+
oo
|
|
2197
|
+
], 8, ro))
|
|
2198
|
+
]),
|
|
2199
|
+
_: 1
|
|
2200
|
+
}, 8, ["aria-hidden", "style"]));
|
|
2201
|
+
}
|
|
2202
|
+
}), so = /* @__PURE__ */ no(lo, [["__scopeId", "data-v-19f4cbbe"]]), co = {
|
|
2099
2203
|
class: "form-actions",
|
|
2100
2204
|
"data-testid": "form-actions"
|
|
2101
|
-
},
|
|
2205
|
+
}, uo = { key: 0 }, po = /* @__PURE__ */ ie({
|
|
2102
2206
|
__name: "EntityBaseForm",
|
|
2103
2207
|
props: {
|
|
2104
2208
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2153,21 +2257,21 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2153
2257
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
2154
2258
|
setup(e, { emit: t }) {
|
|
2155
2259
|
var n;
|
|
2156
|
-
const i = t, r = e, o =
|
|
2260
|
+
const i = t, r = e, o = Ht(), { i18n: { t: a } } = ge.useI18n(), { getMessageFromError: l } = ge.useErrors(), { axiosInstance: s } = ge.useAxios({
|
|
2157
2261
|
headers: (n = r.config) == null ? void 0 : n.requestHeaders
|
|
2158
|
-
}), u =
|
|
2159
|
-
var
|
|
2160
|
-
let
|
|
2161
|
-
return r.config.app === "konnect" ?
|
|
2162
|
-
}),
|
|
2262
|
+
}), u = F(!1), d = F(!1), c = F(""), f = x(() => r.canSubmit === !1 || r.isReadonly), p = F(!1), C = x(() => {
|
|
2263
|
+
var k, y;
|
|
2264
|
+
let N = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
2265
|
+
return r.config.app === "konnect" ? N = N.replace(/{controlPlaneId}/gi, ((k = r.config) == null ? void 0 : k.controlPlaneId) || "") : r.config.app === "kongManager" && (N = N.replace(/\/{workspace}/gi, (y = r.config) != null && y.workspace ? `/${r.config.workspace}` : "")), r.editId ? (N = N.replace(/{id}/gi, r.editId), N) : (N = N.replace(/\/{id}/gi, ""), N);
|
|
2266
|
+
}), m = () => {
|
|
2163
2267
|
p.value = !p.value;
|
|
2164
|
-
},
|
|
2165
|
-
r.config.cancelRoute ? o.push(r.config.cancelRoute) :
|
|
2166
|
-
},
|
|
2268
|
+
}, A = () => {
|
|
2269
|
+
r.config.cancelRoute ? o.push(r.config.cancelRoute) : O();
|
|
2270
|
+
}, O = () => {
|
|
2167
2271
|
i("cancel");
|
|
2168
|
-
},
|
|
2272
|
+
}, g = () => {
|
|
2169
2273
|
f.value || i("submit");
|
|
2170
|
-
},
|
|
2274
|
+
}, M = F([
|
|
2171
2275
|
{
|
|
2172
2276
|
title: a("baseForm.configuration.yaml"),
|
|
2173
2277
|
hash: "#yaml"
|
|
@@ -2177,115 +2281,115 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2177
2281
|
hash: "#json"
|
|
2178
2282
|
}
|
|
2179
2283
|
]);
|
|
2180
|
-
return pe(() => u.value, (
|
|
2181
|
-
i("loading",
|
|
2284
|
+
return pe(() => u.value, (k) => {
|
|
2285
|
+
i("loading", k);
|
|
2182
2286
|
}, { immediate: !0 }), Xe(async () => {
|
|
2183
2287
|
if (r.editId)
|
|
2184
2288
|
try {
|
|
2185
2289
|
d.value = !1, u.value = !0;
|
|
2186
|
-
const { data:
|
|
2187
|
-
i("fetch:success",
|
|
2188
|
-
} catch (
|
|
2189
|
-
const
|
|
2190
|
-
c.value =
|
|
2290
|
+
const { data: k } = await s.get(C.value);
|
|
2291
|
+
i("fetch:success", k);
|
|
2292
|
+
} catch (k) {
|
|
2293
|
+
const y = l(k);
|
|
2294
|
+
c.value = y.startsWith("code") ? a("baseForm.errors.edit") : y, d.value = !0, i("fetch:error", k);
|
|
2191
2295
|
} finally {
|
|
2192
2296
|
u.value = !1;
|
|
2193
2297
|
}
|
|
2194
|
-
}), (
|
|
2195
|
-
const
|
|
2196
|
-
return
|
|
2197
|
-
default:
|
|
2198
|
-
u.value ? (
|
|
2298
|
+
}), (k, y) => {
|
|
2299
|
+
const N = $("KSkeleton"), ee = $("KEmptyState"), L = $("KAlert"), j = $("KButton"), J = $("KTabs"), B = $("KSlideout"), P = $("KCard");
|
|
2300
|
+
return S(), H(P, { class: "kong-ui-entity-base-form" }, {
|
|
2301
|
+
default: b(() => [
|
|
2302
|
+
u.value ? (S(), H(N, {
|
|
2199
2303
|
key: 0,
|
|
2200
2304
|
type: "form"
|
|
2201
|
-
})) : d.value ? (
|
|
2305
|
+
})) : d.value ? (S(), H(ee, {
|
|
2202
2306
|
key: 1,
|
|
2203
|
-
"cta-text":
|
|
2307
|
+
"cta-text": h(a)("baseForm.actions.back"),
|
|
2204
2308
|
"data-testid": "form-fetch-error",
|
|
2205
|
-
"handle-click":
|
|
2309
|
+
"handle-click": A,
|
|
2206
2310
|
"is-error": !0
|
|
2207
2311
|
}, {
|
|
2208
|
-
message:
|
|
2209
|
-
K("h3", null,
|
|
2312
|
+
message: b(() => [
|
|
2313
|
+
K("h3", null, E(c.value), 1)
|
|
2210
2314
|
]),
|
|
2211
2315
|
_: 1
|
|
2212
|
-
}, 8, ["cta-text"])) : (
|
|
2316
|
+
}, 8, ["cta-text"])) : (S(), q("form", {
|
|
2213
2317
|
key: 2,
|
|
2214
2318
|
"data-testid": "form-content",
|
|
2215
|
-
onReset:
|
|
2216
|
-
onSubmit:
|
|
2319
|
+
onReset: $e(O, ["prevent"]),
|
|
2320
|
+
onSubmit: $e(g, ["prevent"])
|
|
2217
2321
|
}, [
|
|
2218
|
-
ae(
|
|
2219
|
-
e.errorMessage ? (
|
|
2322
|
+
ae(k.$slots, "default", {}, void 0, !0),
|
|
2323
|
+
e.errorMessage ? (S(), H(L, {
|
|
2220
2324
|
key: 0,
|
|
2221
2325
|
"alert-message": e.errorMessage,
|
|
2222
2326
|
appearance: "danger",
|
|
2223
2327
|
"data-testid": "form-error"
|
|
2224
|
-
}, null, 8, ["alert-message"])) :
|
|
2225
|
-
K("div",
|
|
2226
|
-
ae(
|
|
2227
|
-
e.config.jsonYamlFormsEnabled ? (
|
|
2228
|
-
|
|
2328
|
+
}, null, 8, ["alert-message"])) : Z("", !0),
|
|
2329
|
+
K("div", co, [
|
|
2330
|
+
ae(k.$slots, "form-actions", {}, () => [
|
|
2331
|
+
e.config.jsonYamlFormsEnabled ? (S(), q("div", uo, [
|
|
2332
|
+
I(j, {
|
|
2229
2333
|
appearance: "tertiary",
|
|
2230
2334
|
"data-testid": "form-view-configuration",
|
|
2231
|
-
onClick:
|
|
2335
|
+
onClick: y[0] || (y[0] = (z) => m())
|
|
2232
2336
|
}, {
|
|
2233
|
-
default:
|
|
2234
|
-
|
|
2337
|
+
default: b(() => [
|
|
2338
|
+
G(E(h(a)("baseForm.actions.viewConfiguration")), 1)
|
|
2235
2339
|
]),
|
|
2236
2340
|
_: 1
|
|
2237
2341
|
})
|
|
2238
|
-
])) :
|
|
2239
|
-
|
|
2342
|
+
])) : Z("", !0),
|
|
2343
|
+
I(j, {
|
|
2240
2344
|
appearance: "secondary",
|
|
2241
2345
|
"data-testid": "form-cancel",
|
|
2242
2346
|
disabled: e.isReadonly,
|
|
2243
2347
|
type: "reset"
|
|
2244
2348
|
}, {
|
|
2245
|
-
default:
|
|
2246
|
-
|
|
2349
|
+
default: b(() => [
|
|
2350
|
+
G(E(h(a)("baseForm.actions.cancel")), 1)
|
|
2247
2351
|
]),
|
|
2248
2352
|
_: 1
|
|
2249
2353
|
}, 8, ["disabled"]),
|
|
2250
|
-
|
|
2354
|
+
I(j, {
|
|
2251
2355
|
appearance: "primary",
|
|
2252
2356
|
"data-testid": "form-submit",
|
|
2253
2357
|
disabled: f.value,
|
|
2254
2358
|
type: "submit"
|
|
2255
2359
|
}, {
|
|
2256
|
-
default:
|
|
2257
|
-
|
|
2360
|
+
default: b(() => [
|
|
2361
|
+
G(E(h(a)("baseForm.actions.save")), 1)
|
|
2258
2362
|
]),
|
|
2259
2363
|
_: 1
|
|
2260
2364
|
}, 8, ["disabled"])
|
|
2261
2365
|
], !0)
|
|
2262
2366
|
])
|
|
2263
2367
|
], 32)),
|
|
2264
|
-
|
|
2368
|
+
I(B, {
|
|
2265
2369
|
"close-on-blur": !1,
|
|
2266
2370
|
"data-testid": "form-view-configuration-slideout",
|
|
2267
2371
|
"has-overlay": !1,
|
|
2268
2372
|
"offset-top": 60,
|
|
2269
|
-
title:
|
|
2373
|
+
title: h(a)("baseForm.configuration.title"),
|
|
2270
2374
|
visible: p.value,
|
|
2271
|
-
onClose:
|
|
2375
|
+
onClose: y[1] || (y[1] = (z) => m())
|
|
2272
2376
|
}, {
|
|
2273
|
-
default:
|
|
2274
|
-
K("div", null,
|
|
2275
|
-
|
|
2377
|
+
default: b(() => [
|
|
2378
|
+
K("div", null, E(h(a)("baseForm.configuration.message")), 1),
|
|
2379
|
+
I(J, {
|
|
2276
2380
|
"data-testid": "form-view-configuration-slideout-tabs",
|
|
2277
|
-
tabs:
|
|
2381
|
+
tabs: M.value
|
|
2278
2382
|
}, {
|
|
2279
|
-
json:
|
|
2280
|
-
|
|
2383
|
+
json: b(() => [
|
|
2384
|
+
I(Mi, {
|
|
2281
2385
|
config: e.config,
|
|
2282
|
-
"fetcher-url":
|
|
2386
|
+
"fetcher-url": C.value,
|
|
2283
2387
|
"json-record": r.formFields,
|
|
2284
2388
|
"request-method": r.editId ? "put" : "post"
|
|
2285
2389
|
}, null, 8, ["config", "fetcher-url", "json-record", "request-method"])
|
|
2286
2390
|
]),
|
|
2287
|
-
yaml:
|
|
2288
|
-
|
|
2391
|
+
yaml: b(() => [
|
|
2392
|
+
I(to, {
|
|
2289
2393
|
"yaml-record": r.formFields
|
|
2290
2394
|
}, null, 8, ["yaml-record"])
|
|
2291
2395
|
]),
|
|
@@ -2299,10 +2403,10 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2299
2403
|
});
|
|
2300
2404
|
};
|
|
2301
2405
|
}
|
|
2302
|
-
}),
|
|
2406
|
+
}), fo = /* @__PURE__ */ Ae(po, [["__scopeId", "data-v-2e2d1350"]]), mo = {
|
|
2303
2407
|
key: 0,
|
|
2304
2408
|
"data-testid": "first-col"
|
|
2305
|
-
},
|
|
2409
|
+
}, go = /* @__PURE__ */ ie({
|
|
2306
2410
|
__name: "EntityBaseTableCell",
|
|
2307
2411
|
props: {
|
|
2308
2412
|
keyName: {
|
|
@@ -2315,68 +2419,68 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2315
2419
|
}
|
|
2316
2420
|
},
|
|
2317
2421
|
setup(e) {
|
|
2318
|
-
const t = e, n =
|
|
2319
|
-
var
|
|
2320
|
-
return ((
|
|
2321
|
-
}), i =
|
|
2322
|
-
var
|
|
2323
|
-
return ((
|
|
2324
|
-
}), r =
|
|
2325
|
-
var
|
|
2326
|
-
const
|
|
2327
|
-
return
|
|
2422
|
+
const t = e, n = x(() => {
|
|
2423
|
+
var m;
|
|
2424
|
+
return ((m = t.rowEl) == null ? void 0 : m.querySelector(`[data-testid="${t.keyName}"]`)) || null;
|
|
2425
|
+
}), i = x(() => {
|
|
2426
|
+
var m;
|
|
2427
|
+
return ((m = n.value) == null ? void 0 : m.querySelector('[data-testid="first-col"]')) || null;
|
|
2428
|
+
}), r = x(() => {
|
|
2429
|
+
var m, A;
|
|
2430
|
+
const O = (m = t.rowEl) == null ? void 0 : m.querySelectorAll("td");
|
|
2431
|
+
return O ? ((A = O[0]) == null ? void 0 : A.getAttribute("data-testid")) === t.keyName : !1;
|
|
2328
2432
|
});
|
|
2329
2433
|
let o;
|
|
2330
2434
|
const a = () => {
|
|
2331
2435
|
o && (o.disconnect(), o = void 0);
|
|
2332
2436
|
}, l = () => {
|
|
2333
|
-
var
|
|
2334
|
-
u.value = ((
|
|
2335
|
-
}, s =
|
|
2437
|
+
var m, A, O;
|
|
2438
|
+
u.value = ((m = i.value) == null ? void 0 : m.getBoundingClientRect().width) || 0, d.value = ((A = n.value) == null ? void 0 : A.clientWidth) || 0, c.value = ((O = s.value) == null ? void 0 : O.innerText) || "";
|
|
2439
|
+
}, s = F({}), u = F(0), d = F(0), c = F(""), f = x(() => [i.value, n.value]), p = pe(
|
|
2336
2440
|
f,
|
|
2337
|
-
(
|
|
2441
|
+
(m) => {
|
|
2338
2442
|
if (r.value && (a(), "ResizeObserver" in window && window)) {
|
|
2339
|
-
o = new ResizeObserver((
|
|
2443
|
+
o = new ResizeObserver((A) => {
|
|
2340
2444
|
window.requestAnimationFrame(() => {
|
|
2341
|
-
!Array.isArray(
|
|
2445
|
+
!Array.isArray(A) || !A.length || l();
|
|
2342
2446
|
});
|
|
2343
2447
|
});
|
|
2344
|
-
for (const
|
|
2345
|
-
|
|
2448
|
+
for (const A of m)
|
|
2449
|
+
A && o.observe(A);
|
|
2346
2450
|
}
|
|
2347
2451
|
},
|
|
2348
2452
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
2349
|
-
),
|
|
2350
|
-
return
|
|
2453
|
+
), C = x(() => r.value ? u.value > d.value : !1);
|
|
2454
|
+
return Hn(() => {
|
|
2351
2455
|
l();
|
|
2352
|
-
}),
|
|
2456
|
+
}), Yn(() => {
|
|
2353
2457
|
p();
|
|
2354
|
-
}), (
|
|
2355
|
-
const
|
|
2356
|
-
return
|
|
2458
|
+
}), (m, A) => {
|
|
2459
|
+
const O = $("KTooltip");
|
|
2460
|
+
return S(), q("span", {
|
|
2357
2461
|
ref_key: "contentRef",
|
|
2358
2462
|
ref: s,
|
|
2359
2463
|
class: "content-wrapper"
|
|
2360
2464
|
}, [
|
|
2361
|
-
r.value ? (
|
|
2362
|
-
|
|
2465
|
+
r.value ? (S(), q("span", mo, [
|
|
2466
|
+
I(O, {
|
|
2363
2467
|
"max-width": "300",
|
|
2364
2468
|
placement: "bottomStart",
|
|
2365
|
-
text:
|
|
2469
|
+
text: C.value ? c.value : ""
|
|
2366
2470
|
}, {
|
|
2367
|
-
default:
|
|
2368
|
-
ae(
|
|
2471
|
+
default: b(() => [
|
|
2472
|
+
ae(m.$slots, "default", {}, void 0, !0)
|
|
2369
2473
|
]),
|
|
2370
2474
|
_: 3
|
|
2371
2475
|
}, 8, ["text"])
|
|
2372
|
-
])) : ae(
|
|
2476
|
+
])) : ae(m.$slots, "default", { key: 1 }, void 0, !0)
|
|
2373
2477
|
], 512);
|
|
2374
2478
|
};
|
|
2375
2479
|
}
|
|
2376
|
-
}),
|
|
2480
|
+
}), ho = /* @__PURE__ */ Ae(go, [["__scopeId", "data-v-c4379fd4"]]), yo = { class: "toolbar-container" }, vo = {
|
|
2377
2481
|
key: 0,
|
|
2378
2482
|
class: "toolbar-button-container"
|
|
2379
|
-
},
|
|
2483
|
+
}, bo = ["data-testid"], ko = /* @__PURE__ */ ie({
|
|
2380
2484
|
__name: "EntityBaseTable",
|
|
2381
2485
|
props: {
|
|
2382
2486
|
// table header configuration
|
|
@@ -2486,72 +2590,72 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2486
2590
|
},
|
|
2487
2591
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
2488
2592
|
setup(e, { emit: t }) {
|
|
2489
|
-
const n = e, i = t, { i18n: { t: r } } =
|
|
2490
|
-
var
|
|
2593
|
+
const n = e, i = t, { i18n: { t: r } } = ge.useI18n(), o = x(() => {
|
|
2594
|
+
var y, N;
|
|
2491
2595
|
return typeof n.errorMessage == "string" ? {
|
|
2492
2596
|
hasError: !!n.errorMessage,
|
|
2493
2597
|
title: n.errorMessage,
|
|
2494
2598
|
message: void 0
|
|
2495
2599
|
} : {
|
|
2496
2600
|
hasError: !!n.errorMessage,
|
|
2497
|
-
title: (
|
|
2498
|
-
message: (
|
|
2601
|
+
title: (y = n.errorMessage) == null ? void 0 : y.title,
|
|
2602
|
+
message: (N = n.errorMessage) == null ? void 0 : N.message
|
|
2499
2603
|
};
|
|
2500
|
-
}), a =
|
|
2501
|
-
const
|
|
2502
|
-
return Object.keys(n.tableHeaders).forEach((
|
|
2503
|
-
const ee = n.tableHeaders[
|
|
2504
|
-
|
|
2505
|
-
label: ee.label ??
|
|
2506
|
-
key:
|
|
2604
|
+
}), a = x(() => n.cacheIdentifier || n.preferencesStorageKey), l = (y) => y.hasData || !!n.query, s = x(() => {
|
|
2605
|
+
const y = [];
|
|
2606
|
+
return Object.keys(n.tableHeaders).forEach((N) => {
|
|
2607
|
+
const ee = n.tableHeaders[N];
|
|
2608
|
+
y.push({
|
|
2609
|
+
label: ee.label ?? N,
|
|
2610
|
+
key: N,
|
|
2507
2611
|
sortable: ee.sortable ?? !1
|
|
2508
2612
|
});
|
|
2509
|
-
}), n.enableEntityActions &&
|
|
2613
|
+
}), n.enableEntityActions && y.push({
|
|
2510
2614
|
key: "actions",
|
|
2511
2615
|
hideLabel: !0
|
|
2512
|
-
}),
|
|
2513
|
-
}), u = (
|
|
2514
|
-
"data-rowid":
|
|
2515
|
-
"data-testid":
|
|
2516
|
-
...n.rowAttributes(
|
|
2517
|
-
}), d =
|
|
2518
|
-
var
|
|
2519
|
-
return (
|
|
2520
|
-
}, f = (
|
|
2521
|
-
const
|
|
2522
|
-
"data-testid":
|
|
2523
|
-
...n.cellAttributes(
|
|
2616
|
+
}), y;
|
|
2617
|
+
}), u = (y) => ({
|
|
2618
|
+
"data-rowid": y.id,
|
|
2619
|
+
"data-testid": y.name,
|
|
2620
|
+
...n.rowAttributes(y)
|
|
2621
|
+
}), d = F({}), c = (y) => {
|
|
2622
|
+
var N;
|
|
2623
|
+
return (N = d.value) == null ? void 0 : N.$el.querySelector(`[data-rowid="${y.id}"]`);
|
|
2624
|
+
}, f = (y) => {
|
|
2625
|
+
const N = {
|
|
2626
|
+
"data-testid": y.headerKey,
|
|
2627
|
+
...n.cellAttributes(y)
|
|
2524
2628
|
};
|
|
2525
|
-
return
|
|
2629
|
+
return y.colIndex === 0 && (N.style = {
|
|
2526
2630
|
maxWidth: "250px",
|
|
2527
2631
|
overflowX: "hidden",
|
|
2528
2632
|
textOverflow: "ellipsis"
|
|
2529
|
-
}),
|
|
2633
|
+
}), N;
|
|
2530
2634
|
}, p = () => {
|
|
2531
|
-
i("empty-state-cta-clicked"),
|
|
2532
|
-
},
|
|
2635
|
+
i("empty-state-cta-clicked"), C();
|
|
2636
|
+
}, C = () => {
|
|
2533
2637
|
i("clear-search-input");
|
|
2534
|
-
},
|
|
2535
|
-
i("click:row",
|
|
2536
|
-
}),
|
|
2537
|
-
i("sort",
|
|
2538
|
-
}, { setTablePreferences:
|
|
2539
|
-
const
|
|
2638
|
+
}, m = x(() => n.disableRowClick ? void 0 : (y, N) => {
|
|
2639
|
+
i("click:row", N);
|
|
2640
|
+
}), A = (y) => {
|
|
2641
|
+
i("sort", y);
|
|
2642
|
+
}, { setTablePreferences: O, getTablePreferences: g } = ai(), M = x(() => {
|
|
2643
|
+
const y = g(n.preferencesStorageKey);
|
|
2540
2644
|
return {
|
|
2541
2645
|
...n.initialFetcherParams,
|
|
2542
|
-
...
|
|
2646
|
+
...y
|
|
2543
2647
|
};
|
|
2544
|
-
}),
|
|
2545
|
-
n.preferencesStorageKey &&
|
|
2648
|
+
}), k = (y) => {
|
|
2649
|
+
n.preferencesStorageKey && O(n.preferencesStorageKey, y);
|
|
2546
2650
|
};
|
|
2547
|
-
return (
|
|
2548
|
-
const ee =
|
|
2549
|
-
return
|
|
2651
|
+
return (y, N) => {
|
|
2652
|
+
const ee = $("KIcon"), L = $("KButton"), j = $("KDropdown"), J = $("KTable"), B = $("KCard");
|
|
2653
|
+
return S(), H(B, {
|
|
2550
2654
|
class: "kong-ui-entity-base-table",
|
|
2551
2655
|
title: e.title
|
|
2552
2656
|
}, {
|
|
2553
|
-
default:
|
|
2554
|
-
|
|
2657
|
+
default: b(() => [
|
|
2658
|
+
I(J, {
|
|
2555
2659
|
ref_key: "tableRefs",
|
|
2556
2660
|
ref: d,
|
|
2557
2661
|
"cache-identifier": a.value,
|
|
@@ -2559,12 +2663,12 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2559
2663
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
2560
2664
|
"disable-sorting": e.disableSorting,
|
|
2561
2665
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
2562
|
-
"empty-state-action-message": e.query ?
|
|
2666
|
+
"empty-state-action-message": e.query ? h(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
2563
2667
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
2564
2668
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
2565
2669
|
"empty-state-icon-size": "96",
|
|
2566
|
-
"empty-state-message": e.query ?
|
|
2567
|
-
"empty-state-title": e.query ?
|
|
2670
|
+
"empty-state-message": e.query ? h(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
2671
|
+
"empty-state-title": e.query ? h(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
2568
2672
|
"enable-client-sort": e.enableClientSort,
|
|
2569
2673
|
"error-state-message": o.value.message,
|
|
2570
2674
|
"error-state-title": o.value.title,
|
|
@@ -2573,51 +2677,51 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2573
2677
|
"has-error": o.value.hasError,
|
|
2574
2678
|
headers: s.value,
|
|
2575
2679
|
"hide-pagination-when-optional": "",
|
|
2576
|
-
"initial-fetcher-params":
|
|
2680
|
+
"initial-fetcher-params": M.value,
|
|
2577
2681
|
"is-loading": e.isLoading,
|
|
2578
2682
|
"pagination-type": e.paginationType,
|
|
2579
2683
|
"row-attrs": u,
|
|
2580
2684
|
"search-input": e.query,
|
|
2581
2685
|
onKtableEmptyStateCtaClicked: p,
|
|
2582
|
-
"onRow:click":
|
|
2583
|
-
onSort:
|
|
2584
|
-
"onUpdate:tablePreferences":
|
|
2585
|
-
},
|
|
2586
|
-
toolbar:
|
|
2587
|
-
|
|
2588
|
-
ae(
|
|
2589
|
-
|
|
2590
|
-
ae(
|
|
2591
|
-
])) :
|
|
2686
|
+
"onRow:click": m.value,
|
|
2687
|
+
onSort: N[0] || (N[0] = (P) => A(P)),
|
|
2688
|
+
"onUpdate:tablePreferences": k
|
|
2689
|
+
}, Rt({
|
|
2690
|
+
toolbar: b(({ state: P }) => [
|
|
2691
|
+
be(K("div", yo, [
|
|
2692
|
+
ae(y.$slots, "toolbar-filter", {}, void 0, !0),
|
|
2693
|
+
y.$slots["toolbar-button"] ? (S(), q("div", vo, [
|
|
2694
|
+
ae(y.$slots, "toolbar-button", {}, void 0, !0)
|
|
2695
|
+
])) : Z("", !0)
|
|
2592
2696
|
], 512), [
|
|
2593
|
-
[
|
|
2697
|
+
[ke, l(P)]
|
|
2594
2698
|
])
|
|
2595
2699
|
]),
|
|
2596
|
-
actions:
|
|
2700
|
+
actions: b(({ row: P, rowKey: z, rowValue: le }) => [
|
|
2597
2701
|
K("div", {
|
|
2598
2702
|
class: "actions-container",
|
|
2599
|
-
"data-testid":
|
|
2703
|
+
"data-testid": P.name
|
|
2600
2704
|
}, [
|
|
2601
|
-
|
|
2705
|
+
I(j, {
|
|
2602
2706
|
"kpop-attributes": { placement: "bottomEnd" },
|
|
2603
2707
|
width: e.dropdownMenuWidth
|
|
2604
2708
|
}, {
|
|
2605
|
-
items:
|
|
2606
|
-
ae(
|
|
2607
|
-
row:
|
|
2608
|
-
rowKey:
|
|
2709
|
+
items: b(() => [
|
|
2710
|
+
ae(y.$slots, "actions", {
|
|
2711
|
+
row: P,
|
|
2712
|
+
rowKey: z,
|
|
2609
2713
|
rowValue: le
|
|
2610
2714
|
}, void 0, !0)
|
|
2611
2715
|
]),
|
|
2612
|
-
default:
|
|
2613
|
-
|
|
2716
|
+
default: b(() => [
|
|
2717
|
+
I(L, {
|
|
2614
2718
|
class: "actions-trigger",
|
|
2615
2719
|
"data-testid": "overflow-actions-button",
|
|
2616
2720
|
size: "small"
|
|
2617
2721
|
}, {
|
|
2618
|
-
icon:
|
|
2619
|
-
|
|
2620
|
-
color:
|
|
2722
|
+
icon: b(() => [
|
|
2723
|
+
I(ee, {
|
|
2724
|
+
color: h(Oi),
|
|
2621
2725
|
icon: "more",
|
|
2622
2726
|
size: "16"
|
|
2623
2727
|
}, null, 8, ["color"])
|
|
@@ -2627,24 +2731,24 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2627
2731
|
]),
|
|
2628
2732
|
_: 2
|
|
2629
2733
|
}, 1032, ["width"])
|
|
2630
|
-
], 8,
|
|
2734
|
+
], 8, bo)
|
|
2631
2735
|
]),
|
|
2632
2736
|
_: 2
|
|
2633
2737
|
}, [
|
|
2634
|
-
et(e.tableHeaders, (
|
|
2635
|
-
name:
|
|
2636
|
-
fn:
|
|
2637
|
-
|
|
2638
|
-
"key-name": String(
|
|
2738
|
+
et(e.tableHeaders, (P, z) => ({
|
|
2739
|
+
name: z,
|
|
2740
|
+
fn: b(({ row: le, rowKey: Ie, rowValue: se }) => [
|
|
2741
|
+
I(ho, {
|
|
2742
|
+
"key-name": String(z),
|
|
2639
2743
|
"row-el": c(le)
|
|
2640
2744
|
}, {
|
|
2641
|
-
default:
|
|
2642
|
-
ae(
|
|
2745
|
+
default: b(() => [
|
|
2746
|
+
ae(y.$slots, z, {
|
|
2643
2747
|
row: le,
|
|
2644
|
-
rowKey:
|
|
2748
|
+
rowKey: Ie,
|
|
2645
2749
|
rowValue: se
|
|
2646
2750
|
}, () => [
|
|
2647
|
-
|
|
2751
|
+
G(E(se), 1)
|
|
2648
2752
|
], !0)
|
|
2649
2753
|
]),
|
|
2650
2754
|
_: 2
|
|
@@ -2657,13 +2761,13 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2657
2761
|
}, 8, ["title"]);
|
|
2658
2762
|
};
|
|
2659
2763
|
}
|
|
2660
|
-
}),
|
|
2764
|
+
}), wo = /* @__PURE__ */ Ae(ko, [["__scopeId", "data-v-ecfaa7cf"]]), Co = {
|
|
2661
2765
|
key: 0,
|
|
2662
2766
|
class: "kong-ui-entity-delete-error"
|
|
2663
|
-
},
|
|
2767
|
+
}, So = {
|
|
2664
2768
|
key: 1,
|
|
2665
2769
|
class: "description"
|
|
2666
|
-
},
|
|
2770
|
+
}, Ao = /* @__PURE__ */ ie({
|
|
2667
2771
|
__name: "EntityDeleteModal",
|
|
2668
2772
|
props: {
|
|
2669
2773
|
visible: {
|
|
@@ -2702,14 +2806,14 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2702
2806
|
},
|
|
2703
2807
|
emits: ["cancel", "proceed"],
|
|
2704
2808
|
setup(e, { emit: t }) {
|
|
2705
|
-
const { i18nT: n } =
|
|
2809
|
+
const { i18nT: n } = ge.useI18n(), i = e, r = t, o = x(() => i.needConfirm ? i.entityName : ""), a = () => {
|
|
2706
2810
|
r("cancel");
|
|
2707
2811
|
}, l = () => {
|
|
2708
2812
|
r("proceed");
|
|
2709
2813
|
};
|
|
2710
2814
|
return (s, u) => {
|
|
2711
|
-
const d =
|
|
2712
|
-
return
|
|
2815
|
+
const d = $("KAlert"), c = $("KPrompt");
|
|
2816
|
+
return S(), H(c, {
|
|
2713
2817
|
"action-button-appearance": "danger",
|
|
2714
2818
|
"action-button-disabled": e.actionPending,
|
|
2715
2819
|
"action-button-text": "Yes, delete",
|
|
@@ -2720,50 +2824,50 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2720
2824
|
onCancel: a,
|
|
2721
2825
|
onProceed: l
|
|
2722
2826
|
}, {
|
|
2723
|
-
default:
|
|
2724
|
-
e.error ? (
|
|
2725
|
-
|
|
2726
|
-
alertMessage:
|
|
2727
|
-
|
|
2827
|
+
default: b(() => [
|
|
2828
|
+
e.error ? (S(), q("div", Co, [
|
|
2829
|
+
I(d, { appearance: "danger" }, {
|
|
2830
|
+
alertMessage: b(() => [
|
|
2831
|
+
G(E(e.error), 1)
|
|
2728
2832
|
]),
|
|
2729
2833
|
_: 1
|
|
2730
2834
|
})
|
|
2731
|
-
])) :
|
|
2732
|
-
|
|
2835
|
+
])) : Z("", !0),
|
|
2836
|
+
I(h(n), {
|
|
2733
2837
|
class: "message",
|
|
2734
2838
|
keypath: i.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
2735
2839
|
tag: "p"
|
|
2736
|
-
},
|
|
2737
|
-
entityType:
|
|
2738
|
-
|
|
2840
|
+
}, Rt({
|
|
2841
|
+
entityType: b(() => [
|
|
2842
|
+
G(E(i.entityType), 1)
|
|
2739
2843
|
]),
|
|
2740
2844
|
_: 2
|
|
2741
2845
|
}, [
|
|
2742
2846
|
i.entityName ? {
|
|
2743
2847
|
name: "entityName",
|
|
2744
|
-
fn:
|
|
2745
|
-
K("strong", null,
|
|
2848
|
+
fn: b(() => [
|
|
2849
|
+
K("strong", null, E(i.entityName), 1)
|
|
2746
2850
|
]),
|
|
2747
2851
|
key: "0"
|
|
2748
2852
|
} : void 0
|
|
2749
2853
|
]), 1032, ["keypath"]),
|
|
2750
|
-
i.description || s.$slots.description ? (
|
|
2854
|
+
i.description || s.$slots.description ? (S(), q("div", So, [
|
|
2751
2855
|
ae(s.$slots, "description", {}, () => [
|
|
2752
|
-
K("p", null,
|
|
2856
|
+
K("p", null, E(i.description), 1)
|
|
2753
2857
|
], !0)
|
|
2754
|
-
])) :
|
|
2858
|
+
])) : Z("", !0)
|
|
2755
2859
|
]),
|
|
2756
2860
|
_: 3
|
|
2757
2861
|
}, 8, ["action-button-disabled", "confirmation-text", "title", "visible"]);
|
|
2758
2862
|
};
|
|
2759
2863
|
}
|
|
2760
|
-
}),
|
|
2864
|
+
}), Io = /* @__PURE__ */ Ae(Ao, [["__scopeId", "data-v-efe8f34b"]]), xo = {
|
|
2761
2865
|
fill: "none",
|
|
2762
2866
|
height: "20",
|
|
2763
2867
|
viewBox: "0 0 20 20",
|
|
2764
2868
|
width: "20",
|
|
2765
2869
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2766
|
-
},
|
|
2870
|
+
}, _o = {
|
|
2767
2871
|
id: "mask0_180_20349",
|
|
2768
2872
|
height: "20",
|
|
2769
2873
|
maskUnits: "userSpaceOnUse",
|
|
@@ -2771,35 +2875,35 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2771
2875
|
width: "20",
|
|
2772
2876
|
x: "0",
|
|
2773
2877
|
y: "0"
|
|
2774
|
-
},
|
|
2878
|
+
}, To = ["fill"], jo = { mask: "url(#mask0_180_20349)" }, Oo = ["fill"], $t = /* @__PURE__ */ ie({
|
|
2775
2879
|
__name: "IconFilter",
|
|
2776
2880
|
props: {
|
|
2777
2881
|
color: {
|
|
2778
2882
|
type: String,
|
|
2779
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
2883
|
+
default: `var(--kong-ui-entity-filter-color, ${ji})`
|
|
2780
2884
|
}
|
|
2781
2885
|
},
|
|
2782
2886
|
setup(e) {
|
|
2783
|
-
return (t, n) => (
|
|
2784
|
-
K("mask",
|
|
2887
|
+
return (t, n) => (S(), q("svg", xo, [
|
|
2888
|
+
K("mask", _o, [
|
|
2785
2889
|
K("rect", {
|
|
2786
2890
|
fill: e.color,
|
|
2787
2891
|
height: "20",
|
|
2788
2892
|
width: "20"
|
|
2789
|
-
}, null, 8,
|
|
2893
|
+
}, null, 8, To)
|
|
2790
2894
|
]),
|
|
2791
|
-
K("g",
|
|
2895
|
+
K("g", jo, [
|
|
2792
2896
|
K("path", {
|
|
2793
2897
|
d: "M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",
|
|
2794
2898
|
fill: e.color
|
|
2795
|
-
}, null, 8,
|
|
2899
|
+
}, null, 8, Oo)
|
|
2796
2900
|
])
|
|
2797
2901
|
]));
|
|
2798
2902
|
}
|
|
2799
|
-
}),
|
|
2903
|
+
}), No = {
|
|
2800
2904
|
key: 1,
|
|
2801
2905
|
class: "kong-ui-entity-filter"
|
|
2802
|
-
},
|
|
2906
|
+
}, Fo = { class: "menu-item-title" }, Mo = { class: "menu-item-indicator" }, Eo = { class: "menu-item-body" }, $o = ["for"], Lo = { class: "menu-item-buttons" }, qo = { class: "filter-clear-button-container" }, Ko = /* @__PURE__ */ ie({
|
|
2803
2907
|
__name: "EntityFilter",
|
|
2804
2908
|
props: {
|
|
2805
2909
|
// filter config, either exact match or fuzzy match
|
|
@@ -2819,50 +2923,52 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2819
2923
|
},
|
|
2820
2924
|
emits: ["update:modelValue"],
|
|
2821
2925
|
setup(e, { emit: t }) {
|
|
2822
|
-
const { i18n: { t: n } } =
|
|
2823
|
-
const
|
|
2824
|
-
return new URLSearchParams(i.modelValue).forEach((
|
|
2825
|
-
|
|
2826
|
-
}),
|
|
2827
|
-
}), s =
|
|
2828
|
-
const
|
|
2829
|
-
return Object.keys(
|
|
2830
|
-
label:
|
|
2831
|
-
value:
|
|
2926
|
+
const { i18n: { t: n } } = ge.useI18n(), i = e, r = t, o = F(!1), a = F({}), l = x(() => {
|
|
2927
|
+
const g = [];
|
|
2928
|
+
return new URLSearchParams(i.modelValue).forEach((M, k) => {
|
|
2929
|
+
M !== "" && g.push(k);
|
|
2930
|
+
}), g;
|
|
2931
|
+
}), s = x(() => {
|
|
2932
|
+
const g = i.config.fields;
|
|
2933
|
+
return Object.keys(g).filter((M) => g[M].searchable).map((M) => ({
|
|
2934
|
+
label: g[M].label || M,
|
|
2935
|
+
value: M
|
|
2832
2936
|
}));
|
|
2833
2937
|
});
|
|
2834
|
-
pe(() => i.modelValue, (
|
|
2835
|
-
a.value = {}, new URLSearchParams(
|
|
2836
|
-
a.value[
|
|
2938
|
+
pe(() => i.modelValue, (g) => {
|
|
2939
|
+
a.value = {}, new URLSearchParams(g).forEach((M, k) => {
|
|
2940
|
+
a.value[k] = M;
|
|
2837
2941
|
});
|
|
2838
2942
|
});
|
|
2839
2943
|
const u = () => {
|
|
2840
2944
|
o.value = !o.value;
|
|
2841
|
-
}, d = (
|
|
2842
|
-
r("update:modelValue",
|
|
2843
|
-
}, c = (
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2945
|
+
}, d = (g) => {
|
|
2946
|
+
r("update:modelValue", g);
|
|
2947
|
+
}, c = () => {
|
|
2948
|
+
d("");
|
|
2949
|
+
}, f = (g) => `filter-${g}`, p = (g) => {
|
|
2950
|
+
var M, k;
|
|
2951
|
+
return (((k = (M = i.config.schema) == null ? void 0 : M[g]) == null ? void 0 : k.values) ?? []).map((y) => ({
|
|
2952
|
+
value: y,
|
|
2953
|
+
label: y
|
|
2848
2954
|
}));
|
|
2849
|
-
},
|
|
2850
|
-
var
|
|
2851
|
-
return ((
|
|
2852
|
-
},
|
|
2955
|
+
}, C = (g) => {
|
|
2956
|
+
var M, k;
|
|
2957
|
+
return ((k = (M = i.config.schema) == null ? void 0 : M[g]) == null ? void 0 : k.type) ?? "text";
|
|
2958
|
+
}, m = (g) => {
|
|
2853
2959
|
a.value = {
|
|
2854
2960
|
...a.value,
|
|
2855
|
-
[
|
|
2856
|
-
},
|
|
2857
|
-
},
|
|
2858
|
-
a.value = {},
|
|
2859
|
-
},
|
|
2860
|
-
const
|
|
2861
|
-
|
|
2961
|
+
[g]: ""
|
|
2962
|
+
}, O();
|
|
2963
|
+
}, A = () => {
|
|
2964
|
+
a.value = {}, O(!0);
|
|
2965
|
+
}, O = (g = !1) => {
|
|
2966
|
+
const M = Object.keys(a.value).reduce((k, y) => (a.value[y] && (k[y] = `${a.value[y]}`), k), {});
|
|
2967
|
+
g && (o.value = !1), r("update:modelValue", new URLSearchParams(M).toString());
|
|
2862
2968
|
};
|
|
2863
|
-
return (
|
|
2864
|
-
const
|
|
2865
|
-
return e.config.isExactMatch ? (
|
|
2969
|
+
return (g, M) => {
|
|
2970
|
+
const k = $("KInput"), y = $("KButton"), N = $("KSelect"), ee = $("KMenuItem"), L = $("KMenu");
|
|
2971
|
+
return e.config.isExactMatch ? (S(), H(k, {
|
|
2866
2972
|
key: 0,
|
|
2867
2973
|
autocomplete: "off",
|
|
2868
2974
|
class: "kong-ui-entity-filter-input",
|
|
@@ -2871,89 +2977,97 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2871
2977
|
placeholder: e.config.placeholder,
|
|
2872
2978
|
"onUpdate:modelValue": d
|
|
2873
2979
|
}, {
|
|
2874
|
-
before:
|
|
2875
|
-
|
|
2980
|
+
before: b(() => [
|
|
2981
|
+
I($t)
|
|
2982
|
+
]),
|
|
2983
|
+
after: b(() => [
|
|
2984
|
+
be(I(h(so), {
|
|
2985
|
+
class: "kong-ui-entity-filter-clear",
|
|
2986
|
+
onClick: c
|
|
2987
|
+
}, null, 512), [
|
|
2988
|
+
[ke, e.modelValue !== ""]
|
|
2989
|
+
])
|
|
2876
2990
|
]),
|
|
2877
2991
|
_: 1
|
|
2878
|
-
}, 8, ["model-value", "placeholder"])) : (
|
|
2879
|
-
|
|
2992
|
+
}, 8, ["model-value", "placeholder"])) : (S(), q("div", No, [
|
|
2993
|
+
I(y, {
|
|
2880
2994
|
appearance: "tertiary",
|
|
2881
2995
|
"data-testid": "filter-button",
|
|
2882
2996
|
onClick: u
|
|
2883
2997
|
}, {
|
|
2884
|
-
default:
|
|
2885
|
-
|
|
2886
|
-
|
|
2998
|
+
default: b(() => [
|
|
2999
|
+
I($t),
|
|
3000
|
+
G(" " + E(h(n)("filter.filterButtonText")) + " " + E(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
2887
3001
|
]),
|
|
2888
3002
|
_: 1
|
|
2889
3003
|
}),
|
|
2890
|
-
|
|
3004
|
+
be(K("div", {
|
|
2891
3005
|
class: "kong-ui-entity-filter-backdrop",
|
|
2892
3006
|
onClick: u
|
|
2893
3007
|
}, null, 512), [
|
|
2894
|
-
[
|
|
3008
|
+
[ke, o.value]
|
|
2895
3009
|
]),
|
|
2896
|
-
|
|
2897
|
-
body:
|
|
2898
|
-
(
|
|
2899
|
-
key:
|
|
2900
|
-
"data-testid":
|
|
3010
|
+
be(I(L, { class: "kong-ui-entity-filter-menu" }, {
|
|
3011
|
+
body: b(() => [
|
|
3012
|
+
(S(!0), q(Bt, null, et(s.value, (j, J) => (S(), H(ee, {
|
|
3013
|
+
key: j.value,
|
|
3014
|
+
"data-testid": j.value,
|
|
2901
3015
|
expandable: "",
|
|
2902
|
-
"last-menu-item":
|
|
3016
|
+
"last-menu-item": J === s.value.length - 1
|
|
2903
3017
|
}, {
|
|
2904
|
-
itemTitle:
|
|
2905
|
-
K("span",
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
[
|
|
3018
|
+
itemTitle: b(() => [
|
|
3019
|
+
K("span", Fo, [
|
|
3020
|
+
G(E(j.label) + " ", 1),
|
|
3021
|
+
be(K("span", Mo, null, 512), [
|
|
3022
|
+
[ke, l.value.includes(j.value)]
|
|
2909
3023
|
])
|
|
2910
3024
|
])
|
|
2911
3025
|
]),
|
|
2912
|
-
itemBody:
|
|
2913
|
-
var
|
|
3026
|
+
itemBody: b(() => {
|
|
3027
|
+
var B, P;
|
|
2914
3028
|
return [
|
|
2915
|
-
K("div",
|
|
3029
|
+
K("div", Eo, [
|
|
2916
3030
|
K("label", {
|
|
2917
3031
|
class: "menu-item-label",
|
|
2918
|
-
for:
|
|
2919
|
-
},
|
|
2920
|
-
((
|
|
3032
|
+
for: f(j.value)
|
|
3033
|
+
}, E(h(n)("filter.fieldLabel")), 9, $o),
|
|
3034
|
+
((P = (B = e.config.schema) == null ? void 0 : B[j.value]) == null ? void 0 : P.type) === "select" ? (S(), H(N, {
|
|
2921
3035
|
key: 0,
|
|
2922
|
-
id:
|
|
2923
|
-
modelValue: a.value[
|
|
2924
|
-
"onUpdate:modelValue": (
|
|
2925
|
-
items:
|
|
2926
|
-
placeholder:
|
|
2927
|
-
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (
|
|
3036
|
+
id: f(j.value),
|
|
3037
|
+
modelValue: a.value[j.value],
|
|
3038
|
+
"onUpdate:modelValue": (z) => a.value[j.value] = z,
|
|
3039
|
+
items: p(j.value),
|
|
3040
|
+
placeholder: h(n)("filter.selectPlaceholder")
|
|
3041
|
+
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (S(), H(k, {
|
|
2928
3042
|
key: 1,
|
|
2929
|
-
id:
|
|
2930
|
-
modelValue: a.value[
|
|
2931
|
-
"onUpdate:modelValue": (
|
|
3043
|
+
id: f(j.value),
|
|
3044
|
+
modelValue: a.value[j.value],
|
|
3045
|
+
"onUpdate:modelValue": (z) => a.value[j.value] = z,
|
|
2932
3046
|
autocomplete: "off",
|
|
2933
|
-
placeholder:
|
|
2934
|
-
type:
|
|
3047
|
+
placeholder: h(n)("filter.inputPlaceholder"),
|
|
3048
|
+
type: C(j.value)
|
|
2935
3049
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
2936
3050
|
]),
|
|
2937
|
-
K("div",
|
|
2938
|
-
|
|
3051
|
+
K("div", Lo, [
|
|
3052
|
+
I(y, {
|
|
2939
3053
|
appearance: "tertiary",
|
|
2940
3054
|
"data-testid": "apply-filter",
|
|
2941
3055
|
size: "small",
|
|
2942
|
-
onClick:
|
|
3056
|
+
onClick: M[0] || (M[0] = (z) => O(!0))
|
|
2943
3057
|
}, {
|
|
2944
|
-
default:
|
|
2945
|
-
|
|
3058
|
+
default: b(() => [
|
|
3059
|
+
G(E(h(n)("filter.applyButtonText")), 1)
|
|
2946
3060
|
]),
|
|
2947
3061
|
_: 1
|
|
2948
3062
|
}),
|
|
2949
|
-
|
|
3063
|
+
I(y, {
|
|
2950
3064
|
appearance: "tertiary",
|
|
2951
3065
|
"data-testid": "clear-filter",
|
|
2952
3066
|
size: "small",
|
|
2953
|
-
onClick: (
|
|
3067
|
+
onClick: (z) => m(j.value)
|
|
2954
3068
|
}, {
|
|
2955
|
-
default:
|
|
2956
|
-
|
|
3069
|
+
default: b(() => [
|
|
3070
|
+
G(E(h(n)("filter.clearButtonText")), 1)
|
|
2957
3071
|
]),
|
|
2958
3072
|
_: 2
|
|
2959
3073
|
}, 1032, ["onClick"])
|
|
@@ -2963,15 +3077,15 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2963
3077
|
_: 2
|
|
2964
3078
|
}, 1032, ["data-testid", "last-menu-item"]))), 128))
|
|
2965
3079
|
]),
|
|
2966
|
-
actionButton:
|
|
2967
|
-
K("div",
|
|
2968
|
-
|
|
3080
|
+
actionButton: b(() => [
|
|
3081
|
+
K("div", qo, [
|
|
3082
|
+
I(y, {
|
|
2969
3083
|
appearance: "tertiary",
|
|
2970
3084
|
size: "small",
|
|
2971
|
-
onClick:
|
|
3085
|
+
onClick: A
|
|
2972
3086
|
}, {
|
|
2973
|
-
default:
|
|
2974
|
-
|
|
3087
|
+
default: b(() => [
|
|
3088
|
+
G(E(h(n)("filter.clearAllButtonText")), 1)
|
|
2975
3089
|
]),
|
|
2976
3090
|
_: 1
|
|
2977
3091
|
})
|
|
@@ -2979,12 +3093,12 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
2979
3093
|
]),
|
|
2980
3094
|
_: 1
|
|
2981
3095
|
}, 512), [
|
|
2982
|
-
[
|
|
3096
|
+
[ke, o.value]
|
|
2983
3097
|
])
|
|
2984
3098
|
]));
|
|
2985
3099
|
};
|
|
2986
3100
|
}
|
|
2987
|
-
}),
|
|
3101
|
+
}), Ro = /* @__PURE__ */ Ae(Ko, [["__scopeId", "data-v-206cc415"]]), Ye = /* @__PURE__ */ ie({
|
|
2988
3102
|
__name: "PermissionsWrapper",
|
|
2989
3103
|
props: {
|
|
2990
3104
|
/**
|
|
@@ -3006,24 +3120,24 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3006
3120
|
}
|
|
3007
3121
|
},
|
|
3008
3122
|
setup(e) {
|
|
3009
|
-
const t = e, n =
|
|
3123
|
+
const t = e, n = F(void 0), i = x(() => n.value === !0 || n.value !== void 0 && t.forceShow === !0);
|
|
3010
3124
|
return pe(() => t.authFunction, async () => {
|
|
3011
3125
|
n.value = await t.authFunction();
|
|
3012
3126
|
}, { immediate: !0 }), (r, o) => i.value ? ae(r.$slots, "default", {
|
|
3013
3127
|
key: 0,
|
|
3014
3128
|
isAllowed: n.value
|
|
3015
|
-
}) :
|
|
3129
|
+
}) : Z("", !0);
|
|
3016
3130
|
}
|
|
3017
|
-
}),
|
|
3131
|
+
}), Bo = { class: "form-section-wrapper" }, Uo = {
|
|
3018
3132
|
key: 0,
|
|
3019
3133
|
class: "form-section-title"
|
|
3020
|
-
},
|
|
3134
|
+
}, Po = {
|
|
3021
3135
|
key: 1,
|
|
3022
3136
|
class: "form-section-description"
|
|
3023
|
-
},
|
|
3137
|
+
}, Do = {
|
|
3024
3138
|
key: 2,
|
|
3025
3139
|
class: "form-section-footer"
|
|
3026
|
-
},
|
|
3140
|
+
}, Vo = { class: "form-section-content" }, zo = /* @__PURE__ */ ie({
|
|
3027
3141
|
__name: "EntityFormSection",
|
|
3028
3142
|
props: {
|
|
3029
3143
|
title: {
|
|
@@ -3048,52 +3162,52 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3048
3162
|
}
|
|
3049
3163
|
},
|
|
3050
3164
|
setup(e) {
|
|
3051
|
-
const t =
|
|
3052
|
-
return (n, i) => (
|
|
3053
|
-
class:
|
|
3165
|
+
const t = Vn();
|
|
3166
|
+
return (n, i) => (S(), q("fieldset", {
|
|
3167
|
+
class: Le(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
3054
3168
|
}, [
|
|
3055
|
-
K("div",
|
|
3056
|
-
e.hideInfoHeader ?
|
|
3169
|
+
K("div", Bo, [
|
|
3170
|
+
e.hideInfoHeader ? Z("", !0) : (S(), q("div", {
|
|
3057
3171
|
key: 0,
|
|
3058
|
-
class:
|
|
3172
|
+
class: Le(["form-section-info", { sticky: e.stickyInfoHeader }])
|
|
3059
3173
|
}, [
|
|
3060
|
-
e.title ? (
|
|
3061
|
-
e.description ||
|
|
3174
|
+
e.title ? (S(), q("h4", Uo, E(e.title), 1)) : Z("", !0),
|
|
3175
|
+
e.description || h(t).description ? (S(), q("div", Po, [
|
|
3062
3176
|
ae(n.$slots, "description", {}, () => [
|
|
3063
|
-
K("p", null,
|
|
3177
|
+
K("p", null, E(e.description), 1)
|
|
3064
3178
|
], !0)
|
|
3065
|
-
])) :
|
|
3066
|
-
|
|
3179
|
+
])) : Z("", !0),
|
|
3180
|
+
h(t).footer ? (S(), q("div", Do, [
|
|
3067
3181
|
ae(n.$slots, "footer", {}, void 0, !0)
|
|
3068
|
-
])) :
|
|
3182
|
+
])) : Z("", !0)
|
|
3069
3183
|
], 2)),
|
|
3070
|
-
K("div",
|
|
3184
|
+
K("div", Vo, [
|
|
3071
3185
|
ae(n.$slots, "default", {}, void 0, !0)
|
|
3072
3186
|
])
|
|
3073
3187
|
])
|
|
3074
3188
|
], 2));
|
|
3075
3189
|
}
|
|
3076
|
-
}),
|
|
3190
|
+
}), Lt = /* @__PURE__ */ Ae(zo, [["__scopeId", "data-v-3565daa7"]]), { useAxios: Un, useDeleteUrlBuilder: Ho, useErrors: Yo, useExternalLinkCreator: xl, useFetchUrlBuilder: _l, useFetcher: Wo, useDebouncedFilter: Jo, useStringHelpers: Tl, useHelpers: jl, useGatewayFeatureSupported: Ol, useTruncationDetector: Nl } = ge, Go = {
|
|
3077
3191
|
fail: "Failed to copy id to clipboard",
|
|
3078
3192
|
success: {
|
|
3079
3193
|
prefix: "Successfully",
|
|
3080
3194
|
content: " copied to clipboard"
|
|
3081
3195
|
}
|
|
3082
|
-
},
|
|
3083
|
-
message:
|
|
3084
|
-
iconTitle:
|
|
3085
|
-
},
|
|
3196
|
+
}, Zo = "Copy to clipboard", Qo = {
|
|
3197
|
+
message: Go,
|
|
3198
|
+
iconTitle: Zo
|
|
3199
|
+
}, Xo = "kong-ui-copy-uuid-notify", qt = "24px", el = (e, t) => {
|
|
3086
3200
|
const n = e.__vccOpts || e;
|
|
3087
3201
|
for (const [i, r] of t)
|
|
3088
3202
|
n[i] = r;
|
|
3089
3203
|
return n;
|
|
3090
|
-
},
|
|
3204
|
+
}, tl = (e) => (Dt("data-v-13f41aa3"), e = e(), Vt(), e), nl = ["aria-hidden"], il = {
|
|
3091
3205
|
key: 0,
|
|
3092
3206
|
"data-testid": "kui-icon-svg-title"
|
|
3093
|
-
},
|
|
3207
|
+
}, rl = /* @__PURE__ */ tl(() => /* @__PURE__ */ K("path", {
|
|
3094
3208
|
d: "M5 22C4.45 22 3.97917 21.8042 3.5875 21.4125C3.19583 21.0208 3 20.55 3 20V6H5V20H16V22H5ZM9 18C8.45 18 7.97917 17.8042 7.5875 17.4125C7.19583 17.0208 7 16.55 7 16V4C7 3.45 7.19583 2.97917 7.5875 2.5875C7.97917 2.19583 8.45 2 9 2H18C18.55 2 19.0208 2.19583 19.4125 2.5875C19.8042 2.97917 20 3.45 20 4V16C20 16.55 19.8042 17.0208 19.4125 17.4125C19.0208 17.8042 18.55 18 18 18H9ZM9 16H18V4H9V16Z",
|
|
3095
3209
|
fill: "currentColor"
|
|
3096
|
-
}, null, -1)),
|
|
3210
|
+
}, null, -1)), al = /* @__PURE__ */ ie({
|
|
3097
3211
|
__name: "CopyIcon",
|
|
3098
3212
|
props: {
|
|
3099
3213
|
/** The accessibility text provided to screen readers */
|
|
@@ -3124,7 +3238,7 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3124
3238
|
size: {
|
|
3125
3239
|
type: [Number, String],
|
|
3126
3240
|
required: !1,
|
|
3127
|
-
default:
|
|
3241
|
+
default: qt,
|
|
3128
3242
|
// if setting to the imported const fails, just pass a number of 24 as the default.
|
|
3129
3243
|
validator: (e) => {
|
|
3130
3244
|
if (typeof e == "number" && e > 0)
|
|
@@ -3145,7 +3259,7 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3145
3259
|
}
|
|
3146
3260
|
},
|
|
3147
3261
|
setup(e) {
|
|
3148
|
-
const t = e, n =
|
|
3262
|
+
const t = e, n = x(() => {
|
|
3149
3263
|
if (typeof t.size == "number" && t.size > 0)
|
|
3150
3264
|
return `${t.size}px`;
|
|
3151
3265
|
if (typeof t.size == "string") {
|
|
@@ -3153,8 +3267,8 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3153
3267
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
3154
3268
|
return `${o}px`;
|
|
3155
3269
|
}
|
|
3156
|
-
return
|
|
3157
|
-
}), i =
|
|
3270
|
+
return qt;
|
|
3271
|
+
}), i = x(() => ({
|
|
3158
3272
|
boxSizing: "border-box",
|
|
3159
3273
|
color: t.color,
|
|
3160
3274
|
display: t.display,
|
|
@@ -3162,14 +3276,14 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3162
3276
|
lineHeight: "0",
|
|
3163
3277
|
width: n.value
|
|
3164
3278
|
}));
|
|
3165
|
-
return (r, o) => (
|
|
3279
|
+
return (r, o) => (S(), H(je(e.as), {
|
|
3166
3280
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3167
3281
|
class: "kui-icon copy-icon",
|
|
3168
3282
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
3169
|
-
style:
|
|
3283
|
+
style: Pt(i.value)
|
|
3170
3284
|
}, {
|
|
3171
|
-
default:
|
|
3172
|
-
(
|
|
3285
|
+
default: b(() => [
|
|
3286
|
+
(S(), q("svg", {
|
|
3173
3287
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
3174
3288
|
"data-testid": "kui-icon-svg-copy-icon",
|
|
3175
3289
|
fill: "none",
|
|
@@ -3179,14 +3293,14 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3179
3293
|
width: "100%",
|
|
3180
3294
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3181
3295
|
}, [
|
|
3182
|
-
e.title ? (
|
|
3183
|
-
|
|
3184
|
-
], 8,
|
|
3296
|
+
e.title ? (S(), q("title", il, E(e.title), 1)) : Z("", !0),
|
|
3297
|
+
rl
|
|
3298
|
+
], 8, nl))
|
|
3185
3299
|
]),
|
|
3186
3300
|
_: 1
|
|
3187
3301
|
}, 8, ["aria-hidden", "style"]));
|
|
3188
3302
|
}
|
|
3189
|
-
}),
|
|
3303
|
+
}), ol = /* @__PURE__ */ el(al, [["__scopeId", "data-v-13f41aa3"]]), ll = "16px", sl = { class: "kong-ui-copy-uuid" }, cl = ["onClick"], Kt = 15, ul = /* @__PURE__ */ ie({
|
|
3190
3304
|
__name: "CopyUuid",
|
|
3191
3305
|
props: {
|
|
3192
3306
|
uuid: {
|
|
@@ -3230,19 +3344,19 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3230
3344
|
},
|
|
3231
3345
|
emits: ["success", "error"],
|
|
3232
3346
|
setup(e, { emit: t }) {
|
|
3233
|
-
const { t: n } = tt("en-us",
|
|
3234
|
-
}), a =
|
|
3347
|
+
const { t: n } = tt("en-us", Qo), i = e, r = t, o = i.notify || Ut(Xo, () => {
|
|
3348
|
+
}), a = x(() => i.idTooltip ? {
|
|
3235
3349
|
label: i.idTooltip,
|
|
3236
3350
|
positionFixed: !0,
|
|
3237
3351
|
placement: "bottomStart"
|
|
3238
3352
|
} : {
|
|
3239
3353
|
title: i.uuid
|
|
3240
|
-
}), l =
|
|
3354
|
+
}), l = x(() => !!(i.tooltip && i.successTooltip)), s = F(i.tooltip), u = x(() => i.tooltip ? {
|
|
3241
3355
|
label: s.value,
|
|
3242
3356
|
positionFixed: !0,
|
|
3243
3357
|
maxWidth: "500px",
|
|
3244
3358
|
placement: "bottomStart"
|
|
3245
|
-
} : {}), d =
|
|
3359
|
+
} : {}), d = x(() => {
|
|
3246
3360
|
var p;
|
|
3247
3361
|
return i.format === "redacted" ? "*****" : i.format === "deleted" ? `*${(p = i.uuid) == null ? void 0 : p.substring(0, 5)}` : i.uuid;
|
|
3248
3362
|
}), c = (p) => {
|
|
@@ -3250,7 +3364,7 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3250
3364
|
s.value = i.tooltip;
|
|
3251
3365
|
}, 1800);
|
|
3252
3366
|
}, f = (p) => {
|
|
3253
|
-
var
|
|
3367
|
+
var C, m;
|
|
3254
3368
|
if (!p(i.uuid)) {
|
|
3255
3369
|
typeof o == "function" && o({
|
|
3256
3370
|
type: "error",
|
|
@@ -3258,45 +3372,45 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3258
3372
|
}), l.value ? c(n("message.fail")) : r("error", i.uuid);
|
|
3259
3373
|
return;
|
|
3260
3374
|
}
|
|
3261
|
-
const
|
|
3375
|
+
const A = ((C = i.uuid) == null ? void 0 : C.length) > Kt, O = i.format === "hidden" || i.format === "redacted" ? n("message.success.prefix") : `"${((m = i.uuid) == null ? void 0 : m.substring(0, Kt)) + (A ? "..." : "")}"`;
|
|
3262
3376
|
typeof o == "function" && o({
|
|
3263
3377
|
type: "success",
|
|
3264
|
-
message: `${
|
|
3378
|
+
message: `${O}${n("message.success.content")}`
|
|
3265
3379
|
}), l.value ? c(i.successTooltip) : r("success", i.uuid);
|
|
3266
3380
|
};
|
|
3267
|
-
return (p,
|
|
3268
|
-
const
|
|
3269
|
-
return
|
|
3270
|
-
e.format !== "hidden" ? (
|
|
3271
|
-
default:
|
|
3381
|
+
return (p, C) => {
|
|
3382
|
+
const m = $("KClipboardProvider");
|
|
3383
|
+
return S(), q("div", sl, [
|
|
3384
|
+
e.format !== "hidden" ? (S(), H(je(e.idTooltip ? "KTooltip" : "div"), ut({ key: 0 }, a.value, { "data-testid": "copy-id" }), {
|
|
3385
|
+
default: b(() => [
|
|
3272
3386
|
K("div", {
|
|
3273
|
-
class:
|
|
3387
|
+
class: Le([
|
|
3274
3388
|
"uuid-container",
|
|
3275
3389
|
e.truncated ? "truncated-uuid" : null,
|
|
3276
3390
|
e.useMono ? "mono" : null
|
|
3277
3391
|
])
|
|
3278
|
-
},
|
|
3392
|
+
}, E(d.value), 3)
|
|
3279
3393
|
]),
|
|
3280
3394
|
_: 1
|
|
3281
|
-
}, 16)) :
|
|
3282
|
-
(
|
|
3283
|
-
default:
|
|
3284
|
-
|
|
3285
|
-
default:
|
|
3395
|
+
}, 16)) : Z("", !0),
|
|
3396
|
+
(S(), H(je(e.tooltip ? "KTooltip" : "div"), ut(u.value, { class: "uuid-icon-wrapper" }), {
|
|
3397
|
+
default: b(() => [
|
|
3398
|
+
I(m, null, {
|
|
3399
|
+
default: b(({ copyToClipboard: A }) => [
|
|
3286
3400
|
K("span", {
|
|
3287
3401
|
"data-testid": "copy-to-clipboard",
|
|
3288
3402
|
role: "button",
|
|
3289
3403
|
tabindex: "0",
|
|
3290
|
-
onClick:
|
|
3404
|
+
onClick: $e((O) => f(A), ["stop"])
|
|
3291
3405
|
}, [
|
|
3292
|
-
|
|
3406
|
+
I(h(ol), {
|
|
3293
3407
|
class: "uuid-icon",
|
|
3294
3408
|
color: e.iconColor,
|
|
3295
3409
|
decorative: !!e.tooltip,
|
|
3296
|
-
size:
|
|
3297
|
-
title:
|
|
3410
|
+
size: h(ll),
|
|
3411
|
+
title: h(n)("iconTitle")
|
|
3298
3412
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
3299
|
-
], 8,
|
|
3413
|
+
], 8, cl)
|
|
3300
3414
|
]),
|
|
3301
3415
|
_: 1
|
|
3302
3416
|
})
|
|
@@ -3306,12 +3420,12 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3306
3420
|
]);
|
|
3307
3421
|
};
|
|
3308
3422
|
}
|
|
3309
|
-
}),
|
|
3423
|
+
}), dl = (e, t) => {
|
|
3310
3424
|
const n = e.__vccOpts || e;
|
|
3311
3425
|
for (const [i, r] of t)
|
|
3312
3426
|
n[i] = r;
|
|
3313
3427
|
return n;
|
|
3314
|
-
},
|
|
3428
|
+
}, pl = /* @__PURE__ */ dl(ul, [["__scopeId", "data-v-0c07874b"]]), fl = { class: "kong-ui-entities-snis-list" }, ml = { key: 1 }, gl = { key: 1 }, hl = /* @__PURE__ */ ie({
|
|
3315
3429
|
__name: "SniList",
|
|
3316
3430
|
props: {
|
|
3317
3431
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3357,164 +3471,164 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3357
3471
|
},
|
|
3358
3472
|
emits: ["error", "copy:success", "copy:error", "delete:success"],
|
|
3359
3473
|
setup(e, { emit: t }) {
|
|
3360
|
-
var
|
|
3361
|
-
const n = t, i = e, { i18n: { t: r } } =
|
|
3362
|
-
var
|
|
3363
|
-
|
|
3364
|
-
entity:
|
|
3474
|
+
var xe;
|
|
3475
|
+
const n = t, i = e, { i18n: { t: r } } = Yt.useI18n(), o = (_, U) => {
|
|
3476
|
+
var v;
|
|
3477
|
+
_.type === "error" ? n("copy:error", {
|
|
3478
|
+
entity: U,
|
|
3365
3479
|
field: "certificate.id",
|
|
3366
3480
|
message: r("errors.copy")
|
|
3367
3481
|
}) : n("copy:success", {
|
|
3368
|
-
entity:
|
|
3482
|
+
entity: U,
|
|
3369
3483
|
field: "certificate.id",
|
|
3370
|
-
message: r("copy.success", { val: (
|
|
3484
|
+
message: r("copy.success", { val: (v = U.certificate) == null ? void 0 : v.id })
|
|
3371
3485
|
});
|
|
3372
|
-
}, { axiosInstance: a } =
|
|
3373
|
-
headers: (
|
|
3374
|
-
}), l =
|
|
3486
|
+
}, { axiosInstance: a } = Un({
|
|
3487
|
+
headers: (xe = i.config) == null ? void 0 : xe.requestHeaders
|
|
3488
|
+
}), l = F(1), s = x(() => i.config.app !== "kongManager" || !!i.config.disableSorting), u = {
|
|
3375
3489
|
name: { label: r("snis.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
3376
3490
|
certificate: { label: r("snis.list.table_headers.certificate_id"), sortable: !1 },
|
|
3377
3491
|
tags: { label: r("snis.list.table_headers.tags"), sortable: !1 }
|
|
3378
|
-
}, d = u, c = (
|
|
3492
|
+
}, d = u, c = (_) => ({
|
|
3379
3493
|
style: {
|
|
3380
|
-
maxWidth:
|
|
3494
|
+
maxWidth: _.headerKey === "name" ? "250px" : _.headerKey === "certificate" ? "350px" : null
|
|
3381
3495
|
}
|
|
3382
|
-
}), f =
|
|
3383
|
-
var
|
|
3384
|
-
let
|
|
3385
|
-
return i.config.app === "konnect" ?
|
|
3386
|
-
}), p =
|
|
3387
|
-
const
|
|
3388
|
-
if (
|
|
3496
|
+
}), f = x(() => {
|
|
3497
|
+
var U, v;
|
|
3498
|
+
let _ = `${i.config.apiBaseUrl}${_e.list[i.config.app].all}`;
|
|
3499
|
+
return i.config.app === "konnect" ? _ = _.replace(/{controlPlaneId}/gi, ((U = i.config) == null ? void 0 : U.controlPlaneId) || "") : i.config.app === "kongManager" && (_ = _.replace(/\/{workspace}/gi, (v = i.config) != null && v.workspace ? `/${i.config.workspace}` : "")), _;
|
|
3500
|
+
}), p = F(""), C = x(() => {
|
|
3501
|
+
const _ = i.config.app === "konnect" || i.config.isExactMatch;
|
|
3502
|
+
if (_)
|
|
3389
3503
|
return {
|
|
3390
|
-
isExactMatch:
|
|
3504
|
+
isExactMatch: _,
|
|
3391
3505
|
placeholder: r("search.placeholder")
|
|
3392
3506
|
};
|
|
3393
|
-
const { name:
|
|
3507
|
+
const { name: U } = u;
|
|
3394
3508
|
return {
|
|
3395
|
-
isExactMatch:
|
|
3396
|
-
fields: { name:
|
|
3509
|
+
isExactMatch: _,
|
|
3510
|
+
fields: { name: U },
|
|
3397
3511
|
schema: i.config.filterSchema
|
|
3398
3512
|
};
|
|
3399
|
-
}), { fetcher:
|
|
3513
|
+
}), { fetcher: m, fetcherState: A } = Wo(i.config, f.value), O = () => {
|
|
3400
3514
|
p.value = "";
|
|
3401
|
-
},
|
|
3515
|
+
}, g = () => {
|
|
3402
3516
|
l.value++;
|
|
3403
|
-
},
|
|
3517
|
+
}, M = F(null), k = F({
|
|
3404
3518
|
ctaPath: i.config.createRoute,
|
|
3405
3519
|
ctaText: void 0,
|
|
3406
3520
|
message: r("snis.list.empty_state.description"),
|
|
3407
3521
|
title: r("snis.title")
|
|
3408
|
-
}),
|
|
3409
|
-
const
|
|
3410
|
-
if (!
|
|
3522
|
+
}), y = (_, U) => {
|
|
3523
|
+
const v = _.id;
|
|
3524
|
+
if (!U(v)) {
|
|
3411
3525
|
n("copy:error", {
|
|
3412
|
-
entity:
|
|
3526
|
+
entity: _,
|
|
3413
3527
|
field: "id",
|
|
3414
3528
|
message: r("errors.copy")
|
|
3415
3529
|
});
|
|
3416
3530
|
return;
|
|
3417
3531
|
}
|
|
3418
3532
|
n("copy:success", {
|
|
3419
|
-
entity:
|
|
3533
|
+
entity: _,
|
|
3420
3534
|
field: "id",
|
|
3421
|
-
message: r("copy.success", { val:
|
|
3535
|
+
message: r("copy.success", { val: v })
|
|
3422
3536
|
});
|
|
3423
|
-
},
|
|
3424
|
-
const
|
|
3425
|
-
if (!
|
|
3537
|
+
}, N = (_, U) => {
|
|
3538
|
+
const v = JSON.stringify(_);
|
|
3539
|
+
if (!U(v)) {
|
|
3426
3540
|
n("copy:error", {
|
|
3427
|
-
entity:
|
|
3541
|
+
entity: _,
|
|
3428
3542
|
message: r("errors.copy")
|
|
3429
3543
|
});
|
|
3430
3544
|
return;
|
|
3431
3545
|
}
|
|
3432
3546
|
n("copy:success", {
|
|
3433
|
-
entity:
|
|
3547
|
+
entity: _,
|
|
3434
3548
|
message: r("copy.success_brief")
|
|
3435
3549
|
});
|
|
3436
|
-
}, ee = (
|
|
3550
|
+
}, ee = (_) => ({
|
|
3437
3551
|
label: r("actions.edit"),
|
|
3438
|
-
to: i.config.getEditRoute(
|
|
3439
|
-
}),
|
|
3440
|
-
|
|
3552
|
+
to: i.config.getEditRoute(_)
|
|
3553
|
+
}), L = F(void 0), j = F(!1), J = F(!1), B = F(""), P = Ho(i.config, f.value), z = (_) => {
|
|
3554
|
+
L.value = _, j.value = !0;
|
|
3441
3555
|
}, le = () => {
|
|
3442
|
-
|
|
3443
|
-
},
|
|
3444
|
-
var
|
|
3445
|
-
if ((
|
|
3446
|
-
|
|
3556
|
+
j.value = !1, L.value = void 0;
|
|
3557
|
+
}, Ie = async () => {
|
|
3558
|
+
var _, U, v;
|
|
3559
|
+
if ((_ = L.value) != null && _.id) {
|
|
3560
|
+
J.value = !0;
|
|
3447
3561
|
try {
|
|
3448
|
-
await a.delete(L
|
|
3449
|
-
} catch (
|
|
3450
|
-
B.value = ((
|
|
3562
|
+
await a.delete(P(L.value.id)), n("delete:success", L.value), J.value = !1, le(), l.value++;
|
|
3563
|
+
} catch (T) {
|
|
3564
|
+
B.value = ((v = (U = T.response) == null ? void 0 : U.data) == null ? void 0 : v.message) || T.message || r("errors.delete"), n("error", T);
|
|
3451
3565
|
} finally {
|
|
3452
|
-
|
|
3566
|
+
J.value = !1;
|
|
3453
3567
|
}
|
|
3454
3568
|
}
|
|
3455
|
-
}, se =
|
|
3456
|
-
return pe(
|
|
3457
|
-
var
|
|
3458
|
-
if (Array.isArray((
|
|
3459
|
-
|
|
3569
|
+
}, se = F(!0);
|
|
3570
|
+
return pe(A, (_) => {
|
|
3571
|
+
var U, v, T, D;
|
|
3572
|
+
if (Array.isArray((U = _ == null ? void 0 : _.response) == null ? void 0 : U.data) && (se.value = _.response.data.length > 0), _.status === me.Error) {
|
|
3573
|
+
M.value = {
|
|
3460
3574
|
title: r("errors.general")
|
|
3461
|
-
}, (D = (
|
|
3575
|
+
}, (D = (T = (v = _.error) == null ? void 0 : v.response) == null ? void 0 : T.data) != null && D.message && (M.value.message = _.error.response.data.message), n("error", _.error);
|
|
3462
3576
|
return;
|
|
3463
3577
|
}
|
|
3464
|
-
|
|
3578
|
+
M.value = null;
|
|
3465
3579
|
}), Xe(async () => {
|
|
3466
|
-
await i.canCreate() && (
|
|
3467
|
-
}), (
|
|
3468
|
-
const
|
|
3469
|
-
return
|
|
3470
|
-
|
|
3580
|
+
await i.canCreate() && (k.value.title = r("snis.list.empty_state.title"), k.value.ctaText = r("actions.create"));
|
|
3581
|
+
}), (_, U) => {
|
|
3582
|
+
const v = $("KButton"), T = $("KBadge"), D = $("KTruncate"), ce = $("KDropdownItem"), te = $("KClipboardProvider");
|
|
3583
|
+
return S(), q("div", fl, [
|
|
3584
|
+
I(h(wo), {
|
|
3471
3585
|
"cache-identifier": e.cacheIdentifier,
|
|
3472
3586
|
"cell-attributes": c,
|
|
3473
3587
|
"disable-pagination-page-jump": "",
|
|
3474
3588
|
"disable-row-click": !0,
|
|
3475
3589
|
"disable-sorting": s.value,
|
|
3476
|
-
"empty-state-options":
|
|
3590
|
+
"empty-state-options": k.value,
|
|
3477
3591
|
"enable-entity-actions": "",
|
|
3478
|
-
"error-message":
|
|
3479
|
-
fetcher:
|
|
3592
|
+
"error-message": M.value,
|
|
3593
|
+
fetcher: h(m),
|
|
3480
3594
|
"fetcher-cache-key": l.value,
|
|
3481
3595
|
"pagination-type": "offset",
|
|
3482
3596
|
"preferences-storage-key": "kong-ui-entities-snis-list",
|
|
3483
3597
|
query: p.value,
|
|
3484
|
-
"table-headers":
|
|
3598
|
+
"table-headers": h(d),
|
|
3485
3599
|
"use-action-outside": e.useActionOutside,
|
|
3486
|
-
onClearSearchInput:
|
|
3487
|
-
onSort:
|
|
3600
|
+
onClearSearchInput: O,
|
|
3601
|
+
onSort: g
|
|
3488
3602
|
}, {
|
|
3489
|
-
"toolbar-filter":
|
|
3490
|
-
|
|
3603
|
+
"toolbar-filter": b(() => [
|
|
3604
|
+
I(h(Ro), {
|
|
3491
3605
|
modelValue: p.value,
|
|
3492
|
-
"onUpdate:modelValue":
|
|
3493
|
-
config:
|
|
3606
|
+
"onUpdate:modelValue": U[0] || (U[0] = (V) => p.value = V),
|
|
3607
|
+
config: C.value
|
|
3494
3608
|
}, null, 8, ["modelValue", "config"])
|
|
3495
3609
|
]),
|
|
3496
|
-
"toolbar-button":
|
|
3497
|
-
(
|
|
3610
|
+
"toolbar-button": b(() => [
|
|
3611
|
+
(S(), H(je(e.useActionOutside ? "Teleport" : "div"), {
|
|
3498
3612
|
to: e.useActionOutside ? "#kong-ui-app-page-header-action-button" : void 0
|
|
3499
3613
|
}, {
|
|
3500
|
-
default:
|
|
3501
|
-
|
|
3614
|
+
default: b(() => [
|
|
3615
|
+
I(h(Ye), {
|
|
3502
3616
|
"auth-function": () => e.canCreate()
|
|
3503
3617
|
}, {
|
|
3504
|
-
default:
|
|
3505
|
-
|
|
3618
|
+
default: b(() => [
|
|
3619
|
+
be(I(v, {
|
|
3506
3620
|
appearance: "primary",
|
|
3507
3621
|
"data-testid": "toolbar-add-sni",
|
|
3508
3622
|
icon: "plus",
|
|
3509
3623
|
size: "large",
|
|
3510
3624
|
to: e.config.createRoute
|
|
3511
3625
|
}, {
|
|
3512
|
-
default:
|
|
3513
|
-
|
|
3626
|
+
default: b(() => [
|
|
3627
|
+
G(E(h(r)("snis.list.toolbar_actions.new")), 1)
|
|
3514
3628
|
]),
|
|
3515
3629
|
_: 1
|
|
3516
3630
|
}, 8, ["to"]), [
|
|
3517
|
-
[
|
|
3631
|
+
[ke, se.value]
|
|
3518
3632
|
])
|
|
3519
3633
|
]),
|
|
3520
3634
|
_: 1
|
|
@@ -3523,88 +3637,88 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3523
3637
|
_: 1
|
|
3524
3638
|
}, 8, ["to"]))
|
|
3525
3639
|
]),
|
|
3526
|
-
name:
|
|
3527
|
-
K("b", null,
|
|
3640
|
+
name: b(({ rowValue: V }) => [
|
|
3641
|
+
K("b", null, E(V ?? "-"), 1)
|
|
3528
3642
|
]),
|
|
3529
|
-
certificate:
|
|
3530
|
-
V.certificate && V.certificate.id ? (
|
|
3643
|
+
certificate: b(({ row: V }) => [
|
|
3644
|
+
V.certificate && V.certificate.id ? (S(), H(h(pl), {
|
|
3531
3645
|
key: 0,
|
|
3532
3646
|
class: "copy-certificate-uuid",
|
|
3533
3647
|
"data-testid": "copy-certificate-uuid",
|
|
3534
|
-
notify: (
|
|
3648
|
+
notify: (R) => o(R, V),
|
|
3535
3649
|
truncated: !1,
|
|
3536
3650
|
uuid: V.certificate.id
|
|
3537
|
-
}, null, 8, ["notify", "uuid"])) : (
|
|
3651
|
+
}, null, 8, ["notify", "uuid"])) : (S(), q("span", ml, "-"))
|
|
3538
3652
|
]),
|
|
3539
|
-
tags:
|
|
3540
|
-
V != null && V.length ? (
|
|
3541
|
-
default:
|
|
3542
|
-
(
|
|
3543
|
-
key:
|
|
3544
|
-
onClick:
|
|
3653
|
+
tags: b(({ rowValue: V }) => [
|
|
3654
|
+
V != null && V.length ? (S(), H(D, { key: 0 }, {
|
|
3655
|
+
default: b(() => [
|
|
3656
|
+
(S(!0), q(Bt, null, et(V, (R) => (S(), H(T, {
|
|
3657
|
+
key: R,
|
|
3658
|
+
onClick: U[1] || (U[1] = $e(() => {
|
|
3545
3659
|
}, ["stop"]))
|
|
3546
3660
|
}, {
|
|
3547
|
-
default:
|
|
3548
|
-
|
|
3661
|
+
default: b(() => [
|
|
3662
|
+
G(E(R), 1)
|
|
3549
3663
|
]),
|
|
3550
3664
|
_: 2
|
|
3551
3665
|
}, 1024))), 128))
|
|
3552
3666
|
]),
|
|
3553
3667
|
_: 2
|
|
3554
|
-
}, 1024)) : (
|
|
3668
|
+
}, 1024)) : (S(), q("span", gl, "-"))
|
|
3555
3669
|
]),
|
|
3556
|
-
actions:
|
|
3557
|
-
|
|
3558
|
-
default:
|
|
3559
|
-
|
|
3670
|
+
actions: b(({ row: V }) => [
|
|
3671
|
+
I(te, null, {
|
|
3672
|
+
default: b(({ copyToClipboard: R }) => [
|
|
3673
|
+
I(ce, {
|
|
3560
3674
|
"data-testid": "action-entity-copy-id",
|
|
3561
|
-
onClick: (
|
|
3675
|
+
onClick: (Dn) => y(V, R)
|
|
3562
3676
|
}, {
|
|
3563
|
-
default:
|
|
3564
|
-
|
|
3677
|
+
default: b(() => [
|
|
3678
|
+
G(E(h(r)("actions.copy_id")), 1)
|
|
3565
3679
|
]),
|
|
3566
3680
|
_: 2
|
|
3567
3681
|
}, 1032, ["onClick"])
|
|
3568
3682
|
]),
|
|
3569
3683
|
_: 2
|
|
3570
3684
|
}, 1024),
|
|
3571
|
-
|
|
3572
|
-
default:
|
|
3573
|
-
|
|
3685
|
+
I(te, null, {
|
|
3686
|
+
default: b(({ copyToClipboard: R }) => [
|
|
3687
|
+
I(ce, {
|
|
3574
3688
|
"data-testid": "action-entity-copy-json",
|
|
3575
|
-
onClick: (
|
|
3689
|
+
onClick: (Dn) => N(V, R)
|
|
3576
3690
|
}, {
|
|
3577
|
-
default:
|
|
3578
|
-
|
|
3691
|
+
default: b(() => [
|
|
3692
|
+
G(E(h(r)("actions.copy_json")), 1)
|
|
3579
3693
|
]),
|
|
3580
3694
|
_: 2
|
|
3581
3695
|
}, 1032, ["onClick"])
|
|
3582
3696
|
]),
|
|
3583
3697
|
_: 2
|
|
3584
3698
|
}, 1024),
|
|
3585
|
-
|
|
3699
|
+
I(h(Ye), {
|
|
3586
3700
|
"auth-function": () => e.canEdit(V)
|
|
3587
3701
|
}, {
|
|
3588
|
-
default:
|
|
3589
|
-
|
|
3702
|
+
default: b(() => [
|
|
3703
|
+
I(ce, {
|
|
3590
3704
|
"data-testid": "action-entity-edit",
|
|
3591
3705
|
item: ee(V.id)
|
|
3592
3706
|
}, null, 8, ["item"])
|
|
3593
3707
|
]),
|
|
3594
3708
|
_: 2
|
|
3595
3709
|
}, 1032, ["auth-function"]),
|
|
3596
|
-
|
|
3710
|
+
I(h(Ye), {
|
|
3597
3711
|
"auth-function": () => e.canDelete(V)
|
|
3598
3712
|
}, {
|
|
3599
|
-
default:
|
|
3600
|
-
|
|
3713
|
+
default: b(() => [
|
|
3714
|
+
I(ce, {
|
|
3601
3715
|
danger: "",
|
|
3602
3716
|
"data-testid": "action-entity-delete",
|
|
3603
3717
|
"has-divider": "",
|
|
3604
|
-
onClick: (
|
|
3718
|
+
onClick: (R) => z(V)
|
|
3605
3719
|
}, {
|
|
3606
|
-
default:
|
|
3607
|
-
|
|
3720
|
+
default: b(() => [
|
|
3721
|
+
G(E(h(r)("actions.delete")), 1)
|
|
3608
3722
|
]),
|
|
3609
3723
|
_: 2
|
|
3610
3724
|
}, 1032, ["onClick"])
|
|
@@ -3614,31 +3728,31 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3614
3728
|
]),
|
|
3615
3729
|
_: 1
|
|
3616
3730
|
}, 8, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "use-action-outside"]),
|
|
3617
|
-
|
|
3618
|
-
"action-pending":
|
|
3619
|
-
description:
|
|
3620
|
-
"entity-name":
|
|
3621
|
-
"entity-type":
|
|
3731
|
+
I(h(Io), {
|
|
3732
|
+
"action-pending": J.value,
|
|
3733
|
+
description: h(r)("delete.description"),
|
|
3734
|
+
"entity-name": L.value && (L.value.name || L.value.id),
|
|
3735
|
+
"entity-type": h(Wt).SNI,
|
|
3622
3736
|
error: B.value,
|
|
3623
3737
|
"need-confirm": !1,
|
|
3624
|
-
title:
|
|
3625
|
-
visible:
|
|
3738
|
+
title: h(r)("delete.title"),
|
|
3739
|
+
visible: j.value,
|
|
3626
3740
|
onCancel: le,
|
|
3627
|
-
onProceed:
|
|
3741
|
+
onProceed: Ie
|
|
3628
3742
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
3629
3743
|
]);
|
|
3630
3744
|
};
|
|
3631
3745
|
}
|
|
3632
|
-
}),
|
|
3746
|
+
}), Pn = (e, t) => {
|
|
3633
3747
|
const n = e.__vccOpts || e;
|
|
3634
3748
|
for (const [i, r] of t)
|
|
3635
3749
|
n[i] = r;
|
|
3636
3750
|
return n;
|
|
3637
|
-
},
|
|
3751
|
+
}, Fl = /* @__PURE__ */ Pn(hl, [["__scopeId", "data-v-8c7d3e3a"]]), yl = { class: "kong-ui-entities-snis-form" }, vl = { "data-testid": "no-search-results" }, bl = {
|
|
3638
3752
|
key: 2,
|
|
3639
3753
|
class: "invalid-certificate-message",
|
|
3640
3754
|
"data-testid": "invalid-certificate-message"
|
|
3641
|
-
},
|
|
3755
|
+
}, kl = /* @__PURE__ */ ie({
|
|
3642
3756
|
__name: "SniForm",
|
|
3643
3757
|
props: {
|
|
3644
3758
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3656,10 +3770,10 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3656
3770
|
},
|
|
3657
3771
|
emits: ["update", "error", "loading"],
|
|
3658
3772
|
setup(e, { emit: t }) {
|
|
3659
|
-
var
|
|
3660
|
-
const n = t, i = e, r =
|
|
3661
|
-
headers: (
|
|
3662
|
-
}), s =
|
|
3773
|
+
var U;
|
|
3774
|
+
const n = t, i = e, r = Ht(), { i18n: { t: o } } = Yt.useI18n(), { getMessageFromError: a } = Yo(), { axiosInstance: l } = Un({
|
|
3775
|
+
headers: (U = i.config) == null ? void 0 : U.requestHeaders
|
|
3776
|
+
}), s = x(() => _e.form[i.config.app].edit), u = x(() => i.sniId ? Ee.Edit : Ee.Create), d = x(() => i.config.certificateId && u.value === Ee.Create ? i.config.certificateId : ""), c = dt({
|
|
3663
3777
|
fields: {
|
|
3664
3778
|
name: "",
|
|
3665
3779
|
tags: "",
|
|
@@ -3671,155 +3785,155 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3671
3785
|
name: "",
|
|
3672
3786
|
tags: "",
|
|
3673
3787
|
certificate_id: ""
|
|
3674
|
-
}), p =
|
|
3675
|
-
var
|
|
3676
|
-
c.fields.name = (
|
|
3677
|
-
},
|
|
3788
|
+
}), p = x(() => JSON.stringify(c.fields) !== JSON.stringify(f) && !!c.fields.name && !!(c.fields.certificate_id || d.value)), C = (v) => {
|
|
3789
|
+
var T, D;
|
|
3790
|
+
c.fields.name = (v == null ? void 0 : v.name) || "", c.fields.tags = ((T = v == null ? void 0 : v.tags) == null ? void 0 : T.join(", ")) || "", c.fields.certificate_id = ((D = v == null ? void 0 : v.certificate) == null ? void 0 : D.id) || "", Object.assign(f, c.fields);
|
|
3791
|
+
}, m = () => {
|
|
3678
3792
|
r.push(i.config.cancelRoute);
|
|
3679
|
-
},
|
|
3680
|
-
var
|
|
3681
|
-
let
|
|
3682
|
-
return i.config.app === "konnect" ?
|
|
3683
|
-
}),
|
|
3684
|
-
var
|
|
3685
|
-
let
|
|
3686
|
-
return i.config.app === "konnect" ?
|
|
3687
|
-
}),
|
|
3688
|
-
var
|
|
3793
|
+
}, A = x(() => {
|
|
3794
|
+
var T, D;
|
|
3795
|
+
let v = `${i.config.apiBaseUrl}${_e.form[i.config.app].validate}`;
|
|
3796
|
+
return i.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((T = i.config) == null ? void 0 : T.controlPlaneId) || "") : i.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (D = i.config) != null && D.workspace ? `/${i.config.workspace}` : "")), v = v.replace(/{id}/gi, i.sniId), v;
|
|
3797
|
+
}), O = x(() => {
|
|
3798
|
+
var T, D;
|
|
3799
|
+
let v = `${i.config.apiBaseUrl}${_e.form[i.config.app][u.value]}`;
|
|
3800
|
+
return i.config.app === "konnect" ? v = v.replace(/{controlPlaneId}/gi, ((T = i.config) == null ? void 0 : T.controlPlaneId) || "") : i.config.app === "kongManager" && (v = v.replace(/\/{workspace}/gi, (D = i.config) != null && D.workspace ? `/${i.config.workspace}` : "")), v = v.replace(/{id}/gi, i.sniId), v;
|
|
3801
|
+
}), g = x(() => {
|
|
3802
|
+
var v, T;
|
|
3689
3803
|
return {
|
|
3690
3804
|
name: c.fields.name,
|
|
3691
|
-
tags: (
|
|
3805
|
+
tags: (T = (v = c.fields.tags.split(",")) == null ? void 0 : v.map((D) => String(D || "").trim())) == null ? void 0 : T.filter((D) => D !== ""),
|
|
3692
3806
|
certificate: { id: d.value || c.fields.certificate_id }
|
|
3693
3807
|
};
|
|
3694
|
-
}),
|
|
3695
|
-
var
|
|
3808
|
+
}), M = async () => {
|
|
3809
|
+
var v, T, D, ce, te, V;
|
|
3696
3810
|
try {
|
|
3697
3811
|
c.isReadonly = !0;
|
|
3698
|
-
let
|
|
3699
|
-
await l.post(
|
|
3700
|
-
} catch (
|
|
3701
|
-
c.errorMessage = a(
|
|
3812
|
+
let R;
|
|
3813
|
+
await l.post(A.value, g.value), u.value === "create" ? R = await l.post(O.value, g.value) : u.value === "edit" && (R = ((v = i.config) == null ? void 0 : v.app) === "konnect" ? await l.put(O.value, g.value) : await l.patch(O.value, g.value)), c.fields.name = ((T = R == null ? void 0 : R.data) == null ? void 0 : T.name) || "", c.fields.tags = ((ce = (D = R == null ? void 0 : R.data) == null ? void 0 : D.tags) == null ? void 0 : ce.join(", ")) || "", c.fields.certificate_id = ((V = (te = R == null ? void 0 : R.data) == null ? void 0 : te.certificate) == null ? void 0 : V.id) || "", Object.assign(f, c.fields), n("update", R == null ? void 0 : R.data);
|
|
3814
|
+
} catch (R) {
|
|
3815
|
+
c.errorMessage = a(R), n("error", R);
|
|
3702
3816
|
} finally {
|
|
3703
3817
|
c.isReadonly = !1;
|
|
3704
3818
|
}
|
|
3705
3819
|
}, {
|
|
3706
|
-
debouncedQueryChange:
|
|
3707
|
-
loading:
|
|
3708
|
-
allRecords:
|
|
3820
|
+
debouncedQueryChange: k,
|
|
3821
|
+
loading: y,
|
|
3822
|
+
allRecords: N,
|
|
3709
3823
|
error: ee,
|
|
3710
|
-
validationError:
|
|
3711
|
-
loadItems:
|
|
3712
|
-
results:
|
|
3713
|
-
} =
|
|
3714
|
-
|
|
3715
|
-
},
|
|
3716
|
-
label:
|
|
3717
|
-
value:
|
|
3718
|
-
selected: c.fields.certificate_id ===
|
|
3719
|
-
}))),
|
|
3824
|
+
validationError: L,
|
|
3825
|
+
loadItems: j,
|
|
3826
|
+
results: J
|
|
3827
|
+
} = Jo(i.config, _e.form[i.config.app].certificates), B = (v) => {
|
|
3828
|
+
k(v);
|
|
3829
|
+
}, P = x(() => ee.value ? o("errors.certificates.fetch") : ""), z = x(() => L.value ? o("errors.certificates.invalid") : ""), le = F(0), Ie = x(() => N.value === void 0), se = F(/* @__PURE__ */ new Set()), xe = x(() => Array.from(se.value).map((T) => ({
|
|
3830
|
+
label: T,
|
|
3831
|
+
value: T,
|
|
3832
|
+
selected: c.fields.certificate_id === T
|
|
3833
|
+
}))), _ = (v) => {
|
|
3720
3834
|
se.value.clear();
|
|
3721
|
-
let
|
|
3722
|
-
for (
|
|
3723
|
-
se.value.add(
|
|
3835
|
+
let T;
|
|
3836
|
+
for (T of v)
|
|
3837
|
+
se.value.add(T.id);
|
|
3724
3838
|
};
|
|
3725
|
-
return pe(
|
|
3726
|
-
|
|
3727
|
-
}, { immediate: !0, deep: !0 }), pe(
|
|
3839
|
+
return pe(J, (v) => {
|
|
3840
|
+
_(v);
|
|
3841
|
+
}, { immediate: !0, deep: !0 }), pe(xe, () => {
|
|
3728
3842
|
le.value++;
|
|
3729
3843
|
}, { immediate: !0, deep: !0 }), Xe(async () => {
|
|
3730
|
-
await
|
|
3731
|
-
}), (
|
|
3732
|
-
const D =
|
|
3733
|
-
return
|
|
3734
|
-
|
|
3844
|
+
await j();
|
|
3845
|
+
}), (v, T) => {
|
|
3846
|
+
const D = $("KInput"), ce = $("KSelect");
|
|
3847
|
+
return S(), q("div", yl, [
|
|
3848
|
+
I(h(fo), {
|
|
3735
3849
|
"can-submit": p.value,
|
|
3736
3850
|
config: e.config,
|
|
3737
3851
|
"edit-id": e.sniId,
|
|
3738
|
-
"error-message": c.errorMessage ||
|
|
3852
|
+
"error-message": c.errorMessage || P.value,
|
|
3739
3853
|
"fetch-url": s.value,
|
|
3740
|
-
"form-fields":
|
|
3854
|
+
"form-fields": g.value,
|
|
3741
3855
|
"is-readonly": c.isReadonly,
|
|
3742
|
-
onCancel:
|
|
3743
|
-
"onFetch:error":
|
|
3744
|
-
"onFetch:success":
|
|
3745
|
-
onLoading:
|
|
3746
|
-
onSubmit:
|
|
3856
|
+
onCancel: m,
|
|
3857
|
+
"onFetch:error": T[3] || (T[3] = (te) => v.$emit("error", te)),
|
|
3858
|
+
"onFetch:success": C,
|
|
3859
|
+
onLoading: T[4] || (T[4] = (te) => v.$emit("loading", te)),
|
|
3860
|
+
onSubmit: M
|
|
3747
3861
|
}, {
|
|
3748
|
-
default:
|
|
3749
|
-
|
|
3750
|
-
description:
|
|
3751
|
-
title:
|
|
3862
|
+
default: b(() => [
|
|
3863
|
+
I(h(Lt), {
|
|
3864
|
+
description: h(o)("form.sections.general.description"),
|
|
3865
|
+
title: h(o)("form.sections.general.title")
|
|
3752
3866
|
}, {
|
|
3753
|
-
default:
|
|
3754
|
-
|
|
3867
|
+
default: b(() => [
|
|
3868
|
+
I(D, {
|
|
3755
3869
|
modelValue: c.fields.name,
|
|
3756
|
-
"onUpdate:modelValue":
|
|
3870
|
+
"onUpdate:modelValue": T[0] || (T[0] = (te) => c.fields.name = te),
|
|
3757
3871
|
modelModifiers: { trim: !0 },
|
|
3758
3872
|
autocomplete: "off",
|
|
3759
3873
|
"data-testid": "sni-form-name",
|
|
3760
|
-
label:
|
|
3761
|
-
placeholder:
|
|
3874
|
+
label: h(o)("form.fields.name.label"),
|
|
3875
|
+
placeholder: h(o)("form.fields.name.placeholder"),
|
|
3762
3876
|
readonly: c.isReadonly,
|
|
3763
3877
|
required: "",
|
|
3764
3878
|
type: "text"
|
|
3765
3879
|
}, null, 8, ["modelValue", "label", "placeholder", "readonly"]),
|
|
3766
|
-
|
|
3880
|
+
I(D, {
|
|
3767
3881
|
modelValue: c.fields.tags,
|
|
3768
|
-
"onUpdate:modelValue":
|
|
3882
|
+
"onUpdate:modelValue": T[1] || (T[1] = (te) => c.fields.tags = te),
|
|
3769
3883
|
modelModifiers: { trim: !0 },
|
|
3770
3884
|
autocomplete: "off",
|
|
3771
3885
|
"data-testid": "sni-form-tags",
|
|
3772
|
-
help:
|
|
3773
|
-
label:
|
|
3774
|
-
"label-attributes": { info:
|
|
3775
|
-
placeholder:
|
|
3886
|
+
help: h(o)("form.fields.tags.help"),
|
|
3887
|
+
label: h(o)("form.fields.tags.label"),
|
|
3888
|
+
"label-attributes": { info: h(o)("form.fields.tags.tooltip") },
|
|
3889
|
+
placeholder: h(o)("form.fields.tags.placeholder"),
|
|
3776
3890
|
readonly: c.isReadonly,
|
|
3777
3891
|
type: "text"
|
|
3778
3892
|
}, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
|
|
3779
3893
|
]),
|
|
3780
3894
|
_: 1
|
|
3781
3895
|
}, 8, ["description", "title"]),
|
|
3782
|
-
|
|
3783
|
-
description:
|
|
3896
|
+
I(h(Lt), {
|
|
3897
|
+
description: h(o)("form.sections.certificate.description"),
|
|
3784
3898
|
"has-divider": "",
|
|
3785
|
-
title:
|
|
3899
|
+
title: h(o)("form.sections.certificate.title")
|
|
3786
3900
|
}, {
|
|
3787
|
-
default:
|
|
3788
|
-
d.value ? (
|
|
3901
|
+
default: b(() => [
|
|
3902
|
+
d.value ? (S(), H(D, {
|
|
3789
3903
|
key: 0,
|
|
3790
3904
|
"data-testid": "sni-form-certificate-id",
|
|
3791
|
-
label:
|
|
3905
|
+
label: h(o)("form.fields.certificate_id.label"),
|
|
3792
3906
|
"model-value": d.value,
|
|
3793
3907
|
readonly: "",
|
|
3794
3908
|
required: "",
|
|
3795
3909
|
width: "100%"
|
|
3796
|
-
}, null, 8, ["label", "model-value"])) : (
|
|
3910
|
+
}, null, 8, ["label", "model-value"])) : (S(), H(ce, {
|
|
3797
3911
|
key: 1,
|
|
3798
3912
|
modelValue: c.fields.certificate_id,
|
|
3799
|
-
"onUpdate:modelValue":
|
|
3913
|
+
"onUpdate:modelValue": T[2] || (T[2] = (te) => c.fields.certificate_id = te),
|
|
3800
3914
|
clearable: "",
|
|
3801
3915
|
"data-testid": "sni-form-certificate-id",
|
|
3802
|
-
"dropdown-footer-text":
|
|
3916
|
+
"dropdown-footer-text": Ie.value ? h(o)("form.fields.certificate_id.footer") : void 0,
|
|
3803
3917
|
"enable-filtering": "",
|
|
3804
3918
|
"filter-function": () => !0,
|
|
3805
|
-
items:
|
|
3806
|
-
label:
|
|
3807
|
-
loading:
|
|
3808
|
-
placeholder:
|
|
3919
|
+
items: xe.value,
|
|
3920
|
+
label: h(o)("form.fields.certificate_id.label"),
|
|
3921
|
+
loading: h(y),
|
|
3922
|
+
placeholder: h(o)("form.fields.certificate_id.placeholder"),
|
|
3809
3923
|
readonly: c.isReadonly,
|
|
3810
3924
|
required: "",
|
|
3811
3925
|
width: "100%",
|
|
3812
3926
|
onQueryChange: B
|
|
3813
3927
|
}, {
|
|
3814
|
-
loading:
|
|
3815
|
-
K("div", null,
|
|
3928
|
+
loading: b(() => [
|
|
3929
|
+
K("div", null, E(h(o)("actions.loading")), 1)
|
|
3816
3930
|
]),
|
|
3817
|
-
empty:
|
|
3818
|
-
K("div",
|
|
3931
|
+
empty: b(() => [
|
|
3932
|
+
K("div", vl, E(h(o)("search.no_results")), 1)
|
|
3819
3933
|
]),
|
|
3820
3934
|
_: 1
|
|
3821
3935
|
}, 8, ["modelValue", "dropdown-footer-text", "items", "label", "loading", "placeholder", "readonly"])),
|
|
3822
|
-
|
|
3936
|
+
z.value ? (S(), q("p", bl, E(z.value), 1)) : Z("", !0)
|
|
3823
3937
|
]),
|
|
3824
3938
|
_: 1
|
|
3825
3939
|
}, 8, ["description", "title"])
|
|
@@ -3829,8 +3943,8 @@ const Xa = { class: "yaml-config" }, eo = /* @__PURE__ */ re({
|
|
|
3829
3943
|
]);
|
|
3830
3944
|
};
|
|
3831
3945
|
}
|
|
3832
|
-
}),
|
|
3946
|
+
}), Ml = /* @__PURE__ */ Pn(kl, [["__scopeId", "data-v-3880eb83"]]);
|
|
3833
3947
|
export {
|
|
3834
|
-
|
|
3835
|
-
|
|
3948
|
+
Ml as SniForm,
|
|
3949
|
+
Fl as SniList
|
|
3836
3950
|
};
|