@kong-ui-public/entities-gateway-services 2.0.8-pr.951.ca22a4bc.0 → 2.0.8
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-gateway-services.es.js +705 -711
- package/dist/entities-gateway-services.umd.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/components/GatewayServiceForm.vue.d.ts.map +1 -1
- package/dist/types/composables/useI18n.d.ts +4 -12
- package/dist/types/composables/useI18n.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as ae, ref as F, computed as x, resolveComponent as L, openBlock as b, createBlock as R, Teleport as ir, createVNode as S, withCtx as y, unref as m, createTextVNode as J, toDisplayString as j, createElementVNode as O, watch as we, renderSlot as Q, createCommentVNode as H, useSlots as tt, onBeforeMount as yt, createSlots as xe, createElementBlock as $, renderList as ve, Fragment as he, normalizeClass as $e, withModifiers as Ne, withDirectives as Ge, vShow as Je, useCssVars as rr, resolveDynamicComponent as Ke, normalizeProps as ar, guardReactiveProps as or, mergeProps as ct, onMounted as ti, onUnmounted as nr, normalizeStyle as ii, inject as lr, pushScopeId as ri, popScopeId as ai, reactive as Tt } from "vue";
|
|
2
2
|
import { useRouter as vt } from "vue-router";
|
|
3
3
|
import { createI18n as ht, i18nTComponent as oi } from "@kong-ui-public/i18n";
|
|
4
|
-
import
|
|
5
|
-
import { MethodsArray as
|
|
6
|
-
const
|
|
4
|
+
import sr from "axios";
|
|
5
|
+
import { MethodsArray as cr } from "@kong/kongponents";
|
|
6
|
+
const ur = {
|
|
7
7
|
create: "New Gateway Service",
|
|
8
8
|
copy_id: "Copy ID",
|
|
9
9
|
copy_json: "Copy JSON",
|
|
@@ -19,9 +19,9 @@ const ua = {
|
|
|
19
19
|
description: "Deleting this Gateway Service will also remove any associated routes and plugins. This action cannot be reversed.",
|
|
20
20
|
menu_label: "Delete"
|
|
21
21
|
}
|
|
22
|
-
},
|
|
22
|
+
}, dr = {
|
|
23
23
|
placeholder: "Filter by exact name or ID"
|
|
24
|
-
},
|
|
24
|
+
}, pr = {
|
|
25
25
|
title: "Gateway Services",
|
|
26
26
|
list: {
|
|
27
27
|
toolbar_actions: {
|
|
@@ -52,17 +52,15 @@ const ua = {
|
|
|
52
52
|
title: "Service Endpoint",
|
|
53
53
|
description: "Define the endpoint for this service by specifying the full URL or by its separate elements.",
|
|
54
54
|
checkedGroupLabel: "Choose how and where to send traffic",
|
|
55
|
-
urlLabel: "
|
|
55
|
+
urlLabel: "Upstream URL",
|
|
56
56
|
checkedGroupAltLabel: "Protocol, Host, Port and Path",
|
|
57
57
|
viewAdvancedFields: "View Advanced Fields"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
fields: {
|
|
61
61
|
upstream_url: {
|
|
62
|
-
label: "Upstream URL",
|
|
63
62
|
placeholder: "Enter a URL",
|
|
64
|
-
|
|
65
|
-
tooltip_for_km: "This is the URL of the API you will manage in Kong Gateway."
|
|
63
|
+
tooltip: "This is the URL of the API you will manage in Konnect."
|
|
66
64
|
},
|
|
67
65
|
name: {
|
|
68
66
|
label: "Name",
|
|
@@ -160,39 +158,39 @@ const ua = {
|
|
|
160
158
|
}
|
|
161
159
|
}
|
|
162
160
|
}
|
|
163
|
-
},
|
|
161
|
+
}, fr = {
|
|
164
162
|
general: "Gateway Services could not be retrieved",
|
|
165
163
|
delete: "The gateway service could not be deleted at this time.",
|
|
166
164
|
copy: "Failed to copy to clipboard",
|
|
167
165
|
urlErrorMessage: "Error: invalid URL",
|
|
168
166
|
validationNameError: "The name can be any string containing letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."
|
|
169
|
-
},
|
|
167
|
+
}, mr = {
|
|
170
168
|
success: "Copied {val} to clipboard",
|
|
171
169
|
success_brief: "Successfully copied to clipboard"
|
|
172
|
-
},
|
|
170
|
+
}, gr = {
|
|
173
171
|
gateway_services: "gateway services"
|
|
174
|
-
},
|
|
175
|
-
actions:
|
|
176
|
-
search:
|
|
177
|
-
gateway_services:
|
|
178
|
-
errors:
|
|
179
|
-
copy:
|
|
180
|
-
glossary:
|
|
172
|
+
}, yr = {
|
|
173
|
+
actions: ur,
|
|
174
|
+
search: dr,
|
|
175
|
+
gateway_services: pr,
|
|
176
|
+
errors: fr,
|
|
177
|
+
copy: mr,
|
|
178
|
+
glossary: gr
|
|
181
179
|
};
|
|
182
|
-
function
|
|
183
|
-
const e = ht("en-us",
|
|
180
|
+
function vr() {
|
|
181
|
+
const e = ht("en-us", yr);
|
|
184
182
|
return {
|
|
185
183
|
i18n: e,
|
|
186
184
|
i18nT: oi(e)
|
|
187
185
|
// Translation component <i18n-t>
|
|
188
186
|
};
|
|
189
187
|
}
|
|
190
|
-
function
|
|
188
|
+
function hr() {
|
|
191
189
|
return {
|
|
192
190
|
getPortFromProtocol: (i, t) => {
|
|
193
|
-
const
|
|
194
|
-
if ((
|
|
195
|
-
return
|
|
191
|
+
const r = [80, 443], a = Number(t);
|
|
192
|
+
if ((a || a === 0) && !r.includes(a))
|
|
193
|
+
return a;
|
|
196
194
|
switch (i) {
|
|
197
195
|
case "grpcs":
|
|
198
196
|
case "tls":
|
|
@@ -210,8 +208,8 @@ function ha() {
|
|
|
210
208
|
};
|
|
211
209
|
}
|
|
212
210
|
const We = {
|
|
213
|
-
useI18n:
|
|
214
|
-
usePortFromProtocol:
|
|
211
|
+
useI18n: vr,
|
|
212
|
+
usePortFromProtocol: hr
|
|
215
213
|
}, Pe = {
|
|
216
214
|
list: {
|
|
217
215
|
konnect: {
|
|
@@ -237,37 +235,37 @@ const We = {
|
|
|
237
235
|
var ni = /* @__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))(ni || {}), ut = /* @__PURE__ */ ((e) => (e.Edit = "edit", e.Create = "create", e))(ut || {}), Ae = /* @__PURE__ */ ((e) => (e[e.Loading = 0] = "Loading", e[e.Idle = 1] = "Idle", e[e.NoResults = 2] = "NoResults", e[e.Error = 3] = "Error", e))(Ae || {}), te = /* @__PURE__ */ ((e) => (e.ID = "id", e.IdArray = "id-array", e.Text = "plain-text", e.Date = "date", e.Redacted = "redacted", e.RedactedArray = "redacted-array", e.Json = "json", e.JsonArray = "json-array", e.BadgeTag = "badge-tag", e.BadgeStatus = "badge-status", e.BadgeMethod = "badge-method", e.LinkInternal = "link-internal", e.LinkExternal = "link-external", e))(te || {}), fe = /* @__PURE__ */ ((e) => (e.Basic = "basic", e.Advanced = "advanced", e.Plugin = "plugin", e))(fe || {});
|
|
238
236
|
function bt(e = {}) {
|
|
239
237
|
return {
|
|
240
|
-
axiosInstance:
|
|
238
|
+
axiosInstance: sr.create({
|
|
241
239
|
withCredentials: !0,
|
|
242
240
|
timeout: 3e4,
|
|
243
241
|
...e
|
|
244
242
|
})
|
|
245
243
|
};
|
|
246
244
|
}
|
|
247
|
-
function
|
|
245
|
+
function br() {
|
|
248
246
|
return {
|
|
249
247
|
debounce: (e, i) => {
|
|
250
248
|
let t;
|
|
251
|
-
return (...
|
|
249
|
+
return (...r) => {
|
|
252
250
|
clearTimeout(t), t = window == null ? void 0 : window.setTimeout(() => {
|
|
253
|
-
e(...
|
|
251
|
+
e(...r);
|
|
254
252
|
}, i);
|
|
255
253
|
};
|
|
256
254
|
}
|
|
257
255
|
};
|
|
258
256
|
}
|
|
259
|
-
const ot = "khcp-user-table-preferences",
|
|
257
|
+
const ot = "khcp-user-table-preferences", _r = {
|
|
260
258
|
pageSize: 30,
|
|
261
259
|
sortColumnKey: void 0,
|
|
262
260
|
sortColumnOrder: void 0
|
|
263
261
|
};
|
|
264
|
-
function
|
|
262
|
+
function wr() {
|
|
265
263
|
const e = (t) => {
|
|
266
264
|
if (typeof t == "string")
|
|
267
265
|
try {
|
|
268
266
|
return JSON.parse(t);
|
|
269
|
-
} catch (
|
|
270
|
-
console.error("useTablePreferences(tryParseJson)",
|
|
267
|
+
} catch (r) {
|
|
268
|
+
console.error("useTablePreferences(tryParseJson)", r);
|
|
271
269
|
return;
|
|
272
270
|
}
|
|
273
271
|
}, i = () => {
|
|
@@ -275,34 +273,34 @@ function wa() {
|
|
|
275
273
|
return !t || !Object.keys(t).length ? /* @__PURE__ */ new Map() : new Map(Object.entries(t));
|
|
276
274
|
};
|
|
277
275
|
return {
|
|
278
|
-
setTablePreferences: (t,
|
|
276
|
+
setTablePreferences: (t, r) => {
|
|
279
277
|
try {
|
|
280
|
-
const
|
|
281
|
-
|
|
282
|
-
} catch (
|
|
283
|
-
console.error("useTablePreferences(setTablePreferences)",
|
|
278
|
+
const a = i();
|
|
279
|
+
a.set(t, r), localStorage.setItem(ot, JSON.stringify(Object.fromEntries(a.entries())));
|
|
280
|
+
} catch (a) {
|
|
281
|
+
console.error("useTablePreferences(setTablePreferences)", a);
|
|
284
282
|
}
|
|
285
283
|
},
|
|
286
284
|
getTablePreferences: (t) => {
|
|
287
|
-
const
|
|
288
|
-
return (
|
|
285
|
+
const r = i();
|
|
286
|
+
return (r == null ? void 0 : r.get(t)) || void 0 || _r;
|
|
289
287
|
},
|
|
290
288
|
deleteAllTablePreferences: () => {
|
|
291
289
|
localStorage.removeItem(ot);
|
|
292
290
|
}
|
|
293
291
|
};
|
|
294
292
|
}
|
|
295
|
-
const
|
|
293
|
+
const kr = {
|
|
296
294
|
actions: {
|
|
297
295
|
copyId: "Copy ID",
|
|
298
296
|
copied_id: 'Copied "{id}" to the clipboard',
|
|
299
297
|
copyToClipboard: "Copied successfully!",
|
|
300
298
|
copyToClipboardFailed: "Failed to copy to the clipboard"
|
|
301
299
|
}
|
|
302
|
-
},
|
|
300
|
+
}, Cr = {
|
|
303
301
|
message: "Are you sure you want to delete this {entityType}?",
|
|
304
302
|
messageWithName: "Are you sure you want to delete this {entityType} {entityName}?"
|
|
305
|
-
},
|
|
303
|
+
}, Sr = {
|
|
306
304
|
actions: {
|
|
307
305
|
save: "Save",
|
|
308
306
|
cancel: "Cancel",
|
|
@@ -311,13 +309,13 @@ const ka = {
|
|
|
311
309
|
errors: {
|
|
312
310
|
edit: "The entity could not be edited at this time."
|
|
313
311
|
}
|
|
314
|
-
},
|
|
312
|
+
}, Ir = {
|
|
315
313
|
emptyState: {
|
|
316
314
|
noSearchResultsTitle: "No results found",
|
|
317
315
|
noSearchResultsMessage: "Please adjust the criteria and try again.",
|
|
318
316
|
noSearchResultsCtaText: "Clear"
|
|
319
317
|
}
|
|
320
|
-
},
|
|
318
|
+
}, Ar = {
|
|
321
319
|
title: "Configuration",
|
|
322
320
|
actions: {
|
|
323
321
|
copy: "Copy JSON"
|
|
@@ -352,7 +350,7 @@ const ka = {
|
|
|
352
350
|
entryTitle: "Entry {index}",
|
|
353
351
|
structuredFormat: "Structured"
|
|
354
352
|
}
|
|
355
|
-
},
|
|
353
|
+
}, xr = {
|
|
356
354
|
filterButtonText: "Filter",
|
|
357
355
|
fieldLabel: "Filter by:",
|
|
358
356
|
inputPlaceholder: "Enter a value",
|
|
@@ -360,15 +358,15 @@ const ka = {
|
|
|
360
358
|
applyButtonText: "Apply",
|
|
361
359
|
clearButtonText: "Clear",
|
|
362
360
|
clearAllButtonText: "Clear all filters"
|
|
363
|
-
},
|
|
361
|
+
}, Tr = {
|
|
364
362
|
errors: {
|
|
365
363
|
fetch: "Could not fetch available items",
|
|
366
364
|
invalid: "Please select a valid value"
|
|
367
365
|
}
|
|
368
|
-
}, $
|
|
366
|
+
}, $r = {
|
|
369
367
|
unexpected: "An unexpected error has occurred",
|
|
370
368
|
dataKeyUndefined: 'The data key "{dataKey}" does not exist in the response.'
|
|
371
|
-
},
|
|
369
|
+
}, Mr = {
|
|
372
370
|
enable: {
|
|
373
371
|
title: "Enable {entityType}",
|
|
374
372
|
message: "Are you sure you want to enable the {entityType} {entityName}?",
|
|
@@ -379,19 +377,19 @@ const ka = {
|
|
|
379
377
|
message: "Are you sure you want to disable the {entityType} {entityName}?",
|
|
380
378
|
confirmText: "Yes, disable"
|
|
381
379
|
}
|
|
382
|
-
},
|
|
383
|
-
global:
|
|
384
|
-
deleteModal:
|
|
385
|
-
baseForm:
|
|
386
|
-
baseTable:
|
|
387
|
-
baseConfigCard:
|
|
388
|
-
filter:
|
|
389
|
-
debouncedFilter:
|
|
390
|
-
errors: $
|
|
391
|
-
toggleModal:
|
|
380
|
+
}, Er = {
|
|
381
|
+
global: kr,
|
|
382
|
+
deleteModal: Cr,
|
|
383
|
+
baseForm: Sr,
|
|
384
|
+
baseTable: Ir,
|
|
385
|
+
baseConfigCard: Ar,
|
|
386
|
+
filter: xr,
|
|
387
|
+
debouncedFilter: Tr,
|
|
388
|
+
errors: $r,
|
|
389
|
+
toggleModal: Mr
|
|
392
390
|
};
|
|
393
391
|
function _t() {
|
|
394
|
-
const e = ht("en-us",
|
|
392
|
+
const e = ht("en-us", Er);
|
|
395
393
|
return {
|
|
396
394
|
i18n: e,
|
|
397
395
|
i18nT: oi(e)
|
|
@@ -399,12 +397,12 @@ function _t() {
|
|
|
399
397
|
};
|
|
400
398
|
}
|
|
401
399
|
function li() {
|
|
402
|
-
const e = (t,
|
|
403
|
-
if (t.length !==
|
|
400
|
+
const e = (t, r) => (r == null ? void 0 : r[t]) ?? void 0, i = (t, r) => {
|
|
401
|
+
if (t.length !== r.length)
|
|
404
402
|
return !1;
|
|
405
|
-
const
|
|
406
|
-
for (const o of
|
|
407
|
-
const l = t.filter((c) => c === o).length, n =
|
|
403
|
+
const a = /* @__PURE__ */ new Set([...t, ...r]);
|
|
404
|
+
for (const o of a) {
|
|
405
|
+
const l = t.filter((c) => c === o).length, n = r.filter((c) => c === o).length;
|
|
408
406
|
if (l !== n)
|
|
409
407
|
return !1;
|
|
410
408
|
}
|
|
@@ -412,16 +410,16 @@ function li() {
|
|
|
412
410
|
};
|
|
413
411
|
return {
|
|
414
412
|
getPropValue: e,
|
|
415
|
-
objectsAreEqual: (t,
|
|
416
|
-
if (
|
|
417
|
-
if (Object.keys(t).length === Object.keys(
|
|
413
|
+
objectsAreEqual: (t, r, a) => {
|
|
414
|
+
if (a) {
|
|
415
|
+
if (Object.keys(t).length === Object.keys(r).length)
|
|
418
416
|
for (const o in t)
|
|
419
|
-
if (Array.isArray(t[o]) && Array.isArray(
|
|
420
|
-
if (i(t[o],
|
|
417
|
+
if (Array.isArray(t[o]) && Array.isArray(r[o])) {
|
|
418
|
+
if (i(t[o], r[o]))
|
|
421
419
|
continue;
|
|
422
420
|
return !1;
|
|
423
421
|
} else {
|
|
424
|
-
if (t[o] ===
|
|
422
|
+
if (t[o] === r[o])
|
|
425
423
|
continue;
|
|
426
424
|
return !1;
|
|
427
425
|
}
|
|
@@ -430,26 +428,26 @@ function li() {
|
|
|
430
428
|
return !0;
|
|
431
429
|
}
|
|
432
430
|
try {
|
|
433
|
-
return JSON.stringify(t) === JSON.stringify(
|
|
431
|
+
return JSON.stringify(t) === JSON.stringify(r);
|
|
434
432
|
} catch {
|
|
435
433
|
return !1;
|
|
436
434
|
}
|
|
437
435
|
},
|
|
438
|
-
sortAlpha: (t) => (
|
|
439
|
-
let o =
|
|
440
|
-
return Array.isArray(
|
|
436
|
+
sortAlpha: (t) => (r, a) => {
|
|
437
|
+
let o = r[t] === void 0 || r[t] === null ? "" : r[t], l = a[t] === void 0 || a[t] === null ? "" : a[t];
|
|
438
|
+
return Array.isArray(r[t]) && (o = r[t][0]), Array.isArray(a[t]) && (l = a[t][0]), o.localeCompare(l);
|
|
441
439
|
},
|
|
442
440
|
isValidUuid: (t) => t ? /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(t) : !1
|
|
443
441
|
};
|
|
444
442
|
}
|
|
445
|
-
function
|
|
443
|
+
function jr(e, i, t, r = {
|
|
446
444
|
fetchedItemsKey: "data",
|
|
447
445
|
searchKeys: ["id"]
|
|
448
446
|
}) {
|
|
449
447
|
t || (t = "100");
|
|
450
|
-
const { axiosInstance:
|
|
448
|
+
const { axiosInstance: a } = bt({
|
|
451
449
|
headers: e.requestHeaders
|
|
452
|
-
}), { i18n: { t: o } } = _t(), { debounce: l } =
|
|
450
|
+
}), { i18n: { t: o } } = _t(), { debounce: l } = br(), n = l(async (C) => {
|
|
453
451
|
await E(C);
|
|
454
452
|
}, 200), c = F(!1), d = F(""), f = F(""), p = F([]), _ = F([]), h = F(void 0), I = m(i);
|
|
455
453
|
let k = `${e.apiBaseUrl}${I}`;
|
|
@@ -457,8 +455,8 @@ function ja(e, i, t, a = {
|
|
|
457
455
|
const { isValidUuid: v } = li(), T = async () => {
|
|
458
456
|
try {
|
|
459
457
|
c.value = !0;
|
|
460
|
-
const { data: C } = await
|
|
461
|
-
C != null && C.next || (h.value =
|
|
458
|
+
const { data: C } = await a.get(`${k}?size=${t}`);
|
|
459
|
+
C != null && C.next || (h.value = r.fetchedItemsKey in C ? C[r.fetchedItemsKey] : []), _.value = r.fetchedItemsKey in C ? C[r.fetchedItemsKey] : [], p.value = _.value;
|
|
462
460
|
} catch {
|
|
463
461
|
p.value = [], d.value = o("debouncedFilter.errors.fetch");
|
|
464
462
|
} finally {
|
|
@@ -472,17 +470,17 @@ function ja(e, i, t, a = {
|
|
|
472
470
|
if (c.value = !0, d.value = "", f.value = "", e.app === "konnect") {
|
|
473
471
|
let A = k + "";
|
|
474
472
|
C && (A += `/${C}`);
|
|
475
|
-
const { data: q } = await
|
|
476
|
-
|
|
473
|
+
const { data: q } = await a.get(`${A}?size=${t}`);
|
|
474
|
+
r.fetchedItemsKey in q ? p.value = q[r.fetchedItemsKey] : q != null && q.id ? p.value = [q] : p.value = [];
|
|
477
475
|
} else if (C) {
|
|
478
476
|
const A = [];
|
|
479
|
-
v(C) &&
|
|
480
|
-
const { data: N } = await
|
|
481
|
-
return [N[
|
|
477
|
+
v(C) && r.searchKeys.includes("id") ? A.push((async () => {
|
|
478
|
+
const { data: N } = await a.get(`${k}/${C}`);
|
|
479
|
+
return [N[r.fetchedItemsKey] ?? N];
|
|
482
480
|
})()) : A.push(
|
|
483
|
-
...
|
|
484
|
-
const { data: z } = await
|
|
485
|
-
return z[
|
|
481
|
+
...r.searchKeys.filter((N) => N !== "id").map(async (N) => {
|
|
482
|
+
const { data: z } = await a.get(`${k}?${N}=${C}`);
|
|
483
|
+
return z[r.fetchedItemsKey];
|
|
486
484
|
})
|
|
487
485
|
);
|
|
488
486
|
const q = await Promise.all(A), U = /* @__PURE__ */ new Set();
|
|
@@ -503,7 +501,7 @@ function ja(e, i, t, a = {
|
|
|
503
501
|
c.value = !0, f.value = "", C ? (p.value = (Y = h.value) == null ? void 0 : Y.filter((A) => {
|
|
504
502
|
var q;
|
|
505
503
|
let U = !1;
|
|
506
|
-
for (const N of
|
|
504
|
+
for (const N of r.searchKeys) {
|
|
507
505
|
const z = typeof A[N] == "string" ? (q = A[N]) == null ? void 0 : q.toLowerCase() : A[N];
|
|
508
506
|
z != null && z.includes(C.toLowerCase()) && (U = !0);
|
|
509
507
|
}
|
|
@@ -520,30 +518,30 @@ function ja(e, i, t, a = {
|
|
|
520
518
|
debouncedQueryChange: n
|
|
521
519
|
};
|
|
522
520
|
}
|
|
523
|
-
function
|
|
524
|
-
const t = m(i),
|
|
521
|
+
function Vr(e, i) {
|
|
522
|
+
const t = m(i), r = x(
|
|
525
523
|
() => e.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${t}`) : new URL(t)
|
|
526
524
|
);
|
|
527
|
-
return
|
|
525
|
+
return r.value.search = "", (a) => `${r.value.href}/${a}`;
|
|
528
526
|
}
|
|
529
|
-
function
|
|
527
|
+
function Or() {
|
|
530
528
|
const { i18n: { t: e } } = _t();
|
|
531
529
|
return {
|
|
532
530
|
getMessageFromError: (i) => {
|
|
533
|
-
var t,
|
|
531
|
+
var t, r, a;
|
|
534
532
|
if (!i)
|
|
535
533
|
return e("errors.unexpected");
|
|
536
534
|
if ((t = i == null ? void 0 : i.response) != null && t.data) {
|
|
537
535
|
if (i.response.data.detail)
|
|
538
536
|
return i.response.data.detail;
|
|
539
|
-
if ((
|
|
537
|
+
if ((r = i.response.data.details) != null && r.length)
|
|
540
538
|
return i.response.data.details.map((o) => {
|
|
541
539
|
let l = e("errors.unexpected");
|
|
542
540
|
return o.messages && typeof o.messages == "object" && o.messages.length && (l = o.messages.join(", ")), o.field ? `${o.field} - ${l}` : l;
|
|
543
541
|
}).join("; ");
|
|
544
542
|
if (i.response.data.message) {
|
|
545
543
|
const { message: o } = i.response.data;
|
|
546
|
-
return Array.isArray(o) ? (
|
|
544
|
+
return Array.isArray(o) ? (a = o[0]) != null && a.constraints ? Object.values(o[0].constraints)[0] : o[0] : o;
|
|
547
545
|
}
|
|
548
546
|
if (typeof i.response.data == "string")
|
|
549
547
|
return i.response.data;
|
|
@@ -554,45 +552,45 @@ function Oa() {
|
|
|
554
552
|
}
|
|
555
553
|
};
|
|
556
554
|
}
|
|
557
|
-
function
|
|
555
|
+
function Fr(e) {
|
|
558
556
|
const i = window.location.origin, t = i.endsWith("/") ? i : `${i}/`;
|
|
559
557
|
try {
|
|
560
|
-
const
|
|
561
|
-
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(
|
|
562
|
-
return `${t}${
|
|
558
|
+
const r = e.join("/"), a = `${t}${r}`, o = e.some((l) => l.trim() === "");
|
|
559
|
+
if (/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(a) && !o && new URL(a))
|
|
560
|
+
return `${t}${r}`;
|
|
563
561
|
throw new Error("Invalid url");
|
|
564
|
-
} catch (
|
|
565
|
-
return console.warn("Failed to build valid URL:",
|
|
562
|
+
} catch (r) {
|
|
563
|
+
return console.warn("Failed to build valid URL:", r), "";
|
|
566
564
|
}
|
|
567
565
|
}
|
|
568
566
|
function si(e, i) {
|
|
569
|
-
const t = F(m(e)),
|
|
567
|
+
const t = F(m(e)), r = F(m(i)), a = x(
|
|
570
568
|
() => !!(t.value.app === "konnect" || t.value.isExactMatch)
|
|
571
569
|
), o = x(
|
|
572
|
-
() =>
|
|
570
|
+
() => r.value.startsWith("/") ? new URL(`${window.location.origin}${r.value}`) : new URL(r.value)
|
|
573
571
|
);
|
|
574
572
|
return (l) => {
|
|
575
573
|
const { page: n, pageSize: c, offset: d, sortColumnKey: f, sortColumnOrder: p, query: _ } = l;
|
|
576
574
|
try {
|
|
577
575
|
let h = new URL(o.value.href);
|
|
578
|
-
return
|
|
576
|
+
return a.value && _ ? (h.search = "", h = new URL(`${h.href}/${_}/`)) : (a.value || new URLSearchParams(_).forEach((I, k) => {
|
|
579
577
|
h.searchParams.append(k, I);
|
|
580
578
|
}), f && h.searchParams.append("sort_by", f), p === "desc" && h.searchParams.append("sort_desc", "1"), h.searchParams.append("size", String(c))), d && n !== 1 && h.searchParams.append("offset", String(d)), h.href;
|
|
581
579
|
} catch (h) {
|
|
582
|
-
return console.error("RouteList(fetcher)", h),
|
|
580
|
+
return console.error("RouteList(fetcher)", h), r.value;
|
|
583
581
|
}
|
|
584
582
|
};
|
|
585
583
|
}
|
|
586
|
-
function
|
|
587
|
-
const
|
|
584
|
+
function Nr(e, i, t = "data") {
|
|
585
|
+
const r = m(i), { axiosInstance: a } = bt({
|
|
588
586
|
headers: e.requestHeaders
|
|
589
|
-
}), o = si(e,
|
|
587
|
+
}), o = si(e, r), l = F({
|
|
590
588
|
status: Ae.Idle
|
|
591
589
|
});
|
|
592
590
|
return { fetcher: async (n) => {
|
|
593
591
|
try {
|
|
594
592
|
l.value = { status: Ae.Loading };
|
|
595
|
-
const c = o(n), { data: d } = await
|
|
593
|
+
const c = o(n), { data: d } = await a.get(c), f = t && t.replace(/[^\w-_]/gi, "");
|
|
596
594
|
let p;
|
|
597
595
|
d[f] && Array.isArray(d[f]) ? p = d[f] : p = Object.keys(d).length ? [d] : [];
|
|
598
596
|
const _ = {
|
|
@@ -625,10 +623,10 @@ function Na(e, i, t = "data") {
|
|
|
625
623
|
}
|
|
626
624
|
}, fetcherState: l };
|
|
627
625
|
}
|
|
628
|
-
function
|
|
629
|
-
const e = (t,
|
|
626
|
+
function Kr() {
|
|
627
|
+
const e = (t, r = "_") => t ? t.split(r).map((a) => a.toLowerCase() === "id" ? a.toUpperCase() : a.charAt(0).toUpperCase() + a.substring(1)).join(" ") : "", i = /(?:^|[\s-:'"])\w/g;
|
|
630
628
|
return {
|
|
631
|
-
capitalize: (t) => t ? t.replace(i, (
|
|
629
|
+
capitalize: (t) => t ? t.replace(i, (r) => r.toUpperCase()) : "",
|
|
632
630
|
convertKeyToTitle: e
|
|
633
631
|
};
|
|
634
632
|
}
|
|
@@ -642,25 +640,25 @@ const ci = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
642
640
|
}, Mt = (e) => e === "*" || e === "x" || e === "X", Et = (e) => {
|
|
643
641
|
const i = parseInt(e, 10);
|
|
644
642
|
return isNaN(i) ? e : i;
|
|
645
|
-
},
|
|
643
|
+
}, Lr = (e, i) => typeof e != typeof i ? [String(e), String(i)] : [e, i], qr = (e, i) => {
|
|
646
644
|
if (Mt(e) || Mt(i))
|
|
647
645
|
return 0;
|
|
648
|
-
const [t,
|
|
649
|
-
return t >
|
|
646
|
+
const [t, r] = Lr(Et(e), Et(i));
|
|
647
|
+
return t > r ? 1 : t < r ? -1 : 0;
|
|
650
648
|
}, jt = (e, i) => {
|
|
651
649
|
for (let t = 0; t < Math.max(e.length, i.length); t++) {
|
|
652
|
-
const
|
|
653
|
-
if (
|
|
654
|
-
return
|
|
650
|
+
const r = qr(e[t] || "0", i[t] || "0");
|
|
651
|
+
if (r !== 0)
|
|
652
|
+
return r;
|
|
655
653
|
}
|
|
656
654
|
return 0;
|
|
657
|
-
},
|
|
658
|
-
const t = $t(e),
|
|
659
|
-
return l !== 0 ? l :
|
|
655
|
+
}, Br = (e, i) => {
|
|
656
|
+
const t = $t(e), r = $t(i), a = t.pop(), o = r.pop(), l = jt(t, r);
|
|
657
|
+
return l !== 0 ? l : a && o ? jt(a.split("."), o.split(".")) : a || o ? a ? -1 : 1 : 0;
|
|
660
658
|
}, Vt = (e, i, t) => {
|
|
661
|
-
|
|
662
|
-
const
|
|
663
|
-
return ui[t].includes(
|
|
659
|
+
Pr(t);
|
|
660
|
+
const r = Br(e, i);
|
|
661
|
+
return ui[t].includes(r);
|
|
664
662
|
}, ui = {
|
|
665
663
|
">": [1],
|
|
666
664
|
">=": [0, 1],
|
|
@@ -668,67 +666,67 @@ const ci = /^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-(
|
|
|
668
666
|
"<=": [-1, 0],
|
|
669
667
|
"<": [-1],
|
|
670
668
|
"!=": [-1, 1]
|
|
671
|
-
}, Ot = Object.keys(ui),
|
|
669
|
+
}, Ot = Object.keys(ui), Pr = (e) => {
|
|
672
670
|
if (typeof e != "string")
|
|
673
671
|
throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);
|
|
674
672
|
if (Ot.indexOf(e) === -1)
|
|
675
673
|
throw new Error(`Invalid operator, expected one of ${Ot.join("|")}`);
|
|
676
|
-
},
|
|
677
|
-
function
|
|
674
|
+
}, Ur = (e) => typeof e == "string" && /^[v\d]/.test(e) && ci.test(e);
|
|
675
|
+
function Rr(e) {
|
|
678
676
|
const { gatewayInfo: i, supportedRange: t } = e;
|
|
679
677
|
if (!i)
|
|
680
678
|
return !0;
|
|
681
|
-
const { edition:
|
|
682
|
-
if (!
|
|
679
|
+
const { edition: r, version: a } = i;
|
|
680
|
+
if (!Ur(a))
|
|
683
681
|
return console.error("Invalid version"), !1;
|
|
684
|
-
const o = t[
|
|
682
|
+
const o = t[r];
|
|
685
683
|
if (!o)
|
|
686
684
|
return !1;
|
|
687
685
|
const [l, n] = o;
|
|
688
|
-
return !(l && Vt(
|
|
686
|
+
return !(l && Vt(a, l, "<") || n && Vt(a, n, ">"));
|
|
689
687
|
}
|
|
690
|
-
function
|
|
691
|
-
const i = F(0), t = F(0),
|
|
692
|
-
return we(e, (
|
|
693
|
-
|
|
688
|
+
function Dr(e) {
|
|
689
|
+
const i = F(0), t = F(0), r = F(!1);
|
|
690
|
+
return we(e, (a) => {
|
|
691
|
+
a && !r.value && (i.value = a.offsetWidth, t.value = a.scrollWidth, r.value = !0);
|
|
694
692
|
}), {
|
|
695
693
|
isTruncated: x(() => i.value < t.value)
|
|
696
694
|
};
|
|
697
695
|
}
|
|
698
696
|
const ce = {
|
|
699
697
|
useAxios: bt,
|
|
700
|
-
useDebouncedFilter:
|
|
701
|
-
useDeleteUrlBuilder:
|
|
702
|
-
useErrors:
|
|
703
|
-
useExternalLinkCreator:
|
|
704
|
-
useFetcher:
|
|
698
|
+
useDebouncedFilter: jr,
|
|
699
|
+
useDeleteUrlBuilder: Vr,
|
|
700
|
+
useErrors: Or,
|
|
701
|
+
useExternalLinkCreator: Fr,
|
|
702
|
+
useFetcher: Nr,
|
|
705
703
|
useFetchUrlBuilder: si,
|
|
706
704
|
useHelpers: li,
|
|
707
|
-
useStringHelpers:
|
|
705
|
+
useStringHelpers: Kr,
|
|
708
706
|
useI18n: _t,
|
|
709
|
-
useGatewayFeatureSupported:
|
|
710
|
-
useTruncationDetector:
|
|
711
|
-
},
|
|
707
|
+
useGatewayFeatureSupported: Rr,
|
|
708
|
+
useTruncationDetector: Dr
|
|
709
|
+
}, Hr = {
|
|
712
710
|
fail: "Failed to copy id to clipboard",
|
|
713
711
|
success: {
|
|
714
712
|
prefix: "Successfully",
|
|
715
713
|
content: " copied to clipboard"
|
|
716
714
|
}
|
|
717
|
-
},
|
|
718
|
-
message:
|
|
719
|
-
iconTitle:
|
|
720
|
-
},
|
|
715
|
+
}, zr = "Copy to clipboard", Gr = {
|
|
716
|
+
message: Hr,
|
|
717
|
+
iconTitle: zr
|
|
718
|
+
}, Jr = "kong-ui-copy-uuid-notify", Ft = "24px", Wr = (e, i) => {
|
|
721
719
|
const t = e.__vccOpts || e;
|
|
722
|
-
for (const [
|
|
723
|
-
t[
|
|
720
|
+
for (const [r, a] of i)
|
|
721
|
+
t[r] = a;
|
|
724
722
|
return t;
|
|
725
|
-
},
|
|
723
|
+
}, Yr = (e) => (ri("data-v-9971cc79"), e = e(), ai(), e), Zr = ["aria-hidden"], Qr = {
|
|
726
724
|
key: 0,
|
|
727
725
|
"data-testid": "kui-icon-svg-title"
|
|
728
|
-
},
|
|
726
|
+
}, Xr = /* @__PURE__ */ Yr(() => /* @__PURE__ */ O("path", {
|
|
729
727
|
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",
|
|
730
728
|
fill: "currentColor"
|
|
731
|
-
}, null, -1)),
|
|
729
|
+
}, null, -1)), ea = /* @__PURE__ */ ae({
|
|
732
730
|
__name: "CopyIcon",
|
|
733
731
|
props: {
|
|
734
732
|
/** The accessibility text provided to screen readers */
|
|
@@ -784,12 +782,12 @@ const ce = {
|
|
|
784
782
|
if (typeof i.size == "number" && i.size > 0)
|
|
785
783
|
return `${i.size}px`;
|
|
786
784
|
if (typeof i.size == "string") {
|
|
787
|
-
const
|
|
785
|
+
const a = String(i.size).replace(/px/gi, ""), o = Number(a);
|
|
788
786
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
789
787
|
return `${o}px`;
|
|
790
788
|
}
|
|
791
789
|
return Ft;
|
|
792
|
-
}),
|
|
790
|
+
}), r = x(() => ({
|
|
793
791
|
boxSizing: "border-box",
|
|
794
792
|
color: i.color,
|
|
795
793
|
display: i.display,
|
|
@@ -797,11 +795,11 @@ const ce = {
|
|
|
797
795
|
lineHeight: "0",
|
|
798
796
|
width: t.value
|
|
799
797
|
}));
|
|
800
|
-
return (
|
|
798
|
+
return (a, o) => (b(), R(Ke(e.as), {
|
|
801
799
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
802
800
|
class: "kui-icon copy-icon",
|
|
803
801
|
"data-testid": "kui-icon-wrapper-copy-icon",
|
|
804
|
-
style: ii(
|
|
802
|
+
style: ii(r.value)
|
|
805
803
|
}, {
|
|
806
804
|
default: y(() => [
|
|
807
805
|
(b(), $("svg", {
|
|
@@ -814,14 +812,14 @@ const ce = {
|
|
|
814
812
|
width: "100%",
|
|
815
813
|
xmlns: "http://www.w3.org/2000/svg"
|
|
816
814
|
}, [
|
|
817
|
-
e.title ? (b(), $("title",
|
|
818
|
-
|
|
819
|
-
], 8,
|
|
815
|
+
e.title ? (b(), $("title", Qr, j(e.title), 1)) : H("", !0),
|
|
816
|
+
Xr
|
|
817
|
+
], 8, Zr))
|
|
820
818
|
]),
|
|
821
819
|
_: 1
|
|
822
820
|
}, 8, ["aria-hidden", "style"]));
|
|
823
821
|
}
|
|
824
|
-
}),
|
|
822
|
+
}), ta = /* @__PURE__ */ Wr(ea, [["__scopeId", "data-v-9971cc79"]]), ia = "16px", ra = { class: "kong-ui-copy-uuid" }, aa = ["onClick"], Nt = 15, oa = /* @__PURE__ */ ae({
|
|
825
823
|
__name: "CopyUuid",
|
|
826
824
|
props: {
|
|
827
825
|
uuid: {
|
|
@@ -865,7 +863,7 @@ const ce = {
|
|
|
865
863
|
},
|
|
866
864
|
emits: ["success", "error"],
|
|
867
865
|
setup(e, { emit: i }) {
|
|
868
|
-
const t = e, { t:
|
|
866
|
+
const t = e, { t: r } = ht("en-us", Gr), a = t.notify || lr(Jr, () => {
|
|
869
867
|
}), o = x(() => t.idTooltip ? {
|
|
870
868
|
label: t.idTooltip,
|
|
871
869
|
positionFixed: !0,
|
|
@@ -887,21 +885,21 @@ const ce = {
|
|
|
887
885
|
}, p = (_) => {
|
|
888
886
|
var h, I;
|
|
889
887
|
if (!_(t.uuid)) {
|
|
890
|
-
typeof
|
|
888
|
+
typeof a == "function" && a({
|
|
891
889
|
type: "error",
|
|
892
|
-
message:
|
|
893
|
-
}), l.value ? f(
|
|
890
|
+
message: r("message.fail")
|
|
891
|
+
}), l.value ? f(r("message.fail")) : i("error", t.uuid);
|
|
894
892
|
return;
|
|
895
893
|
}
|
|
896
|
-
const k = ((h = t.uuid) == null ? void 0 : h.length) > Nt, v = t.format === "hidden" || t.format === "redacted" ?
|
|
897
|
-
typeof
|
|
894
|
+
const k = ((h = t.uuid) == null ? void 0 : h.length) > Nt, v = t.format === "hidden" || t.format === "redacted" ? r("message.success.prefix") : `"${((I = t.uuid) == null ? void 0 : I.substring(0, Nt)) + (k ? "..." : "")}"`;
|
|
895
|
+
typeof a == "function" && a({
|
|
898
896
|
type: "success",
|
|
899
|
-
message: `${v}${
|
|
897
|
+
message: `${v}${r("message.success.content")}`
|
|
900
898
|
}), l.value ? f(t.successTooltip) : i("success", t.uuid);
|
|
901
899
|
};
|
|
902
900
|
return (_, h) => {
|
|
903
901
|
const I = L("KClipboardProvider");
|
|
904
|
-
return b(), $("div",
|
|
902
|
+
return b(), $("div", ra, [
|
|
905
903
|
e.format !== "hidden" ? (b(), R(Ke(e.idTooltip ? "KTooltip" : "div"), ct({ key: 0 }, o.value, { "data-testid": "copy-id" }), {
|
|
906
904
|
default: y(() => [
|
|
907
905
|
O("div", {
|
|
@@ -924,14 +922,14 @@ const ce = {
|
|
|
924
922
|
tabindex: "0",
|
|
925
923
|
onClick: Ne((v) => p(k), ["stop"])
|
|
926
924
|
}, [
|
|
927
|
-
S(m(
|
|
925
|
+
S(m(ta), {
|
|
928
926
|
class: "uuid-icon",
|
|
929
927
|
color: e.iconColor,
|
|
930
928
|
decorative: !!e.tooltip,
|
|
931
|
-
size: m(
|
|
932
|
-
title: m(
|
|
929
|
+
size: m(ia),
|
|
930
|
+
title: m(r)("iconTitle")
|
|
933
931
|
}, null, 8, ["color", "decorative", "size", "title"])
|
|
934
|
-
], 8,
|
|
932
|
+
], 8, aa)
|
|
935
933
|
]),
|
|
936
934
|
_: 1
|
|
937
935
|
})
|
|
@@ -941,15 +939,15 @@ const ce = {
|
|
|
941
939
|
]);
|
|
942
940
|
};
|
|
943
941
|
}
|
|
944
|
-
}),
|
|
942
|
+
}), na = (e, i) => {
|
|
945
943
|
const t = e.__vccOpts || e;
|
|
946
|
-
for (const [
|
|
947
|
-
t[
|
|
944
|
+
for (const [r, a] of i)
|
|
945
|
+
t[r] = a;
|
|
948
946
|
return t;
|
|
949
|
-
}, di = /* @__PURE__ */
|
|
947
|
+
}, di = /* @__PURE__ */ na(oa, [["__scopeId", "data-v-0c07874b"]]), la = {
|
|
950
948
|
key: 0,
|
|
951
949
|
class: "config-card-fieldset-title"
|
|
952
|
-
},
|
|
950
|
+
}, sa = /* @__PURE__ */ ae({
|
|
953
951
|
__name: "JsonCardItem",
|
|
954
952
|
props: {
|
|
955
953
|
item: {
|
|
@@ -966,25 +964,25 @@ const ce = {
|
|
|
966
964
|
}
|
|
967
965
|
},
|
|
968
966
|
setup(e) {
|
|
969
|
-
const i = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle:
|
|
967
|
+
const i = e, { i18n: { t } } = ce.useI18n(), { convertKeyToTitle: r } = ce.useStringHelpers(), a = x(() => i.item.key ?? "json-array-item"), o = x(() => i.item.value ?? i.item), l = x(() => {
|
|
970
968
|
const c = JSON.parse(JSON.stringify(o.value));
|
|
971
969
|
return i.isArrayItem && delete c.name, c;
|
|
972
970
|
}), n = x(() => {
|
|
973
971
|
var c;
|
|
974
|
-
return i.isArrayItem ? (c = o.value) != null && c.name ?
|
|
972
|
+
return i.isArrayItem ? (c = o.value) != null && c.name ? r(o.value.name, "_") : t("baseConfigCard.general.entryTitle", { index: i.index }) : "";
|
|
975
973
|
});
|
|
976
974
|
return (c, d) => (b(), R(Ke(e.isArrayItem ? "fieldset" : "div"), {
|
|
977
975
|
class: $e(e.isArrayItem ? "config-card-fieldset" : "config-card-json-item")
|
|
978
976
|
}, {
|
|
979
977
|
default: y(() => [
|
|
980
|
-
e.isArrayItem ? (b(), $("legend",
|
|
978
|
+
e.isArrayItem ? (b(), $("legend", la, [
|
|
981
979
|
O("b", null, j(n.value), 1)
|
|
982
980
|
])) : H("", !0),
|
|
983
981
|
(b(!0), $(he, null, ve(Object.keys(l.value), (f, p) => (b(), R(wt, {
|
|
984
|
-
key: `${
|
|
982
|
+
key: `${a.value}-property-${p}`,
|
|
985
983
|
item: {
|
|
986
984
|
key: f,
|
|
987
|
-
label: m(
|
|
985
|
+
label: m(r)(f),
|
|
988
986
|
value: l.value[f]
|
|
989
987
|
}
|
|
990
988
|
}, null, 8, ["item"]))), 128))
|
|
@@ -994,10 +992,10 @@ const ce = {
|
|
|
994
992
|
}
|
|
995
993
|
}), be = (e, i) => {
|
|
996
994
|
const t = e.__vccOpts || e;
|
|
997
|
-
for (const [
|
|
998
|
-
t[
|
|
995
|
+
for (const [r, a] of i)
|
|
996
|
+
t[r] = a;
|
|
999
997
|
return t;
|
|
1000
|
-
}, pi = /* @__PURE__ */ be(
|
|
998
|
+
}, pi = /* @__PURE__ */ be(sa, [["__scopeId", "data-v-68ca83ec"]]), ca = /* @__PURE__ */ ae({
|
|
1001
999
|
__name: "InternalLinkItem",
|
|
1002
1000
|
props: {
|
|
1003
1001
|
item: {
|
|
@@ -1008,13 +1006,13 @@ const ce = {
|
|
|
1008
1006
|
emits: ["navigation-click"],
|
|
1009
1007
|
setup(e) {
|
|
1010
1008
|
const { i18n: { t: i } } = ce.useI18n();
|
|
1011
|
-
return (t,
|
|
1012
|
-
const
|
|
1009
|
+
return (t, r) => {
|
|
1010
|
+
const a = L("KButton");
|
|
1013
1011
|
return b(), $("div", null, [
|
|
1014
|
-
S(
|
|
1012
|
+
S(a, {
|
|
1015
1013
|
appearance: "tertiary",
|
|
1016
1014
|
class: "navigation-button",
|
|
1017
|
-
onClick:
|
|
1015
|
+
onClick: r[0] || (r[0] = (o) => t.$emit("navigation-click", e.item))
|
|
1018
1016
|
}, {
|
|
1019
1017
|
default: y(() => [
|
|
1020
1018
|
J(j(e.item.value || m(i)("baseConfigCard.commonFields.link")), 1)
|
|
@@ -1024,7 +1022,7 @@ const ce = {
|
|
|
1024
1022
|
]);
|
|
1025
1023
|
};
|
|
1026
1024
|
}
|
|
1027
|
-
}),
|
|
1025
|
+
}), ua = /* @__PURE__ */ be(ca, [["__scopeId", "data-v-c96811e5"]]), da = /* @__PURE__ */ ae({
|
|
1028
1026
|
__name: "StatusBadge",
|
|
1029
1027
|
props: {
|
|
1030
1028
|
status: {
|
|
@@ -1034,9 +1032,9 @@ const ce = {
|
|
|
1034
1032
|
},
|
|
1035
1033
|
setup(e) {
|
|
1036
1034
|
const { i18n: { t: i } } = ce.useI18n();
|
|
1037
|
-
return (t,
|
|
1038
|
-
const
|
|
1039
|
-
return b(), R(
|
|
1035
|
+
return (t, r) => {
|
|
1036
|
+
const a = L("KBadge");
|
|
1037
|
+
return b(), R(a, {
|
|
1040
1038
|
appearance: e.status ? "success" : "neutral"
|
|
1041
1039
|
}, {
|
|
1042
1040
|
default: y(() => [
|
|
@@ -1046,11 +1044,11 @@ const ce = {
|
|
|
1046
1044
|
}, 8, ["appearance"]);
|
|
1047
1045
|
};
|
|
1048
1046
|
}
|
|
1049
|
-
}),
|
|
1047
|
+
}), pa = "#0044f4", fa = "#e0e4ea", ma = "#3a3f51", ga = "1px", ya = "20px", va = { class: "config-card-details-row" }, ha = ["data-testid"], ba = ["data-testid"], _a = ["data-testid"], wa = ["data-testid"], ka = { key: 1 }, Ca = ["data-testid"], Sa = ["data-testid"], Ia = ["data-testid"], Aa = ["data-testid"], xa = {
|
|
1050
1048
|
name: "ConfigCardItem",
|
|
1051
|
-
components: { CopyUuid: di, JsonCardItem: pi, StatusBadge:
|
|
1052
|
-
},
|
|
1053
|
-
...
|
|
1049
|
+
components: { CopyUuid: di, JsonCardItem: pi, StatusBadge: da, InternalLinkItem: ua }
|
|
1050
|
+
}, Ta = /* @__PURE__ */ ae({
|
|
1051
|
+
...xa,
|
|
1054
1052
|
props: {
|
|
1055
1053
|
item: {
|
|
1056
1054
|
type: Object,
|
|
@@ -1070,21 +1068,21 @@ const ce = {
|
|
|
1070
1068
|
emits: ["navigation-click"],
|
|
1071
1069
|
setup(e, { emit: i }) {
|
|
1072
1070
|
const t = e;
|
|
1073
|
-
|
|
1074
|
-
"
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1071
|
+
rr((h) => ({
|
|
1072
|
+
"1df60db4": d.value ? "none" : `solid ${m(ga)} ${m(fa)}`,
|
|
1073
|
+
"21d1d34e": c.value && l.value ? "block" : "flex",
|
|
1074
|
+
"4d3dc7e7": c.value && l.value ? "100%" : t.slim ? "50%" : "25%",
|
|
1075
|
+
"4d400dc2": c.value && l.value ? "100%" : t.slim ? "50%" : "75%"
|
|
1078
1076
|
}));
|
|
1079
|
-
const
|
|
1077
|
+
const r = tt(), { i18n: { t: a, formatUnixTimeStamp: o } } = ce.useI18n(), l = x(() => t.item.value !== void 0 && t.item.value !== null && t.item.value !== ""), n = x(() => !!(t.item.tooltip || r["label-tooltip"])), c = x(() => t.item.type === te.Json || t.item.type === te.JsonArray), d = x(() => t.item.type === te.JsonArray), f = x(() => {
|
|
1080
1078
|
switch (t.item.type) {
|
|
1081
1079
|
case te.ID:
|
|
1082
1080
|
return {
|
|
1083
1081
|
tag: "CopyUuid",
|
|
1084
1082
|
attrs: {
|
|
1085
1083
|
"data-testid": `${t.item.key}-copy-uuid`,
|
|
1086
|
-
"success-tooltip":
|
|
1087
|
-
tooltip:
|
|
1084
|
+
"success-tooltip": a("baseConfigCard.copy.success"),
|
|
1085
|
+
tooltip: a("baseConfigCard.copy.tooltip", { label: t.item.label }),
|
|
1088
1086
|
truncated: !1,
|
|
1089
1087
|
uuid: t.item.value,
|
|
1090
1088
|
notify: () => {
|
|
@@ -1096,8 +1094,8 @@ const ce = {
|
|
|
1096
1094
|
tag: "div",
|
|
1097
1095
|
additionalComponent: "CopyUuid",
|
|
1098
1096
|
childAttrs: {
|
|
1099
|
-
"success-tooltip":
|
|
1100
|
-
tooltip:
|
|
1097
|
+
"success-tooltip": a("baseConfigCard.copy.success"),
|
|
1098
|
+
tooltip: a("baseConfigCard.copy.tooltip", { label: t.item.label }),
|
|
1101
1099
|
truncated: !1,
|
|
1102
1100
|
notify: () => {
|
|
1103
1101
|
}
|
|
@@ -1109,8 +1107,8 @@ const ce = {
|
|
|
1109
1107
|
attrs: {
|
|
1110
1108
|
"data-testid": `${t.item.key}-copy-uuid-redacted`,
|
|
1111
1109
|
format: "redacted",
|
|
1112
|
-
"success-tooltip":
|
|
1113
|
-
tooltip:
|
|
1110
|
+
"success-tooltip": a("baseConfigCard.copy.success"),
|
|
1111
|
+
tooltip: a("baseConfigCard.copy.tooltip", { label: t.item.label }),
|
|
1114
1112
|
truncated: !1,
|
|
1115
1113
|
uuid: t.item.value,
|
|
1116
1114
|
notify: () => {
|
|
@@ -1123,8 +1121,8 @@ const ce = {
|
|
|
1123
1121
|
additionalComponent: "CopyUuid",
|
|
1124
1122
|
childAttrs: {
|
|
1125
1123
|
format: "redacted",
|
|
1126
|
-
"success-tooltip":
|
|
1127
|
-
tooltip:
|
|
1124
|
+
"success-tooltip": a("baseConfigCard.copy.success"),
|
|
1125
|
+
tooltip: a("baseConfigCard.copy.tooltip", { label: t.item.label }),
|
|
1128
1126
|
truncated: !1,
|
|
1129
1127
|
notify: () => {
|
|
1130
1128
|
}
|
|
@@ -1205,7 +1203,7 @@ const ce = {
|
|
|
1205
1203
|
}), p = F(), { isTruncated: _ } = ce.useTruncationDetector(p);
|
|
1206
1204
|
return (h, I) => {
|
|
1207
1205
|
const k = L("KLabel"), v = L("KBadge"), T = L("KMethodBadge"), s = L("KTooltip");
|
|
1208
|
-
return b(), $("div",
|
|
1206
|
+
return b(), $("div", va, [
|
|
1209
1207
|
O("div", {
|
|
1210
1208
|
class: "config-card-details-label",
|
|
1211
1209
|
"data-testid": `${e.item.key}-label`
|
|
@@ -1226,13 +1224,13 @@ const ce = {
|
|
|
1226
1224
|
Q(h.$slots, "label-tooltip", {}, () => [
|
|
1227
1225
|
J(j(e.item.tooltip), 1)
|
|
1228
1226
|
], !0)
|
|
1229
|
-
], 8,
|
|
1227
|
+
], 8, ba)
|
|
1230
1228
|
]),
|
|
1231
1229
|
key: "0"
|
|
1232
1230
|
} : void 0
|
|
1233
1231
|
]), 1024)
|
|
1234
1232
|
], !0)
|
|
1235
|
-
], 8,
|
|
1233
|
+
], 8, ha),
|
|
1236
1234
|
O("div", {
|
|
1237
1235
|
class: "config-card-details-value",
|
|
1238
1236
|
"data-testid": `${e.item.key}-property-value`
|
|
@@ -1240,8 +1238,8 @@ const ce = {
|
|
|
1240
1238
|
Q(h.$slots, e.item.key, {
|
|
1241
1239
|
rowValue: e.item.value
|
|
1242
1240
|
}, () => [
|
|
1243
|
-
l.value ? (b(), $("div",
|
|
1244
|
-
(b(), R(Ke(f.value.tag),
|
|
1241
|
+
l.value ? (b(), $("div", ka, [
|
|
1242
|
+
(b(), R(Ke(f.value.tag), ar(or(f.value.attrs)), {
|
|
1245
1243
|
default: y(() => [
|
|
1246
1244
|
f.value.additionalComponent === "KBadge" ? (b(), $("div", {
|
|
1247
1245
|
key: 0,
|
|
@@ -1258,7 +1256,7 @@ const ce = {
|
|
|
1258
1256
|
]),
|
|
1259
1257
|
_: 2
|
|
1260
1258
|
}, 1032, ["data-testid", "truncation-tooltip"]))), 128))
|
|
1261
|
-
], 8,
|
|
1259
|
+
], 8, Ca)) : H("", !0),
|
|
1262
1260
|
f.value.additionalComponent === "CopyUuid" ? (b(), $("div", {
|
|
1263
1261
|
key: 1,
|
|
1264
1262
|
class: "copy-uuid-array",
|
|
@@ -1269,7 +1267,7 @@ const ce = {
|
|
|
1269
1267
|
"data-testid": `${e.item.key}-copy-uuid-${C}`,
|
|
1270
1268
|
uuid: E
|
|
1271
1269
|
}), null, 16, ["data-testid", "uuid"]))), 128))
|
|
1272
|
-
], 8,
|
|
1270
|
+
], 8, Sa)) : f.value.additionalComponent === "KMethodBadge" ? (b(), $("div", {
|
|
1273
1271
|
key: 2,
|
|
1274
1272
|
class: "method-badge-array",
|
|
1275
1273
|
"data-testid": `${e.item.key}-badge-methods`
|
|
@@ -1280,14 +1278,14 @@ const ce = {
|
|
|
1280
1278
|
"data-testid": `${e.item.key}-badge-method-${C}`,
|
|
1281
1279
|
"is-rounded": "",
|
|
1282
1280
|
label: E,
|
|
1283
|
-
method: m(
|
|
1281
|
+
method: m(cr).includes(E.toLowerCase()) ? E.toLowerCase() : "custom"
|
|
1284
1282
|
}, {
|
|
1285
1283
|
default: y(() => [
|
|
1286
1284
|
J(j(E), 1)
|
|
1287
1285
|
]),
|
|
1288
1286
|
_: 2
|
|
1289
1287
|
}, 1032, ["data-testid", "label", "method"]))), 128))
|
|
1290
|
-
], 8,
|
|
1288
|
+
], 8, Ia)) : H("", !0),
|
|
1291
1289
|
f.value.additionalComponent === "JsonCardItem" ? (b(), $("div", {
|
|
1292
1290
|
key: 3,
|
|
1293
1291
|
"data-testid": `${t.item.key}-json-array-content`
|
|
@@ -1298,7 +1296,7 @@ const ce = {
|
|
|
1298
1296
|
"is-array-item": "",
|
|
1299
1297
|
item: E
|
|
1300
1298
|
}, null, 8, ["index", "item"]))), 128))
|
|
1301
|
-
], 8,
|
|
1299
|
+
], 8, Aa)) : (b(), R(s, {
|
|
1302
1300
|
key: 4,
|
|
1303
1301
|
label: m(_) ? e.item.value : ""
|
|
1304
1302
|
}, {
|
|
@@ -1317,52 +1315,52 @@ const ce = {
|
|
|
1317
1315
|
])) : (b(), $("div", {
|
|
1318
1316
|
key: 0,
|
|
1319
1317
|
"data-testid": `${e.item.key}-no-value`
|
|
1320
|
-
}, " – ", 8,
|
|
1318
|
+
}, " – ", 8, wa))
|
|
1321
1319
|
], !0)
|
|
1322
|
-
], 8,
|
|
1320
|
+
], 8, _a)
|
|
1323
1321
|
]);
|
|
1324
1322
|
};
|
|
1325
1323
|
}
|
|
1326
|
-
}), wt = /* @__PURE__ */ be(
|
|
1324
|
+
}), wt = /* @__PURE__ */ be(Ta, [["__scopeId", "data-v-307ab96d"]]);
|
|
1327
1325
|
/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */
|
|
1328
1326
|
function fi(e) {
|
|
1329
1327
|
return typeof e > "u" || e === null;
|
|
1330
1328
|
}
|
|
1331
|
-
function $
|
|
1329
|
+
function $a(e) {
|
|
1332
1330
|
return typeof e == "object" && e !== null;
|
|
1333
1331
|
}
|
|
1334
|
-
function
|
|
1332
|
+
function Ma(e) {
|
|
1335
1333
|
return Array.isArray(e) ? e : fi(e) ? [] : [e];
|
|
1336
1334
|
}
|
|
1337
|
-
function
|
|
1338
|
-
var t,
|
|
1335
|
+
function Ea(e, i) {
|
|
1336
|
+
var t, r, a, o;
|
|
1339
1337
|
if (i)
|
|
1340
|
-
for (o = Object.keys(i), t = 0,
|
|
1341
|
-
|
|
1338
|
+
for (o = Object.keys(i), t = 0, r = o.length; t < r; t += 1)
|
|
1339
|
+
a = o[t], e[a] = i[a];
|
|
1342
1340
|
return e;
|
|
1343
1341
|
}
|
|
1344
|
-
function
|
|
1345
|
-
var t = "",
|
|
1346
|
-
for (
|
|
1342
|
+
function ja(e, i) {
|
|
1343
|
+
var t = "", r;
|
|
1344
|
+
for (r = 0; r < i; r += 1)
|
|
1347
1345
|
t += e;
|
|
1348
1346
|
return t;
|
|
1349
1347
|
}
|
|
1350
|
-
function
|
|
1348
|
+
function Va(e) {
|
|
1351
1349
|
return e === 0 && Number.NEGATIVE_INFINITY === 1 / e;
|
|
1352
1350
|
}
|
|
1353
|
-
var
|
|
1354
|
-
isNothing:
|
|
1355
|
-
isObject:
|
|
1356
|
-
toArray:
|
|
1357
|
-
repeat:
|
|
1358
|
-
isNegativeZero:
|
|
1359
|
-
extend:
|
|
1351
|
+
var Oa = fi, Fa = $a, Na = Ma, Ka = ja, La = Va, qa = Ea, se = {
|
|
1352
|
+
isNothing: Oa,
|
|
1353
|
+
isObject: Fa,
|
|
1354
|
+
toArray: Na,
|
|
1355
|
+
repeat: Ka,
|
|
1356
|
+
isNegativeZero: La,
|
|
1357
|
+
extend: qa
|
|
1360
1358
|
};
|
|
1361
1359
|
function mi(e, i) {
|
|
1362
|
-
var t = "",
|
|
1360
|
+
var t = "", r = e.reason || "(unknown reason)";
|
|
1363
1361
|
return e.mark ? (e.mark.name && (t += 'in "' + e.mark.name + '" '), t += "(" + (e.mark.line + 1) + ":" + (e.mark.column + 1) + ")", !i && e.mark.snippet && (t += `
|
|
1364
1362
|
|
|
1365
|
-
` + e.mark.snippet),
|
|
1363
|
+
` + e.mark.snippet), r + " " + t) : r;
|
|
1366
1364
|
}
|
|
1367
1365
|
function Ue(e, i) {
|
|
1368
1366
|
Error.call(this), this.name = "YAMLException", this.reason = e, this.mark = i, this.message = mi(this, !1), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack || "";
|
|
@@ -1373,48 +1371,48 @@ Ue.prototype.toString = function(e) {
|
|
|
1373
1371
|
return this.name + ": " + mi(this, e);
|
|
1374
1372
|
};
|
|
1375
1373
|
var ge = Ue;
|
|
1376
|
-
function nt(e, i, t,
|
|
1377
|
-
var o = "", l = "", n = Math.floor(
|
|
1378
|
-
return
|
|
1374
|
+
function nt(e, i, t, r, a) {
|
|
1375
|
+
var o = "", l = "", n = Math.floor(a / 2) - 1;
|
|
1376
|
+
return r - i > n && (o = " ... ", i = r - n + o.length), t - r > n && (l = " ...", t = r + n - l.length), {
|
|
1379
1377
|
str: o + e.slice(i, t).replace(/\t/g, "→") + l,
|
|
1380
|
-
pos:
|
|
1378
|
+
pos: r - i + o.length
|
|
1381
1379
|
// relative position
|
|
1382
1380
|
};
|
|
1383
1381
|
}
|
|
1384
1382
|
function lt(e, i) {
|
|
1385
1383
|
return se.repeat(" ", i - e.length) + e;
|
|
1386
1384
|
}
|
|
1387
|
-
function
|
|
1385
|
+
function Ba(e, i) {
|
|
1388
1386
|
if (i = Object.create(i || null), !e.buffer)
|
|
1389
1387
|
return null;
|
|
1390
1388
|
i.maxLength || (i.maxLength = 79), typeof i.indent != "number" && (i.indent = 1), typeof i.linesBefore != "number" && (i.linesBefore = 3), typeof i.linesAfter != "number" && (i.linesAfter = 2);
|
|
1391
|
-
for (var t = /\r?\n|\r|\0/g,
|
|
1392
|
-
|
|
1393
|
-
l < 0 && (l =
|
|
1394
|
-
var n = "", c, d, f = Math.min(e.line + i.linesAfter,
|
|
1389
|
+
for (var t = /\r?\n|\r|\0/g, r = [0], a = [], o, l = -1; o = t.exec(e.buffer); )
|
|
1390
|
+
a.push(o.index), r.push(o.index + o[0].length), e.position <= o.index && l < 0 && (l = r.length - 2);
|
|
1391
|
+
l < 0 && (l = r.length - 1);
|
|
1392
|
+
var n = "", c, d, f = Math.min(e.line + i.linesAfter, a.length).toString().length, p = i.maxLength - (i.indent + f + 3);
|
|
1395
1393
|
for (c = 1; c <= i.linesBefore && !(l - c < 0); c++)
|
|
1396
1394
|
d = nt(
|
|
1397
1395
|
e.buffer,
|
|
1398
|
-
a[l - c],
|
|
1399
1396
|
r[l - c],
|
|
1400
|
-
|
|
1397
|
+
a[l - c],
|
|
1398
|
+
e.position - (r[l] - r[l - c]),
|
|
1401
1399
|
p
|
|
1402
1400
|
), n = se.repeat(" ", i.indent) + lt((e.line - c + 1).toString(), f) + " | " + d.str + `
|
|
1403
1401
|
` + n;
|
|
1404
|
-
for (d = nt(e.buffer,
|
|
1402
|
+
for (d = nt(e.buffer, r[l], a[l], e.position, p), n += se.repeat(" ", i.indent) + lt((e.line + 1).toString(), f) + " | " + d.str + `
|
|
1405
1403
|
`, n += se.repeat("-", i.indent + f + 3 + d.pos) + `^
|
|
1406
|
-
`, c = 1; c <= i.linesAfter && !(l + c >=
|
|
1404
|
+
`, c = 1; c <= i.linesAfter && !(l + c >= a.length); c++)
|
|
1407
1405
|
d = nt(
|
|
1408
1406
|
e.buffer,
|
|
1409
|
-
a[l + c],
|
|
1410
1407
|
r[l + c],
|
|
1411
|
-
|
|
1408
|
+
a[l + c],
|
|
1409
|
+
e.position - (r[l] - r[l + c]),
|
|
1412
1410
|
p
|
|
1413
1411
|
), n += se.repeat(" ", i.indent) + lt((e.line + c + 1).toString(), f) + " | " + d.str + `
|
|
1414
1412
|
`;
|
|
1415
1413
|
return n.replace(/\n$/, "");
|
|
1416
1414
|
}
|
|
1417
|
-
var
|
|
1415
|
+
var Pa = Ba, Ua = [
|
|
1418
1416
|
"kind",
|
|
1419
1417
|
"multi",
|
|
1420
1418
|
"resolve",
|
|
@@ -1425,41 +1423,41 @@ var Pr = Br, Ur = [
|
|
|
1425
1423
|
"representName",
|
|
1426
1424
|
"defaultStyle",
|
|
1427
1425
|
"styleAliases"
|
|
1428
|
-
],
|
|
1426
|
+
], Ra = [
|
|
1429
1427
|
"scalar",
|
|
1430
1428
|
"sequence",
|
|
1431
1429
|
"mapping"
|
|
1432
1430
|
];
|
|
1433
|
-
function
|
|
1431
|
+
function Da(e) {
|
|
1434
1432
|
var i = {};
|
|
1435
1433
|
return e !== null && Object.keys(e).forEach(function(t) {
|
|
1436
|
-
e[t].forEach(function(
|
|
1437
|
-
i[String(
|
|
1434
|
+
e[t].forEach(function(r) {
|
|
1435
|
+
i[String(r)] = t;
|
|
1438
1436
|
});
|
|
1439
1437
|
}), i;
|
|
1440
1438
|
}
|
|
1441
|
-
function
|
|
1439
|
+
function Ha(e, i) {
|
|
1442
1440
|
if (i = i || {}, Object.keys(i).forEach(function(t) {
|
|
1443
|
-
if (
|
|
1441
|
+
if (Ua.indexOf(t) === -1)
|
|
1444
1442
|
throw new ge('Unknown option "' + t + '" is met in definition of "' + e + '" YAML type.');
|
|
1445
1443
|
}), this.options = i, this.tag = e, this.kind = i.kind || null, this.resolve = i.resolve || function() {
|
|
1446
1444
|
return !0;
|
|
1447
1445
|
}, this.construct = i.construct || function(t) {
|
|
1448
1446
|
return t;
|
|
1449
|
-
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases =
|
|
1447
|
+
}, this.instanceOf = i.instanceOf || null, this.predicate = i.predicate || null, this.represent = i.represent || null, this.representName = i.representName || null, this.defaultStyle = i.defaultStyle || null, this.multi = i.multi || !1, this.styleAliases = Da(i.styleAliases || null), Ra.indexOf(this.kind) === -1)
|
|
1450
1448
|
throw new ge('Unknown kind "' + this.kind + '" is specified for "' + e + '" YAML type.');
|
|
1451
1449
|
}
|
|
1452
|
-
var pe =
|
|
1450
|
+
var pe = Ha;
|
|
1453
1451
|
function Kt(e, i) {
|
|
1454
1452
|
var t = [];
|
|
1455
|
-
return e[i].forEach(function(
|
|
1456
|
-
var
|
|
1453
|
+
return e[i].forEach(function(r) {
|
|
1454
|
+
var a = t.length;
|
|
1457
1455
|
t.forEach(function(o, l) {
|
|
1458
|
-
o.tag ===
|
|
1459
|
-
}), t[
|
|
1456
|
+
o.tag === r.tag && o.kind === r.kind && o.multi === r.multi && (a = l);
|
|
1457
|
+
}), t[a] = r;
|
|
1460
1458
|
}), t;
|
|
1461
1459
|
}
|
|
1462
|
-
function
|
|
1460
|
+
function za() {
|
|
1463
1461
|
var e = {
|
|
1464
1462
|
scalar: {},
|
|
1465
1463
|
sequence: {},
|
|
@@ -1472,11 +1470,11 @@ function zr() {
|
|
|
1472
1470
|
fallback: []
|
|
1473
1471
|
}
|
|
1474
1472
|
}, i, t;
|
|
1475
|
-
function a
|
|
1476
|
-
|
|
1473
|
+
function r(a) {
|
|
1474
|
+
a.multi ? (e.multi[a.kind].push(a), e.multi.fallback.push(a)) : e[a.kind][a.tag] = e.fallback[a.tag] = a;
|
|
1477
1475
|
}
|
|
1478
1476
|
for (i = 0, t = arguments.length; i < t; i += 1)
|
|
1479
|
-
arguments[i].forEach(
|
|
1477
|
+
arguments[i].forEach(r);
|
|
1480
1478
|
return e;
|
|
1481
1479
|
}
|
|
1482
1480
|
function dt(e) {
|
|
@@ -1492,19 +1490,19 @@ dt.prototype.extend = function(e) {
|
|
|
1492
1490
|
e.implicit && (i = i.concat(e.implicit)), e.explicit && (t = t.concat(e.explicit));
|
|
1493
1491
|
else
|
|
1494
1492
|
throw new ge("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
1495
|
-
i.forEach(function(
|
|
1496
|
-
if (!(
|
|
1493
|
+
i.forEach(function(a) {
|
|
1494
|
+
if (!(a instanceof pe))
|
|
1497
1495
|
throw new ge("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1498
|
-
if (
|
|
1496
|
+
if (a.loadKind && a.loadKind !== "scalar")
|
|
1499
1497
|
throw new ge("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
1500
|
-
if (
|
|
1498
|
+
if (a.multi)
|
|
1501
1499
|
throw new ge("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
1502
|
-
}), t.forEach(function(
|
|
1503
|
-
if (!(
|
|
1500
|
+
}), t.forEach(function(a) {
|
|
1501
|
+
if (!(a instanceof pe))
|
|
1504
1502
|
throw new ge("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
1505
1503
|
});
|
|
1506
|
-
var
|
|
1507
|
-
return
|
|
1504
|
+
var r = Object.create(dt.prototype);
|
|
1505
|
+
return r.implicit = (this.implicit || []).concat(i), r.explicit = (this.explicit || []).concat(t), r.compiledImplicit = Kt(r, "implicit"), r.compiledExplicit = Kt(r, "explicit"), r.compiledTypeMap = za(r.compiledImplicit, r.compiledExplicit), r;
|
|
1508
1506
|
};
|
|
1509
1507
|
var gi = dt, yi = new pe("tag:yaml.org,2002:str", {
|
|
1510
1508
|
kind: "scalar",
|
|
@@ -1528,23 +1526,23 @@ var gi = dt, yi = new pe("tag:yaml.org,2002:str", {
|
|
|
1528
1526
|
hi
|
|
1529
1527
|
]
|
|
1530
1528
|
});
|
|
1531
|
-
function
|
|
1529
|
+
function Ga(e) {
|
|
1532
1530
|
if (e === null)
|
|
1533
1531
|
return !0;
|
|
1534
1532
|
var i = e.length;
|
|
1535
1533
|
return i === 1 && e === "~" || i === 4 && (e === "null" || e === "Null" || e === "NULL");
|
|
1536
1534
|
}
|
|
1537
|
-
function
|
|
1535
|
+
function Ja() {
|
|
1538
1536
|
return null;
|
|
1539
1537
|
}
|
|
1540
|
-
function
|
|
1538
|
+
function Wa(e) {
|
|
1541
1539
|
return e === null;
|
|
1542
1540
|
}
|
|
1543
1541
|
var _i = new pe("tag:yaml.org,2002:null", {
|
|
1544
1542
|
kind: "scalar",
|
|
1545
|
-
resolve:
|
|
1546
|
-
construct:
|
|
1547
|
-
predicate:
|
|
1543
|
+
resolve: Ga,
|
|
1544
|
+
construct: Ja,
|
|
1545
|
+
predicate: Wa,
|
|
1548
1546
|
represent: {
|
|
1549
1547
|
canonical: function() {
|
|
1550
1548
|
return "~";
|
|
@@ -1564,23 +1562,23 @@ var _i = new pe("tag:yaml.org,2002:null", {
|
|
|
1564
1562
|
},
|
|
1565
1563
|
defaultStyle: "lowercase"
|
|
1566
1564
|
});
|
|
1567
|
-
function
|
|
1565
|
+
function Ya(e) {
|
|
1568
1566
|
if (e === null)
|
|
1569
1567
|
return !1;
|
|
1570
1568
|
var i = e.length;
|
|
1571
1569
|
return i === 4 && (e === "true" || e === "True" || e === "TRUE") || i === 5 && (e === "false" || e === "False" || e === "FALSE");
|
|
1572
1570
|
}
|
|
1573
|
-
function
|
|
1571
|
+
function Za(e) {
|
|
1574
1572
|
return e === "true" || e === "True" || e === "TRUE";
|
|
1575
1573
|
}
|
|
1576
|
-
function
|
|
1574
|
+
function Qa(e) {
|
|
1577
1575
|
return Object.prototype.toString.call(e) === "[object Boolean]";
|
|
1578
1576
|
}
|
|
1579
1577
|
var wi = new pe("tag:yaml.org,2002:bool", {
|
|
1580
1578
|
kind: "scalar",
|
|
1581
|
-
resolve:
|
|
1582
|
-
construct:
|
|
1583
|
-
predicate:
|
|
1579
|
+
resolve: Ya,
|
|
1580
|
+
construct: Za,
|
|
1581
|
+
predicate: Qa,
|
|
1584
1582
|
represent: {
|
|
1585
1583
|
lowercase: function(e) {
|
|
1586
1584
|
return e ? "true" : "false";
|
|
@@ -1594,7 +1592,7 @@ var wi = new pe("tag:yaml.org,2002:bool", {
|
|
|
1594
1592
|
},
|
|
1595
1593
|
defaultStyle: "lowercase"
|
|
1596
1594
|
});
|
|
1597
|
-
function
|
|
1595
|
+
function Xa(e) {
|
|
1598
1596
|
return 48 <= e && e <= 57 || 65 <= e && e <= 70 || 97 <= e && e <= 102;
|
|
1599
1597
|
}
|
|
1600
1598
|
function eo(e) {
|
|
@@ -1606,55 +1604,55 @@ function to(e) {
|
|
|
1606
1604
|
function io(e) {
|
|
1607
1605
|
if (e === null)
|
|
1608
1606
|
return !1;
|
|
1609
|
-
var i = e.length, t = 0,
|
|
1607
|
+
var i = e.length, t = 0, r = !1, a;
|
|
1610
1608
|
if (!i)
|
|
1611
1609
|
return !1;
|
|
1612
|
-
if (
|
|
1610
|
+
if (a = e[t], (a === "-" || a === "+") && (a = e[++t]), a === "0") {
|
|
1613
1611
|
if (t + 1 === i)
|
|
1614
1612
|
return !0;
|
|
1615
|
-
if (
|
|
1613
|
+
if (a = e[++t], a === "b") {
|
|
1616
1614
|
for (t++; t < i; t++)
|
|
1617
|
-
if (
|
|
1618
|
-
if (
|
|
1615
|
+
if (a = e[t], a !== "_") {
|
|
1616
|
+
if (a !== "0" && a !== "1")
|
|
1619
1617
|
return !1;
|
|
1620
|
-
|
|
1618
|
+
r = !0;
|
|
1621
1619
|
}
|
|
1622
|
-
return
|
|
1620
|
+
return r && a !== "_";
|
|
1623
1621
|
}
|
|
1624
|
-
if (
|
|
1622
|
+
if (a === "x") {
|
|
1625
1623
|
for (t++; t < i; t++)
|
|
1626
|
-
if (
|
|
1627
|
-
if (!
|
|
1624
|
+
if (a = e[t], a !== "_") {
|
|
1625
|
+
if (!Xa(e.charCodeAt(t)))
|
|
1628
1626
|
return !1;
|
|
1629
|
-
|
|
1627
|
+
r = !0;
|
|
1630
1628
|
}
|
|
1631
|
-
return
|
|
1629
|
+
return r && a !== "_";
|
|
1632
1630
|
}
|
|
1633
|
-
if (
|
|
1631
|
+
if (a === "o") {
|
|
1634
1632
|
for (t++; t < i; t++)
|
|
1635
|
-
if (
|
|
1633
|
+
if (a = e[t], a !== "_") {
|
|
1636
1634
|
if (!eo(e.charCodeAt(t)))
|
|
1637
1635
|
return !1;
|
|
1638
|
-
|
|
1636
|
+
r = !0;
|
|
1639
1637
|
}
|
|
1640
|
-
return
|
|
1638
|
+
return r && a !== "_";
|
|
1641
1639
|
}
|
|
1642
1640
|
}
|
|
1643
|
-
if (
|
|
1641
|
+
if (a === "_")
|
|
1644
1642
|
return !1;
|
|
1645
1643
|
for (; t < i; t++)
|
|
1646
|
-
if (
|
|
1644
|
+
if (a = e[t], a !== "_") {
|
|
1647
1645
|
if (!to(e.charCodeAt(t)))
|
|
1648
1646
|
return !1;
|
|
1649
|
-
|
|
1647
|
+
r = !0;
|
|
1650
1648
|
}
|
|
1651
|
-
return !(!
|
|
1649
|
+
return !(!r || a === "_");
|
|
1652
1650
|
}
|
|
1653
|
-
function
|
|
1654
|
-
var i = e, t = 1,
|
|
1655
|
-
if (i.indexOf("_") !== -1 && (i = i.replace(/_/g, "")),
|
|
1651
|
+
function ro(e) {
|
|
1652
|
+
var i = e, t = 1, r;
|
|
1653
|
+
if (i.indexOf("_") !== -1 && (i = i.replace(/_/g, "")), r = i[0], (r === "-" || r === "+") && (r === "-" && (t = -1), i = i.slice(1), r = i[0]), i === "0")
|
|
1656
1654
|
return 0;
|
|
1657
|
-
if (
|
|
1655
|
+
if (r === "0") {
|
|
1658
1656
|
if (i[1] === "b")
|
|
1659
1657
|
return t * parseInt(i.slice(2), 2);
|
|
1660
1658
|
if (i[1] === "x")
|
|
@@ -1664,14 +1662,14 @@ function ao(e) {
|
|
|
1664
1662
|
}
|
|
1665
1663
|
return t * parseInt(i, 10);
|
|
1666
1664
|
}
|
|
1667
|
-
function
|
|
1665
|
+
function ao(e) {
|
|
1668
1666
|
return Object.prototype.toString.call(e) === "[object Number]" && e % 1 === 0 && !se.isNegativeZero(e);
|
|
1669
1667
|
}
|
|
1670
1668
|
var ki = new pe("tag:yaml.org,2002:int", {
|
|
1671
1669
|
kind: "scalar",
|
|
1672
1670
|
resolve: io,
|
|
1673
|
-
construct:
|
|
1674
|
-
predicate:
|
|
1671
|
+
construct: ro,
|
|
1672
|
+
predicate: ao,
|
|
1675
1673
|
represent: {
|
|
1676
1674
|
binary: function(e) {
|
|
1677
1675
|
return e >= 0 ? "0b" + e.toString(2) : "-0b" + e.toString(2).slice(1);
|
|
@@ -1767,17 +1765,17 @@ function po(e) {
|
|
|
1767
1765
|
return e === null ? !1 : Ai.exec(e) !== null || xi.exec(e) !== null;
|
|
1768
1766
|
}
|
|
1769
1767
|
function fo(e) {
|
|
1770
|
-
var i, t,
|
|
1768
|
+
var i, t, r, a, o, l, n, c = 0, d = null, f, p, _;
|
|
1771
1769
|
if (i = Ai.exec(e), i === null && (i = xi.exec(e)), i === null)
|
|
1772
1770
|
throw new Error("Date resolve error");
|
|
1773
|
-
if (t = +i[1],
|
|
1774
|
-
return new Date(Date.UTC(t,
|
|
1771
|
+
if (t = +i[1], r = +i[2] - 1, a = +i[3], !i[4])
|
|
1772
|
+
return new Date(Date.UTC(t, r, a));
|
|
1775
1773
|
if (o = +i[4], l = +i[5], n = +i[6], i[7]) {
|
|
1776
1774
|
for (c = i[7].slice(0, 3); c.length < 3; )
|
|
1777
1775
|
c += "0";
|
|
1778
1776
|
c = +c;
|
|
1779
1777
|
}
|
|
1780
|
-
return i[9] && (f = +i[10], p = +(i[11] || 0), d = (f * 60 + p) * 6e4, i[9] === "-" && (d = -d)), _ = new Date(Date.UTC(t,
|
|
1778
|
+
return i[9] && (f = +i[10], p = +(i[11] || 0), d = (f * 60 + p) * 6e4, i[9] === "-" && (d = -d)), _ = new Date(Date.UTC(t, r, a, o, l, n, c)), d && _.setTime(_.getTime() - d), _;
|
|
1781
1779
|
}
|
|
1782
1780
|
function mo(e) {
|
|
1783
1781
|
return e.toISOString();
|
|
@@ -1800,26 +1798,26 @@ var $i = new pe("tag:yaml.org,2002:merge", {
|
|
|
1800
1798
|
function yo(e) {
|
|
1801
1799
|
if (e === null)
|
|
1802
1800
|
return !1;
|
|
1803
|
-
var i, t,
|
|
1804
|
-
for (t = 0; t <
|
|
1801
|
+
var i, t, r = 0, a = e.length, o = kt;
|
|
1802
|
+
for (t = 0; t < a; t++)
|
|
1805
1803
|
if (i = o.indexOf(e.charAt(t)), !(i > 64)) {
|
|
1806
1804
|
if (i < 0)
|
|
1807
1805
|
return !1;
|
|
1808
|
-
|
|
1806
|
+
r += 6;
|
|
1809
1807
|
}
|
|
1810
|
-
return
|
|
1808
|
+
return r % 8 === 0;
|
|
1811
1809
|
}
|
|
1812
1810
|
function vo(e) {
|
|
1813
|
-
var i, t,
|
|
1814
|
-
for (i = 0; i <
|
|
1815
|
-
i % 4 === 0 && i && (n.push(l >> 16 & 255), n.push(l >> 8 & 255), n.push(l & 255)), l = l << 6 | o.indexOf(
|
|
1816
|
-
return t =
|
|
1811
|
+
var i, t, r = e.replace(/[\r\n=]/g, ""), a = r.length, o = kt, l = 0, n = [];
|
|
1812
|
+
for (i = 0; i < a; i++)
|
|
1813
|
+
i % 4 === 0 && i && (n.push(l >> 16 & 255), n.push(l >> 8 & 255), n.push(l & 255)), l = l << 6 | o.indexOf(r.charAt(i));
|
|
1814
|
+
return t = a % 4 * 6, t === 0 ? (n.push(l >> 16 & 255), n.push(l >> 8 & 255), n.push(l & 255)) : t === 18 ? (n.push(l >> 10 & 255), n.push(l >> 2 & 255)) : t === 12 && n.push(l >> 4 & 255), new Uint8Array(n);
|
|
1817
1815
|
}
|
|
1818
1816
|
function ho(e) {
|
|
1819
|
-
var i = "", t = 0,
|
|
1820
|
-
for (
|
|
1821
|
-
|
|
1822
|
-
return
|
|
1817
|
+
var i = "", t = 0, r, a, o = e.length, l = kt;
|
|
1818
|
+
for (r = 0; r < o; r++)
|
|
1819
|
+
r % 3 === 0 && r && (i += l[t >> 18 & 63], i += l[t >> 12 & 63], i += l[t >> 6 & 63], i += l[t & 63]), t = (t << 8) + e[r];
|
|
1820
|
+
return a = o % 3, a === 0 ? (i += l[t >> 18 & 63], i += l[t >> 12 & 63], i += l[t >> 6 & 63], i += l[t & 63]) : a === 2 ? (i += l[t >> 10 & 63], i += l[t >> 4 & 63], i += l[t << 2 & 63], i += l[64]) : a === 1 && (i += l[t >> 2 & 63], i += l[t << 4 & 63], i += l[64], i += l[64]), i;
|
|
1823
1821
|
}
|
|
1824
1822
|
function bo(e) {
|
|
1825
1823
|
return Object.prototype.toString.call(e) === "[object Uint8Array]";
|
|
@@ -1834,12 +1832,12 @@ var Mi = new pe("tag:yaml.org,2002:binary", {
|
|
|
1834
1832
|
function ko(e) {
|
|
1835
1833
|
if (e === null)
|
|
1836
1834
|
return !0;
|
|
1837
|
-
var i = [], t,
|
|
1838
|
-
for (t = 0,
|
|
1839
|
-
if (
|
|
1835
|
+
var i = [], t, r, a, o, l, n = e;
|
|
1836
|
+
for (t = 0, r = n.length; t < r; t += 1) {
|
|
1837
|
+
if (a = n[t], l = !1, wo.call(a) !== "[object Object]")
|
|
1840
1838
|
return !1;
|
|
1841
|
-
for (o in
|
|
1842
|
-
if (_o.call(
|
|
1839
|
+
for (o in a)
|
|
1840
|
+
if (_o.call(a, o))
|
|
1843
1841
|
if (!l)
|
|
1844
1842
|
l = !0;
|
|
1845
1843
|
else
|
|
@@ -1864,20 +1862,20 @@ var Ei = new pe("tag:yaml.org,2002:omap", {
|
|
|
1864
1862
|
function Io(e) {
|
|
1865
1863
|
if (e === null)
|
|
1866
1864
|
return !0;
|
|
1867
|
-
var i, t,
|
|
1865
|
+
var i, t, r, a, o, l = e;
|
|
1868
1866
|
for (o = new Array(l.length), i = 0, t = l.length; i < t; i += 1) {
|
|
1869
|
-
if (
|
|
1867
|
+
if (r = l[i], So.call(r) !== "[object Object]" || (a = Object.keys(r), a.length !== 1))
|
|
1870
1868
|
return !1;
|
|
1871
|
-
o[i] = [
|
|
1869
|
+
o[i] = [a[0], r[a[0]]];
|
|
1872
1870
|
}
|
|
1873
1871
|
return !0;
|
|
1874
1872
|
}
|
|
1875
1873
|
function Ao(e) {
|
|
1876
1874
|
if (e === null)
|
|
1877
1875
|
return [];
|
|
1878
|
-
var i, t,
|
|
1876
|
+
var i, t, r, a, o, l = e;
|
|
1879
1877
|
for (o = new Array(l.length), i = 0, t = l.length; i < t; i += 1)
|
|
1880
|
-
|
|
1878
|
+
r = l[i], a = Object.keys(r), o[i] = [a[0], r[a[0]]];
|
|
1881
1879
|
return o;
|
|
1882
1880
|
}
|
|
1883
1881
|
var ji = new pe("tag:yaml.org,2002:pairs", {
|
|
@@ -1963,7 +1961,7 @@ function Bi(e, i) {
|
|
|
1963
1961
|
line: e.line,
|
|
1964
1962
|
column: e.position - e.lineStart
|
|
1965
1963
|
};
|
|
1966
|
-
return t.snippet =
|
|
1964
|
+
return t.snippet = Pa(t), new ge(i, t);
|
|
1967
1965
|
}
|
|
1968
1966
|
function M(e, i) {
|
|
1969
1967
|
throw Bi(e, i);
|
|
@@ -1973,54 +1971,54 @@ function Qe(e, i) {
|
|
|
1973
1971
|
}
|
|
1974
1972
|
var Pt = {
|
|
1975
1973
|
YAML: function(e, i, t) {
|
|
1976
|
-
var
|
|
1977
|
-
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"),
|
|
1974
|
+
var r, a, o;
|
|
1975
|
+
e.version !== null && M(e, "duplication of %YAML directive"), t.length !== 1 && M(e, "YAML directive accepts exactly one argument"), r = /^([0-9]+)\.([0-9]+)$/.exec(t[0]), r === null && M(e, "ill-formed argument of the YAML directive"), a = parseInt(r[1], 10), o = parseInt(r[2], 10), a !== 1 && M(e, "unacceptable YAML version of the document"), e.version = t[0], e.checkLineBreaks = o < 2, o !== 1 && o !== 2 && Qe(e, "unsupported YAML version of the document");
|
|
1978
1976
|
},
|
|
1979
1977
|
TAG: function(e, i, t) {
|
|
1980
|
-
var
|
|
1981
|
-
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"),
|
|
1978
|
+
var r, a;
|
|
1979
|
+
t.length !== 2 && M(e, "TAG directive accepts exactly two arguments"), r = t[0], a = t[1], Ni.test(r) || M(e, "ill-formed tag handle (first argument) of the TAG directive"), Ie.call(e.tagMap, r) && M(e, 'there is a previously declared suffix for "' + r + '" tag handle'), Ki.test(a) || M(e, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
1982
1980
|
try {
|
|
1983
|
-
|
|
1981
|
+
a = decodeURIComponent(a);
|
|
1984
1982
|
} catch {
|
|
1985
|
-
M(e, "tag prefix is malformed: " +
|
|
1983
|
+
M(e, "tag prefix is malformed: " + a);
|
|
1986
1984
|
}
|
|
1987
|
-
e.tagMap[
|
|
1985
|
+
e.tagMap[r] = a;
|
|
1988
1986
|
}
|
|
1989
1987
|
};
|
|
1990
|
-
function Se(e, i, t,
|
|
1991
|
-
var
|
|
1988
|
+
function Se(e, i, t, r) {
|
|
1989
|
+
var a, o, l, n;
|
|
1992
1990
|
if (i < t) {
|
|
1993
|
-
if (n = e.input.slice(i, t),
|
|
1994
|
-
for (
|
|
1995
|
-
l = n.charCodeAt(
|
|
1991
|
+
if (n = e.input.slice(i, t), r)
|
|
1992
|
+
for (a = 0, o = n.length; a < o; a += 1)
|
|
1993
|
+
l = n.charCodeAt(a), l === 9 || 32 <= l && l <= 1114111 || M(e, "expected valid JSON character");
|
|
1996
1994
|
else
|
|
1997
1995
|
Eo.test(n) && M(e, "the stream contains non-printable characters");
|
|
1998
1996
|
e.result += n;
|
|
1999
1997
|
}
|
|
2000
1998
|
}
|
|
2001
|
-
function Ut(e, i, t,
|
|
2002
|
-
var
|
|
2003
|
-
for (se.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"),
|
|
2004
|
-
o =
|
|
1999
|
+
function Ut(e, i, t, r) {
|
|
2000
|
+
var a, o, l, n;
|
|
2001
|
+
for (se.isObject(t) || M(e, "cannot merge mappings; the provided source object is unacceptable"), a = Object.keys(t), l = 0, n = a.length; l < n; l += 1)
|
|
2002
|
+
o = a[l], Ie.call(i, o) || (i[o] = t[o], r[o] = !0);
|
|
2005
2003
|
}
|
|
2006
|
-
function Fe(e, i, t,
|
|
2004
|
+
function Fe(e, i, t, r, a, o, l, n, c) {
|
|
2007
2005
|
var d, f;
|
|
2008
|
-
if (Array.isArray(
|
|
2009
|
-
for (
|
|
2010
|
-
Array.isArray(
|
|
2011
|
-
if (typeof
|
|
2006
|
+
if (Array.isArray(a))
|
|
2007
|
+
for (a = Array.prototype.slice.call(a), d = 0, f = a.length; d < f; d += 1)
|
|
2008
|
+
Array.isArray(a[d]) && M(e, "nested arrays are not supported inside keys"), typeof a == "object" && qt(a[d]) === "[object Object]" && (a[d] = "[object Object]");
|
|
2009
|
+
if (typeof a == "object" && qt(a) === "[object Object]" && (a = "[object Object]"), a = String(a), i === null && (i = {}), r === "tag:yaml.org,2002:merge")
|
|
2012
2010
|
if (Array.isArray(o))
|
|
2013
2011
|
for (d = 0, f = o.length; d < f; d += 1)
|
|
2014
2012
|
Ut(e, i, o[d], t);
|
|
2015
2013
|
else
|
|
2016
2014
|
Ut(e, i, o, t);
|
|
2017
2015
|
else
|
|
2018
|
-
!e.json && !Ie.call(t,
|
|
2016
|
+
!e.json && !Ie.call(t, a) && Ie.call(i, a) && (e.line = l || e.line, e.lineStart = n || e.lineStart, e.position = c || e.position, M(e, "duplicated mapping key")), a === "__proto__" ? Object.defineProperty(i, a, {
|
|
2019
2017
|
configurable: !0,
|
|
2020
2018
|
enumerable: !0,
|
|
2021
2019
|
writable: !0,
|
|
2022
2020
|
value: o
|
|
2023
|
-
}) : i[
|
|
2021
|
+
}) : i[a] = o, delete t[a];
|
|
2024
2022
|
return i;
|
|
2025
2023
|
}
|
|
2026
2024
|
function St(e) {
|
|
@@ -2028,20 +2026,20 @@ function St(e) {
|
|
|
2028
2026
|
i = e.input.charCodeAt(e.position), i === 10 ? e.position++ : i === 13 ? (e.position++, e.input.charCodeAt(e.position) === 10 && e.position++) : M(e, "a line break is expected"), e.line += 1, e.lineStart = e.position, e.firstTabInLine = -1;
|
|
2029
2027
|
}
|
|
2030
2028
|
function le(e, i, t) {
|
|
2031
|
-
for (var
|
|
2032
|
-
for (; Te(
|
|
2033
|
-
|
|
2034
|
-
if (i &&
|
|
2029
|
+
for (var r = 0, a = e.input.charCodeAt(e.position); a !== 0; ) {
|
|
2030
|
+
for (; Te(a); )
|
|
2031
|
+
a === 9 && e.firstTabInLine === -1 && (e.firstTabInLine = e.position), a = e.input.charCodeAt(++e.position);
|
|
2032
|
+
if (i && a === 35)
|
|
2035
2033
|
do
|
|
2036
|
-
|
|
2037
|
-
while (
|
|
2038
|
-
if (_e(
|
|
2039
|
-
for (St(e),
|
|
2040
|
-
e.lineIndent++,
|
|
2034
|
+
a = e.input.charCodeAt(++e.position);
|
|
2035
|
+
while (a !== 10 && a !== 13 && a !== 0);
|
|
2036
|
+
if (_e(a))
|
|
2037
|
+
for (St(e), a = e.input.charCodeAt(e.position), r++, e.lineIndent = 0; a === 32; )
|
|
2038
|
+
e.lineIndent++, a = e.input.charCodeAt(++e.position);
|
|
2041
2039
|
else
|
|
2042
2040
|
break;
|
|
2043
2041
|
}
|
|
2044
|
-
return t !== -1 &&
|
|
2042
|
+
return t !== -1 && r !== 0 && e.lineIndent < t && Qe(e, "deficient indentation"), r;
|
|
2045
2043
|
}
|
|
2046
2044
|
function it(e) {
|
|
2047
2045
|
var i = e.position, t;
|
|
@@ -2052,15 +2050,15 @@ function It(e, i) {
|
|
|
2052
2050
|
`, i - 1));
|
|
2053
2051
|
}
|
|
2054
2052
|
function qo(e, i, t) {
|
|
2055
|
-
var
|
|
2056
|
-
if (h = e.input.charCodeAt(e.position), ye(h) || Oe(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (
|
|
2053
|
+
var r, a, o, l, n, c, d, f, p = e.kind, _ = e.result, h;
|
|
2054
|
+
if (h = e.input.charCodeAt(e.position), ye(h) || Oe(h) || h === 35 || h === 38 || h === 42 || h === 33 || h === 124 || h === 62 || h === 39 || h === 34 || h === 37 || h === 64 || h === 96 || (h === 63 || h === 45) && (a = e.input.charCodeAt(e.position + 1), ye(a) || t && Oe(a)))
|
|
2057
2055
|
return !1;
|
|
2058
2056
|
for (e.kind = "scalar", e.result = "", o = l = e.position, n = !1; h !== 0; ) {
|
|
2059
2057
|
if (h === 58) {
|
|
2060
|
-
if (
|
|
2058
|
+
if (a = e.input.charCodeAt(e.position + 1), ye(a) || t && Oe(a))
|
|
2061
2059
|
break;
|
|
2062
2060
|
} else if (h === 35) {
|
|
2063
|
-
if (
|
|
2061
|
+
if (r = e.input.charCodeAt(e.position - 1), ye(r))
|
|
2064
2062
|
break;
|
|
2065
2063
|
} else {
|
|
2066
2064
|
if (e.position === e.lineStart && it(e) || t && Oe(h))
|
|
@@ -2079,24 +2077,24 @@ function qo(e, i, t) {
|
|
|
2079
2077
|
return Se(e, o, l, !1), e.result ? !0 : (e.kind = p, e.result = _, !1);
|
|
2080
2078
|
}
|
|
2081
2079
|
function Bo(e, i) {
|
|
2082
|
-
var t,
|
|
2080
|
+
var t, r, a;
|
|
2083
2081
|
if (t = e.input.charCodeAt(e.position), t !== 39)
|
|
2084
2082
|
return !1;
|
|
2085
|
-
for (e.kind = "scalar", e.result = "", e.position++,
|
|
2083
|
+
for (e.kind = "scalar", e.result = "", e.position++, r = a = e.position; (t = e.input.charCodeAt(e.position)) !== 0; )
|
|
2086
2084
|
if (t === 39)
|
|
2087
|
-
if (Se(e,
|
|
2088
|
-
|
|
2085
|
+
if (Se(e, r, e.position, !0), t = e.input.charCodeAt(++e.position), t === 39)
|
|
2086
|
+
r = e.position, e.position++, a = e.position;
|
|
2089
2087
|
else
|
|
2090
2088
|
return !0;
|
|
2091
2089
|
else
|
|
2092
|
-
_e(t) ? (Se(e,
|
|
2090
|
+
_e(t) ? (Se(e, r, a, !0), It(e, le(e, !1, i)), r = a = e.position) : e.position === e.lineStart && it(e) ? M(e, "unexpected end of the document within a single quoted scalar") : (e.position++, a = e.position);
|
|
2093
2091
|
M(e, "unexpected end of the stream within a single quoted scalar");
|
|
2094
2092
|
}
|
|
2095
2093
|
function Po(e, i) {
|
|
2096
|
-
var t,
|
|
2094
|
+
var t, r, a, o, l, n;
|
|
2097
2095
|
if (n = e.input.charCodeAt(e.position), n !== 34)
|
|
2098
2096
|
return !1;
|
|
2099
|
-
for (e.kind = "scalar", e.result = "", e.position++, t =
|
|
2097
|
+
for (e.kind = "scalar", e.result = "", e.position++, t = r = e.position; (n = e.input.charCodeAt(e.position)) !== 0; ) {
|
|
2100
2098
|
if (n === 34)
|
|
2101
2099
|
return Se(e, t, e.position, !0), e.position++, !0;
|
|
2102
2100
|
if (n === 92) {
|
|
@@ -2105,19 +2103,19 @@ function Po(e, i) {
|
|
|
2105
2103
|
else if (n < 256 && Li[n])
|
|
2106
2104
|
e.result += qi[n], e.position++;
|
|
2107
2105
|
else if ((l = Fo(n)) > 0) {
|
|
2108
|
-
for (
|
|
2106
|
+
for (a = l, o = 0; a > 0; a--)
|
|
2109
2107
|
n = e.input.charCodeAt(++e.position), (l = Oo(n)) >= 0 ? o = (o << 4) + l : M(e, "expected hexadecimal character");
|
|
2110
2108
|
e.result += Ko(o), e.position++;
|
|
2111
2109
|
} else
|
|
2112
2110
|
M(e, "unknown escape sequence");
|
|
2113
|
-
t =
|
|
2111
|
+
t = r = e.position;
|
|
2114
2112
|
} else
|
|
2115
|
-
_e(n) ? (Se(e, t,
|
|
2113
|
+
_e(n) ? (Se(e, t, r, !0), It(e, le(e, !1, i)), t = r = e.position) : e.position === e.lineStart && it(e) ? M(e, "unexpected end of the document within a double quoted scalar") : (e.position++, r = e.position);
|
|
2116
2114
|
}
|
|
2117
2115
|
M(e, "unexpected end of the stream within a double quoted scalar");
|
|
2118
2116
|
}
|
|
2119
2117
|
function Uo(e, i) {
|
|
2120
|
-
var t = !0,
|
|
2118
|
+
var t = !0, r, a, o, l = e.tag, n, c = e.anchor, d, f, p, _, h, I = /* @__PURE__ */ Object.create(null), k, v, T, s;
|
|
2121
2119
|
if (s = e.input.charCodeAt(e.position), s === 91)
|
|
2122
2120
|
f = 93, h = !1, n = [];
|
|
2123
2121
|
else if (s === 123)
|
|
@@ -2127,21 +2125,21 @@ function Uo(e, i) {
|
|
|
2127
2125
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = n), s = e.input.charCodeAt(++e.position); s !== 0; ) {
|
|
2128
2126
|
if (le(e, !0, i), s = e.input.charCodeAt(e.position), s === f)
|
|
2129
2127
|
return e.position++, e.tag = l, e.anchor = c, e.kind = h ? "mapping" : "sequence", e.result = n, !0;
|
|
2130
|
-
t ? s === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), v = k = T = null, p = _ = !1, s === 63 && (d = e.input.charCodeAt(e.position + 1), ye(d) && (p = _ = !0, e.position++, le(e, !0, i))),
|
|
2128
|
+
t ? s === 44 && M(e, "expected the node content, but found ','") : M(e, "missed comma between flow collection entries"), v = k = T = null, p = _ = !1, s === 63 && (d = e.input.charCodeAt(e.position + 1), ye(d) && (p = _ = !0, e.position++, le(e, !0, i))), r = e.line, a = e.lineStart, o = e.position, Le(e, i, Ye, !1, !0), v = e.tag, k = e.result, le(e, !0, i), s = e.input.charCodeAt(e.position), (_ || e.line === r) && s === 58 && (p = !0, s = e.input.charCodeAt(++e.position), le(e, !0, i), Le(e, i, Ye, !1, !0), T = e.result), h ? Fe(e, n, I, v, k, T, r, a, o) : p ? n.push(Fe(e, null, I, v, k, T, r, a, o)) : n.push(k), le(e, !0, i), s = e.input.charCodeAt(e.position), s === 44 ? (t = !0, s = e.input.charCodeAt(++e.position)) : t = !1;
|
|
2131
2129
|
}
|
|
2132
2130
|
M(e, "unexpected end of the stream within a flow collection");
|
|
2133
2131
|
}
|
|
2134
2132
|
function Ro(e, i) {
|
|
2135
|
-
var t,
|
|
2133
|
+
var t, r, a = st, o = !1, l = !1, n = i, c = 0, d = !1, f, p;
|
|
2136
2134
|
if (p = e.input.charCodeAt(e.position), p === 124)
|
|
2137
|
-
|
|
2135
|
+
r = !1;
|
|
2138
2136
|
else if (p === 62)
|
|
2139
|
-
|
|
2137
|
+
r = !0;
|
|
2140
2138
|
else
|
|
2141
2139
|
return !1;
|
|
2142
2140
|
for (e.kind = "scalar", e.result = ""; p !== 0; )
|
|
2143
2141
|
if (p = e.input.charCodeAt(++e.position), p === 43 || p === 45)
|
|
2144
|
-
st ===
|
|
2142
|
+
st === a ? a = p === 43 ? Lt : Mo : M(e, "repeat of a chomping mode identifier");
|
|
2145
2143
|
else if ((f = No(p)) >= 0)
|
|
2146
2144
|
f === 0 ? M(e, "bad explicit indentation width of a block scalar; it cannot be less than one") : l ? M(e, "repeat of an indentation width identifier") : (n = i + f - 1, l = !0);
|
|
2147
2145
|
else
|
|
@@ -2163,12 +2161,12 @@ function Ro(e, i) {
|
|
|
2163
2161
|
continue;
|
|
2164
2162
|
}
|
|
2165
2163
|
if (e.lineIndent < n) {
|
|
2166
|
-
|
|
2167
|
-
`, o ? 1 + c : c) :
|
|
2164
|
+
a === Lt ? e.result += se.repeat(`
|
|
2165
|
+
`, o ? 1 + c : c) : a === st && o && (e.result += `
|
|
2168
2166
|
`);
|
|
2169
2167
|
break;
|
|
2170
2168
|
}
|
|
2171
|
-
for (
|
|
2169
|
+
for (r ? Te(p) ? (d = !0, e.result += se.repeat(`
|
|
2172
2170
|
`, o ? 1 + c : c)) : d ? (d = !1, e.result += se.repeat(`
|
|
2173
2171
|
`, c + 1)) : c === 0 ? o && (e.result += " ") : e.result += se.repeat(`
|
|
2174
2172
|
`, c) : e.result += se.repeat(`
|
|
@@ -2179,7 +2177,7 @@ function Ro(e, i) {
|
|
|
2179
2177
|
return !0;
|
|
2180
2178
|
}
|
|
2181
2179
|
function Rt(e, i) {
|
|
2182
|
-
var t,
|
|
2180
|
+
var t, r = e.tag, a = e.anchor, o = [], l, n = !1, c;
|
|
2183
2181
|
if (e.firstTabInLine !== -1)
|
|
2184
2182
|
return !1;
|
|
2185
2183
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = o), c = e.input.charCodeAt(e.position); c !== 0 && (e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), !(c !== 45 || (l = e.input.charCodeAt(e.position + 1), !ye(l)))); ) {
|
|
@@ -2192,15 +2190,15 @@ function Rt(e, i) {
|
|
|
2192
2190
|
else if (e.lineIndent < i)
|
|
2193
2191
|
break;
|
|
2194
2192
|
}
|
|
2195
|
-
return n ? (e.tag =
|
|
2193
|
+
return n ? (e.tag = r, e.anchor = a, e.kind = "sequence", e.result = o, !0) : !1;
|
|
2196
2194
|
}
|
|
2197
2195
|
function Do(e, i, t) {
|
|
2198
|
-
var
|
|
2196
|
+
var r, a, o, l, n, c, d = e.tag, f = e.anchor, p = {}, _ = /* @__PURE__ */ Object.create(null), h = null, I = null, k = null, v = !1, T = !1, s;
|
|
2199
2197
|
if (e.firstTabInLine !== -1)
|
|
2200
2198
|
return !1;
|
|
2201
2199
|
for (e.anchor !== null && (e.anchorMap[e.anchor] = p), s = e.input.charCodeAt(e.position); s !== 0; ) {
|
|
2202
|
-
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")),
|
|
2203
|
-
s === 63 ? (v && (Fe(e, p, _, h, I, null, l, n, c), h = I = k = null), T = !0, v = !0,
|
|
2200
|
+
if (!v && e.firstTabInLine !== -1 && (e.position = e.firstTabInLine, M(e, "tab characters must not be used in indentation")), r = e.input.charCodeAt(e.position + 1), o = e.line, (s === 63 || s === 58) && ye(r))
|
|
2201
|
+
s === 63 ? (v && (Fe(e, p, _, h, I, null, l, n, c), h = I = k = null), T = !0, v = !0, a = !0) : v ? (v = !1, a = !0) : M(e, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"), e.position += 1, s = r;
|
|
2204
2202
|
else {
|
|
2205
2203
|
if (l = e.line, n = e.lineStart, c = e.position, !Le(e, t, Oi, !1, !0))
|
|
2206
2204
|
break;
|
|
@@ -2208,7 +2206,7 @@ function Do(e, i, t) {
|
|
|
2208
2206
|
for (s = e.input.charCodeAt(e.position); Te(s); )
|
|
2209
2207
|
s = e.input.charCodeAt(++e.position);
|
|
2210
2208
|
if (s === 58)
|
|
2211
|
-
s = e.input.charCodeAt(++e.position), ye(s) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Fe(e, p, _, h, I, null, l, n, c), h = I = k = null), T = !0, v = !1,
|
|
2209
|
+
s = e.input.charCodeAt(++e.position), ye(s) || M(e, "a whitespace character is expected after the key-value separator within a block mapping"), v && (Fe(e, p, _, h, I, null, l, n, c), h = I = k = null), T = !0, v = !1, a = !1, h = e.tag, I = e.result;
|
|
2212
2210
|
else if (T)
|
|
2213
2211
|
M(e, "can not read an implicit mapping pair; a colon is missed");
|
|
2214
2212
|
else
|
|
@@ -2218,7 +2216,7 @@ function Do(e, i, t) {
|
|
|
2218
2216
|
else
|
|
2219
2217
|
return e.tag = d, e.anchor = f, !0;
|
|
2220
2218
|
}
|
|
2221
|
-
if ((e.line === o || e.lineIndent > i) && (v && (l = e.line, n = e.lineStart, c = e.position), Le(e, i, Ze, !0,
|
|
2219
|
+
if ((e.line === o || e.lineIndent > i) && (v && (l = e.line, n = e.lineStart, c = e.position), Le(e, i, Ze, !0, a) && (v ? I = e.result : k = e.result), v || (Fe(e, p, _, h, I, k, l, n, c), h = I = k = null), le(e, !0, -1), s = e.input.charCodeAt(e.position)), (e.line === o || e.lineIndent > i) && s !== 0)
|
|
2222
2220
|
M(e, "bad indentation of a mapping entry");
|
|
2223
2221
|
else if (e.lineIndent < i)
|
|
2224
2222
|
break;
|
|
@@ -2226,17 +2224,17 @@ function Do(e, i, t) {
|
|
|
2226
2224
|
return v && Fe(e, p, _, h, I, null, l, n, c), T && (e.tag = d, e.anchor = f, e.kind = "mapping", e.result = p), T;
|
|
2227
2225
|
}
|
|
2228
2226
|
function Ho(e) {
|
|
2229
|
-
var i, t = !1,
|
|
2227
|
+
var i, t = !1, r = !1, a, o, l;
|
|
2230
2228
|
if (l = e.input.charCodeAt(e.position), l !== 33)
|
|
2231
2229
|
return !1;
|
|
2232
|
-
if (e.tag !== null && M(e, "duplication of a tag property"), l = e.input.charCodeAt(++e.position), l === 60 ? (t = !0, l = e.input.charCodeAt(++e.position)) : l === 33 ? (
|
|
2230
|
+
if (e.tag !== null && M(e, "duplication of a tag property"), l = e.input.charCodeAt(++e.position), l === 60 ? (t = !0, l = e.input.charCodeAt(++e.position)) : l === 33 ? (r = !0, a = "!!", l = e.input.charCodeAt(++e.position)) : a = "!", i = e.position, t) {
|
|
2233
2231
|
do
|
|
2234
2232
|
l = e.input.charCodeAt(++e.position);
|
|
2235
2233
|
while (l !== 0 && l !== 62);
|
|
2236
2234
|
e.position < e.length ? (o = e.input.slice(i, e.position), l = e.input.charCodeAt(++e.position)) : M(e, "unexpected end of the stream within a verbatim tag");
|
|
2237
2235
|
} else {
|
|
2238
2236
|
for (; l !== 0 && !ye(l); )
|
|
2239
|
-
l === 33 && (
|
|
2237
|
+
l === 33 && (r ? M(e, "tag suffix cannot contain exclamation marks") : (a = e.input.slice(i - 1, e.position + 1), Ni.test(a) || M(e, "named tag handle cannot contain such characters"), r = !0, i = e.position + 1)), l = e.input.charCodeAt(++e.position);
|
|
2240
2238
|
o = e.input.slice(i, e.position), Vo.test(o) && M(e, "tag suffix cannot contain flow indicator characters");
|
|
2241
2239
|
}
|
|
2242
2240
|
o && !Ki.test(o) && M(e, "tag name cannot contain such characters: " + o);
|
|
@@ -2245,7 +2243,7 @@ function Ho(e) {
|
|
|
2245
2243
|
} catch {
|
|
2246
2244
|
M(e, "tag name is malformed: " + o);
|
|
2247
2245
|
}
|
|
2248
|
-
return t ? e.tag = o : Ie.call(e.tagMap,
|
|
2246
|
+
return t ? e.tag = o : Ie.call(e.tagMap, a) ? e.tag = e.tagMap[a] + o : a === "!" ? e.tag = "!" + o : a === "!!" ? e.tag = "tag:yaml.org,2002:" + o : M(e, 'undeclared tag handle "' + a + '"'), !0;
|
|
2249
2247
|
}
|
|
2250
2248
|
function zo(e) {
|
|
2251
2249
|
var i, t;
|
|
@@ -2256,19 +2254,19 @@ function zo(e) {
|
|
|
2256
2254
|
return e.position === i && M(e, "name of an anchor node must contain at least one character"), e.anchor = e.input.slice(i, e.position), !0;
|
|
2257
2255
|
}
|
|
2258
2256
|
function Go(e) {
|
|
2259
|
-
var i, t,
|
|
2260
|
-
if (
|
|
2257
|
+
var i, t, r;
|
|
2258
|
+
if (r = e.input.charCodeAt(e.position), r !== 42)
|
|
2261
2259
|
return !1;
|
|
2262
|
-
for (
|
|
2263
|
-
|
|
2260
|
+
for (r = e.input.charCodeAt(++e.position), i = e.position; r !== 0 && !ye(r) && !Oe(r); )
|
|
2261
|
+
r = e.input.charCodeAt(++e.position);
|
|
2264
2262
|
return e.position === i && M(e, "name of an alias node must contain at least one character"), t = e.input.slice(i, e.position), Ie.call(e.anchorMap, t) || M(e, 'unidentified alias "' + t + '"'), e.result = e.anchorMap[t], le(e, !0, -1), !0;
|
|
2265
2263
|
}
|
|
2266
|
-
function Le(e, i, t,
|
|
2264
|
+
function Le(e, i, t, r, a) {
|
|
2267
2265
|
var o, l, n, c = 1, d = !1, f = !1, p, _, h, I, k, v;
|
|
2268
|
-
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = l = n = Ze === t || Fi === t,
|
|
2266
|
+
if (e.listener !== null && e.listener("open", e), e.tag = null, e.anchor = null, e.kind = null, e.result = null, o = l = n = Ze === t || Fi === t, r && le(e, !0, -1) && (d = !0, e.lineIndent > i ? c = 1 : e.lineIndent === i ? c = 0 : e.lineIndent < i && (c = -1)), c === 1)
|
|
2269
2267
|
for (; Ho(e) || zo(e); )
|
|
2270
2268
|
le(e, !0, -1) ? (d = !0, n = o, e.lineIndent > i ? c = 1 : e.lineIndent === i ? c = 0 : e.lineIndent < i && (c = -1)) : n = !1;
|
|
2271
|
-
if (n && (n = d ||
|
|
2269
|
+
if (n && (n = d || a), (c === 1 || Ze === t) && (Ye === t || Oi === t ? k = i : k = i + 1, v = e.position - e.lineStart, c === 1 ? n && (Rt(e, v) || Do(e, v, k)) || Uo(e, k) ? f = !0 : (l && Ro(e, k) || Bo(e, k) || Po(e, k) ? f = !0 : Go(e) ? (f = !0, (e.tag !== null || e.anchor !== null) && M(e, "alias node should not have any properties")) : qo(e, k, Ye === t) && (f = !0, e.tag === null && (e.tag = "?")), e.anchor !== null && (e.anchorMap[e.anchor] = e.result)) : c === 0 && (f = n && Rt(e, v))), e.tag === null)
|
|
2272
2270
|
e.anchor !== null && (e.anchorMap[e.anchor] = e.result);
|
|
2273
2271
|
else if (e.tag === "?") {
|
|
2274
2272
|
for (e.result !== null && e.kind !== "scalar" && M(e, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + e.kind + '"'), p = 0, _ = e.implicitTypes.length; p < _; p += 1)
|
|
@@ -2290,11 +2288,11 @@ function Le(e, i, t, a, r) {
|
|
|
2290
2288
|
return e.listener !== null && e.listener("close", e), e.tag !== null || e.anchor !== null || f;
|
|
2291
2289
|
}
|
|
2292
2290
|
function Jo(e) {
|
|
2293
|
-
var i = e.position, t,
|
|
2291
|
+
var i = e.position, t, r, a, o = !1, l;
|
|
2294
2292
|
for (e.version = null, e.checkLineBreaks = e.legacy, e.tagMap = /* @__PURE__ */ Object.create(null), e.anchorMap = /* @__PURE__ */ Object.create(null); (l = e.input.charCodeAt(e.position)) !== 0 && (le(e, !0, -1), l = e.input.charCodeAt(e.position), !(e.lineIndent > 0 || l !== 37)); ) {
|
|
2295
2293
|
for (o = !0, l = e.input.charCodeAt(++e.position), t = e.position; l !== 0 && !ye(l); )
|
|
2296
2294
|
l = e.input.charCodeAt(++e.position);
|
|
2297
|
-
for (
|
|
2295
|
+
for (r = e.input.slice(t, e.position), a = [], r.length < 1 && M(e, "directive name must not be less than one character in length"); l !== 0; ) {
|
|
2298
2296
|
for (; Te(l); )
|
|
2299
2297
|
l = e.input.charCodeAt(++e.position);
|
|
2300
2298
|
if (l === 35) {
|
|
@@ -2307,9 +2305,9 @@ function Jo(e) {
|
|
|
2307
2305
|
break;
|
|
2308
2306
|
for (t = e.position; l !== 0 && !ye(l); )
|
|
2309
2307
|
l = e.input.charCodeAt(++e.position);
|
|
2310
|
-
|
|
2308
|
+
a.push(e.input.slice(t, e.position));
|
|
2311
2309
|
}
|
|
2312
|
-
l !== 0 && St(e), Ie.call(Pt,
|
|
2310
|
+
l !== 0 && St(e), Ie.call(Pt, r) ? Pt[r](e, r, a) : Qe(e, 'unknown document directive "' + r + '"');
|
|
2313
2311
|
}
|
|
2314
2312
|
if (le(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, le(e, !0, -1)) : o && M(e, "directives end mark is expected"), Le(e, e.lineIndent - 1, Ze, !1, !0), le(e, !0, -1), e.checkLineBreaks && jo.test(e.input.slice(i, e.position)) && Qe(e, "non-ASCII line breaks are interpreted as content"), e.documents.push(e.result), e.position === e.lineStart && it(e)) {
|
|
2315
2313
|
e.input.charCodeAt(e.position) === 46 && (e.position += 3, le(e, !0, -1));
|
|
@@ -2323,8 +2321,8 @@ function Jo(e) {
|
|
|
2323
2321
|
function Pi(e, i) {
|
|
2324
2322
|
e = String(e), i = i || {}, e.length !== 0 && (e.charCodeAt(e.length - 1) !== 10 && e.charCodeAt(e.length - 1) !== 13 && (e += `
|
|
2325
2323
|
`), e.charCodeAt(0) === 65279 && (e = e.slice(1)));
|
|
2326
|
-
var t = new Lo(e, i),
|
|
2327
|
-
for (
|
|
2324
|
+
var t = new Lo(e, i), r = e.indexOf("\0");
|
|
2325
|
+
for (r !== -1 && (t.position = r, M(t, "null byte is not allowed in input")), t.input += "\0"; t.input.charCodeAt(t.position) === 32; )
|
|
2328
2326
|
t.lineIndent += 1, t.position += 1;
|
|
2329
2327
|
for (; t.position < t.length - 1; )
|
|
2330
2328
|
Jo(t);
|
|
@@ -2332,11 +2330,11 @@ function Pi(e, i) {
|
|
|
2332
2330
|
}
|
|
2333
2331
|
function Wo(e, i, t) {
|
|
2334
2332
|
i !== null && typeof i == "object" && typeof t > "u" && (t = i, i = null);
|
|
2335
|
-
var
|
|
2333
|
+
var r = Pi(e, t);
|
|
2336
2334
|
if (typeof i != "function")
|
|
2337
|
-
return
|
|
2338
|
-
for (var
|
|
2339
|
-
i(a
|
|
2335
|
+
return r;
|
|
2336
|
+
for (var a = 0, o = r.length; a < o; a += 1)
|
|
2337
|
+
i(r[a]);
|
|
2340
2338
|
}
|
|
2341
2339
|
function Yo(e, i) {
|
|
2342
2340
|
var t = Pi(e, i);
|
|
@@ -2349,7 +2347,7 @@ function Yo(e, i) {
|
|
|
2349
2347
|
var Zo = Wo, Qo = Yo, Ui = {
|
|
2350
2348
|
loadAll: Zo,
|
|
2351
2349
|
load: Qo
|
|
2352
|
-
}, Ri = Object.prototype.toString, Di = Object.prototype.hasOwnProperty, At = 65279, Xo = 9, Re = 10, en = 13, tn = 32,
|
|
2350
|
+
}, Ri = Object.prototype.toString, Di = Object.prototype.hasOwnProperty, At = 65279, Xo = 9, Re = 10, en = 13, tn = 32, rn = 33, an = 34, pt = 35, on = 37, nn = 38, ln = 39, sn = 42, Hi = 44, cn = 45, Xe = 58, un = 61, dn = 62, pn = 63, fn = 64, zi = 91, Gi = 93, mn = 96, Ji = 123, gn = 124, Wi = 125, me = {};
|
|
2353
2351
|
me[0] = "\\0";
|
|
2354
2352
|
me[7] = "\\a";
|
|
2355
2353
|
me[8] = "\\b";
|
|
@@ -2384,33 +2382,33 @@ var yn = [
|
|
|
2384
2382
|
"OFF"
|
|
2385
2383
|
], vn = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
2386
2384
|
function hn(e, i) {
|
|
2387
|
-
var t,
|
|
2385
|
+
var t, r, a, o, l, n, c;
|
|
2388
2386
|
if (i === null)
|
|
2389
2387
|
return {};
|
|
2390
|
-
for (t = {},
|
|
2391
|
-
l = a
|
|
2388
|
+
for (t = {}, r = Object.keys(i), a = 0, o = r.length; a < o; a += 1)
|
|
2389
|
+
l = r[a], n = String(i[l]), l.slice(0, 2) === "!!" && (l = "tag:yaml.org,2002:" + l.slice(2)), c = e.compiledTypeMap.fallback[l], c && Di.call(c.styleAliases, n) && (n = c.styleAliases[n]), t[l] = n;
|
|
2392
2390
|
return t;
|
|
2393
2391
|
}
|
|
2394
2392
|
function bn(e) {
|
|
2395
|
-
var i, t,
|
|
2393
|
+
var i, t, r;
|
|
2396
2394
|
if (i = e.toString(16).toUpperCase(), e <= 255)
|
|
2397
|
-
t = "x",
|
|
2395
|
+
t = "x", r = 2;
|
|
2398
2396
|
else if (e <= 65535)
|
|
2399
|
-
t = "u",
|
|
2397
|
+
t = "u", r = 4;
|
|
2400
2398
|
else if (e <= 4294967295)
|
|
2401
|
-
t = "U",
|
|
2399
|
+
t = "U", r = 8;
|
|
2402
2400
|
else
|
|
2403
2401
|
throw new ge("code point within a string may not be greater than 0xFFFFFFFF");
|
|
2404
|
-
return "\\" + t + se.repeat("0",
|
|
2402
|
+
return "\\" + t + se.repeat("0", r - i.length) + i;
|
|
2405
2403
|
}
|
|
2406
2404
|
var _n = 1, De = 2;
|
|
2407
2405
|
function wn(e) {
|
|
2408
2406
|
this.schema = e.schema || Ct, this.indent = Math.max(1, e.indent || 2), this.noArrayIndent = e.noArrayIndent || !1, this.skipInvalid = e.skipInvalid || !1, this.flowLevel = se.isNothing(e.flowLevel) ? -1 : e.flowLevel, this.styleMap = hn(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 === '"' ? De : _n, 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;
|
|
2409
2407
|
}
|
|
2410
2408
|
function Dt(e, i) {
|
|
2411
|
-
for (var t = se.repeat(" ", i),
|
|
2412
|
-
|
|
2413
|
-
`,
|
|
2409
|
+
for (var t = se.repeat(" ", i), r = 0, a = -1, o = "", l, n = e.length; r < n; )
|
|
2410
|
+
a = e.indexOf(`
|
|
2411
|
+
`, r), a === -1 ? (l = e.slice(r), r = n) : (l = e.slice(r, a + 1), r = a + 1), l.length && l !== `
|
|
2414
2412
|
` && (o += t), o += l;
|
|
2415
2413
|
return o;
|
|
2416
2414
|
}
|
|
@@ -2419,9 +2417,9 @@ function ft(e, i) {
|
|
|
2419
2417
|
` + se.repeat(" ", e.indent * i);
|
|
2420
2418
|
}
|
|
2421
2419
|
function kn(e, i) {
|
|
2422
|
-
var t,
|
|
2423
|
-
for (t = 0,
|
|
2424
|
-
if (
|
|
2420
|
+
var t, r, a;
|
|
2421
|
+
for (t = 0, r = e.implicitTypes.length; t < r; t += 1)
|
|
2422
|
+
if (a = e.implicitTypes[t], a.resolve(i))
|
|
2425
2423
|
return !0;
|
|
2426
2424
|
return !1;
|
|
2427
2425
|
}
|
|
@@ -2435,32 +2433,32 @@ function Ht(e) {
|
|
|
2435
2433
|
return He(e) && e !== At && e !== en && e !== Re;
|
|
2436
2434
|
}
|
|
2437
2435
|
function zt(e, i, t) {
|
|
2438
|
-
var
|
|
2436
|
+
var r = Ht(e), a = r && !et(e);
|
|
2439
2437
|
return (
|
|
2440
2438
|
// ns-plain-safe
|
|
2441
2439
|
(t ? (
|
|
2442
2440
|
// c = flow-in
|
|
2443
|
-
|
|
2444
|
-
) :
|
|
2441
|
+
r
|
|
2442
|
+
) : r && e !== Hi && e !== zi && e !== Gi && e !== Ji && e !== Wi) && e !== pt && !(i === Xe && !a) || Ht(i) && !et(i) && e === pt || i === Xe && a
|
|
2445
2443
|
);
|
|
2446
2444
|
}
|
|
2447
2445
|
function Cn(e) {
|
|
2448
|
-
return He(e) && e !== At && !et(e) && e !== cn && e !== pn && e !== Xe && e !== Hi && e !== zi && e !== Gi && e !== Ji && e !== Wi && e !== pt && e !== nn && e !== sn && e !==
|
|
2446
|
+
return He(e) && e !== At && !et(e) && e !== cn && e !== pn && e !== Xe && e !== Hi && e !== zi && e !== Gi && e !== Ji && e !== Wi && e !== pt && e !== nn && e !== sn && e !== rn && e !== gn && e !== un && e !== dn && e !== ln && e !== an && e !== on && e !== fn && e !== mn;
|
|
2449
2447
|
}
|
|
2450
2448
|
function Sn(e) {
|
|
2451
2449
|
return !et(e) && e !== Xe;
|
|
2452
2450
|
}
|
|
2453
2451
|
function Be(e, i) {
|
|
2454
|
-
var t = e.charCodeAt(i),
|
|
2455
|
-
return t >= 55296 && t <= 56319 && i + 1 < e.length && (
|
|
2452
|
+
var t = e.charCodeAt(i), r;
|
|
2453
|
+
return t >= 55296 && t <= 56319 && i + 1 < e.length && (r = e.charCodeAt(i + 1), r >= 56320 && r <= 57343) ? (t - 55296) * 1024 + r - 56320 + 65536 : t;
|
|
2456
2454
|
}
|
|
2457
2455
|
function Yi(e) {
|
|
2458
2456
|
var i = /^\n* /;
|
|
2459
2457
|
return i.test(e);
|
|
2460
2458
|
}
|
|
2461
2459
|
var Zi = 1, mt = 2, Qi = 3, Xi = 4, Ve = 5;
|
|
2462
|
-
function In(e, i, t,
|
|
2463
|
-
var c, d = 0, f = null, p = !1, _ = !1, h =
|
|
2460
|
+
function In(e, i, t, r, a, o, l, n) {
|
|
2461
|
+
var c, d = 0, f = null, p = !1, _ = !1, h = r !== -1, I = -1, k = Cn(Be(e, 0)) && Sn(Be(e, e.length - 1));
|
|
2464
2462
|
if (i || l)
|
|
2465
2463
|
for (c = 0; c < e.length; d >= 65536 ? c += 2 : c++) {
|
|
2466
2464
|
if (d = Be(e, c), !He(d))
|
|
@@ -2471,22 +2469,22 @@ function In(e, i, t, a, r, o, l, n) {
|
|
|
2471
2469
|
for (c = 0; c < e.length; d >= 65536 ? c += 2 : c++) {
|
|
2472
2470
|
if (d = Be(e, c), d === Re)
|
|
2473
2471
|
p = !0, h && (_ = _ || // Foldable line = too long, and not more-indented.
|
|
2474
|
-
c - I - 1 >
|
|
2472
|
+
c - I - 1 > r && e[I + 1] !== " ", I = c);
|
|
2475
2473
|
else if (!He(d))
|
|
2476
2474
|
return Ve;
|
|
2477
2475
|
k = k && zt(d, f, n), f = d;
|
|
2478
2476
|
}
|
|
2479
|
-
_ = _ || h && c - I - 1 >
|
|
2477
|
+
_ = _ || h && c - I - 1 > r && e[I + 1] !== " ";
|
|
2480
2478
|
}
|
|
2481
|
-
return !p && !_ ? k && !l && !
|
|
2479
|
+
return !p && !_ ? k && !l && !a(e) ? Zi : o === De ? Ve : mt : t > 9 && Yi(e) ? Ve : l ? o === De ? Ve : mt : _ ? Xi : Qi;
|
|
2482
2480
|
}
|
|
2483
|
-
function An(e, i, t,
|
|
2481
|
+
function An(e, i, t, r, a) {
|
|
2484
2482
|
e.dump = function() {
|
|
2485
2483
|
if (i.length === 0)
|
|
2486
2484
|
return e.quotingType === De ? '""' : "''";
|
|
2487
2485
|
if (!e.noCompatMode && (yn.indexOf(i) !== -1 || vn.test(i)))
|
|
2488
2486
|
return e.quotingType === De ? '"' + i + '"' : "'" + i + "'";
|
|
2489
|
-
var o = e.indent * Math.max(1, t), l = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), n =
|
|
2487
|
+
var o = e.indent * Math.max(1, t), l = e.lineWidth === -1 ? -1 : Math.max(Math.min(e.lineWidth, 40), e.lineWidth - o), n = r || e.flowLevel > -1 && t >= e.flowLevel;
|
|
2490
2488
|
function c(d) {
|
|
2491
2489
|
return kn(e, d);
|
|
2492
2490
|
}
|
|
@@ -2497,8 +2495,8 @@ function An(e, i, t, a, r) {
|
|
|
2497
2495
|
l,
|
|
2498
2496
|
c,
|
|
2499
2497
|
e.quotingType,
|
|
2500
|
-
e.forceQuotes && !
|
|
2501
|
-
|
|
2498
|
+
e.forceQuotes && !r,
|
|
2499
|
+
a
|
|
2502
2500
|
)) {
|
|
2503
2501
|
case Zi:
|
|
2504
2502
|
return i;
|
|
@@ -2516,10 +2514,10 @@ function An(e, i, t, a, r) {
|
|
|
2516
2514
|
}();
|
|
2517
2515
|
}
|
|
2518
2516
|
function Gt(e, i) {
|
|
2519
|
-
var t = Yi(e) ? String(i) : "",
|
|
2520
|
-
`,
|
|
2517
|
+
var t = Yi(e) ? String(i) : "", r = e[e.length - 1] === `
|
|
2518
|
+
`, a = r && (e[e.length - 2] === `
|
|
2521
2519
|
` || e === `
|
|
2522
|
-
`), o =
|
|
2520
|
+
`), o = a ? "+" : r ? "" : "-";
|
|
2523
2521
|
return t + o + `
|
|
2524
2522
|
`;
|
|
2525
2523
|
}
|
|
@@ -2528,53 +2526,53 @@ function Jt(e) {
|
|
|
2528
2526
|
` ? e.slice(0, -1) : e;
|
|
2529
2527
|
}
|
|
2530
2528
|
function xn(e, i) {
|
|
2531
|
-
for (var t = /(\n+)([^\n]*)/g,
|
|
2529
|
+
for (var t = /(\n+)([^\n]*)/g, r = function() {
|
|
2532
2530
|
var d = e.indexOf(`
|
|
2533
2531
|
`);
|
|
2534
2532
|
return d = d !== -1 ? d : e.length, t.lastIndex = d, Wt(e.slice(0, d), i);
|
|
2535
|
-
}(),
|
|
2533
|
+
}(), a = e[0] === `
|
|
2536
2534
|
` || e[0] === " ", o, l; l = t.exec(e); ) {
|
|
2537
2535
|
var n = l[1], c = l[2];
|
|
2538
|
-
o = c[0] === " ",
|
|
2539
|
-
` : "") + Wt(c, i),
|
|
2536
|
+
o = c[0] === " ", r += n + (!a && !o && c !== "" ? `
|
|
2537
|
+
` : "") + Wt(c, i), a = o;
|
|
2540
2538
|
}
|
|
2541
|
-
return
|
|
2539
|
+
return r;
|
|
2542
2540
|
}
|
|
2543
2541
|
function Wt(e, i) {
|
|
2544
2542
|
if (e === "" || e[0] === " ")
|
|
2545
2543
|
return e;
|
|
2546
|
-
for (var t = / [^ ]/g,
|
|
2547
|
-
n =
|
|
2548
|
-
` + e.slice(
|
|
2544
|
+
for (var t = / [^ ]/g, r, a = 0, o, l = 0, n = 0, c = ""; r = t.exec(e); )
|
|
2545
|
+
n = r.index, n - a > i && (o = l > a ? l : n, c += `
|
|
2546
|
+
` + e.slice(a, o), a = o + 1), l = n;
|
|
2549
2547
|
return c += `
|
|
2550
|
-
`, e.length -
|
|
2551
|
-
` + e.slice(l + 1) : c += e.slice(
|
|
2548
|
+
`, e.length - a > i && l > a ? c += e.slice(a, l) + `
|
|
2549
|
+
` + e.slice(l + 1) : c += e.slice(a), c.slice(1);
|
|
2552
2550
|
}
|
|
2553
2551
|
function Tn(e) {
|
|
2554
|
-
for (var i = "", t = 0,
|
|
2555
|
-
t = Be(e,
|
|
2552
|
+
for (var i = "", t = 0, r, a = 0; a < e.length; t >= 65536 ? a += 2 : a++)
|
|
2553
|
+
t = Be(e, a), r = me[t], !r && He(t) ? (i += e[a], t >= 65536 && (i += e[a + 1])) : i += r || bn(t);
|
|
2556
2554
|
return i;
|
|
2557
2555
|
}
|
|
2558
2556
|
function $n(e, i, t) {
|
|
2559
|
-
var
|
|
2557
|
+
var r = "", a = e.tag, o, l, n;
|
|
2560
2558
|
for (o = 0, l = t.length; o < l; o += 1)
|
|
2561
|
-
n = t[o], e.replacer && (n = e.replacer.call(t, String(o), n)), (ke(e, i, n, !1, !1) || typeof n > "u" && ke(e, i, null, !1, !1)) && (
|
|
2562
|
-
e.tag =
|
|
2559
|
+
n = t[o], e.replacer && (n = e.replacer.call(t, String(o), n)), (ke(e, i, n, !1, !1) || typeof n > "u" && ke(e, i, null, !1, !1)) && (r !== "" && (r += "," + (e.condenseFlow ? "" : " ")), r += e.dump);
|
|
2560
|
+
e.tag = a, e.dump = "[" + r + "]";
|
|
2563
2561
|
}
|
|
2564
|
-
function Yt(e, i, t,
|
|
2565
|
-
var
|
|
2562
|
+
function Yt(e, i, t, r) {
|
|
2563
|
+
var a = "", o = e.tag, l, n, c;
|
|
2566
2564
|
for (l = 0, n = t.length; l < n; l += 1)
|
|
2567
|
-
c = t[l], e.replacer && (c = e.replacer.call(t, String(l), c)), (ke(e, i + 1, c, !0, !0, !1, !0) || typeof c > "u" && ke(e, i + 1, null, !0, !0, !1, !0)) && ((!
|
|
2568
|
-
e.tag = o, e.dump =
|
|
2565
|
+
c = t[l], e.replacer && (c = e.replacer.call(t, String(l), c)), (ke(e, i + 1, c, !0, !0, !1, !0) || typeof c > "u" && ke(e, i + 1, null, !0, !0, !1, !0)) && ((!r || a !== "") && (a += ft(e, i)), e.dump && Re === e.dump.charCodeAt(0) ? a += "-" : a += "- ", a += e.dump);
|
|
2566
|
+
e.tag = o, e.dump = a || "[]";
|
|
2569
2567
|
}
|
|
2570
2568
|
function Mn(e, i, t) {
|
|
2571
|
-
var
|
|
2569
|
+
var r = "", a = e.tag, o = Object.keys(t), l, n, c, d, f;
|
|
2572
2570
|
for (l = 0, n = o.length; l < n; l += 1)
|
|
2573
|
-
f = "",
|
|
2574
|
-
e.tag =
|
|
2571
|
+
f = "", r !== "" && (f += ", "), e.condenseFlow && (f += '"'), c = o[l], d = t[c], e.replacer && (d = e.replacer.call(t, c, d)), ke(e, i, c, !1, !1) && (e.dump.length > 1024 && (f += "? "), f += e.dump + (e.condenseFlow ? '"' : "") + ":" + (e.condenseFlow ? "" : " "), ke(e, i, d, !1, !1) && (f += e.dump, r += f));
|
|
2572
|
+
e.tag = a, e.dump = "{" + r + "}";
|
|
2575
2573
|
}
|
|
2576
|
-
function En(e, i, t,
|
|
2577
|
-
var
|
|
2574
|
+
function En(e, i, t, r) {
|
|
2575
|
+
var a = "", o = e.tag, l = Object.keys(t), n, c, d, f, p, _;
|
|
2578
2576
|
if (e.sortKeys === !0)
|
|
2579
2577
|
l.sort();
|
|
2580
2578
|
else if (typeof e.sortKeys == "function")
|
|
@@ -2582,38 +2580,38 @@ function En(e, i, t, a) {
|
|
|
2582
2580
|
else if (e.sortKeys)
|
|
2583
2581
|
throw new ge("sortKeys must be a boolean or a function");
|
|
2584
2582
|
for (n = 0, c = l.length; n < c; n += 1)
|
|
2585
|
-
_ = "", (!
|
|
2586
|
-
e.tag = o, e.dump =
|
|
2583
|
+
_ = "", (!r || a !== "") && (_ += ft(e, i)), d = l[n], f = t[d], e.replacer && (f = e.replacer.call(t, d, f)), ke(e, i + 1, d, !0, !0, !0) && (p = e.tag !== null && e.tag !== "?" || e.dump && e.dump.length > 1024, p && (e.dump && Re === e.dump.charCodeAt(0) ? _ += "?" : _ += "? "), _ += e.dump, p && (_ += ft(e, i)), ke(e, i + 1, f, !0, p) && (e.dump && Re === e.dump.charCodeAt(0) ? _ += ":" : _ += ": ", _ += e.dump, a += _));
|
|
2584
|
+
e.tag = o, e.dump = a || "{}";
|
|
2587
2585
|
}
|
|
2588
2586
|
function Zt(e, i, t) {
|
|
2589
|
-
var
|
|
2590
|
-
for (
|
|
2591
|
-
if (n =
|
|
2587
|
+
var r, a, o, l, n, c;
|
|
2588
|
+
for (a = t ? e.explicitTypes : e.implicitTypes, o = 0, l = a.length; o < l; o += 1)
|
|
2589
|
+
if (n = a[o], (n.instanceOf || n.predicate) && (!n.instanceOf || typeof i == "object" && i instanceof n.instanceOf) && (!n.predicate || n.predicate(i))) {
|
|
2592
2590
|
if (t ? n.multi && n.representName ? e.tag = n.representName(i) : e.tag = n.tag : e.tag = "?", n.represent) {
|
|
2593
2591
|
if (c = e.styleMap[n.tag] || n.defaultStyle, Ri.call(n.represent) === "[object Function]")
|
|
2594
|
-
|
|
2592
|
+
r = n.represent(i, c);
|
|
2595
2593
|
else if (Di.call(n.represent, c))
|
|
2596
|
-
|
|
2594
|
+
r = n.represent[c](i, c);
|
|
2597
2595
|
else
|
|
2598
2596
|
throw new ge("!<" + n.tag + '> tag resolver accepts not "' + c + '" style');
|
|
2599
|
-
e.dump =
|
|
2597
|
+
e.dump = r;
|
|
2600
2598
|
}
|
|
2601
2599
|
return !0;
|
|
2602
2600
|
}
|
|
2603
2601
|
return !1;
|
|
2604
2602
|
}
|
|
2605
|
-
function ke(e, i, t,
|
|
2603
|
+
function ke(e, i, t, r, a, o, l) {
|
|
2606
2604
|
e.tag = null, e.dump = t, Zt(e, t, !1) || Zt(e, t, !0);
|
|
2607
|
-
var n = Ri.call(e.dump), c =
|
|
2608
|
-
|
|
2605
|
+
var n = Ri.call(e.dump), c = r, d;
|
|
2606
|
+
r && (r = e.flowLevel < 0 || e.flowLevel > i);
|
|
2609
2607
|
var f = n === "[object Object]" || n === "[object Array]", p, _;
|
|
2610
|
-
if (f && (p = e.duplicates.indexOf(t), _ = p !== -1), (e.tag !== null && e.tag !== "?" || _ || e.indent !== 2 && i > 0) && (
|
|
2608
|
+
if (f && (p = e.duplicates.indexOf(t), _ = p !== -1), (e.tag !== null && e.tag !== "?" || _ || e.indent !== 2 && i > 0) && (a = !1), _ && e.usedDuplicates[p])
|
|
2611
2609
|
e.dump = "*ref_" + p;
|
|
2612
2610
|
else {
|
|
2613
2611
|
if (f && _ && !e.usedDuplicates[p] && (e.usedDuplicates[p] = !0), n === "[object Object]")
|
|
2614
|
-
|
|
2612
|
+
r && Object.keys(e.dump).length !== 0 ? (En(e, i, e.dump, a), _ && (e.dump = "&ref_" + p + e.dump)) : (Mn(e, i, e.dump), _ && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2615
2613
|
else if (n === "[object Array]")
|
|
2616
|
-
|
|
2614
|
+
r && e.dump.length !== 0 ? (e.noArrayIndent && !l && i > 0 ? Yt(e, i - 1, e.dump, a) : Yt(e, i, e.dump, a), _ && (e.dump = "&ref_" + p + e.dump)) : ($n(e, i, e.dump), _ && (e.dump = "&ref_" + p + " " + e.dump));
|
|
2617
2615
|
else if (n === "[object String]")
|
|
2618
2616
|
e.tag !== "?" && An(e, e.dump, i, o, c);
|
|
2619
2617
|
else {
|
|
@@ -2628,29 +2626,29 @@ function ke(e, i, t, a, r, o, l) {
|
|
|
2628
2626
|
return !0;
|
|
2629
2627
|
}
|
|
2630
2628
|
function jn(e, i) {
|
|
2631
|
-
var t = [],
|
|
2632
|
-
for (gt(e, t,
|
|
2633
|
-
i.duplicates.push(t[a
|
|
2629
|
+
var t = [], r = [], a, o;
|
|
2630
|
+
for (gt(e, t, r), a = 0, o = r.length; a < o; a += 1)
|
|
2631
|
+
i.duplicates.push(t[r[a]]);
|
|
2634
2632
|
i.usedDuplicates = new Array(o);
|
|
2635
2633
|
}
|
|
2636
2634
|
function gt(e, i, t) {
|
|
2637
|
-
var
|
|
2635
|
+
var r, a, o;
|
|
2638
2636
|
if (e !== null && typeof e == "object")
|
|
2639
|
-
if (
|
|
2640
|
-
t.indexOf(
|
|
2637
|
+
if (a = i.indexOf(e), a !== -1)
|
|
2638
|
+
t.indexOf(a) === -1 && t.push(a);
|
|
2641
2639
|
else if (i.push(e), Array.isArray(e))
|
|
2642
|
-
for (
|
|
2643
|
-
gt(e[
|
|
2640
|
+
for (a = 0, o = e.length; a < o; a += 1)
|
|
2641
|
+
gt(e[a], i, t);
|
|
2644
2642
|
else
|
|
2645
|
-
for (
|
|
2646
|
-
gt(e[a
|
|
2643
|
+
for (r = Object.keys(e), a = 0, o = r.length; a < o; a += 1)
|
|
2644
|
+
gt(e[r[a]], i, t);
|
|
2647
2645
|
}
|
|
2648
2646
|
function Vn(e, i) {
|
|
2649
2647
|
i = i || {};
|
|
2650
2648
|
var t = new wn(i);
|
|
2651
2649
|
t.noRefs || jn(e, t);
|
|
2652
|
-
var
|
|
2653
|
-
return t.replacer && (
|
|
2650
|
+
var r = e;
|
|
2651
|
+
return t.replacer && (r = t.replacer.call({ "": r }, "", r)), ke(t, 0, r, !0, !0) ? t.dump + `
|
|
2654
2652
|
` : "";
|
|
2655
2653
|
}
|
|
2656
2654
|
var On = Vn, Fn = {
|
|
@@ -2703,7 +2701,7 @@ const Zn = {
|
|
|
2703
2701
|
}, tl = {
|
|
2704
2702
|
key: 2,
|
|
2705
2703
|
class: "config-card-display-yaml"
|
|
2706
|
-
}, il = /* @__PURE__ */
|
|
2704
|
+
}, il = /* @__PURE__ */ ae({
|
|
2707
2705
|
__name: "ConfigCardDisplay",
|
|
2708
2706
|
props: {
|
|
2709
2707
|
propertyCollections: {
|
|
@@ -2729,7 +2727,7 @@ const Zn = {
|
|
|
2729
2727
|
}
|
|
2730
2728
|
},
|
|
2731
2729
|
setup(e) {
|
|
2732
|
-
const i = e, t = tt(), { i18n: { t:
|
|
2730
|
+
const i = e, t = tt(), { i18n: { t: r } } = ce.useI18n(), a = (n) => !!(n.tooltip || t[`${n.key}-label-tooltip`]), o = F(""), l = F("");
|
|
2733
2731
|
return we(() => i.format, (n) => {
|
|
2734
2732
|
n === "json" ? o.value = JSON.stringify(i.record, null, 2) : n === "yaml" && (l.value = Yn.dump(i.record));
|
|
2735
2733
|
}, { immediate: !0 }), (n, c) => {
|
|
@@ -2741,7 +2739,7 @@ const Zn = {
|
|
|
2741
2739
|
class: $e(`config-card-details-${f}-props`),
|
|
2742
2740
|
"data-testid": `config-card-details-${f}-props`
|
|
2743
2741
|
}, [
|
|
2744
|
-
f !== "basic" ? (b(), $("div", Xn, j(f === "advanced" ? m(
|
|
2742
|
+
f !== "basic" ? (b(), $("div", Xn, j(f === "advanced" ? m(r)("baseConfigCard.sections.advanced") : m(r)("baseConfigCard.sections.plugin")), 1)) : H("", !0),
|
|
2745
2743
|
(b(!0), $(he, null, ve(e.propertyCollections[f], (p) => (b(), R(wt, {
|
|
2746
2744
|
key: p.key,
|
|
2747
2745
|
item: p
|
|
@@ -2757,7 +2755,7 @@ const Zn = {
|
|
|
2757
2755
|
]),
|
|
2758
2756
|
_: 2
|
|
2759
2757
|
}, [
|
|
2760
|
-
|
|
2758
|
+
a(p) ? {
|
|
2761
2759
|
name: "label-tooltip",
|
|
2762
2760
|
fn: y(() => [
|
|
2763
2761
|
Q(n.$slots, `${p.key}-label-tooltip`, { row: p }, void 0, !0)
|
|
@@ -2786,18 +2784,18 @@ const Zn = {
|
|
|
2786
2784
|
], 64);
|
|
2787
2785
|
};
|
|
2788
2786
|
}
|
|
2789
|
-
}),
|
|
2787
|
+
}), rl = /* @__PURE__ */ be(il, [["__scopeId", "data-v-6c45e9e4"]]), Qt = "24px", al = (e, i) => {
|
|
2790
2788
|
const t = e.__vccOpts || e;
|
|
2791
|
-
for (const [
|
|
2792
|
-
t[
|
|
2789
|
+
for (const [r, a] of i)
|
|
2790
|
+
t[r] = a;
|
|
2793
2791
|
return t;
|
|
2794
|
-
}, ol = (e) => (
|
|
2792
|
+
}, ol = (e) => (ri("data-v-dd88a2bb"), e = e(), ai(), e), nl = ["aria-hidden"], ll = {
|
|
2795
2793
|
key: 0,
|
|
2796
2794
|
"data-testid": "kui-icon-svg-title"
|
|
2797
2795
|
}, sl = /* @__PURE__ */ ol(() => /* @__PURE__ */ O("path", {
|
|
2798
2796
|
d: "M14 9.9V8.2C14.55 7.96667 15.1125 7.79167 15.6875 7.675C16.2625 7.55833 16.8667 7.5 17.5 7.5C17.9333 7.5 18.3583 7.53333 18.775 7.6C19.1917 7.66667 19.6 7.75 20 7.85V9.45C19.6 9.3 19.1958 9.1875 18.7875 9.1125C18.3792 9.0375 17.95 9 17.5 9C16.8667 9 16.2583 9.07917 15.675 9.2375C15.0917 9.39583 14.5333 9.61667 14 9.9ZM14 15.4V13.7C14.55 13.4667 15.1125 13.2917 15.6875 13.175C16.2625 13.0583 16.8667 13 17.5 13C17.9333 13 18.3583 13.0333 18.775 13.1C19.1917 13.1667 19.6 13.25 20 13.35V14.95C19.6 14.8 19.1958 14.6875 18.7875 14.6125C18.3792 14.5375 17.95 14.5 17.5 14.5C16.8667 14.5 16.2583 14.575 15.675 14.725C15.0917 14.875 14.5333 15.1 14 15.4ZM14 12.65V10.95C14.55 10.7167 15.1125 10.5417 15.6875 10.425C16.2625 10.3083 16.8667 10.25 17.5 10.25C17.9333 10.25 18.3583 10.2833 18.775 10.35C19.1917 10.4167 19.6 10.5 20 10.6V12.2C19.6 12.05 19.1958 11.9375 18.7875 11.8625C18.3792 11.7875 17.95 11.75 17.5 11.75C16.8667 11.75 16.2583 11.8292 15.675 11.9875C15.0917 12.1458 14.5333 12.3667 14 12.65ZM6.5 16C7.28333 16 8.04583 16.0875 8.7875 16.2625C9.52917 16.4375 10.2667 16.7 11 17.05V7.2C10.3167 6.8 9.59167 6.5 8.825 6.3C8.05833 6.1 7.28333 6 6.5 6C5.9 6 5.30417 6.05833 4.7125 6.175C4.12083 6.29167 3.55 6.46667 3 6.7V16.6C3.58333 16.4 4.1625 16.25 4.7375 16.15C5.3125 16.05 5.9 16 6.5 16ZM13 17.05C13.7333 16.7 14.4708 16.4375 15.2125 16.2625C15.9542 16.0875 16.7167 16 17.5 16C18.1 16 18.6875 16.05 19.2625 16.15C19.8375 16.25 20.4167 16.4 21 16.6V6.7C20.45 6.46667 19.8792 6.29167 19.2875 6.175C18.6958 6.05833 18.1 6 17.5 6C16.7167 6 15.9417 6.1 15.175 6.3C14.4083 6.5 13.6833 6.8 13 7.2V17.05ZM12 20C11.2 19.3667 10.3333 18.875 9.4 18.525C8.46667 18.175 7.5 18 6.5 18C5.8 18 5.1125 18.0917 4.4375 18.275C3.7625 18.4583 3.11667 18.7167 2.5 19.05C2.15 19.2333 1.8125 19.225 1.4875 19.025C1.1625 18.825 1 18.5333 1 18.15V6.1C1 5.91667 1.04583 5.74167 1.1375 5.575C1.22917 5.40833 1.36667 5.28333 1.55 5.2C2.31667 4.8 3.11667 4.5 3.95 4.3C4.78333 4.1 5.63333 4 6.5 4C7.46667 4 8.4125 4.125 9.3375 4.375C10.2625 4.625 11.15 5 12 5.5C12.85 5 13.7375 4.625 14.6625 4.375C15.5875 4.125 16.5333 4 17.5 4C18.3667 4 19.2167 4.1 20.05 4.3C20.8833 4.5 21.6833 4.8 22.45 5.2C22.6333 5.28333 22.7708 5.40833 22.8625 5.575C22.9542 5.74167 23 5.91667 23 6.1V18.15C23 18.5333 22.8375 18.825 22.5125 19.025C22.1875 19.225 21.85 19.2333 21.5 19.05C20.8833 18.7167 20.2375 18.4583 19.5625 18.275C18.8875 18.0917 18.2 18 17.5 18C16.5 18 15.5333 18.175 14.6 18.525C13.6667 18.875 12.8 19.3667 12 20Z",
|
|
2799
2797
|
fill: "currentColor"
|
|
2800
|
-
}, null, -1)), cl = /* @__PURE__ */
|
|
2798
|
+
}, null, -1)), cl = /* @__PURE__ */ ae({
|
|
2801
2799
|
__name: "BookIcon",
|
|
2802
2800
|
props: {
|
|
2803
2801
|
/** The accessibility text provided to screen readers */
|
|
@@ -2853,12 +2851,12 @@ const Zn = {
|
|
|
2853
2851
|
if (typeof i.size == "number" && i.size > 0)
|
|
2854
2852
|
return `${i.size}px`;
|
|
2855
2853
|
if (typeof i.size == "string") {
|
|
2856
|
-
const
|
|
2854
|
+
const a = String(i.size).replace(/px/gi, ""), o = Number(a);
|
|
2857
2855
|
if (o && !isNaN(o) && Number.isInteger(o) && o > 0)
|
|
2858
2856
|
return `${o}px`;
|
|
2859
2857
|
}
|
|
2860
2858
|
return Qt;
|
|
2861
|
-
}),
|
|
2859
|
+
}), r = x(() => ({
|
|
2862
2860
|
boxSizing: "border-box",
|
|
2863
2861
|
color: i.color,
|
|
2864
2862
|
display: i.display,
|
|
@@ -2866,11 +2864,11 @@ const Zn = {
|
|
|
2866
2864
|
lineHeight: "0",
|
|
2867
2865
|
width: t.value
|
|
2868
2866
|
}));
|
|
2869
|
-
return (
|
|
2867
|
+
return (a, o) => (b(), R(Ke(e.as), {
|
|
2870
2868
|
"aria-hidden": e.decorative ? "true" : void 0,
|
|
2871
2869
|
class: "kui-icon book-icon",
|
|
2872
2870
|
"data-testid": "kui-icon-wrapper-book-icon",
|
|
2873
|
-
style: ii(
|
|
2871
|
+
style: ii(r.value)
|
|
2874
2872
|
}, {
|
|
2875
2873
|
default: y(() => [
|
|
2876
2874
|
(b(), $("svg", {
|
|
@@ -2890,7 +2888,7 @@ const Zn = {
|
|
|
2890
2888
|
_: 1
|
|
2891
2889
|
}, 8, ["aria-hidden", "style"]));
|
|
2892
2890
|
}
|
|
2893
|
-
}), ul = /* @__PURE__ */
|
|
2891
|
+
}), ul = /* @__PURE__ */ al(cl, [["__scopeId", "data-v-dd88a2bb"]]), dl = { "data-testid": "config-card-title" }, pl = { class: "config-card-actions" }, fl = ["href"], ml = {
|
|
2894
2892
|
key: 2,
|
|
2895
2893
|
class: "config-card-details-section"
|
|
2896
2894
|
}, gl = {
|
|
@@ -2899,7 +2897,7 @@ const Zn = {
|
|
|
2899
2897
|
}, yl = ["data-testid"], vl = {
|
|
2900
2898
|
key: 0,
|
|
2901
2899
|
class: "config-card-prop-section-title"
|
|
2902
|
-
}, hl = /* @__PURE__ */
|
|
2900
|
+
}, hl = /* @__PURE__ */ ae({
|
|
2903
2901
|
__name: "EntityBaseConfigCard",
|
|
2904
2902
|
props: {
|
|
2905
2903
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -2974,8 +2972,8 @@ const Zn = {
|
|
|
2974
2972
|
emits: ["loading", "fetch:success", "fetch:error", "copy:success", "copy:error"],
|
|
2975
2973
|
setup(e, { emit: i }) {
|
|
2976
2974
|
var t;
|
|
2977
|
-
const
|
|
2978
|
-
headers: (t =
|
|
2975
|
+
const r = e, a = tt(), { i18n: { t: o } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { convertKeyToTitle: n } = ce.useStringHelpers(), { axiosInstance: c } = ce.useAxios({
|
|
2976
|
+
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
2979
2977
|
}), d = [
|
|
2980
2978
|
{
|
|
2981
2979
|
label: o("baseConfigCard.general.structuredFormat"),
|
|
@@ -3032,7 +3030,7 @@ const Zn = {
|
|
|
3032
3030
|
return [];
|
|
3033
3031
|
const N = [], z = Object.keys(v.value).length;
|
|
3034
3032
|
for (const D in v.value) {
|
|
3035
|
-
const X = (q = (A =
|
|
3033
|
+
const X = (q = (A = r.configSchema) == null ? void 0 : A[D]) == null ? void 0 : q.order, G = (U = _[D]) == null ? void 0 : U.order;
|
|
3036
3034
|
let ie = z;
|
|
3037
3035
|
(G || G === 0) && (ie = G === -1 ? z + 1 : G), X && (ie = X === -1 ? z + 1 : X), N.push([D, ie]);
|
|
3038
3036
|
}
|
|
@@ -3040,7 +3038,7 @@ const Zn = {
|
|
|
3040
3038
|
return D[1] - X[1];
|
|
3041
3039
|
}), N.map((D) => {
|
|
3042
3040
|
var X, G;
|
|
3043
|
-
const ie = D[0], Z = (X = v.value) == null ? void 0 : X[ie], ee = ((G =
|
|
3041
|
+
const ie = D[0], Z = (X = v.value) == null ? void 0 : X[ie], ee = ((G = r.configSchema) == null ? void 0 : G[ie]) || {}, de = _[ie];
|
|
3044
3042
|
return {
|
|
3045
3043
|
key: ie,
|
|
3046
3044
|
value: Z,
|
|
@@ -3050,14 +3048,14 @@ const Zn = {
|
|
|
3050
3048
|
tooltip: ee.tooltip ?? ((de == null ? void 0 : de.tooltip) || void 0),
|
|
3051
3049
|
section: ee.section ?? ((de == null ? void 0 : de.section) || fe.Advanced)
|
|
3052
3050
|
};
|
|
3053
|
-
}).filter((D) => !D.hidden && D.key !==
|
|
3051
|
+
}).filter((D) => !D.hidden && D.key !== r.pluginConfigKey);
|
|
3054
3052
|
}), s = x(() => {
|
|
3055
3053
|
var A, q;
|
|
3056
|
-
if (!v.value || !
|
|
3054
|
+
if (!v.value || !r.pluginConfigKey)
|
|
3057
3055
|
return [];
|
|
3058
|
-
const U = v.value[
|
|
3056
|
+
const U = v.value[r.pluginConfigKey] || {}, N = Object.keys(U).length, z = [];
|
|
3059
3057
|
for (const D in U) {
|
|
3060
|
-
const X = (q = (A =
|
|
3058
|
+
const X = (q = (A = r.pluginConfigSchema) == null ? void 0 : A[D]) == null ? void 0 : q.order, G = U[D];
|
|
3061
3059
|
let ie = G != null && G !== "" ? N - 1 : N;
|
|
3062
3060
|
X && (ie = X === -1 ? N + 1 : X), z.push([D, ie]);
|
|
3063
3061
|
}
|
|
@@ -3065,7 +3063,7 @@ const Zn = {
|
|
|
3065
3063
|
return D[1] - X[1];
|
|
3066
3064
|
}), z.map((D) => {
|
|
3067
3065
|
var X;
|
|
3068
|
-
const G = D[0], ie = U[G], Z = ((X =
|
|
3066
|
+
const G = D[0], ie = U[G], Z = ((X = r.pluginConfigSchema) == null ? void 0 : X[G]) || {};
|
|
3069
3067
|
return {
|
|
3070
3068
|
key: G,
|
|
3071
3069
|
value: ie,
|
|
@@ -3086,10 +3084,10 @@ const Zn = {
|
|
|
3086
3084
|
}), C = x(() => {
|
|
3087
3085
|
const A = [];
|
|
3088
3086
|
return E.value.basic.length && A.push("basic"), E.value.advanced.length && A.push("advanced"), E.value.plugin.length && A.push("plugin"), A;
|
|
3089
|
-
}), P = (A) => !!(A.tooltip ||
|
|
3087
|
+
}), P = (A) => !!(A.tooltip || a[`${A.key}-label-tooltip`]), oe = x(() => {
|
|
3090
3088
|
var A, q;
|
|
3091
|
-
let U = `${
|
|
3092
|
-
return
|
|
3089
|
+
let U = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3090
|
+
return r.config.app === "konnect" ? U = U.replace(/{controlPlaneId}/gi, ((A = r.config) == null ? void 0 : A.controlPlaneId) || "") : r.config.app === "kongManager" && (U = U.replace(/\/{workspace}/gi, (q = r.config) != null && q.workspace ? `/${r.config.workspace}` : "")), U = U.replace(/{id}/gi, r.config.entityId), U;
|
|
3093
3091
|
}), Y = (A) => {
|
|
3094
3092
|
v.value && A(JSON.stringify(v.value)) ? i("copy:success", v.value) : i("copy:error");
|
|
3095
3093
|
};
|
|
@@ -3099,14 +3097,14 @@ const Zn = {
|
|
|
3099
3097
|
I.value = !1, h.value = !0;
|
|
3100
3098
|
try {
|
|
3101
3099
|
const { data: A } = await c.get(oe.value);
|
|
3102
|
-
if (
|
|
3103
|
-
if (typeof A[
|
|
3104
|
-
v.value = { ...A[
|
|
3100
|
+
if (r.dataKey)
|
|
3101
|
+
if (typeof A[r.dataKey] < "u")
|
|
3102
|
+
v.value = { ...A[r.dataKey] };
|
|
3105
3103
|
else
|
|
3106
|
-
throw new Error(o("errors.dataKeyUndefined", { dataKey:
|
|
3104
|
+
throw new Error(o("errors.dataKeyUndefined", { dataKey: r.dataKey }));
|
|
3107
3105
|
else
|
|
3108
3106
|
v.value = { ...A };
|
|
3109
|
-
Object.keys(
|
|
3107
|
+
Object.keys(r.configSchema).filter((q) => r.configSchema[q].forceShow).forEach((q) => {
|
|
3110
3108
|
v.value && typeof v.value[q] > "u" && (v.value[q] = null);
|
|
3111
3109
|
}), i("fetch:success", A);
|
|
3112
3110
|
} catch (A) {
|
|
@@ -3138,7 +3136,7 @@ const Zn = {
|
|
|
3138
3136
|
items: d,
|
|
3139
3137
|
onChange: p
|
|
3140
3138
|
})) : H("", !0),
|
|
3141
|
-
|
|
3139
|
+
r.config.jsonYamlEnabled && e.configCardDoc ? (b(), R(z, {
|
|
3142
3140
|
key: 2,
|
|
3143
3141
|
appearance: "tertiary",
|
|
3144
3142
|
class: "book-icon",
|
|
@@ -3150,7 +3148,7 @@ const Zn = {
|
|
|
3150
3148
|
rel: "noopener",
|
|
3151
3149
|
target: "_blank"
|
|
3152
3150
|
}, [
|
|
3153
|
-
S(m(ul), { size: m(
|
|
3151
|
+
S(m(ul), { size: m(ya) }, null, 8, ["size"])
|
|
3154
3152
|
], 8, fl)
|
|
3155
3153
|
]),
|
|
3156
3154
|
_: 1
|
|
@@ -3190,7 +3188,7 @@ const Zn = {
|
|
|
3190
3188
|
_: 1
|
|
3191
3189
|
})) : H("", !0),
|
|
3192
3190
|
e.config.jsonYamlEnabled ? (b(), $("div", ml, [
|
|
3193
|
-
S(
|
|
3191
|
+
S(rl, {
|
|
3194
3192
|
format: f.value,
|
|
3195
3193
|
"prop-list-types": C.value,
|
|
3196
3194
|
"property-collections": E.value,
|
|
@@ -3255,10 +3253,10 @@ const Zn = {
|
|
|
3255
3253
|
]), 1024);
|
|
3256
3254
|
};
|
|
3257
3255
|
}
|
|
3258
|
-
}), bl = /* @__PURE__ */ be(hl, [["__scopeId", "data-v-
|
|
3256
|
+
}), bl = /* @__PURE__ */ be(hl, [["__scopeId", "data-v-24515123"]]), _l = ["onReset", "onSubmit"], wl = {
|
|
3259
3257
|
class: "form-actions",
|
|
3260
3258
|
"data-testid": "form-actions"
|
|
3261
|
-
}, kl = /* @__PURE__ */
|
|
3259
|
+
}, kl = /* @__PURE__ */ ae({
|
|
3262
3260
|
__name: "EntityBaseForm",
|
|
3263
3261
|
props: {
|
|
3264
3262
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -3308,16 +3306,16 @@ const Zn = {
|
|
|
3308
3306
|
emits: ["loading", "fetch:success", "fetch:error", "submit", "cancel"],
|
|
3309
3307
|
setup(e, { emit: i }) {
|
|
3310
3308
|
var t;
|
|
3311
|
-
const
|
|
3312
|
-
headers: (t =
|
|
3313
|
-
}), c = F(!1), d = F(!1), f = F(""), p = x(() =>
|
|
3309
|
+
const r = e, a = vt(), { i18n: { t: o } } = ce.useI18n(), { getMessageFromError: l } = ce.useErrors(), { axiosInstance: n } = ce.useAxios({
|
|
3310
|
+
headers: (t = r.config) == null ? void 0 : t.requestHeaders
|
|
3311
|
+
}), c = F(!1), d = F(!1), f = F(""), p = x(() => r.canSubmit === !1 || r.isReadonly), _ = x(() => {
|
|
3314
3312
|
var v, T;
|
|
3315
|
-
if (!
|
|
3313
|
+
if (!r.editId)
|
|
3316
3314
|
return "";
|
|
3317
|
-
let s = `${
|
|
3318
|
-
return
|
|
3315
|
+
let s = `${r.config.apiBaseUrl}${r.fetchUrl}`;
|
|
3316
|
+
return r.config.app === "konnect" ? s = s.replace(/{controlPlaneId}/gi, ((v = r.config) == null ? void 0 : v.controlPlaneId) || "") : r.config.app === "kongManager" && (s = s.replace(/\/{workspace}/gi, (T = r.config) != null && T.workspace ? `/${r.config.workspace}` : "")), s = s.replace(/{id}/gi, r.editId), s;
|
|
3319
3317
|
}), h = () => {
|
|
3320
|
-
|
|
3318
|
+
r.config.cancelRoute ? a.push(r.config.cancelRoute) : I();
|
|
3321
3319
|
}, I = () => {
|
|
3322
3320
|
i("cancel");
|
|
3323
3321
|
}, k = () => {
|
|
@@ -3326,7 +3324,7 @@ const Zn = {
|
|
|
3326
3324
|
return we(() => c.value, (v) => {
|
|
3327
3325
|
i("loading", v);
|
|
3328
3326
|
}, { immediate: !0 }), yt(async () => {
|
|
3329
|
-
if (
|
|
3327
|
+
if (r.editId)
|
|
3330
3328
|
try {
|
|
3331
3329
|
d.value = !1, c.value = !0;
|
|
3332
3330
|
const { data: v } = await n.get(_.value);
|
|
@@ -3403,7 +3401,7 @@ const Zn = {
|
|
|
3403
3401
|
}), Cl = /* @__PURE__ */ be(kl, [["__scopeId", "data-v-81612aef"]]), Sl = {
|
|
3404
3402
|
key: 0,
|
|
3405
3403
|
"data-testid": "first-col"
|
|
3406
|
-
}, Il = /* @__PURE__ */
|
|
3404
|
+
}, Il = /* @__PURE__ */ ae({
|
|
3407
3405
|
__name: "EntityBaseTableCell",
|
|
3408
3406
|
props: {
|
|
3409
3407
|
keyName: {
|
|
@@ -3419,10 +3417,10 @@ const Zn = {
|
|
|
3419
3417
|
const i = e, t = x(() => {
|
|
3420
3418
|
var k;
|
|
3421
3419
|
return ((k = i.rowEl) == null ? void 0 : k.querySelector(`[data-testid="${i.keyName}"]`)) || null;
|
|
3422
|
-
}),
|
|
3420
|
+
}), r = x(() => {
|
|
3423
3421
|
var k;
|
|
3424
3422
|
return ((k = t.value) == null ? void 0 : k.querySelector('[data-testid="first-col"]')) || null;
|
|
3425
|
-
}),
|
|
3423
|
+
}), a = x(() => {
|
|
3426
3424
|
var k, v;
|
|
3427
3425
|
const T = (k = i.rowEl) == null ? void 0 : k.querySelectorAll("td");
|
|
3428
3426
|
return T ? ((v = T[0]) == null ? void 0 : v.getAttribute("data-testid")) === i.keyName : !1;
|
|
@@ -3432,11 +3430,11 @@ const Zn = {
|
|
|
3432
3430
|
o && (o.disconnect(), o = void 0);
|
|
3433
3431
|
}, n = () => {
|
|
3434
3432
|
var k, v, T;
|
|
3435
|
-
d.value = ((k =
|
|
3436
|
-
}, c = F({}), d = F(0), f = F(0), p = F(""), _ = x(() => [
|
|
3433
|
+
d.value = ((k = r.value) == null ? void 0 : k.getBoundingClientRect().width) || 0, f.value = ((v = t.value) == null ? void 0 : v.clientWidth) || 0, p.value = ((T = c.value) == null ? void 0 : T.innerText) || "";
|
|
3434
|
+
}, c = F({}), d = F(0), f = F(0), p = F(""), _ = x(() => [r.value, t.value]), h = we(
|
|
3437
3435
|
_,
|
|
3438
3436
|
(k) => {
|
|
3439
|
-
if (
|
|
3437
|
+
if (a.value && (l(), "ResizeObserver" in window && window)) {
|
|
3440
3438
|
o = new ResizeObserver((v) => {
|
|
3441
3439
|
window.requestAnimationFrame(() => {
|
|
3442
3440
|
!Array.isArray(v) || !v.length || n();
|
|
@@ -3447,10 +3445,10 @@ const Zn = {
|
|
|
3447
3445
|
}
|
|
3448
3446
|
},
|
|
3449
3447
|
{ immediate: !0, flush: "post", deep: !0 }
|
|
3450
|
-
), I = x(() =>
|
|
3448
|
+
), I = x(() => a.value ? d.value > f.value : !1);
|
|
3451
3449
|
return ti(() => {
|
|
3452
3450
|
n();
|
|
3453
|
-
}),
|
|
3451
|
+
}), nr(() => {
|
|
3454
3452
|
h();
|
|
3455
3453
|
}), (k, v) => {
|
|
3456
3454
|
const T = L("KTooltip");
|
|
@@ -3459,7 +3457,7 @@ const Zn = {
|
|
|
3459
3457
|
ref: c,
|
|
3460
3458
|
class: "content-wrapper"
|
|
3461
3459
|
}, [
|
|
3462
|
-
|
|
3460
|
+
a.value ? (b(), $("span", Sl, [
|
|
3463
3461
|
S(T, {
|
|
3464
3462
|
label: I.value ? p.value : "",
|
|
3465
3463
|
"max-width": "300",
|
|
@@ -3477,7 +3475,7 @@ const Zn = {
|
|
|
3477
3475
|
}), Al = /* @__PURE__ */ be(Il, [["__scopeId", "data-v-e42a20c9"]]), xl = { class: "toolbar-container" }, Tl = {
|
|
3478
3476
|
key: 0,
|
|
3479
3477
|
class: "toolbar-button-container"
|
|
3480
|
-
}, $l = ["data-testid"], Ml = /* @__PURE__ */
|
|
3478
|
+
}, $l = ["data-testid"], Ml = /* @__PURE__ */ ae({
|
|
3481
3479
|
__name: "EntityBaseTable",
|
|
3482
3480
|
props: {
|
|
3483
3481
|
// table header configuration
|
|
@@ -3587,7 +3585,7 @@ const Zn = {
|
|
|
3587
3585
|
},
|
|
3588
3586
|
emits: ["click:row", "sort", "clear-search-input", "empty-state-cta-clicked"],
|
|
3589
3587
|
setup(e, { emit: i }) {
|
|
3590
|
-
const t = e, { i18n: { t:
|
|
3588
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), a = x(() => {
|
|
3591
3589
|
var C, P;
|
|
3592
3590
|
return typeof t.errorMessage == "string" ? {
|
|
3593
3591
|
hasError: !!t.errorMessage,
|
|
@@ -3636,7 +3634,7 @@ const Zn = {
|
|
|
3636
3634
|
i("click:row", P);
|
|
3637
3635
|
}), k = (C) => {
|
|
3638
3636
|
i("sort", C);
|
|
3639
|
-
}, { setTablePreferences: v, getTablePreferences: T } =
|
|
3637
|
+
}, { setTablePreferences: v, getTablePreferences: T } = wr(), s = x(() => {
|
|
3640
3638
|
const C = T(t.preferencesStorageKey);
|
|
3641
3639
|
return {
|
|
3642
3640
|
...t.initialFetcherParams,
|
|
@@ -3660,18 +3658,18 @@ const Zn = {
|
|
|
3660
3658
|
"disable-pagination-page-jump": e.disablePaginationPageJump,
|
|
3661
3659
|
"disable-sorting": e.disableSorting,
|
|
3662
3660
|
"empty-state-action-button-icon": e.query ? "" : "plus",
|
|
3663
|
-
"empty-state-action-message": e.query ? m(
|
|
3661
|
+
"empty-state-action-message": e.query ? m(r)("baseTable.emptyState.noSearchResultsCtaText") : e.emptyStateOptions.ctaText,
|
|
3664
3662
|
"empty-state-action-route": e.query ? "" : e.emptyStateOptions.ctaPath,
|
|
3665
3663
|
"empty-state-icon": e.query ? "stateNoSearchResults" : "stateGruceo",
|
|
3666
3664
|
"empty-state-icon-size": "96",
|
|
3667
|
-
"empty-state-message": e.query ? m(
|
|
3668
|
-
"empty-state-title": e.query ? m(
|
|
3665
|
+
"empty-state-message": e.query ? m(r)("baseTable.emptyState.noSearchResultsMessage") : e.emptyStateOptions.message,
|
|
3666
|
+
"empty-state-title": e.query ? m(r)("baseTable.emptyState.noSearchResultsTitle") : e.emptyStateOptions.title,
|
|
3669
3667
|
"enable-client-sort": e.enableClientSort,
|
|
3670
|
-
"error-state-message":
|
|
3671
|
-
"error-state-title":
|
|
3668
|
+
"error-state-message": a.value.message,
|
|
3669
|
+
"error-state-title": a.value.title,
|
|
3672
3670
|
fetcher: e.fetcher,
|
|
3673
3671
|
"fetcher-cache-key": String(e.fetcherCacheKey),
|
|
3674
|
-
"has-error":
|
|
3672
|
+
"has-error": a.value.hasError,
|
|
3675
3673
|
headers: n.value,
|
|
3676
3674
|
"hide-pagination-when-optional": "",
|
|
3677
3675
|
"initial-fetcher-params": s.value,
|
|
@@ -3718,7 +3716,7 @@ const Zn = {
|
|
|
3718
3716
|
}, {
|
|
3719
3717
|
icon: y(() => [
|
|
3720
3718
|
S(oe, {
|
|
3721
|
-
color: m(
|
|
3719
|
+
color: m(ma),
|
|
3722
3720
|
icon: "more",
|
|
3723
3721
|
size: "16"
|
|
3724
3722
|
}, null, 8, ["color"])
|
|
@@ -3764,7 +3762,7 @@ const Zn = {
|
|
|
3764
3762
|
}, Vl = {
|
|
3765
3763
|
key: 1,
|
|
3766
3764
|
class: "description"
|
|
3767
|
-
}, Ol = /* @__PURE__ */
|
|
3765
|
+
}, Ol = /* @__PURE__ */ ae({
|
|
3768
3766
|
__name: "EntityDeleteModal",
|
|
3769
3767
|
props: {
|
|
3770
3768
|
visible: {
|
|
@@ -3803,7 +3801,7 @@ const Zn = {
|
|
|
3803
3801
|
},
|
|
3804
3802
|
emits: ["cancel", "proceed"],
|
|
3805
3803
|
setup(e, { emit: i }) {
|
|
3806
|
-
const t = e, { i18nT:
|
|
3804
|
+
const t = e, { i18nT: r } = ce.useI18n(), a = x(() => t.needConfirm ? t.entityName : ""), o = () => {
|
|
3807
3805
|
i("cancel");
|
|
3808
3806
|
}, l = () => {
|
|
3809
3807
|
i("proceed");
|
|
@@ -3814,7 +3812,7 @@ const Zn = {
|
|
|
3814
3812
|
"action-button-text": "Yes, delete",
|
|
3815
3813
|
"action-pending": e.actionPending,
|
|
3816
3814
|
class: "kong-ui-entity-delete-modal",
|
|
3817
|
-
"confirmation-text":
|
|
3815
|
+
"confirmation-text": a.value,
|
|
3818
3816
|
"is-visible": e.visible,
|
|
3819
3817
|
title: e.title,
|
|
3820
3818
|
type: "danger",
|
|
@@ -3830,7 +3828,7 @@ const Zn = {
|
|
|
3830
3828
|
_: 1
|
|
3831
3829
|
})
|
|
3832
3830
|
])) : H("", !0),
|
|
3833
|
-
S(m(
|
|
3831
|
+
S(m(r), {
|
|
3834
3832
|
class: "message",
|
|
3835
3833
|
keypath: t.entityName ? "deleteModal.messageWithName" : "deleteModal.message",
|
|
3836
3834
|
tag: "p"
|
|
@@ -3872,12 +3870,12 @@ const Zn = {
|
|
|
3872
3870
|
width: "20",
|
|
3873
3871
|
x: "0",
|
|
3874
3872
|
y: "0"
|
|
3875
|
-
}, Ll = ["fill"], ql = { mask: "url(#mask0_180_20349)" }, Bl = ["fill"], Xt = /* @__PURE__ */
|
|
3873
|
+
}, Ll = ["fill"], ql = { mask: "url(#mask0_180_20349)" }, Bl = ["fill"], Xt = /* @__PURE__ */ ae({
|
|
3876
3874
|
__name: "IconFilter",
|
|
3877
3875
|
props: {
|
|
3878
3876
|
color: {
|
|
3879
3877
|
type: String,
|
|
3880
|
-
default: `var(--kong-ui-entity-filter-color, ${
|
|
3878
|
+
default: `var(--kong-ui-entity-filter-color, ${pa})`
|
|
3881
3879
|
}
|
|
3882
3880
|
},
|
|
3883
3881
|
setup(e) {
|
|
@@ -3900,7 +3898,7 @@ const Zn = {
|
|
|
3900
3898
|
}), Pl = {
|
|
3901
3899
|
key: 1,
|
|
3902
3900
|
class: "kong-ui-entity-filter"
|
|
3903
|
-
}, Ul = { class: "menu-item-title" }, Rl = { class: "menu-item-indicator" }, Dl = { class: "menu-item-body" }, Hl = ["for"], zl = { class: "menu-item-buttons" }, Gl = { class: "filter-clear-button-container" }, Jl = /* @__PURE__ */
|
|
3901
|
+
}, Ul = { class: "menu-item-title" }, Rl = { class: "menu-item-indicator" }, Dl = { class: "menu-item-body" }, Hl = ["for"], zl = { class: "menu-item-buttons" }, Gl = { class: "filter-clear-button-container" }, Jl = /* @__PURE__ */ ae({
|
|
3904
3902
|
__name: "EntityFilter",
|
|
3905
3903
|
props: {
|
|
3906
3904
|
// filter config, either exact match or fuzzy match
|
|
@@ -3920,7 +3918,7 @@ const Zn = {
|
|
|
3920
3918
|
},
|
|
3921
3919
|
emits: ["update:modelValue"],
|
|
3922
3920
|
setup(e, { emit: i }) {
|
|
3923
|
-
const t = e, { i18n: { t:
|
|
3921
|
+
const t = e, { i18n: { t: r } } = ce.useI18n(), a = F(!1), o = F({}), l = x(() => {
|
|
3924
3922
|
const v = [];
|
|
3925
3923
|
return new URLSearchParams(t.modelValue).forEach((T, s) => {
|
|
3926
3924
|
T !== "" && v.push(s);
|
|
@@ -3938,7 +3936,7 @@ const Zn = {
|
|
|
3938
3936
|
});
|
|
3939
3937
|
});
|
|
3940
3938
|
const c = () => {
|
|
3941
|
-
|
|
3939
|
+
a.value = !a.value;
|
|
3942
3940
|
}, d = (v) => {
|
|
3943
3941
|
i("update:modelValue", v);
|
|
3944
3942
|
}, f = (v) => `filter-${v}`, p = (v) => {
|
|
@@ -3959,7 +3957,7 @@ const Zn = {
|
|
|
3959
3957
|
o.value = {}, k(!0);
|
|
3960
3958
|
}, k = (v = !1) => {
|
|
3961
3959
|
const T = Object.keys(o.value).reduce((s, E) => (o.value[E] && (s[E] = `${o.value[E]}`), s), {});
|
|
3962
|
-
v && (
|
|
3960
|
+
v && (a.value = !1), i("update:modelValue", new URLSearchParams(T).toString());
|
|
3963
3961
|
};
|
|
3964
3962
|
return (v, T) => {
|
|
3965
3963
|
const s = L("KInput"), E = L("KButton"), C = L("KSelect"), P = L("KMenuItem"), oe = L("KMenu");
|
|
@@ -3984,7 +3982,7 @@ const Zn = {
|
|
|
3984
3982
|
}, {
|
|
3985
3983
|
default: y(() => [
|
|
3986
3984
|
S(Xt),
|
|
3987
|
-
J(" " + j(m(
|
|
3985
|
+
J(" " + j(m(r)("filter.filterButtonText")) + " " + j(l.value.length > 0 ? `(${l.value.length})` : ""), 1)
|
|
3988
3986
|
]),
|
|
3989
3987
|
_: 1
|
|
3990
3988
|
}),
|
|
@@ -3992,7 +3990,7 @@ const Zn = {
|
|
|
3992
3990
|
class: "kong-ui-entity-filter-backdrop",
|
|
3993
3991
|
onClick: c
|
|
3994
3992
|
}, null, 512), [
|
|
3995
|
-
[Je,
|
|
3993
|
+
[Je, a.value]
|
|
3996
3994
|
]),
|
|
3997
3995
|
Ge(S(oe, { class: "kong-ui-entity-filter-menu" }, {
|
|
3998
3996
|
body: y(() => [
|
|
@@ -4017,7 +4015,7 @@ const Zn = {
|
|
|
4017
4015
|
O("label", {
|
|
4018
4016
|
class: "menu-item-label",
|
|
4019
4017
|
for: f(Y.value)
|
|
4020
|
-
}, j(m(
|
|
4018
|
+
}, j(m(r)("filter.fieldLabel")), 9, Hl),
|
|
4021
4019
|
((U = (q = e.config.schema) == null ? void 0 : q[Y.value]) == null ? void 0 : U.type) === "select" ? (b(), R(C, {
|
|
4022
4020
|
key: 0,
|
|
4023
4021
|
id: f(Y.value),
|
|
@@ -4025,14 +4023,14 @@ const Zn = {
|
|
|
4025
4023
|
"onUpdate:modelValue": (N) => o.value[Y.value] = N,
|
|
4026
4024
|
appearance: "select",
|
|
4027
4025
|
items: p(Y.value),
|
|
4028
|
-
placeholder: m(
|
|
4026
|
+
placeholder: m(r)("filter.selectPlaceholder")
|
|
4029
4027
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "items", "placeholder"])) : (b(), R(s, {
|
|
4030
4028
|
key: 1,
|
|
4031
4029
|
id: f(Y.value),
|
|
4032
4030
|
modelValue: o.value[Y.value],
|
|
4033
4031
|
"onUpdate:modelValue": (N) => o.value[Y.value] = N,
|
|
4034
4032
|
autocomplete: "off",
|
|
4035
|
-
placeholder: m(
|
|
4033
|
+
placeholder: m(r)("filter.inputPlaceholder"),
|
|
4036
4034
|
type: _(Y.value)
|
|
4037
4035
|
}, null, 8, ["id", "modelValue", "onUpdate:modelValue", "placeholder", "type"]))
|
|
4038
4036
|
]),
|
|
@@ -4044,7 +4042,7 @@ const Zn = {
|
|
|
4044
4042
|
onClick: T[0] || (T[0] = (N) => k(!0))
|
|
4045
4043
|
}, {
|
|
4046
4044
|
default: y(() => [
|
|
4047
|
-
J(j(m(
|
|
4045
|
+
J(j(m(r)("filter.applyButtonText")), 1)
|
|
4048
4046
|
]),
|
|
4049
4047
|
_: 1
|
|
4050
4048
|
}),
|
|
@@ -4055,7 +4053,7 @@ const Zn = {
|
|
|
4055
4053
|
onClick: (N) => h(Y.value)
|
|
4056
4054
|
}, {
|
|
4057
4055
|
default: y(() => [
|
|
4058
|
-
J(j(m(
|
|
4056
|
+
J(j(m(r)("filter.clearButtonText")), 1)
|
|
4059
4057
|
]),
|
|
4060
4058
|
_: 2
|
|
4061
4059
|
}, 1032, ["onClick"])
|
|
@@ -4073,7 +4071,7 @@ const Zn = {
|
|
|
4073
4071
|
onClick: I
|
|
4074
4072
|
}, {
|
|
4075
4073
|
default: y(() => [
|
|
4076
|
-
J(j(m(
|
|
4074
|
+
J(j(m(r)("filter.clearAllButtonText")), 1)
|
|
4077
4075
|
]),
|
|
4078
4076
|
_: 1
|
|
4079
4077
|
})
|
|
@@ -4081,12 +4079,12 @@ const Zn = {
|
|
|
4081
4079
|
]),
|
|
4082
4080
|
_: 1
|
|
4083
4081
|
}, 512), [
|
|
4084
|
-
[Je,
|
|
4082
|
+
[Je, a.value]
|
|
4085
4083
|
])
|
|
4086
4084
|
]));
|
|
4087
4085
|
};
|
|
4088
4086
|
}
|
|
4089
|
-
}), Wl = /* @__PURE__ */ be(Jl, [["__scopeId", "data-v-5dbd1737"]]), Yl = /* @__PURE__ */
|
|
4087
|
+
}), Wl = /* @__PURE__ */ be(Jl, [["__scopeId", "data-v-5dbd1737"]]), Yl = /* @__PURE__ */ ae({
|
|
4090
4088
|
__name: "EntityToggleModal",
|
|
4091
4089
|
props: {
|
|
4092
4090
|
visible: {
|
|
@@ -4118,10 +4116,10 @@ const Zn = {
|
|
|
4118
4116
|
},
|
|
4119
4117
|
emits: ["canceled", "proceed"],
|
|
4120
4118
|
setup(e, { emit: i }) {
|
|
4121
|
-
const t = e, { i18n: { t:
|
|
4122
|
-
() => t.action === "enable" ?
|
|
4119
|
+
const t = e, { i18n: { t: r }, i18nT: a } = ce.useI18n(), o = F(!1), l = x(
|
|
4120
|
+
() => t.action === "enable" ? r("toggleModal.enable.title", { entityType: t.entityType }) : r("toggleModal.disable.title", { entityType: t.entityType })
|
|
4123
4121
|
), n = x(
|
|
4124
|
-
() => t.action === "enable" ?
|
|
4122
|
+
() => t.action === "enable" ? r("toggleModal.enable.confirmText") : r("toggleModal.disable.confirmText")
|
|
4125
4123
|
), c = () => i("canceled"), d = async () => {
|
|
4126
4124
|
if (t.onConfirm) {
|
|
4127
4125
|
o.value = !0;
|
|
@@ -4136,7 +4134,7 @@ const Zn = {
|
|
|
4136
4134
|
};
|
|
4137
4135
|
return (f, p) => {
|
|
4138
4136
|
const _ = L("KPrompt");
|
|
4139
|
-
return b(), R(
|
|
4137
|
+
return b(), R(ir, { to: "body" }, [
|
|
4140
4138
|
S(_, {
|
|
4141
4139
|
"action-button-text": n.value,
|
|
4142
4140
|
"action-pending": o.value,
|
|
@@ -4148,7 +4146,7 @@ const Zn = {
|
|
|
4148
4146
|
onProceed: d
|
|
4149
4147
|
}, {
|
|
4150
4148
|
"body-content": y(() => [
|
|
4151
|
-
S(m(
|
|
4149
|
+
S(m(a), {
|
|
4152
4150
|
keypath: `toggleModal.${t.action}.message`,
|
|
4153
4151
|
scope: "global"
|
|
4154
4152
|
}, {
|
|
@@ -4166,7 +4164,7 @@ const Zn = {
|
|
|
4166
4164
|
]);
|
|
4167
4165
|
};
|
|
4168
4166
|
}
|
|
4169
|
-
}), qe = /* @__PURE__ */
|
|
4167
|
+
}), qe = /* @__PURE__ */ ae({
|
|
4170
4168
|
__name: "PermissionsWrapper",
|
|
4171
4169
|
props: {
|
|
4172
4170
|
/**
|
|
@@ -4188,10 +4186,10 @@ const Zn = {
|
|
|
4188
4186
|
}
|
|
4189
4187
|
},
|
|
4190
4188
|
setup(e) {
|
|
4191
|
-
const i = e, t = F(void 0),
|
|
4189
|
+
const i = e, t = F(void 0), r = x(() => t.value === !0 || t.value !== void 0 && i.forceShow === !0);
|
|
4192
4190
|
return we(() => i.authFunction, async () => {
|
|
4193
4191
|
t.value = await i.authFunction();
|
|
4194
|
-
}, { immediate: !0 }), (
|
|
4192
|
+
}, { immediate: !0 }), (a, o) => r.value ? Q(a.$slots, "default", {
|
|
4195
4193
|
key: 0,
|
|
4196
4194
|
isAllowed: t.value
|
|
4197
4195
|
}) : H("", !0);
|
|
@@ -4205,7 +4203,7 @@ const Zn = {
|
|
|
4205
4203
|
}, es = {
|
|
4206
4204
|
key: 2,
|
|
4207
4205
|
class: "form-section-footer"
|
|
4208
|
-
}, ts = { class: "form-section-content" }, is = /* @__PURE__ */
|
|
4206
|
+
}, ts = { class: "form-section-content" }, is = /* @__PURE__ */ ae({
|
|
4209
4207
|
__name: "EntityFormSection",
|
|
4210
4208
|
props: {
|
|
4211
4209
|
title: {
|
|
@@ -4231,7 +4229,7 @@ const Zn = {
|
|
|
4231
4229
|
},
|
|
4232
4230
|
setup(e) {
|
|
4233
4231
|
const i = tt();
|
|
4234
|
-
return (t,
|
|
4232
|
+
return (t, r) => (b(), $("fieldset", {
|
|
4235
4233
|
class: $e(["kong-ui-entity-form-section", { "has-divider": e.hasDivider }])
|
|
4236
4234
|
}, [
|
|
4237
4235
|
O("div", Zl, [
|
|
@@ -4255,8 +4253,8 @@ const Zn = {
|
|
|
4255
4253
|
])
|
|
4256
4254
|
], 2));
|
|
4257
4255
|
}
|
|
4258
|
-
}), ei = /* @__PURE__ */ be(is, [["__scopeId", "data-v-8b6dc312"]]), { useAxios:
|
|
4259
|
-
const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 }, us = /* @__PURE__ */
|
|
4256
|
+
}), ei = /* @__PURE__ */ be(is, [["__scopeId", "data-v-8b6dc312"]]), { useAxios: er, useDeleteUrlBuilder: rs, useErrors: as, useExternalLinkCreator: Fs, useFetchUrlBuilder: Ns, useFetcher: os, useDebouncedFilter: Ks, useStringHelpers: Ls, useHelpers: ns, useGatewayFeatureSupported: ls, useTruncationDetector: qs } = ce;
|
|
4257
|
+
const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 }, us = /* @__PURE__ */ ae({
|
|
4260
4258
|
__name: "GatewayServiceList",
|
|
4261
4259
|
props: {
|
|
4262
4260
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4298,16 +4296,16 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4298
4296
|
emits: ["error", "copy:success", "copy:error", "delete:success", "toggle:success"],
|
|
4299
4297
|
setup(e, { emit: i }) {
|
|
4300
4298
|
var Ee;
|
|
4301
|
-
const t = e, { i18n: { t:
|
|
4299
|
+
const t = e, { i18n: { t: r } } = We.useI18n(), a = vt(), { axiosInstance: o } = er({
|
|
4302
4300
|
headers: (Ee = t.config) == null ? void 0 : Ee.requestHeaders
|
|
4303
4301
|
}), l = F(1), n = x(() => t.config.app !== "kongManager" || !!t.config.disableSorting), c = {
|
|
4304
|
-
name: { label:
|
|
4305
|
-
protocol: { label:
|
|
4306
|
-
host: { label:
|
|
4307
|
-
port: { label:
|
|
4308
|
-
path: { label:
|
|
4309
|
-
enabled: { label:
|
|
4310
|
-
tags: { label:
|
|
4302
|
+
name: { label: r("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0 },
|
|
4303
|
+
protocol: { label: r("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
|
|
4304
|
+
host: { label: r("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
|
|
4305
|
+
port: { label: r("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
|
|
4306
|
+
path: { label: r("gateway_services.list.table_headers.path"), searchable: !0, sortable: !0 },
|
|
4307
|
+
enabled: { label: r("gateway_services.list.table_headers.enabled"), searchable: !0, sortable: !0 },
|
|
4308
|
+
tags: { label: r("gateway_services.list.table_headers.tags"), sortable: !1 }
|
|
4311
4309
|
}, d = c, f = x(() => {
|
|
4312
4310
|
var u, g;
|
|
4313
4311
|
let K = `${t.config.apiBaseUrl}${Pe.list[t.config.app].all}`;
|
|
@@ -4317,12 +4315,12 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4317
4315
|
if (K)
|
|
4318
4316
|
return {
|
|
4319
4317
|
isExactMatch: K,
|
|
4320
|
-
placeholder:
|
|
4318
|
+
placeholder: r("search.placeholder")
|
|
4321
4319
|
};
|
|
4322
|
-
const { name: u, enabled: g, protocol: B, host: ne, port:
|
|
4320
|
+
const { name: u, enabled: g, protocol: B, host: ne, port: re, path: ue } = c;
|
|
4323
4321
|
return {
|
|
4324
4322
|
isExactMatch: K,
|
|
4325
|
-
fields: { name: u, enabled: g, protocol: B, host: ne, port:
|
|
4323
|
+
fields: { name: u, enabled: g, protocol: B, host: ne, port: re, path: ue },
|
|
4326
4324
|
schema: t.config.filterSchema
|
|
4327
4325
|
};
|
|
4328
4326
|
}), { fetcher: I, fetcherState: k } = os(t.config, f.value), v = () => {
|
|
@@ -4331,9 +4329,9 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4331
4329
|
l.value++;
|
|
4332
4330
|
}, s = F(null), E = x(() => ({
|
|
4333
4331
|
ctaPath: t.config.createRoute,
|
|
4334
|
-
ctaText: Ce.value ?
|
|
4335
|
-
message:
|
|
4336
|
-
title: Ce.value ?
|
|
4332
|
+
ctaText: Ce.value ? r("actions.create") : void 0,
|
|
4333
|
+
message: r("gateway_services.list.empty_state.description"),
|
|
4334
|
+
title: Ce.value ? r("gateway_services.list.empty_state.title") : ""
|
|
4337
4335
|
})), C = F(!1), P = F(null), oe = x(() => {
|
|
4338
4336
|
const K = {
|
|
4339
4337
|
action: "disable",
|
|
@@ -4355,10 +4353,10 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4355
4353
|
return;
|
|
4356
4354
|
const u = `${p.value.href}/${P.value.id}`, g = !P.value.enabled;
|
|
4357
4355
|
try {
|
|
4358
|
-
const { data:
|
|
4359
|
-
i("toggle:success",
|
|
4360
|
-
} catch (
|
|
4361
|
-
i("error",
|
|
4356
|
+
const { data: re } = ((ne = t.config) == null ? void 0 : ne.app) === "konnect" ? await o.put(u, { ...P.value, enabled: g }) : await o.patch(u, { ...P.value, enabled: g });
|
|
4357
|
+
i("toggle:success", re);
|
|
4358
|
+
} catch (re) {
|
|
4359
|
+
i("error", re);
|
|
4362
4360
|
}
|
|
4363
4361
|
P.value.enabled = g;
|
|
4364
4362
|
}, U = (K, u) => {
|
|
@@ -4367,49 +4365,49 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4367
4365
|
i("copy:error", {
|
|
4368
4366
|
entity: K,
|
|
4369
4367
|
field: "id",
|
|
4370
|
-
message:
|
|
4368
|
+
message: r("errors.copy")
|
|
4371
4369
|
});
|
|
4372
4370
|
return;
|
|
4373
4371
|
}
|
|
4374
4372
|
i("copy:success", {
|
|
4375
4373
|
entity: K,
|
|
4376
4374
|
field: "id",
|
|
4377
|
-
message:
|
|
4375
|
+
message: r("copy.success", { val: g })
|
|
4378
4376
|
});
|
|
4379
4377
|
}, N = (K, u) => {
|
|
4380
4378
|
const g = JSON.stringify(K);
|
|
4381
4379
|
if (!u(g)) {
|
|
4382
4380
|
i("copy:error", {
|
|
4383
4381
|
entity: K,
|
|
4384
|
-
message:
|
|
4382
|
+
message: r("errors.copy")
|
|
4385
4383
|
});
|
|
4386
4384
|
return;
|
|
4387
4385
|
}
|
|
4388
4386
|
i("copy:success", {
|
|
4389
4387
|
entity: K,
|
|
4390
|
-
message:
|
|
4388
|
+
message: r("copy.success_brief")
|
|
4391
4389
|
});
|
|
4392
4390
|
}, z = async (K) => {
|
|
4393
4391
|
var g;
|
|
4394
|
-
await ((g = t.canRetrieve) == null ? void 0 : g.call(t, K)) &&
|
|
4392
|
+
await ((g = t.canRetrieve) == null ? void 0 : g.call(t, K)) && a.push(t.config.getViewRoute(K.id));
|
|
4395
4393
|
}, D = (K) => ({
|
|
4396
|
-
label:
|
|
4394
|
+
label: r("actions.view"),
|
|
4397
4395
|
to: t.config.getViewRoute(K)
|
|
4398
4396
|
}), X = (K) => ({
|
|
4399
|
-
label:
|
|
4397
|
+
label: r("actions.edit"),
|
|
4400
4398
|
to: t.config.getEditRoute(K)
|
|
4401
|
-
}), G = F(void 0), ie = F(!1), Z = F(!1), ee = F(""), de =
|
|
4399
|
+
}), G = F(void 0), ie = F(!1), Z = F(!1), ee = F(""), de = rs(t.config, f.value), rt = (K) => {
|
|
4402
4400
|
G.value = K, ie.value = !0;
|
|
4403
4401
|
}, Me = () => {
|
|
4404
4402
|
ie.value = !1, G.value = void 0;
|
|
4405
|
-
},
|
|
4403
|
+
}, at = async () => {
|
|
4406
4404
|
var K, u, g;
|
|
4407
4405
|
if ((K = G.value) != null && K.id) {
|
|
4408
4406
|
Z.value = !0;
|
|
4409
4407
|
try {
|
|
4410
4408
|
await o.delete(de(G.value.id)), i("delete:success", G.value), Me(), l.value++;
|
|
4411
4409
|
} catch (B) {
|
|
4412
|
-
ee.value = ((g = (u = B.response) == null ? void 0 : u.data) == null ? void 0 : g.message) || B.message ||
|
|
4410
|
+
ee.value = ((g = (u = B.response) == null ? void 0 : u.data) == null ? void 0 : g.message) || B.message || r("errors.delete"), i("error", B);
|
|
4413
4411
|
} finally {
|
|
4414
4412
|
Z.value = !1;
|
|
4415
4413
|
}
|
|
@@ -4419,7 +4417,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4419
4417
|
var u, g, B;
|
|
4420
4418
|
if (K.status === Ae.Error) {
|
|
4421
4419
|
s.value = {
|
|
4422
|
-
title:
|
|
4420
|
+
title: r("errors.general")
|
|
4423
4421
|
}, (B = (g = (u = K.error) == null ? void 0 : u.response) == null ? void 0 : g.data) != null && B.message && (s.value.message = K.error.response.data.message), i("error", K.error);
|
|
4424
4422
|
return;
|
|
4425
4423
|
}
|
|
@@ -4429,7 +4427,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4429
4427
|
return yt(async () => {
|
|
4430
4428
|
Ce.value = await t.canCreate();
|
|
4431
4429
|
}), (K, u) => {
|
|
4432
|
-
const g = L("KButton"), B = L("KInputSwitch"), ne = L("KBadge"),
|
|
4430
|
+
const g = L("KButton"), B = L("KInputSwitch"), ne = L("KBadge"), re = L("KTruncate"), ue = L("KDropdownItem"), w = L("KClipboardProvider");
|
|
4433
4431
|
return b(), $("div", ss, [
|
|
4434
4432
|
S(m(El), {
|
|
4435
4433
|
"cache-identifier": e.cacheIdentifier,
|
|
@@ -4466,7 +4464,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4466
4464
|
to: e.config.createRoute
|
|
4467
4465
|
}, {
|
|
4468
4466
|
default: y(() => [
|
|
4469
|
-
J(j(m(
|
|
4467
|
+
J(j(m(r)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
|
|
4470
4468
|
]),
|
|
4471
4469
|
_: 1
|
|
4472
4470
|
}, 8, ["to"])
|
|
@@ -4492,7 +4490,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4492
4490
|
"onUpdate:modelValue": (ze) => W.enabled = ze,
|
|
4493
4491
|
"data-testid": `row-${W.id}-toggle-input`,
|
|
4494
4492
|
disabled: !V,
|
|
4495
|
-
label: W.enabled ? m(
|
|
4493
|
+
label: W.enabled ? m(r)("actions.enable.enabled_label") : m(r)("actions.enable.disabled_label"),
|
|
4496
4494
|
onClick: Ne((ze) => Y(W), ["prevent"])
|
|
4497
4495
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "label", "onClick"])
|
|
4498
4496
|
])
|
|
@@ -4501,7 +4499,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4501
4499
|
}, 1032, ["auth-function"])
|
|
4502
4500
|
]),
|
|
4503
4501
|
tags: y(({ rowValue: W }) => [
|
|
4504
|
-
(W == null ? void 0 : W.length) > 0 ? (b(), R(
|
|
4502
|
+
(W == null ? void 0 : W.length) > 0 ? (b(), R(re, { key: 0 }, {
|
|
4505
4503
|
default: y(() => [
|
|
4506
4504
|
(b(!0), $(he, null, ve(W, (V) => (b(), R(ne, {
|
|
4507
4505
|
key: V,
|
|
@@ -4525,7 +4523,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4525
4523
|
onClick: (ze) => U(W, V)
|
|
4526
4524
|
}, {
|
|
4527
4525
|
default: y(() => [
|
|
4528
|
-
J(j(m(
|
|
4526
|
+
J(j(m(r)("actions.copy_id")), 1)
|
|
4529
4527
|
]),
|
|
4530
4528
|
_: 2
|
|
4531
4529
|
}, 1032, ["onClick"])
|
|
@@ -4539,7 +4537,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4539
4537
|
onClick: (ze) => N(W, V)
|
|
4540
4538
|
}, {
|
|
4541
4539
|
default: y(() => [
|
|
4542
|
-
J(j(m(
|
|
4540
|
+
J(j(m(r)("actions.copy_json")), 1)
|
|
4543
4541
|
]),
|
|
4544
4542
|
_: 2
|
|
4545
4543
|
}, 1032, ["onClick"])
|
|
@@ -4577,10 +4575,10 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4577
4575
|
danger: "",
|
|
4578
4576
|
"data-testid": "action-entity-delete",
|
|
4579
4577
|
"has-divider": "",
|
|
4580
|
-
onClick: (V) =>
|
|
4578
|
+
onClick: (V) => rt(W)
|
|
4581
4579
|
}, {
|
|
4582
4580
|
default: y(() => [
|
|
4583
|
-
J(j(m(
|
|
4581
|
+
J(j(m(r)("actions.delete.menu_label")), 1)
|
|
4584
4582
|
]),
|
|
4585
4583
|
_: 2
|
|
4586
4584
|
}, 1032, ["onClick"])
|
|
@@ -4594,7 +4592,7 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4594
4592
|
action: oe.value.action,
|
|
4595
4593
|
"entity-id": oe.value.id,
|
|
4596
4594
|
"entity-name": oe.value.name,
|
|
4597
|
-
"entity-type": m(
|
|
4595
|
+
"entity-type": m(r)("glossary.gateway_services"),
|
|
4598
4596
|
"on-confirm": q,
|
|
4599
4597
|
visible: C.value,
|
|
4600
4598
|
onCanceled: A,
|
|
@@ -4602,31 +4600,25 @@ const ss = { class: "kong-ui-entities-gateway-services-list" }, cs = { key: 1 },
|
|
|
4602
4600
|
}, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
|
|
4603
4601
|
S(m(Fl), {
|
|
4604
4602
|
"action-pending": Z.value,
|
|
4605
|
-
description: m(
|
|
4603
|
+
description: m(r)("actions.delete.description"),
|
|
4606
4604
|
"entity-name": G.value && (G.value.name || G.value.id),
|
|
4607
4605
|
"entity-type": m(ni).GatewayService,
|
|
4608
4606
|
error: ee.value,
|
|
4609
|
-
title: m(
|
|
4607
|
+
title: m(r)("actions.delete.title"),
|
|
4610
4608
|
visible: ie.value,
|
|
4611
4609
|
onCancel: Me,
|
|
4612
|
-
onProceed:
|
|
4610
|
+
onProceed: at
|
|
4613
4611
|
}, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
|
|
4614
4612
|
]);
|
|
4615
4613
|
};
|
|
4616
4614
|
}
|
|
4617
4615
|
});
|
|
4618
|
-
const
|
|
4616
|
+
const tr = (e, i) => {
|
|
4619
4617
|
const t = e.__vccOpts || e;
|
|
4620
|
-
for (const [
|
|
4621
|
-
t[
|
|
4618
|
+
for (const [r, a] of i)
|
|
4619
|
+
t[r] = a;
|
|
4622
4620
|
return t;
|
|
4623
|
-
}, Bs = /* @__PURE__ */
|
|
4624
|
-
key: 0,
|
|
4625
|
-
class: "gateway-service-form-group-fields"
|
|
4626
|
-
}, ys = {
|
|
4627
|
-
key: 1,
|
|
4628
|
-
class: "gateway-service-form-group-fields"
|
|
4629
|
-
}, vs = { key: 0 }, hs = { class: "gateway-service-form-margin-top" }, bs = { class: "gateway-service-form-margin-bottom" }, _s = { class: "gateway-service-form-margin-bottom" }, ws = { class: "gateway-service-form-margin-bottom" }, ks = { class: "gateway-service-form-margin-bottom" }, Cs = {
|
|
4621
|
+
}, Bs = /* @__PURE__ */ tr(us, [["__scopeId", "data-v-6437d75d"]]), ds = { class: "kong-ui-entities-gateway-service-form" }, ps = { key: 0 }, fs = { class: "gateway-service-form-traffic-label" }, ms = { class: "gateway-service-form-margin-bottom" }, gs = { key: 0 }, ys = { key: 1 }, vs = { key: 0 }, hs = { class: "gateway-service-form-margin-top" }, bs = { class: "gateway-service-form-margin-bottom" }, _s = { class: "gateway-service-form-margin-bottom" }, ws = { class: "gateway-service-form-margin-bottom" }, ks = { class: "gateway-service-form-margin-bottom" }, Cs = {
|
|
4630
4622
|
key: 0,
|
|
4631
4623
|
class: "gateway-service-form-margin-bottom"
|
|
4632
4624
|
}, Ss = {
|
|
@@ -4641,7 +4633,7 @@ const ta = (e, i) => {
|
|
|
4641
4633
|
}, xs = {
|
|
4642
4634
|
key: 1,
|
|
4643
4635
|
class: "checkbox-aligned-radio"
|
|
4644
|
-
}, Ts = /* @__PURE__ */
|
|
4636
|
+
}, Ts = /* @__PURE__ */ ae({
|
|
4645
4637
|
__name: "GatewayServiceForm",
|
|
4646
4638
|
props: {
|
|
4647
4639
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -4666,9 +4658,9 @@ const ta = (e, i) => {
|
|
|
4666
4658
|
emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated"],
|
|
4667
4659
|
setup(e, { expose: i, emit: t }) {
|
|
4668
4660
|
var K;
|
|
4669
|
-
const
|
|
4670
|
-
headers: (K =
|
|
4671
|
-
}), f = x(() => Pe.form[
|
|
4661
|
+
const r = e, a = F(!0), o = vt(), { i18nT: l, i18n: { t: n } } = We.useI18n(), { getMessageFromError: c } = as(), { axiosInstance: d } = er({
|
|
4662
|
+
headers: (K = r.config) == null ? void 0 : K.requestHeaders
|
|
4663
|
+
}), f = x(() => Pe.form[r.config.app].edit), p = x(() => r.gatewayServiceId ? ut.Edit : ut.Create), _ = F(!1), h = x(() => !!r.gatewayServiceId), I = F(h.value ? "protocol" : "url"), k = We.usePortFromProtocol(), v = F(""), T = x(() => !!v.value), s = Tt({
|
|
4672
4664
|
fields: {
|
|
4673
4665
|
name: "",
|
|
4674
4666
|
protocol: "http",
|
|
@@ -4704,8 +4696,8 @@ const ta = (e, i) => {
|
|
|
4704
4696
|
tls_verify_enabled: !1,
|
|
4705
4697
|
tls_verify_value: !1,
|
|
4706
4698
|
tags: ""
|
|
4707
|
-
}), C =
|
|
4708
|
-
gatewayInfo:
|
|
4699
|
+
}), C = r.config.app === "konnect" || ls({
|
|
4700
|
+
gatewayInfo: r.config.gatewayInfo,
|
|
4709
4701
|
// 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
|
|
4710
4702
|
supportedRange: {
|
|
4711
4703
|
enterprise: ["3.0"]
|
|
@@ -4766,7 +4758,7 @@ const ta = (e, i) => {
|
|
|
4766
4758
|
], oe = { url: "url", protocol: "protocol" }, Y = (u, g) => {
|
|
4767
4759
|
g.value;
|
|
4768
4760
|
}, A = (u) => u ? parseFloat(u) : 0, q = () => {
|
|
4769
|
-
|
|
4761
|
+
a.value = !0, s.errorMessage = "", s.fields.host = E.host, s.fields.path = E.path, s.fields.port = E.port, s.fields.protocol = E.protocol, s.fields.url = E.url, s.fields.retries = E.retries, s.fields.connect_timeout = E.connect_timeout, s.fields.write_timeout = E.write_timeout, s.fields.read_timeout = E.read_timeout, s.fields.client_certificate = E.client_certificate, s.fields.ca_certificates = E.ca_certificates, s.fields.tls_verify_enabled = E.tls_verify_enabled, s.fields.tls_verify_value = E.tls_verify_value;
|
|
4770
4762
|
}, U = () => {
|
|
4771
4763
|
if (s.fields.url && I.value === "url")
|
|
4772
4764
|
try {
|
|
@@ -4800,16 +4792,16 @@ const ta = (e, i) => {
|
|
|
4800
4792
|
var g, B, ne;
|
|
4801
4793
|
s.fields.name = (u == null ? void 0 : u.name) || "", s.fields.tags = ((g = u == null ? void 0 : u.tags) == null ? void 0 : g.join(",")) || "", s.fields.protocol = (u == null ? void 0 : u.protocol) || "http", s.fields.path = (u == null ? void 0 : u.path) || "", s.fields.read_timeout = u != null && u.read_timeout || (u == null ? void 0 : u.read_timeout) === 0 ? u == null ? void 0 : u.read_timeout : 6e4, s.fields.retries = u != null && u.retries || (u == null ? void 0 : u.retries) === 0 ? u == null ? void 0 : u.retries : 5, s.fields.host = (u == null ? void 0 : u.host) || "", s.fields.connect_timeout = u != null && u.connect_timeout || (u == null ? void 0 : u.connect_timeout) === 0 ? u == null ? void 0 : u.connect_timeout : 6e4, s.fields.tls_verify_enabled = (u == null ? void 0 : u.tls_verify) !== "" && (u == null ? void 0 : u.tls_verify) !== null && (u == null ? void 0 : u.tls_verify) !== void 0, s.fields.tls_verify_value = u != null && u.tls_verify ? u == null ? void 0 : u.tls_verify : !1, s.fields.ca_certificates = ((B = u == null ? void 0 : u.ca_certificates) == null ? void 0 : B.join(",")) || "", s.fields.client_certificate = ((ne = u == null ? void 0 : u.client_certificate) == null ? void 0 : ne.id) || "", s.fields.write_timeout = u != null && u.write_timeout || (u == null ? void 0 : u.write_timeout) === 0 ? u == null ? void 0 : u.write_timeout : 6e4, s.fields.port = u != null && u.port || (u == null ? void 0 : u.port) === 0 ? u == null ? void 0 : u.port : 80, Object.assign(E, s.fields);
|
|
4802
4794
|
}, de = () => {
|
|
4803
|
-
o.push(
|
|
4804
|
-
},
|
|
4795
|
+
o.push(r.config.cancelRoute);
|
|
4796
|
+
}, rt = x(() => {
|
|
4805
4797
|
var g, B;
|
|
4806
|
-
let u = `${
|
|
4807
|
-
return
|
|
4798
|
+
let u = `${r.config.apiBaseUrl}${Pe.form[r.config.app].validate}`;
|
|
4799
|
+
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "")), u = u.replace(/{id}/gi, r.gatewayServiceId), u;
|
|
4808
4800
|
}), Me = x(() => {
|
|
4809
4801
|
var g, B;
|
|
4810
|
-
let u = `${
|
|
4811
|
-
return
|
|
4812
|
-
}),
|
|
4802
|
+
let u = `${r.config.apiBaseUrl}${Pe.form[r.config.app][p.value]}`;
|
|
4803
|
+
return r.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = r.config) == null ? void 0 : g.controlPlaneId) || "") : r.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (B = r.config) != null && B.workspace ? `/${r.config.workspace}` : "")), u = u.replace(/{id}/gi, r.gatewayServiceId), u;
|
|
4804
|
+
}), at = (u) => {
|
|
4813
4805
|
let g = "";
|
|
4814
4806
|
u.url && (g = new URL(u.url).protocol), (["https", "wss", "tls"].includes(u.protocol) || ["https", "wss", "tls"].includes(g)) && (u.tls_verify = u.tls_verify_enabled ? u.tls_verify_value : null), delete u.tls_verify_enabled, delete u.tls_verify_value;
|
|
4815
4807
|
}, Ce = () => {
|
|
@@ -4831,25 +4823,25 @@ const ta = (e, i) => {
|
|
|
4831
4823
|
port: s.fields.port,
|
|
4832
4824
|
url: s.fields.url
|
|
4833
4825
|
};
|
|
4834
|
-
return s.fields.client_certificate && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.client_certificate = { id: s.fields.client_certificate }), s.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.tls_verify = s.fields.tls_verify_value), N.value || (u.path = null), p.value === "create" ? I.value === "url" ? (delete u.protocol, delete u.host, delete u.path,
|
|
4826
|
+
return s.fields.client_certificate && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.client_certificate = { id: s.fields.client_certificate }), s.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(s.fields.protocol) && (u.tls_verify = s.fields.tls_verify_value), N.value || (u.path = null), p.value === "create" ? I.value === "url" ? (delete u.protocol, delete u.host, delete u.path, r.config.app === "konnect" && delete u.port) : delete u.url : p.value === "edit" && delete u.url, u;
|
|
4835
4827
|
}, Ee = async () => {
|
|
4836
4828
|
var u, g, B, ne;
|
|
4837
4829
|
try {
|
|
4838
4830
|
s.isReadonly = !0, U();
|
|
4839
|
-
const
|
|
4831
|
+
const re = Ce();
|
|
4840
4832
|
let ue;
|
|
4841
|
-
if (
|
|
4833
|
+
if (at(re), await d.post(rt.value, re), p.value === "create" ? ue = await d.post(Me.value, re) : p.value === "edit" && (ue = ((u = r.config) == null ? void 0 : u.app) === "konnect" ? await d.put(Me.value, re) : await d.patch(Me.value, re)), ue) {
|
|
4842
4834
|
const { data: w } = ue;
|
|
4843
4835
|
s.fields.name = (w == null ? void 0 : w.name) || "", s.fields.port = w.port || k.getPortFromProtocol(w.protocol), s.fields.protocol = (w == null ? void 0 : w.protocol) || "http", s.fields.host = (w == null ? void 0 : w.host) || "", s.fields.path = (w == null ? void 0 : w.path) || "", s.fields.url = (w == null ? void 0 : w.url) || "", s.fields.retries = w != null && w.retries || (w == null ? void 0 : w.retries) === 0 ? w == null ? void 0 : w.retries : 5, s.fields.connect_timeout = w != null && w.connect_timeout || (w == null ? void 0 : w.connect_timeout) === 0 ? w == null ? void 0 : w.connect_timeout : 6e4, s.fields.write_timeout = w != null && w.write_timeout || (w == null ? void 0 : w.write_timeout) === 0 ? w == null ? void 0 : w.write_timeout : 6e4, s.fields.read_timeout = w != null && w.read_timeout || (w == null ? void 0 : w.read_timeout) === 0 ? w == null ? void 0 : w.read_timeout : 6e4, s.fields.client_certificate = ((g = w == null ? void 0 : w.client_certificate) == null ? void 0 : g.id) || "", s.fields.ca_certificates = (B = w == null ? void 0 : w.ca_certificates) != null && B.length ? w == null ? void 0 : w.ca_certificates.join(",") : "", s.fields.tls_verify_enabled = (w == null ? void 0 : w.tls_verify) !== "" && (w == null ? void 0 : w.tls_verify) !== null && (w == null ? void 0 : w.tls_verify) !== void 0, s.fields.tls_verify_value = s.fields.tls_verify_enabled && (w == null ? void 0 : w.tls_verify), s.fields.tags = (ne = w == null ? void 0 : w.tags) != null && ne.length ? w == null ? void 0 : w.tags.join(",") : "", Object.assign(E, s.fields), t("update", ue == null ? void 0 : ue.data);
|
|
4844
4836
|
}
|
|
4845
4837
|
return ue;
|
|
4846
|
-
} catch (
|
|
4847
|
-
s.errorMessage = c(
|
|
4838
|
+
} catch (re) {
|
|
4839
|
+
s.errorMessage = c(re), t("error", re);
|
|
4848
4840
|
} finally {
|
|
4849
4841
|
s.isReadonly = !1;
|
|
4850
4842
|
}
|
|
4851
4843
|
};
|
|
4852
|
-
return we(() =>
|
|
4844
|
+
return we(() => r.gatewayServiceId, () => {
|
|
4853
4845
|
Object.assign(s.fields, E);
|
|
4854
4846
|
}), we(s.fields, (u) => {
|
|
4855
4847
|
s.fields.port = k.getPortFromProtocol(u.protocol, String(u.port)), t("model-updated", Ce());
|
|
@@ -4861,7 +4853,7 @@ const ta = (e, i) => {
|
|
|
4861
4853
|
saveFormData: Ee,
|
|
4862
4854
|
canSubmit: Z
|
|
4863
4855
|
}), (u, g) => {
|
|
4864
|
-
const B = L("KInput"), ne = L("KLabel"),
|
|
4856
|
+
const B = L("KInput"), ne = L("KLabel"), re = L("KRadio"), ue = L("KSelect"), w = L("KCheckbox"), W = L("KCollapse");
|
|
4865
4857
|
return b(), $("div", ds, [
|
|
4866
4858
|
S(m(Cl), {
|
|
4867
4859
|
"can-submit": Z.value,
|
|
@@ -4939,7 +4931,7 @@ const ta = (e, i) => {
|
|
|
4939
4931
|
})
|
|
4940
4932
|
]),
|
|
4941
4933
|
O("div", ms, [
|
|
4942
|
-
S(
|
|
4934
|
+
S(re, {
|
|
4943
4935
|
modelValue: I.value,
|
|
4944
4936
|
"onUpdate:modelValue": g[2] || (g[2] = (V) => I.value = V),
|
|
4945
4937
|
"data-testid": "gateway-service-url-radio",
|
|
@@ -4947,12 +4939,16 @@ const ta = (e, i) => {
|
|
|
4947
4939
|
onChange: q
|
|
4948
4940
|
}, {
|
|
4949
4941
|
default: y(() => [
|
|
4950
|
-
S(ne, {
|
|
4942
|
+
S(ne, {
|
|
4943
|
+
class: "gateway-service-url-radio-label",
|
|
4944
|
+
info: m(n)("gateway_services.form.fields.upstream_url.tooltip"),
|
|
4945
|
+
required: ""
|
|
4946
|
+
}, {
|
|
4951
4947
|
default: y(() => [
|
|
4952
4948
|
J(j(m(n)("gateway_services.form.sections.keys.urlLabel")), 1)
|
|
4953
4949
|
]),
|
|
4954
4950
|
_: 1
|
|
4955
|
-
})
|
|
4951
|
+
}, 8, ["info"])
|
|
4956
4952
|
]),
|
|
4957
4953
|
_: 1
|
|
4958
4954
|
}, 8, ["modelValue", "selected-value"])
|
|
@@ -4964,16 +4960,13 @@ const ta = (e, i) => {
|
|
|
4964
4960
|
modelModifiers: { trim: !0 },
|
|
4965
4961
|
class: "gateway-service-url-input gateway-service-form-margin-bottom",
|
|
4966
4962
|
"data-testid": "gateway-service-url-input",
|
|
4967
|
-
label: m(n)("gateway_services.form.fields.upstream_url.label"),
|
|
4968
|
-
"label-attributes": {
|
|
4969
|
-
info: e.config.app === "konnect" ? m(n)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : m(n)("gateway_services.form.fields.upstream_url.tooltip_for_km")
|
|
4970
|
-
},
|
|
4971
4963
|
name: "url",
|
|
4972
4964
|
placeholder: m(n)("gateway_services.form.fields.upstream_url.placeholder"),
|
|
4973
|
-
required: ""
|
|
4974
|
-
|
|
4965
|
+
required: "",
|
|
4966
|
+
tooltip: m(n)("gateway_services.form.fields.upstream_url.tooltip")
|
|
4967
|
+
}, null, 8, ["modelValue", "placeholder", "tooltip"])
|
|
4975
4968
|
])) : H("", !0),
|
|
4976
|
-
S(
|
|
4969
|
+
S(re, {
|
|
4977
4970
|
modelValue: I.value,
|
|
4978
4971
|
"onUpdate:modelValue": g[4] || (g[4] = (V) => I.value = V),
|
|
4979
4972
|
"checked-group": "protocol",
|
|
@@ -5052,12 +5045,13 @@ const ta = (e, i) => {
|
|
|
5052
5045
|
info: m(n)("gateway_services.form.fields.port.tooltip")
|
|
5053
5046
|
},
|
|
5054
5047
|
name: "port",
|
|
5048
|
+
tooltip: m(n)("gateway_services.form.fields.port.tooltip"),
|
|
5055
5049
|
type: "number"
|
|
5056
|
-
}, null, 8, ["modelValue", "label", "label-attributes"])
|
|
5050
|
+
}, null, 8, ["modelValue", "label", "label-attributes", "tooltip"])
|
|
5057
5051
|
])) : H("", !0),
|
|
5058
5052
|
S(W, {
|
|
5059
|
-
modelValue:
|
|
5060
|
-
"onUpdate:modelValue": g[24] || (g[24] = (V) =>
|
|
5053
|
+
modelValue: a.value,
|
|
5054
|
+
"onUpdate:modelValue": g[24] || (g[24] = (V) => a.value = V),
|
|
5061
5055
|
"data-testid": "advanced-fields-collapse",
|
|
5062
5056
|
"trigger-alignment": "leading",
|
|
5063
5057
|
"trigger-label": m(n)("gateway_services.form.sections.keys.viewAdvancedFields")
|
|
@@ -5202,7 +5196,7 @@ const ta = (e, i) => {
|
|
|
5202
5196
|
_: 1
|
|
5203
5197
|
}, 8, ["modelValue", "description", "label"]),
|
|
5204
5198
|
s.fields.tls_verify_enabled ? (b(), $("div", As, [
|
|
5205
|
-
S(
|
|
5199
|
+
S(re, {
|
|
5206
5200
|
modelValue: s.fields.tls_verify_value,
|
|
5207
5201
|
"onUpdate:modelValue": g[22] || (g[22] = (V) => s.fields.tls_verify_value = V),
|
|
5208
5202
|
"data-testid": "gateway-service-tls-verify-true-option",
|
|
@@ -5211,7 +5205,7 @@ const ta = (e, i) => {
|
|
|
5211
5205
|
}, null, 8, ["modelValue", "label"])
|
|
5212
5206
|
])) : H("", !0),
|
|
5213
5207
|
s.fields.tls_verify_enabled ? (b(), $("div", xs, [
|
|
5214
|
-
S(
|
|
5208
|
+
S(re, {
|
|
5215
5209
|
modelValue: s.fields.tls_verify_value,
|
|
5216
5210
|
"onUpdate:modelValue": g[23] || (g[23] = (V) => s.fields.tls_verify_value = V),
|
|
5217
5211
|
"data-testid": "gateway-service-tls-verify-false-option",
|
|
@@ -5234,7 +5228,7 @@ const ta = (e, i) => {
|
|
|
5234
5228
|
};
|
|
5235
5229
|
}
|
|
5236
5230
|
});
|
|
5237
|
-
const Ps = /* @__PURE__ */
|
|
5231
|
+
const Ps = /* @__PURE__ */ tr(Ts, [["__scopeId", "data-v-3a7da1e1"]]), $s = { class: "kong-ui-gateway-service-entity-config-card" }, Us = /* @__PURE__ */ ae({
|
|
5238
5232
|
__name: "GatewayServiceConfigCard",
|
|
5239
5233
|
props: {
|
|
5240
5234
|
/** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
|
|
@@ -5261,7 +5255,7 @@ const Ps = /* @__PURE__ */ ta(Ts, [["__scopeId", "data-v-9939382c"]]), $s = { cl
|
|
|
5261
5255
|
},
|
|
5262
5256
|
emits: ["loading", "fetch:error", "fetch:success", "copy:success"],
|
|
5263
5257
|
setup(e) {
|
|
5264
|
-
const i = e, { i18n: { t }, i18nT:
|
|
5258
|
+
const i = e, { i18n: { t }, i18nT: r } = We.useI18n(), a = x(() => Pe.form[i.config.app].edit), { getPropValue: o } = ns(), l = (c, d) => o(c, d) === !0 ? t("gateway_services.form.fields.tls_verify_option.true.display") : t("gateway_services.form.fields.tls_verify_option.false.display"), n = F({
|
|
5265
5259
|
id: {},
|
|
5266
5260
|
name: {
|
|
5267
5261
|
tooltip: t("gateway_services.form.fields.name.tooltip")
|
|
@@ -5326,7 +5320,7 @@ const Ps = /* @__PURE__ */ ta(Ts, [["__scopeId", "data-v-9939382c"]]), $s = { cl
|
|
|
5326
5320
|
config: e.config,
|
|
5327
5321
|
"config-card-doc": e.configCardDoc,
|
|
5328
5322
|
"config-schema": n.value,
|
|
5329
|
-
"fetch-url":
|
|
5323
|
+
"fetch-url": a.value,
|
|
5330
5324
|
"hide-title": e.hideTitle,
|
|
5331
5325
|
"onCopy:success": d[0] || (d[0] = (f) => c.$emit("copy:success", f)),
|
|
5332
5326
|
"onFetch:error": d[1] || (d[1] = (f) => c.$emit("fetch:error", f)),
|
|
@@ -5334,7 +5328,7 @@ const Ps = /* @__PURE__ */ ta(Ts, [["__scopeId", "data-v-9939382c"]]), $s = { cl
|
|
|
5334
5328
|
onLoading: d[3] || (d[3] = (f) => c.$emit("loading", f))
|
|
5335
5329
|
}, {
|
|
5336
5330
|
"enabled-label-tooltip": y(() => [
|
|
5337
|
-
S(m(
|
|
5331
|
+
S(m(r), {
|
|
5338
5332
|
keypath: "gateway_services.form.fields.enabled.tooltip",
|
|
5339
5333
|
scope: "global"
|
|
5340
5334
|
}, {
|
|
@@ -5348,7 +5342,7 @@ const Ps = /* @__PURE__ */ ta(Ts, [["__scopeId", "data-v-9939382c"]]), $s = { cl
|
|
|
5348
5342
|
})
|
|
5349
5343
|
]),
|
|
5350
5344
|
"ca_certificates-label-tooltip": y(() => [
|
|
5351
|
-
S(m(
|
|
5345
|
+
S(m(r), {
|
|
5352
5346
|
keypath: "gateway_services.form.fields.ca_certificates.tooltip",
|
|
5353
5347
|
scope: "global"
|
|
5354
5348
|
}, {
|
|
@@ -5362,7 +5356,7 @@ const Ps = /* @__PURE__ */ ta(Ts, [["__scopeId", "data-v-9939382c"]]), $s = { cl
|
|
|
5362
5356
|
})
|
|
5363
5357
|
]),
|
|
5364
5358
|
"tls_verify-label-tooltip": y(() => [
|
|
5365
|
-
S(m(
|
|
5359
|
+
S(m(r), {
|
|
5366
5360
|
keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
|
|
5367
5361
|
scope: "global"
|
|
5368
5362
|
}, {
|