@kong-ui-public/entities-gateway-services 3.14.15-pr.2806.7cb366471.0 → 3.14.15

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.
@@ -1,9 +1,9 @@
1
- import { defineComponent as De, ref as $, computed as C, watch as Me, onBeforeMount as He, resolveComponent as D, createElementBlock as R, openBlock as V, createVNode as n, unref as r, createSlots as Ve, withCtx as d, createTextVNode as U, toDisplayString as h, createBlock as se, createCommentVNode as T, createElementVNode as E, withModifiers as Te, Teleport as Ze, reactive as Be, onMounted as Je, Transition as Ue, Fragment as Qe, renderList as Xe, renderSlot as Ye } from "vue";
2
- import { useRouter as Ne } from "vue-router";
3
- import { BookIcon as Ke, AddIcon as Le, ServicesIcon as et } from "@kong/icons";
4
- import { createI18n as tt, i18nTComponent as ot } from "@kong-ui-public/i18n";
5
- import { useAxios as We, useTableState as rt, useFetcher as it, useDeleteUrlBuilder as lt, FetcherStatus as st, EntityBaseTable as at, PermissionsWrapper as le, TableTags as nt, EntityFilter as ct, EntityToggleModal as dt, EntityDeleteModal as ut, EntityTypes as ft, useHelpers as Oe, ConfigurationSchemaType as pt, ConfigurationSchemaSection as ke, EntityBaseConfigCard as mt, SupportedEntityType as je, useErrors as vt, useValidators as gt, EntityBaseFormType as qe, useGatewayFeatureSupported as yt, EntityBaseForm as _t, EntityFormSection as Ge } from "@kong-ui-public/entities-shared";
6
- const ht = {
1
+ import { defineComponent as Me, ref as U, computed as S, watch as xe, onBeforeMount as ze, resolveComponent as M, createElementBlock as A, openBlock as V, createVNode as c, unref as o, createSlots as ke, withCtx as u, createTextVNode as T, toDisplayString as b, createBlock as le, createCommentVNode as R, createElementVNode as P, withModifiers as Re, Teleport as He, reactive as De, onMounted as Ze, Transition as Te, Fragment as Je, renderList as Qe, renderSlot as Xe } from "vue";
2
+ import { useRouter as Ge } from "vue-router";
3
+ import { BookIcon as Be, AddIcon as Ke, ServicesIcon as Ye } from "@kong/icons";
4
+ import { createI18n as et, i18nTComponent as tt } from "@kong-ui-public/i18n";
5
+ import { useAxios as Ne, useTableState as ot, useFetcher as rt, useDeleteUrlBuilder as it, FetcherStatus as lt, EntityBaseTable as st, PermissionsWrapper as ie, TableTags as at, EntityFilter as nt, EntityToggleModal as ct, EntityDeleteModal as dt, EntityTypes as ut, useHelpers as We, ConfigurationSchemaType as ft, ConfigurationSchemaSection as we, EntityBaseConfigCard as pt, SupportedEntityType as Oe, useErrors as mt, useValidators as vt, EntityBaseFormType as Le, useGatewayFeatureSupported as gt, EntityBaseForm as yt, EntityFormSection as qe } from "@kong-ui-public/entities-shared";
6
+ const _t = {
7
7
  create: "New gateway service",
8
8
  debugger: "Start debugging",
9
9
  serverless_create: "Add a Service",
@@ -17,12 +17,12 @@ const ht = {
17
17
  description: "Deleting this Gateway Service will also remove any associated plugins. This action cannot be reversed.",
18
18
  menu_label: "Delete"
19
19
  }
20
- }, bt = {
20
+ }, ht = {
21
21
  placeholder: {
22
22
  konnect: "Filter by name",
23
23
  kongManager: "Filter by exact name or ID"
24
24
  }
25
- }, wt = {
25
+ }, bt = {
26
26
  title: "Gateway Services",
27
27
  list: {
28
28
  toolbar_actions: {
@@ -205,39 +205,39 @@ const ht = {
205
205
  }
206
206
  }
207
207
  }
208
- }, kt = {
208
+ }, wt = {
209
209
  general: "Gateway Services could not be retrieved",
210
210
  delete: "The gateway service could not be deleted at this time.",
211
211
  copy: "Failed to copy to clipboard",
212
212
  urlErrorMessage: "Error: invalid URL"
213
- }, Vt = {
213
+ }, kt = {
214
214
  success: "Copied {val} to clipboard",
215
215
  success_brief: "Successfully copied to clipboard"
216
- }, Ct = {
216
+ }, Vt = {
217
217
  gateway_services: "gateway services"
218
218
  }, St = {
219
- actions: ht,
220
- search: bt,
221
- gateway_services: wt,
222
- errors: kt,
223
- copy: Vt,
224
- glossary: Ct
219
+ actions: _t,
220
+ search: ht,
221
+ gateway_services: bt,
222
+ errors: wt,
223
+ copy: kt,
224
+ glossary: Vt
225
225
  };
226
- function Et() {
227
- const s = tt("en-us", St);
226
+ function Ct() {
227
+ const s = et("en-us", St);
228
228
  return {
229
229
  i18n: s,
230
- i18nT: ot(s)
230
+ i18nT: tt(s)
231
231
  // Translation component <i18n-t>
232
232
  };
233
233
  }
234
- function Pt() {
234
+ function Et() {
235
235
  return {
236
- getPortFromProtocol: (N, p) => {
237
- const c = [80, 443], a = Number(p);
238
- if ((a || a === 0) && !c.includes(a))
236
+ getPortFromProtocol: (q, m) => {
237
+ const d = [80, 443], a = Number(m);
238
+ if ((a || a === 0) && !d.includes(a))
239
239
  return a;
240
- switch (N) {
240
+ switch (q) {
241
241
  case "grpcs":
242
242
  case "tls":
243
243
  case "https":
@@ -253,8 +253,8 @@ function Pt() {
253
253
  }
254
254
  };
255
255
  }
256
- function It() {
257
- const { i18n: { t: s } } = X.useI18n();
256
+ function Pt() {
257
+ const { i18n: { t: s } } = Q.useI18n();
258
258
  return {
259
259
  validateHost: (v) => {
260
260
  if (!v || v.trim() === "") return s("gateway_services.form.errors.host.empty");
@@ -273,30 +273,30 @@ function It() {
273
273
  }
274
274
  };
275
275
  }
276
- const X = {
277
- useI18n: Et,
278
- usePortFromProtocol: Pt,
279
- useUrlValidators: It
280
- }, $e = "/v2/control-planes/{controlPlaneId}/core-entities", xe = "/{workspace}", Ce = {
276
+ const Q = {
277
+ useI18n: Ct,
278
+ usePortFromProtocol: Et,
279
+ useUrlValidators: Pt
280
+ }, Ue = "/v2/control-planes/{controlPlaneId}/core-entities", $e = "/{workspace}", Ve = {
281
281
  list: {
282
282
  konnect: {
283
- all: `${$e}/services`
283
+ all: `${Ue}/services`
284
284
  },
285
285
  kongManager: {
286
- all: `${xe}/services`
286
+ all: `${$e}/services`
287
287
  }
288
288
  },
289
289
  form: {
290
290
  konnect: {
291
- create: `${$e}/services`,
292
- edit: `${$e}/services/{id}`
291
+ create: `${Ue}/services`,
292
+ edit: `${Ue}/services/{id}`
293
293
  },
294
294
  kongManager: {
295
- create: `${xe}/services`,
296
- edit: `${xe}/services/{id}`
295
+ create: `${$e}/services`,
296
+ edit: `${$e}/services/{id}`
297
297
  }
298
298
  }
299
- }, Ft = { class: "kong-ui-entities-gateway-services-list" }, At = { class: "button-row" }, Rt = { key: 1 }, Tt = /* @__PURE__ */ De({
299
+ }, It = { class: "kong-ui-entities-gateway-services-list" }, Ft = { class: "button-row" }, At = { key: 1 }, Rt = /* @__PURE__ */ Me({
300
300
  __name: "GatewayServiceList",
301
301
  props: {
302
302
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -352,12 +352,12 @@ const X = {
352
352
  }
353
353
  },
354
354
  emits: ["error", "click:learn-more", "copy:success", "copy:error", "delete:success", "toggle:success"],
355
- setup(s, { emit: N }) {
356
- var re;
357
- const p = N, c = s, { i18n: { t: a, formatUnixTimeStamp: v } } = X.useI18n(), F = Ne(), { axiosInstance: q } = We((re = c.config) == null ? void 0 : re.axiosRequestConfig), { hasRecords: l, handleStateChange: B } = rt(() => O.value), P = C(() => l.value && c.config.app === "konnect"), Se = C(() => c.config.app !== "kongManager" || !!c.config.disableSorting), ae = {
355
+ setup(s, { emit: q }) {
356
+ var oe;
357
+ const m = q, d = s, { i18n: { t: a, formatUnixTimeStamp: v } } = Q.useI18n(), F = Ge(), { axiosInstance: B } = Ne((oe = d.config) == null ? void 0 : oe.axiosRequestConfig), { hasRecords: l, handleStateChange: D } = ot(() => W.value), I = S(() => l.value && d.config.app === "konnect"), Se = S(() => d.config.app !== "kongManager" || !!d.config.disableSorting), se = {
358
358
  // the Name column is non-hidable
359
359
  name: { label: a("gateway_services.list.table_headers.name"), searchable: !0, sortable: !0, hidable: !1 },
360
- ...c.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
360
+ ...d.config.showControlPlaneColumn ? { control_plane: { label: a("gateway_services.list.table_headers.control_plane") } } : {},
361
361
  protocol: { label: a("gateway_services.list.table_headers.protocol"), searchable: !0, sortable: !0 },
362
362
  host: { label: a("gateway_services.list.table_headers.host"), searchable: !0, sortable: !0 },
363
363
  port: { label: a("gateway_services.list.table_headers.port"), searchable: !0, sortable: !0 },
@@ -366,206 +366,206 @@ const X = {
366
366
  tags: { label: a("gateway_services.list.table_headers.tags"), sortable: !1 },
367
367
  updated_at: { label: a("gateway_services.list.table_headers.updated_at"), sortable: !0 },
368
368
  created_at: { label: a("gateway_services.list.table_headers.created_at"), sortable: !0 }
369
- }, ue = {
369
+ }, de = {
370
370
  columnVisibility: {
371
371
  created_at: !1
372
372
  }
373
- }, fe = ae, Y = C(() => {
373
+ }, ue = se, X = S(() => {
374
374
  var g, y;
375
- let u = `${c.config.apiBaseUrl}${Ce.list[c.config.app].all}`;
376
- return c.config.app === "konnect" ? u = u.replace(/{controlPlaneId}/gi, ((g = c.config) == null ? void 0 : g.controlPlaneId) || "") : c.config.app === "kongManager" && (u = u.replace(/\/{workspace}/gi, (y = c.config) != null && y.workspace ? `/${c.config.workspace}` : "")), u;
377
- }), Ee = C(() => c.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${Y.value}`) : new URL(Y.value)), O = $(""), j = C(() => {
378
- const u = c.config.app === "konnect" || c.config.isExactMatch;
379
- if (u)
375
+ let f = `${d.config.apiBaseUrl}${Ve.list[d.config.app].all}`;
376
+ return d.config.app === "konnect" ? f = f.replace(/{controlPlaneId}/gi, ((g = d.config) == null ? void 0 : g.controlPlaneId) || "") : d.config.app === "kongManager" && (f = f.replace(/\/{workspace}/gi, (y = d.config) != null && y.workspace ? `/${d.config.workspace}` : "")), f;
377
+ }), Ce = S(() => d.config.apiBaseUrl.startsWith("/") ? new URL(`${window.location.origin}${X.value}`) : new URL(X.value)), W = U(""), O = S(() => {
378
+ const f = d.config.app === "konnect" || d.config.isExactMatch;
379
+ if (f)
380
380
  return {
381
- isExactMatch: u,
382
- placeholder: a(`search.placeholder.${c.config.app}`)
381
+ isExactMatch: f,
382
+ placeholder: a(`search.placeholder.${d.config.app}`)
383
383
  };
384
- const { name: g, enabled: y, protocol: I, host: K, port: L, path: A } = ae;
384
+ const { name: g, enabled: y, protocol: E, host: N, port: K, path: t } = se;
385
385
  return {
386
- isExactMatch: u,
387
- fields: { name: g, enabled: y, protocol: I, host: K, port: L, path: A },
388
- schema: c.config.filterSchema
386
+ isExactMatch: f,
387
+ fields: { name: g, enabled: y, protocol: E, host: N, port: K, path: t },
388
+ schema: d.config.filterSchema
389
389
  };
390
390
  }), {
391
- fetcher: Pe,
392
- fetcherState: z,
393
- fetcherCacheKey: S
394
- } = it(C(() => ({ ...c.config, cacheIdentifier: c.cacheIdentifier })), Y), ne = () => {
395
- O.value = "";
396
- }, ce = () => {
397
- S.value++;
398
- }, ee = $(null), e = C(() => ({
399
- ctaPath: c.config.createRoute,
400
- ctaText: oe.value ? c.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
401
- message: `${a("gateway_services.list.empty_state.description")}${c.config.additionMessageForEmptyState ? ` ${c.config.additionMessageForEmptyState}` : ""}`,
402
- title: oe.value ? c.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
403
- })), w = $(!1), x = $(null), te = C(() => {
404
- const u = {
391
+ fetcher: Ee,
392
+ fetcherState: j,
393
+ fetcherCacheKey: C
394
+ } = rt(S(() => ({ ...d.config, cacheIdentifier: d.cacheIdentifier })), X), ae = () => {
395
+ W.value = "";
396
+ }, ne = () => {
397
+ C.value++;
398
+ }, Y = U(null), e = S(() => ({
399
+ ctaPath: d.config.createRoute,
400
+ ctaText: te.value ? d.isServerless ? a("actions.serverless_create") : a("actions.create") : void 0,
401
+ message: `${a("gateway_services.list.empty_state.description")}${d.config.additionMessageForEmptyState ? ` ${d.config.additionMessageForEmptyState}` : ""}`,
402
+ title: te.value ? d.isServerless ? a("gateway_services.list.empty_state.serverless_title") : a("gateway_services.list.empty_state.title") : a("gateway_services.title")
403
+ })), w = U(!1), $ = U(null), ee = S(() => {
404
+ const f = {
405
405
  action: "disable",
406
406
  id: "",
407
407
  name: ""
408
408
  };
409
- if (x.value) {
410
- const { enabled: g, id: y, name: I } = x.value;
411
- u.action = g ? "disable" : "enable", u.id = y, u.name = I || y;
409
+ if ($.value) {
410
+ const { enabled: g, id: y, name: E } = $.value;
411
+ f.action = g ? "disable" : "enable", f.id = y, f.name = E || y;
412
412
  }
413
- return u;
414
- }), pe = (u) => {
415
- w.value = !0, x.value = u;
416
- }, me = () => {
417
- w.value = !1, x.value = null;
418
- }, H = async () => {
419
- var I, K;
420
- if (!await ((I = c.canEdit) == null ? void 0 : I.call(c, x.value)) || !x.value)
413
+ return f;
414
+ }), fe = (f) => {
415
+ w.value = !0, $.value = f;
416
+ }, pe = () => {
417
+ w.value = !1, $.value = null;
418
+ }, z = async () => {
419
+ var E, N;
420
+ if (!await ((E = d.canEdit) == null ? void 0 : E.call(d, $.value)) || !$.value)
421
421
  return;
422
- const g = `${Ee.value.href}/${x.value.id}`, y = !x.value.enabled;
422
+ const g = `${Ce.value.href}/${$.value.id}`, y = !$.value.enabled;
423
423
  try {
424
- const L = (K = c.config) == null ? void 0 : K.app;
425
- let A;
426
- O.value && L === "konnect" && (A = await q.get(g));
427
- const { data: t } = L === "konnect" ? await q.put(g, { ...(A == null ? void 0 : A.data) || x.value, enabled: y }) : await q.patch(g, { ...x.value, enabled: y });
428
- p("toggle:success", t), x.value.enabled = y;
429
- } catch (L) {
430
- p("error", L);
424
+ const K = (N = d.config) == null ? void 0 : N.app;
425
+ let t;
426
+ W.value && K === "konnect" && (t = await B.get(g));
427
+ const { data: r } = K === "konnect" ? await B.put(g, { ...(t == null ? void 0 : t.data) || $.value, enabled: y }) : await B.patch(g, { ...$.value, enabled: y });
428
+ m("toggle:success", r), $.value.enabled = y;
429
+ } catch (K) {
430
+ m("error", K);
431
431
  }
432
- }, ve = (u) => {
433
- c.config.getControlPlaneRoute && F.push(c.config.getControlPlaneRoute(u));
434
- }, ge = async (u, g) => {
435
- const y = u.id;
432
+ }, me = (f) => {
433
+ d.config.getControlPlaneRoute && F.push(d.config.getControlPlaneRoute(f));
434
+ }, ve = async (f, g) => {
435
+ const y = f.id;
436
436
  if (!await g(y)) {
437
- p("copy:error", {
438
- entity: u,
437
+ m("copy:error", {
438
+ entity: f,
439
439
  field: "id",
440
440
  message: a("errors.copy")
441
441
  });
442
442
  return;
443
443
  }
444
- p("copy:success", {
445
- entity: u,
444
+ m("copy:success", {
445
+ entity: f,
446
446
  field: "id",
447
447
  message: a("copy.success", { val: y })
448
448
  });
449
- }, ye = async (u, g) => {
450
- const y = JSON.stringify(u);
449
+ }, ge = async (f, g) => {
450
+ const y = JSON.stringify(f);
451
451
  if (!await g(y)) {
452
- p("copy:error", {
453
- entity: u,
452
+ m("copy:error", {
453
+ entity: f,
454
454
  message: a("errors.copy")
455
455
  });
456
456
  return;
457
457
  }
458
- p("copy:success", {
459
- entity: u,
458
+ m("copy:success", {
459
+ entity: f,
460
460
  message: a("copy.success_brief")
461
461
  });
462
- }, _e = async (u) => {
462
+ }, ye = async (f) => {
463
463
  var y;
464
- await ((y = c.canRetrieve) == null ? void 0 : y.call(c, u)) && F.push(c.config.getViewRoute(u.id));
465
- }, he = (u) => ({
464
+ await ((y = d.canRetrieve) == null ? void 0 : y.call(d, f)) && F.push(d.config.getViewRoute(f.id));
465
+ }, _e = (f) => ({
466
466
  label: a("actions.view"),
467
- to: c.config.getViewRoute(u)
468
- }), Ie = (u) => ({
467
+ to: d.config.getViewRoute(f)
468
+ }), Pe = (f) => ({
469
469
  label: a("actions.edit"),
470
- to: c.config.getEditRoute(u)
471
- }), Z = (u) => {
472
- if (c.config.getDebugRoute)
470
+ to: d.config.getEditRoute(f)
471
+ }), H = (f) => {
472
+ if (d.config.getDebugRoute)
473
473
  return {
474
474
  label: a("actions.debugger"),
475
- to: c.config.getDebugRoute(u)
475
+ to: d.config.getDebugRoute(f)
476
476
  };
477
- }, M = $(void 0), W = $(!1), J = $(!1), de = $(""), Fe = lt(c.config, Y.value), be = (u) => {
478
- M.value = u, W.value = !0, de.value = "";
479
- }, we = () => {
480
- W.value = !1, M.value = void 0;
481
- }, Ae = async () => {
482
- var u, g, y;
483
- if ((u = M.value) != null && u.id) {
484
- J.value = !0;
477
+ }, x = U(void 0), G = U(!1), Z = U(!1), ce = U(""), Ie = it(d.config, X.value), he = (f) => {
478
+ x.value = f, G.value = !0, ce.value = "";
479
+ }, be = () => {
480
+ G.value = !1, x.value = void 0;
481
+ }, Fe = async () => {
482
+ var f, g, y;
483
+ if ((f = x.value) != null && f.id) {
484
+ Z.value = !0;
485
485
  try {
486
- await q.delete(Fe(M.value.id)), p("delete:success", M.value), we(), S.value++;
487
- } catch (I) {
488
- de.value = ((y = (g = I.response) == null ? void 0 : g.data) == null ? void 0 : y.message) || I.message || a("errors.delete"), p("error", I);
486
+ await B.delete(Ie(x.value.id)), m("delete:success", x.value), be(), C.value++;
487
+ } catch (E) {
488
+ ce.value = ((y = (g = E.response) == null ? void 0 : g.data) == null ? void 0 : y.message) || E.message || a("errors.delete"), m("error", E);
489
489
  } finally {
490
- J.value = !1;
490
+ Z.value = !1;
491
491
  }
492
492
  }
493
- }, Re = () => {
494
- F.push(c.config.createRoute);
493
+ }, Ae = () => {
494
+ F.push(d.config.createRoute);
495
495
  };
496
- Me(z, (u) => {
497
- var g, y, I;
498
- if (u.status === st.Error) {
499
- ee.value = {
496
+ xe(j, (f) => {
497
+ var g, y, E;
498
+ if (f.status === lt.Error) {
499
+ Y.value = {
500
500
  title: a("errors.general")
501
- }, (I = (y = (g = u.error) == null ? void 0 : g.response) == null ? void 0 : y.data) != null && I.message && (ee.value.message = u.error.response.data.message), p("error", u.error);
501
+ }, (E = (y = (g = f.error) == null ? void 0 : g.response) == null ? void 0 : y.data) != null && E.message && (Y.value.message = f.error.response.data.message), m("error", f.error);
502
502
  return;
503
503
  }
504
- ee.value = null;
504
+ Y.value = null;
505
505
  });
506
- const oe = $(!1);
507
- return He(async () => {
508
- oe.value = await c.canCreate();
509
- }), (u, g) => {
510
- const y = D("KButton"), I = D("KEmptyState"), K = D("KBadge"), L = D("KInputSwitch"), A = D("KDropdownItem"), t = D("KClipboardProvider");
511
- return V(), R("div", Ft, [
512
- n(r(at), {
506
+ const te = U(!1);
507
+ return ze(async () => {
508
+ te.value = await d.canCreate();
509
+ }), (f, g) => {
510
+ const y = M("KButton"), E = M("KEmptyState"), N = M("KBadge"), K = M("KInputSwitch"), t = M("KDropdownItem"), r = M("KClipboardProvider");
511
+ return V(), A("div", It, [
512
+ c(o(st), {
513
513
  "cache-identifier": s.cacheIdentifier,
514
- "default-table-preferences": ue,
514
+ "default-table-preferences": de,
515
515
  "disable-sorting": Se.value,
516
516
  "empty-state-options": e.value,
517
517
  "enable-entity-actions": "",
518
- "error-message": ee.value,
519
- fetcher: r(Pe),
520
- "fetcher-cache-key": r(S),
518
+ "error-message": Y.value,
519
+ fetcher: o(Ee),
520
+ "fetcher-cache-key": o(C),
521
521
  "pagination-type": "offset",
522
522
  "preferences-storage-key": "kong-ui-entities-gateway-services-list",
523
- query: O.value,
524
- "table-headers": r(fe),
525
- onClearSearchInput: ne,
526
- "onClick:row": g[4] || (g[4] = (o) => _e(o)),
527
- onSort: ce,
528
- onState: r(B)
529
- }, Ve({
530
- "toolbar-filter": d(() => [
531
- n(r(ct), {
532
- modelValue: O.value,
533
- "onUpdate:modelValue": g[0] || (g[0] = (o) => O.value = o),
534
- config: j.value
523
+ query: W.value,
524
+ "table-headers": o(ue),
525
+ onClearSearchInput: ae,
526
+ "onClick:row": g[4] || (g[4] = (n) => ye(n)),
527
+ onSort: ne,
528
+ onState: o(D)
529
+ }, ke({
530
+ "toolbar-filter": u(() => [
531
+ c(o(nt), {
532
+ modelValue: W.value,
533
+ "onUpdate:modelValue": g[0] || (g[0] = (n) => W.value = n),
534
+ config: O.value
535
535
  }, null, 8, ["modelValue", "config"])
536
536
  ]),
537
- "toolbar-button": d(() => [
538
- (V(), se(Ze, {
537
+ "toolbar-button": u(() => [
538
+ (V(), le(He, {
539
539
  disabled: !s.useActionOutside,
540
540
  to: "#kong-ui-app-page-header-action-button"
541
541
  }, [
542
- E("div", At, [
543
- P.value ? (V(), se(y, {
542
+ P("div", Ft, [
543
+ I.value ? (V(), le(y, {
544
544
  key: 0,
545
545
  appearance: "secondary",
546
546
  class: "open-learning-hub",
547
547
  "data-testid": "gateway-services-learn-more-button",
548
548
  icon: "",
549
- onClick: g[1] || (g[1] = (o) => u.$emit("click:learn-more"))
549
+ onClick: g[1] || (g[1] = (n) => f.$emit("click:learn-more"))
550
550
  }, {
551
- default: d(() => [
552
- n(r(Ke), { decorative: "" })
551
+ default: u(() => [
552
+ c(o(Be), { decorative: "" })
553
553
  ]),
554
554
  _: 1
555
- })) : T("", !0),
556
- n(r(le), {
555
+ })) : R("", !0),
556
+ c(o(ie), {
557
557
  "auth-function": () => s.canCreate()
558
558
  }, {
559
- default: d(() => [
560
- n(y, {
559
+ default: u(() => [
560
+ c(y, {
561
561
  appearance: "primary",
562
562
  "data-testid": "toolbar-add-gateway-service",
563
563
  size: s.useActionOutside ? "medium" : "large",
564
564
  to: s.config.createRoute
565
565
  }, {
566
- default: d(() => [
567
- n(r(Le)),
568
- U(" " + h(r(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
566
+ default: u(() => [
567
+ c(o(Ke)),
568
+ T(" " + b(o(a)("gateway_services.list.toolbar_actions.new_gateway_service")), 1)
569
569
  ]),
570
570
  _: 1
571
571
  }, 8, ["size", "to"])
@@ -575,132 +575,132 @@ const X = {
575
575
  ])
576
576
  ], 8, ["disabled"]))
577
577
  ]),
578
- name: d(({ rowValue: o }) => [
579
- E("b", null, h(o ?? "-"), 1)
578
+ name: u(({ rowValue: n }) => [
579
+ P("b", null, b(n ?? "-"), 1)
580
580
  ]),
581
- control_plane: d(({ row: o }) => {
582
- var m;
581
+ control_plane: u(({ row: n }) => {
582
+ var h;
583
583
  return [
584
- (m = o.x_meta) != null && m.cluster_id ? (V(), se(K, {
584
+ (h = n.x_meta) != null && h.cluster_id ? (V(), le(N, {
585
585
  key: 0,
586
- tooltip: o.x_meta.cluster_id,
586
+ tooltip: n.x_meta.cluster_id,
587
587
  "truncation-tooltip": "",
588
- onClick: Te((b) => ve(o.x_meta.cluster_id), ["stop"])
588
+ onClick: Re((_) => me(n.x_meta.cluster_id), ["stop"])
589
589
  }, {
590
- default: d(() => [
591
- U(h(o.x_meta.cluster_id), 1)
590
+ default: u(() => [
591
+ T(b(n.x_meta.cluster_id), 1)
592
592
  ]),
593
593
  _: 2
594
- }, 1032, ["tooltip", "onClick"])) : (V(), R("b", Rt, "-"))
594
+ }, 1032, ["tooltip", "onClick"])) : (V(), A("b", At, "-"))
595
595
  ];
596
596
  }),
597
- enabled: d(({ row: o }) => [
598
- n(r(le), {
599
- "auth-function": () => s.canEdit(o),
597
+ enabled: u(({ row: n }) => [
598
+ c(o(ie), {
599
+ "auth-function": () => s.canEdit(n),
600
600
  "force-show": ""
601
601
  }, {
602
- default: d(({ isAllowed: m }) => [
603
- E("div", {
604
- onClick: g[3] || (g[3] = Te(() => {
602
+ default: u(({ isAllowed: h }) => [
603
+ P("div", {
604
+ onClick: g[3] || (g[3] = Re(() => {
605
605
  }, ["stop"]))
606
606
  }, [
607
- n(L, {
608
- modelValue: o.enabled,
609
- "onUpdate:modelValue": (b) => o.enabled = b,
610
- "data-testid": `row-${o.id}-toggle-input`,
611
- disabled: !m,
612
- onClick: Te((b) => pe(o), ["prevent"])
607
+ c(K, {
608
+ modelValue: n.enabled,
609
+ "onUpdate:modelValue": (_) => n.enabled = _,
610
+ "data-testid": `row-${n.id}-toggle-input`,
611
+ disabled: !h,
612
+ onClick: Re((_) => fe(n), ["prevent"])
613
613
  }, null, 8, ["modelValue", "onUpdate:modelValue", "data-testid", "disabled", "onClick"])
614
614
  ])
615
615
  ]),
616
616
  _: 2
617
617
  }, 1032, ["auth-function"])
618
618
  ]),
619
- tags: d(({ rowValue: o }) => [
620
- n(r(nt), { tags: o }, null, 8, ["tags"])
619
+ tags: u(({ rowValue: n }) => [
620
+ c(o(at), { tags: n }, null, 8, ["tags"])
621
621
  ]),
622
- created_at: d(({ rowValue: o }) => [
623
- U(h(r(v)(o)), 1)
622
+ created_at: u(({ rowValue: n }) => [
623
+ T(b(o(v)(n)), 1)
624
624
  ]),
625
- updated_at: d(({ row: o, rowValue: m }) => [
626
- U(h(r(v)(m ?? o.created_at)), 1)
625
+ updated_at: u(({ row: n, rowValue: h }) => [
626
+ T(b(o(v)(h ?? n.created_at)), 1)
627
627
  ]),
628
- actions: d(({ row: o }) => [
629
- n(t, null, {
630
- default: d(({ copyToClipboard: m }) => [
631
- n(A, {
628
+ actions: u(({ row: n }) => [
629
+ c(r, null, {
630
+ default: u(({ copyToClipboard: h }) => [
631
+ c(t, {
632
632
  "data-testid": "action-entity-copy-id",
633
- onClick: (b) => ge(o, m)
633
+ onClick: (_) => ve(n, h)
634
634
  }, {
635
- default: d(() => [
636
- U(h(r(a)("actions.copy_id")), 1)
635
+ default: u(() => [
636
+ T(b(o(a)("actions.copy_id")), 1)
637
637
  ]),
638
638
  _: 1
639
639
  }, 8, ["onClick"])
640
640
  ]),
641
641
  _: 2
642
642
  }, 1024),
643
- n(t, null, {
644
- default: d(({ copyToClipboard: m }) => [
645
- n(A, {
643
+ c(r, null, {
644
+ default: u(({ copyToClipboard: h }) => [
645
+ c(t, {
646
646
  "data-testid": "action-entity-copy-json",
647
- onClick: (b) => ye(o, m)
647
+ onClick: (_) => ge(n, h)
648
648
  }, {
649
- default: d(() => [
650
- U(h(r(a)("actions.copy_json")), 1)
649
+ default: u(() => [
650
+ T(b(o(a)("actions.copy_json")), 1)
651
651
  ]),
652
652
  _: 1
653
653
  }, 8, ["onClick"])
654
654
  ]),
655
655
  _: 2
656
656
  }, 1024),
657
- n(r(le), {
658
- "auth-function": () => s.canRetrieve(o)
657
+ c(o(ie), {
658
+ "auth-function": () => s.canRetrieve(n)
659
659
  }, {
660
- default: d(() => [
661
- n(A, {
660
+ default: u(() => [
661
+ c(t, {
662
662
  "data-testid": "action-entity-view",
663
663
  "has-divider": "",
664
- item: he(o.id)
664
+ item: _e(n.id)
665
665
  }, null, 8, ["item"])
666
666
  ]),
667
667
  _: 2
668
668
  }, 1032, ["auth-function"]),
669
- n(r(le), {
670
- "auth-function": () => s.canDebug(o)
669
+ c(o(ie), {
670
+ "auth-function": () => s.canDebug(n)
671
671
  }, {
672
- default: d(() => [
673
- s.config.getDebugRoute ? (V(), se(A, {
672
+ default: u(() => [
673
+ s.config.getDebugRoute ? (V(), le(t, {
674
674
  key: 0,
675
675
  "data-testid": "action-entity-debug",
676
- item: Z(o.id)
677
- }, null, 8, ["item"])) : T("", !0)
676
+ item: H(n.id)
677
+ }, null, 8, ["item"])) : R("", !0)
678
678
  ]),
679
679
  _: 2
680
680
  }, 1032, ["auth-function"]),
681
- n(r(le), {
682
- "auth-function": () => s.canEdit(o)
681
+ c(o(ie), {
682
+ "auth-function": () => s.canEdit(n)
683
683
  }, {
684
- default: d(() => [
685
- n(A, {
684
+ default: u(() => [
685
+ c(t, {
686
686
  "data-testid": "action-entity-edit",
687
- item: Ie(o.id)
687
+ item: Pe(n.id)
688
688
  }, null, 8, ["item"])
689
689
  ]),
690
690
  _: 2
691
691
  }, 1032, ["auth-function"]),
692
- n(r(le), {
693
- "auth-function": () => s.canDelete(o)
692
+ c(o(ie), {
693
+ "auth-function": () => s.canDelete(n)
694
694
  }, {
695
- default: d(() => [
696
- n(A, {
695
+ default: u(() => [
696
+ c(t, {
697
697
  danger: "",
698
698
  "data-testid": "action-entity-delete",
699
699
  "has-divider": "",
700
- onClick: (m) => be(o)
700
+ onClick: (h) => he(n)
701
701
  }, {
702
- default: d(() => [
703
- U(h(r(a)("actions.delete.menu_label")), 1)
702
+ default: u(() => [
703
+ T(b(o(a)("actions.delete.menu_label")), 1)
704
704
  ]),
705
705
  _: 1
706
706
  }, 8, ["onClick"])
@@ -710,50 +710,50 @@ const X = {
710
710
  ]),
711
711
  _: 2
712
712
  }, [
713
- !O.value && s.config.app === "konnect" ? {
713
+ !W.value && s.config.app === "konnect" ? {
714
714
  name: "empty-state",
715
- fn: d(() => {
716
- var o;
715
+ fn: u(() => {
716
+ var n;
717
717
  return [
718
- n(I, {
718
+ c(E, {
719
719
  "data-testid": "gateway-services-entity-empty-state",
720
720
  "icon-background": "",
721
- message: r(a)("gateway_services.empty_state_v2.description"),
722
- title: r(a)("gateway_services.empty_state_v2.title")
723
- }, Ve({
724
- icon: d(() => [
725
- n(r(et), { decorative: "" })
721
+ message: o(a)("gateway_services.empty_state_v2.description"),
722
+ title: o(a)("gateway_services.empty_state_v2.title")
723
+ }, ke({
724
+ icon: u(() => [
725
+ c(o(Ye), { decorative: "" })
726
726
  ]),
727
- action: d(() => [
728
- oe.value ? (V(), se(y, {
727
+ action: u(() => [
728
+ te.value ? (V(), le(y, {
729
729
  key: 0,
730
730
  "data-testid": "entity-create-button",
731
- onClick: Re
731
+ onClick: Ae
732
732
  }, {
733
- default: d(() => [
734
- n(r(Le), { decorative: "" }),
735
- U(" " + h(r(a)("gateway_services.empty_state_v2.create")), 1)
733
+ default: u(() => [
734
+ c(o(Ke), { decorative: "" }),
735
+ T(" " + b(o(a)("gateway_services.empty_state_v2.create")), 1)
736
736
  ]),
737
737
  _: 1
738
- })) : T("", !0),
739
- n(y, {
738
+ })) : R("", !0),
739
+ c(y, {
740
740
  appearance: "secondary",
741
741
  "data-testid": "entity-learn-more-button",
742
- onClick: g[2] || (g[2] = (m) => u.$emit("click:learn-more"))
742
+ onClick: g[2] || (g[2] = (h) => f.$emit("click:learn-more"))
743
743
  }, {
744
- default: d(() => [
745
- n(r(Ke), { decorative: "" }),
746
- U(" " + h(r(a)("gateway_services.empty_state_v2.learn_more")), 1)
744
+ default: u(() => [
745
+ c(o(Be), { decorative: "" }),
746
+ T(" " + b(o(a)("gateway_services.empty_state_v2.learn_more")), 1)
747
747
  ]),
748
748
  _: 1
749
749
  })
750
750
  ]),
751
751
  _: 2
752
752
  }, [
753
- (o = s.config) != null && o.isControlPlaneGroup ? {
753
+ (n = s.config) != null && n.isControlPlaneGroup ? {
754
754
  name: "default",
755
- fn: d(() => [
756
- U(h(r(a)("gateway_services.empty_state_v2.group")), 1)
755
+ fn: u(() => [
756
+ T(b(o(a)("gateway_services.empty_state_v2.group")), 1)
757
757
  ]),
758
758
  key: "0"
759
759
  } : void 0
@@ -763,36 +763,36 @@ const X = {
763
763
  key: "0"
764
764
  } : void 0
765
765
  ]), 1032, ["cache-identifier", "disable-sorting", "empty-state-options", "error-message", "fetcher", "fetcher-cache-key", "query", "table-headers", "onState"]),
766
- n(r(dt), {
767
- action: te.value.action,
768
- "entity-id": te.value.id,
769
- "entity-name": te.value.name,
770
- "entity-type": r(a)("glossary.gateway_services"),
771
- "on-confirm": H,
766
+ c(o(ct), {
767
+ action: ee.value.action,
768
+ "entity-id": ee.value.id,
769
+ "entity-name": ee.value.name,
770
+ "entity-type": o(a)("glossary.gateway_services"),
771
+ "on-confirm": z,
772
772
  visible: w.value,
773
- onCancel: me,
774
- onProceed: me
773
+ onCancel: pe,
774
+ onProceed: pe
775
775
  }, null, 8, ["action", "entity-id", "entity-name", "entity-type", "visible"]),
776
- n(r(ut), {
777
- "action-pending": J.value,
778
- description: r(a)("actions.delete.description"),
779
- "entity-name": M.value && (M.value.name || M.value.id),
780
- "entity-type": r(ft).GatewayService,
781
- error: de.value,
782
- title: r(a)("actions.delete.title"),
783
- visible: W.value,
784
- onCancel: we,
785
- onProceed: Ae
776
+ c(o(dt), {
777
+ "action-pending": Z.value,
778
+ description: o(a)("actions.delete.description"),
779
+ "entity-name": x.value && (x.value.name || x.value.id),
780
+ "entity-type": o(ut).GatewayService,
781
+ error: ce.value,
782
+ title: o(a)("actions.delete.title"),
783
+ visible: G.value,
784
+ onCancel: be,
785
+ onProceed: Fe
786
786
  }, null, 8, ["action-pending", "description", "entity-name", "entity-type", "error", "title", "visible"])
787
787
  ]);
788
788
  };
789
789
  }
790
- }), ze = (s, N) => {
791
- const p = s.__vccOpts || s;
792
- for (const [c, a] of N)
793
- p[c] = a;
794
- return p;
795
- }, no = /* @__PURE__ */ ze(Tt, [["__scopeId", "data-v-be14eac9"]]), Ut = { class: "kong-ui-gateway-service-entity-config-card" }, co = /* @__PURE__ */ De({
790
+ }), je = (s, q) => {
791
+ const m = s.__vccOpts || s;
792
+ for (const [d, a] of q)
793
+ m[d] = a;
794
+ return m;
795
+ }, ao = /* @__PURE__ */ je(Rt, [["__scopeId", "data-v-be14eac9"]]), Tt = { class: "kong-ui-gateway-service-entity-config-card" }, no = /* @__PURE__ */ Me({
796
796
  __name: "GatewayServiceConfigCard",
797
797
  props: {
798
798
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -819,161 +819,161 @@ const X = {
819
819
  },
820
820
  emits: ["loading", "fetch:error", "fetch:success"],
821
821
  setup(s) {
822
- const N = s, { i18n: { t: p }, i18nT: c } = X.useI18n(), a = C(() => Ce.form[N.config.app].edit), { getPropValue: v } = Oe(), F = (l, B) => v(l, B) === !0 ? p("gateway_services.form.fields.tls_verify_option.true.display") : p("gateway_services.form.fields.tls_verify_option.false.display"), q = $({
822
+ const q = s, { i18n: { t: m }, i18nT: d } = Q.useI18n(), a = S(() => Ve.form[q.config.app].edit), { getPropValue: v } = We(), F = (l, D) => v(l, D) === !0 ? m("gateway_services.form.fields.tls_verify_option.true.display") : m("gateway_services.form.fields.tls_verify_option.false.display"), B = U({
823
823
  id: {},
824
824
  name: {
825
- tooltip: p("gateway_services.form.fields.name.tooltip")
825
+ tooltip: m("gateway_services.form.fields.name.tooltip")
826
826
  },
827
827
  enabled: {},
828
828
  updated_at: {},
829
829
  created_at: {},
830
830
  protocol: {
831
- section: ke.Basic,
832
- tooltip: p("gateway_services.form.fields.protocol.tooltip")
831
+ section: we.Basic,
832
+ tooltip: m("gateway_services.form.fields.protocol.tooltip")
833
833
  },
834
834
  host: {
835
- section: ke.Basic,
836
- tooltip: p("gateway_services.form.fields.host.tooltip")
835
+ section: we.Basic,
836
+ tooltip: m("gateway_services.form.fields.host.tooltip")
837
837
  },
838
838
  path: {
839
- section: ke.Basic,
840
- tooltip: p("gateway_services.form.fields.path.tooltip")
839
+ section: we.Basic,
840
+ tooltip: m("gateway_services.form.fields.path.tooltip")
841
841
  },
842
842
  port: {
843
- section: ke.Basic,
844
- tooltip: p("gateway_services.form.fields.port.tooltip")
843
+ section: we.Basic,
844
+ tooltip: m("gateway_services.form.fields.port.tooltip")
845
845
  },
846
846
  tags: {
847
- tooltip: p("gateway_services.form.fields.tags.tooltip")
847
+ tooltip: m("gateway_services.form.fields.tags.tooltip")
848
848
  },
849
849
  // advanced fields
850
850
  retries: {
851
851
  order: 1,
852
- tooltip: p("gateway_services.form.fields.retries.tooltip")
852
+ tooltip: m("gateway_services.form.fields.retries.tooltip")
853
853
  },
854
854
  connect_timeout: {
855
855
  order: 2,
856
- tooltip: p("gateway_services.form.fields.connect_timeout.tooltip")
856
+ tooltip: m("gateway_services.form.fields.connect_timeout.tooltip")
857
857
  },
858
858
  write_timeout: {
859
859
  order: 3,
860
- tooltip: p("gateway_services.form.fields.write_timeout.tooltip")
860
+ tooltip: m("gateway_services.form.fields.write_timeout.tooltip")
861
861
  },
862
862
  read_timeout: {
863
863
  order: 4,
864
- tooltip: p("gateway_services.form.fields.read_timeout.tooltip")
864
+ tooltip: m("gateway_services.form.fields.read_timeout.tooltip")
865
865
  },
866
866
  client_certificate: {
867
867
  order: 5,
868
- tooltip: p("gateway_services.form.fields.client_certificate.tooltip")
868
+ tooltip: m("gateway_services.form.fields.client_certificate.tooltip")
869
869
  },
870
870
  ca_certificates: {
871
- type: pt.BadgeTag,
872
- label: p("gateway_services.form.fields.ca_certificates.label"),
871
+ type: ft.BadgeTag,
872
+ label: m("gateway_services.form.fields.ca_certificates.label"),
873
873
  order: 6
874
874
  },
875
875
  tls_verify: {
876
- label: p("gateway_services.form.fields.tls_verify_enabled.label")
876
+ label: m("gateway_services.form.fields.tls_verify_enabled.label")
877
877
  },
878
878
  tls_verify_depth: {
879
879
  hidden: !0
880
880
  }
881
881
  });
882
- return (l, B) => (V(), R("div", Ut, [
883
- n(r(mt), {
882
+ return (l, D) => (V(), A("div", Tt, [
883
+ c(o(pt), {
884
884
  config: s.config,
885
885
  "config-card-doc": s.configCardDoc,
886
- "config-schema": q.value,
887
- "entity-type": r(je).GatewayService,
886
+ "config-schema": B.value,
887
+ "entity-type": o(Oe).GatewayService,
888
888
  "fetch-url": a.value,
889
889
  "hide-title": s.hideTitle,
890
- "onFetch:error": B[0] || (B[0] = (P) => l.$emit("fetch:error", P)),
891
- "onFetch:success": B[1] || (B[1] = (P) => l.$emit("fetch:success", P)),
892
- onLoading: B[2] || (B[2] = (P) => l.$emit("loading", P))
890
+ "onFetch:error": D[0] || (D[0] = (I) => l.$emit("fetch:error", I)),
891
+ "onFetch:success": D[1] || (D[1] = (I) => l.$emit("fetch:success", I)),
892
+ onLoading: D[2] || (D[2] = (I) => l.$emit("loading", I))
893
893
  }, {
894
- "enabled-label-tooltip": d(() => [
895
- n(r(c), {
894
+ "enabled-label-tooltip": u(() => [
895
+ c(o(d), {
896
896
  keypath: "gateway_services.form.fields.enabled.tooltip",
897
897
  scope: "global"
898
898
  }, {
899
- false: d(() => [
900
- E("code", null, h(r(p)("gateway_services.form.fields.enabled.false")), 1)
899
+ false: u(() => [
900
+ P("code", null, b(o(m)("gateway_services.form.fields.enabled.false")), 1)
901
901
  ]),
902
- true: d(() => [
903
- E("code", null, h(r(p)("gateway_services.form.fields.enabled.true")), 1)
902
+ true: u(() => [
903
+ P("code", null, b(o(m)("gateway_services.form.fields.enabled.true")), 1)
904
904
  ]),
905
905
  _: 1
906
906
  })
907
907
  ]),
908
- "ca_certificates-label-tooltip": d(() => [
909
- n(r(c), {
908
+ "ca_certificates-label-tooltip": u(() => [
909
+ c(o(d), {
910
910
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
911
911
  scope: "global"
912
912
  }, {
913
- code1: d(() => [
914
- E("code", null, h(r(p)("gateway_services.form.fields.ca_certificates.code1")), 1)
913
+ code1: u(() => [
914
+ P("code", null, b(o(m)("gateway_services.form.fields.ca_certificates.code1")), 1)
915
915
  ]),
916
- code2: d(() => [
917
- E("code", null, h(r(p)("gateway_services.form.fields.ca_certificates.code2")), 1)
916
+ code2: u(() => [
917
+ P("code", null, b(o(m)("gateway_services.form.fields.ca_certificates.code2")), 1)
918
918
  ]),
919
919
  _: 1
920
920
  })
921
921
  ]),
922
- "tls_verify-label-tooltip": d(() => [
923
- n(r(c), {
922
+ "tls_verify-label-tooltip": u(() => [
923
+ c(o(d), {
924
924
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
925
925
  scope: "global"
926
926
  }, {
927
- code1: d(() => [
928
- E("code", null, h(r(p)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
927
+ code1: u(() => [
928
+ P("code", null, b(o(m)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
929
929
  ]),
930
930
  _: 1
931
931
  })
932
932
  ]),
933
- tls_verify: d((P) => [
934
- U(h(typeof r(v)("rowValue", P) == "boolean" ? F("rowValue", P) : r(p)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
933
+ tls_verify: u((I) => [
934
+ T(b(typeof o(v)("rowValue", I) == "boolean" ? F("rowValue", I) : o(m)("gateway_services.form.fields.tls_verify_option.unset.display")), 1)
935
935
  ]),
936
- client_certificate: d((P) => [
937
- U(h(r(v)("rowValue", P) ? r(v)("rowValue", P).id : "–"), 1)
936
+ client_certificate: u((I) => [
937
+ T(b(o(v)("rowValue", I) ? o(v)("rowValue", I).id : "–"), 1)
938
938
  ]),
939
939
  _: 1
940
940
  }, 8, ["config", "config-card-doc", "config-schema", "entity-type", "fetch-url", "hide-title"])
941
941
  ]));
942
942
  }
943
- }), G = {
943
+ }), L = {
944
944
  name: "Kong-Air-Flights-API",
945
945
  protocol: "https",
946
946
  path: "/flights",
947
947
  host: "api.kong-air.com",
948
948
  port: 443
949
- }, $t = { class: "kong-ui-entities-gateway-service-form" }, xt = {
949
+ }, Ut = { class: "kong-ui-entities-gateway-service-form" }, $t = {
950
950
  key: 0,
951
951
  class: "gateway-service-form-general-info"
952
- }, Mt = { class: "gateway-service-form-group-selection-wrapper" }, Dt = {
952
+ }, xt = { class: "gateway-service-form-group-selection-wrapper" }, Mt = {
953
953
  key: 0,
954
954
  class: "gateway-service-form-group-fields"
955
- }, Bt = {
955
+ }, Dt = {
956
956
  key: 0,
957
957
  class: "gateway-service-form-group-fields"
958
- }, Kt = { key: 0 }, Lt = {
958
+ }, Bt = { key: 0 }, Kt = {
959
959
  key: 0,
960
960
  class: "gateway-service-form-advanced-fields"
961
- }, qt = { class: "gateway-service-form-margin-bottom" }, Gt = { class: "gateway-service-form-margin-bottom" }, Nt = { class: "gateway-service-form-margin-bottom" }, Wt = { class: "gateway-service-form-margin-bottom" }, Ot = {
961
+ }, Lt = { class: "gateway-service-form-margin-bottom" }, qt = { class: "gateway-service-form-margin-bottom" }, Gt = { class: "gateway-service-form-margin-bottom" }, Nt = { class: "gateway-service-form-margin-bottom" }, Wt = {
962
962
  key: 0,
963
963
  class: "gateway-service-form-margin-bottom"
964
- }, jt = {
964
+ }, Ot = {
965
965
  key: 1,
966
966
  class: "gateway-service-form-margin-bottom"
967
- }, zt = {
967
+ }, jt = {
968
968
  key: 2,
969
969
  class: "gateway-service-form-margin-bottom"
970
- }, Ht = {
970
+ }, zt = {
971
971
  key: 0,
972
972
  class: "checkbox-aligned-radio"
973
- }, Zt = {
973
+ }, Ht = {
974
974
  key: 1,
975
975
  class: "checkbox-aligned-radio"
976
- }, Jt = { class: "gateway-service-form-tags" }, Qt = { class: "form-error-list" }, Xt = /* @__PURE__ */ De({
976
+ }, Zt = { class: "gateway-service-form-tags" }, Jt = { class: "form-error-list" }, Qt = /* @__PURE__ */ Me({
977
977
  __name: "GatewayServiceForm",
978
978
  props: {
979
979
  /** The base konnect or kongManger config. Pass additional config props in the shared entity component as needed. */
@@ -1002,9 +1002,9 @@ const X = {
1002
1002
  }
1003
1003
  },
1004
1004
  emits: ["update", "error", "url-valid:success", "url-valid:error", "loading", "model-updated", "try-sample-api"],
1005
- setup(s, { expose: N, emit: p }) {
1006
- var A;
1007
- const c = p, a = s, v = $(!0), F = Ne(), { i18nT: q, i18n: { t: l } } = X.useI18n(), { getErrorFieldsFromError: B } = vt(), { axiosInstance: P } = We((A = a.config) == null ? void 0 : A.axiosRequestConfig), Se = gt(), { validateHost: ae, validatePath: ue, validatePort: fe, validateProtocol: Y } = X.useUrlValidators(), { objectsAreEqual: Ee } = Oe(), O = C(() => Ce.form[a.config.app].edit), j = C(() => a.gatewayServiceId ? qe.Edit : qe.Create), Pe = $(!1), z = C(() => !!a.gatewayServiceId), S = $(z.value ? "protocol" : "url"), ne = X.usePortFromProtocol(), ce = $(""), ee = C(() => !!ce.value || !!Z("name")), e = Be({
1005
+ setup(s, { expose: q, emit: m }) {
1006
+ var K;
1007
+ const d = m, a = s, v = U(!0), F = Ge(), { i18nT: B, i18n: { t: l } } = Q.useI18n(), { getErrorFieldsFromError: D } = mt(), { axiosInstance: I } = Ne((K = a.config) == null ? void 0 : K.axiosRequestConfig), Se = vt(), { validateHost: se, validatePath: de, validatePort: ue, validateProtocol: X } = Q.useUrlValidators(), { objectsAreEqual: Ce } = We(), W = S(() => Ve.form[a.config.app].edit), O = S(() => a.gatewayServiceId ? Le.Edit : Le.Create), Ee = U(!1), j = S(() => !!a.gatewayServiceId), C = U(j.value ? "protocol" : "url"), ae = Q.usePortFromProtocol(), ne = U(""), Y = S(() => !!ne.value || !!H("name")), e = De({
1008
1008
  fields: {
1009
1009
  name: "",
1010
1010
  protocol: "http",
@@ -1041,7 +1041,7 @@ const X = {
1041
1041
  tls_verify_enabled: "",
1042
1042
  tls_verify_value: ""
1043
1043
  }
1044
- }), w = Be({
1044
+ }), w = De({
1045
1045
  name: "",
1046
1046
  protocol: "http",
1047
1047
  host: "",
@@ -1058,13 +1058,13 @@ const X = {
1058
1058
  tls_verify_value: !1,
1059
1059
  tags: "",
1060
1060
  enabled: !0
1061
- }), x = a.config.app === "konnect" || yt({
1061
+ }), $ = a.config.app === "konnect" || gt({
1062
1062
  gatewayInfo: a.config.gatewayInfo,
1063
1063
  // 'ws' and 'wss' are not valid values for the protocol field in Gateway Community Edition or before Gateway Enterprise Edition 3.0
1064
1064
  supportedRange: {
1065
1065
  enterprise: ["3.0"]
1066
1066
  }
1067
- }), te = [
1067
+ }), ee = [
1068
1068
  {
1069
1069
  label: l("gateway_services.form.fields.protocol.options.http"),
1070
1070
  value: "http",
@@ -1100,7 +1100,7 @@ const X = {
1100
1100
  value: "grpcs",
1101
1101
  group: "grpc"
1102
1102
  },
1103
- ...x ? [
1103
+ ...$ ? [
1104
1104
  {
1105
1105
  label: l("gateway_services.form.fields.protocol.options.ws"),
1106
1106
  value: "ws",
@@ -1117,115 +1117,110 @@ const X = {
1117
1117
  value: "udp",
1118
1118
  group: "udp"
1119
1119
  }
1120
- ], pe = { url: "url", protocol: "protocol" }, me = (t) => {
1121
- e.fields.protocol = t.value, e.fields.port = ne.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
1122
- }, H = (t) => t ? parseFloat(t) : 0, ve = () => {
1120
+ ], fe = { url: "url", protocol: "protocol" }, pe = (t) => {
1121
+ e.fields.protocol = t.value, e.fields.port = ae.getPortFromProtocol(e.fields.protocol, String(e.fields.port));
1122
+ }, z = (t) => t ? parseFloat(t) : 0, me = () => {
1123
1123
  e.fields.host = w.host, e.fields.path = w.path, e.fields.port = w.port, e.fields.protocol = w.protocol, e.fields.url = w.url, e.fields.retries = w.retries, e.fields.connect_timeout = w.connect_timeout, e.fields.write_timeout = w.write_timeout, e.fields.read_timeout = w.read_timeout, e.fields.client_certificate = w.client_certificate, e.fields.ca_certificates = w.ca_certificates, e.fields.tls_verify_enabled = w.tls_verify_enabled, e.fields.tls_verify_value = w.tls_verify_value, e.fields.enabled = w.enabled;
1124
+ }, ve = () => {
1125
+ v.value = !0, G(), e.errorMessages = [], me();
1124
1126
  }, ge = () => {
1125
- v.value = !0, W(), e.errorMessages = [], ve();
1126
- }, ye = () => {
1127
- switch (ve(), e.fields.name = `${G.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, S.value) {
1127
+ switch (me(), e.fields.name = `${L.name}-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, C.value) {
1128
1128
  case "url":
1129
- e.fields.url = `${G.protocol}://${G.host}${G.path}`;
1129
+ e.fields.url = `${L.protocol}://${L.host}${L.path}`;
1130
1130
  break;
1131
1131
  case "protocol":
1132
- e.fields.host = G.host, e.fields.path = G.path, e.fields.protocol = G.protocol, e.fields.port = G.port;
1132
+ e.fields.host = L.host, e.fields.path = L.path, e.fields.protocol = L.protocol, e.fields.port = L.port;
1133
1133
  break;
1134
1134
  default:
1135
- e.fields.url = `${G.protocol}://${G.host}${G.path}`;
1135
+ e.fields.url = `${L.protocol}://${L.host}${L.path}`;
1136
1136
  }
1137
- }, _e = () => {
1138
- if (W(), e.fields.url.length)
1137
+ }, ye = () => {
1138
+ if (G(), e.fields.url.length)
1139
1139
  try {
1140
- const t = new URL(e.fields.url), o = Y(t.protocol, te);
1141
- if (o) throw new Error(o);
1140
+ const t = new URL(e.fields.url), r = X(t.protocol, ee);
1141
+ if (r) throw new Error(r);
1142
1142
  e.fields.protocol = t.protocol.slice(0, -1);
1143
- const m = ae(t.hostname);
1144
- if (m) throw new Error(m);
1143
+ const n = se(t.hostname);
1144
+ if (n) throw new Error(n);
1145
1145
  e.fields.host = t.hostname;
1146
- const b = ue(t.pathname);
1147
- if (b) throw new Error(b);
1146
+ const h = de(t.pathname);
1147
+ if (h) throw new Error(h);
1148
1148
  e.fields.path = t.pathname;
1149
- const _ = fe(t.port);
1149
+ const _ = ue(t.port);
1150
1150
  if (_) throw new Error(_);
1151
1151
  const k = Number(t.port);
1152
- Pe.value = !!k, e.fields.port = k || ne.getPortFromProtocol(e.fields.protocol), c("url-valid:success");
1152
+ Ee.value = !!k, e.fields.port = k || ae.getPortFromProtocol(e.fields.protocol), d("url-valid:success");
1153
1153
  } catch {
1154
- c("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
1154
+ d("url-valid:error", l("gateway_services.form.errors.url.invalid")), e.formFieldErrors.url = l("gateway_services.form.errors.url.invalid");
1155
1155
  }
1156
- }, he = (t) => {
1157
- W(t);
1158
- }, Ie = C(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), Z = (t) => {
1156
+ }, _e = (t) => {
1157
+ G(t);
1158
+ }, Pe = S(() => !!e.formFieldErrors.url || !!e.formFieldErrors.host || !!e.formFieldErrors.port), H = (t) => {
1159
1159
  if (e.errorMessages.length) return "";
1160
- const o = e.formFieldErrors;
1161
- return o[t] ? o[t] : "";
1162
- }, M = (t) => {
1163
- W(t ?? void 0);
1164
- const o = ae(e.fields.host);
1165
- o && (e.formFieldErrors.host = o);
1166
- const m = ue(e.fields.path);
1167
- m && (e.formFieldErrors.path = m);
1168
- const b = fe(e.fields.port);
1169
- b && (e.formFieldErrors.port = b), J.value ? c("url-valid:success") : c("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
1170
- }, W = (t) => {
1160
+ const r = e.formFieldErrors;
1161
+ return r[t] ? r[t] : "";
1162
+ }, x = (t) => {
1163
+ G(t ?? void 0);
1164
+ const r = se(e.fields.host);
1165
+ r && (e.formFieldErrors.host = r);
1166
+ const n = de(e.fields.path);
1167
+ n && (e.formFieldErrors.path = n);
1168
+ const h = ue(e.fields.port);
1169
+ h && (e.formFieldErrors.port = h), Z.value ? d("url-valid:success") : d("url-valid:error", e.errorMessages.join(",") || l("gateway_services.form.errors.url.invalid"));
1170
+ }, G = (t) => {
1171
1171
  if (t)
1172
1172
  e.formFieldErrors[t] = "";
1173
1173
  else
1174
- for (let o in e.formFieldErrors)
1175
- e.formFieldErrors[o] = "";
1174
+ for (let r in e.formFieldErrors)
1175
+ e.formFieldErrors[r] = "";
1176
1176
  e.errorMessages = [];
1177
- }, J = C(() => {
1177
+ }, Z = S(() => {
1178
1178
  for (let t in e.formFieldErrors)
1179
1179
  if (e.formFieldErrors[t].length)
1180
1180
  return !1;
1181
1181
  return !0;
1182
- }), de = () => {
1183
- e.fields.url && S.value === "url" ? _e() : M();
1184
- }, Fe = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, be = C(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), we = C(() => {
1185
- if (S.value === "url")
1182
+ }), ce = () => {
1183
+ e.fields.url && C.value === "url" ? ye() : x();
1184
+ }, Ie = () => `new-service-${(/* @__PURE__ */ new Date()).toISOString().replace(/\D/g, "").slice(0, 17)}`, he = S(() => !["tcp", "tls", "tls_passthrough", "grpc", "grpcs", "udp"].includes(e.fields.protocol)), be = S(() => {
1185
+ if (C.value === "url")
1186
1186
  return !0;
1187
1187
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
1188
- return S.value === "protocol" && t;
1189
- }), Ae = C(() => {
1190
- if (S.value === "url")
1188
+ return C.value === "protocol" && t;
1189
+ }), Fe = S(() => {
1190
+ if (C.value === "url")
1191
1191
  return !0;
1192
1192
  const t = ["https", "tls"].includes(e.fields.protocol);
1193
- return S.value === "protocol" && t;
1194
- }), Re = C(() => {
1195
- if (S.value === "url")
1193
+ return C.value === "protocol" && t;
1194
+ }), Ae = S(() => {
1195
+ if (C.value === "url")
1196
1196
  return !0;
1197
1197
  const t = ["https", "wss", "tls"].includes(e.fields.protocol);
1198
- return S.value === "protocol" && t;
1199
- }), oe = (t) => {
1200
- W("name"), ce.value = Se.utf8Name(t);
1201
- }, re = C(() => {
1202
- const t = !z.value || !Ee(e.fields, w), o = S.value === "url" && !!e.fields.url && J.value, m = S.value === "protocol" && !!e.fields.host && J.value;
1203
- return t && (o || m);
1204
- }), u = (t) => {
1205
- var o, m, b;
1206
- e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((o = t == null ? void 0 : t.tags) == null ? void 0 : o.join(", ")) || "", e.fields.protocol = (t == null ? void 0 : t.protocol) || "http", e.fields.path = (t == null ? void 0 : t.path) || "", e.fields.read_timeout = t != null && t.read_timeout || (t == null ? void 0 : t.read_timeout) === 0 ? t == null ? void 0 : t.read_timeout : 6e4, e.fields.retries = t != null && t.retries || (t == null ? void 0 : t.retries) === 0 ? t == null ? void 0 : t.retries : 5, e.fields.host = (t == null ? void 0 : t.host) || "", e.fields.connect_timeout = t != null && t.connect_timeout || (t == null ? void 0 : t.connect_timeout) === 0 ? t == null ? void 0 : t.connect_timeout : 6e4, e.fields.tls_verify_enabled = (t == null ? void 0 : t.tls_verify) !== "" && (t == null ? void 0 : t.tls_verify) !== null && (t == null ? void 0 : t.tls_verify) !== void 0, e.fields.tls_verify_value = t != null && t.tls_verify ? t == null ? void 0 : t.tls_verify : !1, e.fields.ca_certificates = ((m = t == null ? void 0 : t.ca_certificates) == null ? void 0 : m.join(",")) || "", e.fields.client_certificate = ((b = t == null ? void 0 : t.client_certificate) == null ? void 0 : b.id) || "", e.fields.write_timeout = t != null && t.write_timeout || (t == null ? void 0 : t.write_timeout) === 0 ? t == null ? void 0 : t.write_timeout : 6e4, e.fields.port = t != null && t.port || (t == null ? void 0 : t.port) === 0 ? t == null ? void 0 : t.port : 80, e.fields.enabled = (t == null ? void 0 : t.enabled) ?? !0, Object.assign(w, e.fields);
1198
+ return C.value === "protocol" && t;
1199
+ }), te = (t) => {
1200
+ G("name"), ne.value = Se.utf8Name(t);
1201
+ }, oe = S(() => {
1202
+ const t = !j.value || !Ce(e.fields, w), r = C.value === "url" && !!e.fields.url && Z.value, n = C.value === "protocol" && !!e.fields.host && Z.value;
1203
+ return t && (r || n);
1204
+ }), f = (t) => {
1205
+ var r, n, h;
1206
+ e.fields.name = (t == null ? void 0 : t.name) || "", e.fields.tags = ((r = t == null ? void 0 : t.tags) == null ? void 0 : r.join(", ")) || "", e.fields.protocol = (t == null ? void 0 : t.protocol) || "http", e.fields.path = (t == null ? void 0 : t.path) || "", e.fields.read_timeout = t != null && t.read_timeout || (t == null ? void 0 : t.read_timeout) === 0 ? t == null ? void 0 : t.read_timeout : 6e4, e.fields.retries = t != null && t.retries || (t == null ? void 0 : t.retries) === 0 ? t == null ? void 0 : t.retries : 5, e.fields.host = (t == null ? void 0 : t.host) || "", e.fields.connect_timeout = t != null && t.connect_timeout || (t == null ? void 0 : t.connect_timeout) === 0 ? t == null ? void 0 : t.connect_timeout : 6e4, e.fields.tls_verify_enabled = (t == null ? void 0 : t.tls_verify) !== "" && (t == null ? void 0 : t.tls_verify) !== null && (t == null ? void 0 : t.tls_verify) !== void 0, e.fields.tls_verify_value = t != null && t.tls_verify ? t == null ? void 0 : t.tls_verify : !1, e.fields.ca_certificates = ((n = t == null ? void 0 : t.ca_certificates) == null ? void 0 : n.join(",")) || "", e.fields.client_certificate = ((h = t == null ? void 0 : t.client_certificate) == null ? void 0 : h.id) || "", e.fields.write_timeout = t != null && t.write_timeout || (t == null ? void 0 : t.write_timeout) === 0 ? t == null ? void 0 : t.write_timeout : 6e4, e.fields.port = t != null && t.port || (t == null ? void 0 : t.port) === 0 ? t == null ? void 0 : t.port : 80, e.fields.enabled = (t == null ? void 0 : t.enabled) ?? !0, Object.assign(w, e.fields);
1207
1207
  }, g = () => {
1208
1208
  F.push(a.config.cancelRoute);
1209
- }, y = C(() => {
1210
- var o, m;
1211
- let t = `${a.config.apiBaseUrl}${Ce.form[a.config.app][j.value]}`;
1212
- return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((o = a.config) == null ? void 0 : o.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (m = a.config) != null && m.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
1213
- }), I = (t) => {
1214
- let o = "";
1215
- t.url && (o = new URL(t.url).protocol), (["https", "wss", "tls"].includes(t.protocol) || ["https", "wss", "tls"].includes(o)) && (t.tls_verify = t.tls_verify_enabled ? t.tls_verify_value : null), delete t.tls_verify_enabled, delete t.tls_verify_value;
1216
- }, K = C(() => {
1217
- var o, m, b, _;
1209
+ }, y = S(() => {
1210
+ var r, n;
1211
+ let t = `${a.config.apiBaseUrl}${Ve.form[a.config.app][O.value]}`;
1212
+ return a.config.app === "konnect" ? t = t.replace(/{controlPlaneId}/gi, ((r = a.config) == null ? void 0 : r.controlPlaneId) || "") : a.config.app === "kongManager" && (t = t.replace(/\/{workspace}/gi, (n = a.config) != null && n.workspace ? `/${a.config.workspace}` : "")), t = t.replace(/{id}/gi, a.gatewayServiceId), t;
1213
+ }), E = S(() => {
1214
+ var r, n, h, _;
1218
1215
  const t = {
1219
1216
  name: e.fields.name || null,
1220
- tags: e.fields.tags ? (b = (m = (o = e.fields.tags) == null ? void 0 : o.split(",")) == null ? void 0 : m.map((k) => String(k || "").trim())) == null ? void 0 : b.filter((k) => k !== "") : null,
1217
+ tags: e.fields.tags ? (h = (n = (r = e.fields.tags) == null ? void 0 : r.split(",")) == null ? void 0 : n.map((k) => String(k || "").trim())) == null ? void 0 : h.filter((k) => k !== "") : null,
1221
1218
  protocol: e.fields.protocol,
1222
1219
  path: e.fields.path || null,
1223
1220
  read_timeout: e.fields.read_timeout,
1224
1221
  retries: e.fields.retries,
1225
1222
  host: e.fields.host,
1226
1223
  connect_timeout: e.fields.connect_timeout,
1227
- tls_verify_value: e.fields.tls_verify_value,
1228
- tls_verify_enabled: e.fields.tls_verify_enabled,
1229
1224
  ca_certificates: e.fields.ca_certificates ? (_ = e.fields.ca_certificates) == null ? void 0 : _.split(",").filter((k) => k !== "") : null,
1230
1225
  client_certificate: e.fields.client_certificate ? { id: e.fields.client_certificate } : null,
1231
1226
  write_timeout: e.fields.write_timeout,
@@ -1233,133 +1228,132 @@ const X = {
1233
1228
  url: e.fields.url,
1234
1229
  enabled: e.fields.enabled
1235
1230
  };
1236
- return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), be.value || (t.path = null), j.value === "create" ? S.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : j.value === "edit" && delete t.url, t;
1237
- }), L = async () => {
1238
- var t, o, m, b;
1231
+ return e.fields.client_certificate && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.client_certificate = { id: e.fields.client_certificate }), e.fields.tls_verify_enabled && ["https", "wss", "tls"].includes(e.fields.protocol) && (t.tls_verify = e.fields.tls_verify_value), he.value || (t.path = null), O.value === "create" ? C.value === "url" ? (delete t.protocol, delete t.host, delete t.path, a.config.app === "konnect" && delete t.port) : delete t.url : O.value === "edit" && delete t.url, t;
1232
+ }), N = async () => {
1233
+ var t, r, n, h;
1239
1234
  try {
1240
1235
  e.isReadonly = !0;
1241
- const _ = K.value;
1242
- I(_);
1236
+ const _ = E.value;
1243
1237
  let k;
1244
- if (j.value === "create" ? k = await P.post(y.value, _) : j.value === "edit" && (k = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await P.put(y.value, _) : await P.patch(y.value, _)), k) {
1238
+ if (O.value === "create" ? k = await I.post(y.value, _) : O.value === "edit" && (k = ((t = a.config) == null ? void 0 : t.app) === "konnect" ? await I.put(y.value, _) : await I.patch(y.value, _)), k) {
1245
1239
  const { data: i } = k;
1246
- e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || ne.getPortFromProtocol(i.protocol), e.fields.protocol = (i == null ? void 0 : i.protocol) || "http", e.fields.host = (i == null ? void 0 : i.host) || "", e.fields.path = (i == null ? void 0 : i.path) || "", e.fields.url = (i == null ? void 0 : i.url) || "", e.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, e.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, e.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, e.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, e.fields.client_certificate = ((o = i == null ? void 0 : i.client_certificate) == null ? void 0 : o.id) || "", e.fields.ca_certificates = (m = i == null ? void 0 : i.ca_certificates) != null && m.length ? i == null ? void 0 : i.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (i == null ? void 0 : i.tls_verify), e.fields.tags = (b = i == null ? void 0 : i.tags) != null && b.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(w, e.fields), c("update", k == null ? void 0 : k.data);
1240
+ e.fields.name = (i == null ? void 0 : i.name) || "", e.fields.port = i.port || ae.getPortFromProtocol(i.protocol), e.fields.protocol = (i == null ? void 0 : i.protocol) || "http", e.fields.host = (i == null ? void 0 : i.host) || "", e.fields.path = (i == null ? void 0 : i.path) || "", e.fields.url = (i == null ? void 0 : i.url) || "", e.fields.retries = i != null && i.retries || (i == null ? void 0 : i.retries) === 0 ? i == null ? void 0 : i.retries : 5, e.fields.connect_timeout = i != null && i.connect_timeout || (i == null ? void 0 : i.connect_timeout) === 0 ? i == null ? void 0 : i.connect_timeout : 6e4, e.fields.write_timeout = i != null && i.write_timeout || (i == null ? void 0 : i.write_timeout) === 0 ? i == null ? void 0 : i.write_timeout : 6e4, e.fields.read_timeout = i != null && i.read_timeout || (i == null ? void 0 : i.read_timeout) === 0 ? i == null ? void 0 : i.read_timeout : 6e4, e.fields.client_certificate = ((r = i == null ? void 0 : i.client_certificate) == null ? void 0 : r.id) || "", e.fields.ca_certificates = (n = i == null ? void 0 : i.ca_certificates) != null && n.length ? i == null ? void 0 : i.ca_certificates.join(",") : "", e.fields.tls_verify_enabled = (i == null ? void 0 : i.tls_verify) !== "" && (i == null ? void 0 : i.tls_verify) !== null && (i == null ? void 0 : i.tls_verify) !== void 0, e.fields.tls_verify_value = e.fields.tls_verify_enabled && (i == null ? void 0 : i.tls_verify), e.fields.tags = (h = i == null ? void 0 : i.tags) != null && h.length ? i.tags.join(", ") : "", e.fields.enabled = (i == null ? void 0 : i.enabled) ?? !0, Object.assign(w, e.fields), d("update", k == null ? void 0 : k.data);
1247
1241
  }
1248
1242
  return k;
1249
1243
  } catch (_) {
1250
- const { fields: k, messages: i } = B(_);
1251
- e.errorMessages = i, k.length && k.forEach((Q) => {
1252
- const ie = Q.field;
1253
- ie === "client_certificate.id" ? e.formFieldErrors.client_certificate = Q.message : ie.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = Q.message : Object.keys(e.formFieldErrors).includes(ie) && (e.formFieldErrors = {
1244
+ const { fields: k, messages: i } = D(_);
1245
+ e.errorMessages = i, k.length && k.forEach((J) => {
1246
+ const re = J.field;
1247
+ re === "client_certificate.id" ? e.formFieldErrors.client_certificate = J.message : re.startsWith("ca_certificates") ? e.formFieldErrors.ca_certificates = J.message : Object.keys(e.formFieldErrors).includes(re) && (e.formFieldErrors = {
1254
1248
  ...e.formFieldErrors,
1255
- [ie]: Q.message
1249
+ [re]: J.message
1256
1250
  });
1257
- }), c("error", _);
1251
+ }), d("error", _);
1258
1252
  } finally {
1259
1253
  e.isReadonly = !1;
1260
1254
  }
1261
1255
  };
1262
- return Me(() => a.gatewayServiceId, () => {
1256
+ return xe(() => a.gatewayServiceId, () => {
1263
1257
  Object.assign(e.fields, w);
1264
- }), Me(e.fields, () => {
1265
- c("model-updated", K.value);
1266
- }), Je(() => {
1267
- c("model-updated", K.value), z.value || (e.fields.name = Fe());
1268
- }), N({
1269
- validateUrl: de,
1270
- getPayload: K,
1271
- saveFormData: L,
1272
- canSubmit: re,
1273
- initForm: u
1274
- }), (t, o) => {
1275
- const m = D("KRadio"), b = D("KButton"), _ = D("KInput"), k = D("KSelect"), i = D("KCheckbox"), Q = D("KCollapse"), ie = D("KAlert");
1276
- return V(), R("div", $t, [
1277
- n(r(_t), {
1278
- "can-submit": re.value,
1258
+ }), xe(e.fields, () => {
1259
+ d("model-updated", E.value);
1260
+ }), Ze(() => {
1261
+ d("model-updated", E.value), j.value || (e.fields.name = Ie());
1262
+ }), q({
1263
+ validateUrl: ce,
1264
+ getPayload: E,
1265
+ saveFormData: N,
1266
+ canSubmit: oe,
1267
+ initForm: f
1268
+ }), (t, r) => {
1269
+ const n = M("KRadio"), h = M("KButton"), _ = M("KInput"), k = M("KSelect"), i = M("KCheckbox"), J = M("KCollapse"), re = M("KAlert");
1270
+ return V(), A("div", Ut, [
1271
+ c(o(yt), {
1272
+ "can-submit": oe.value,
1279
1273
  config: s.config,
1280
1274
  "edit-id": s.gatewayServiceId,
1281
- "entity-type": r(je).GatewayService,
1282
- "fetch-url": O.value,
1283
- "form-fields": K.value,
1275
+ "entity-type": o(Oe).GatewayService,
1276
+ "fetch-url": W.value,
1277
+ "form-fields": E.value,
1284
1278
  "is-readonly": e.isReadonly,
1285
1279
  onCancel: g,
1286
- "onFetch:error": o[30] || (o[30] = (f) => t.$emit("error", f)),
1287
- "onFetch:success": u,
1288
- onLoading: o[31] || (o[31] = (f) => t.$emit("loading", f)),
1289
- onSubmit: L
1280
+ "onFetch:error": r[30] || (r[30] = (p) => t.$emit("error", p)),
1281
+ "onFetch:success": f,
1282
+ onLoading: r[31] || (r[31] = (p) => t.$emit("loading", p)),
1283
+ onSubmit: N
1290
1284
  }, {
1291
- "form-actions": d(() => [
1292
- Ye(t.$slots, "form-actions", {
1293
- canSubmit: re.value,
1285
+ "form-actions": u(() => [
1286
+ Xe(t.$slots, "form-actions", {
1287
+ canSubmit: oe.value,
1294
1288
  cancel: g,
1295
- submit: L
1289
+ submit: N
1296
1290
  }, void 0, !0)
1297
1291
  ]),
1298
- default: d(() => [
1299
- n(r(Ge), {
1300
- description: r(l)("gateway_services.form.sections.keys.description"),
1292
+ default: u(() => [
1293
+ c(o(qe), {
1294
+ description: o(l)("gateway_services.form.sections.keys.description"),
1301
1295
  "hide-info-header": s.hideSectionsInfo,
1302
- title: r(l)("gateway_services.form.sections.keys.title")
1296
+ title: o(l)("gateway_services.form.sections.keys.title")
1303
1297
  }, {
1304
- default: d(() => [
1305
- z.value ? T("", !0) : (V(), R("div", xt, [
1306
- E("div", Mt, [
1307
- n(m, {
1308
- modelValue: S.value,
1309
- "onUpdate:modelValue": o[0] || (o[0] = (f) => S.value = f),
1298
+ default: u(() => [
1299
+ j.value ? R("", !0) : (V(), A("div", $t, [
1300
+ P("div", xt, [
1301
+ c(n, {
1302
+ modelValue: C.value,
1303
+ "onUpdate:modelValue": r[0] || (r[0] = (p) => C.value = p),
1310
1304
  card: "",
1311
1305
  "card-orientation": "horizontal",
1312
1306
  "data-testid": "gateway-service-url-radio",
1313
- description: r(l)("gateway_services.form.sections.keys.url.description"),
1314
- label: r(l)("gateway_services.form.sections.keys.url.label"),
1315
- "selected-value": pe.url,
1316
- onChange: ge
1307
+ description: o(l)("gateway_services.form.sections.keys.url.description"),
1308
+ label: o(l)("gateway_services.form.sections.keys.url.label"),
1309
+ "selected-value": fe.url,
1310
+ onChange: ve
1317
1311
  }, null, 8, ["modelValue", "description", "label", "selected-value"]),
1318
- n(m, {
1319
- modelValue: S.value,
1320
- "onUpdate:modelValue": o[1] || (o[1] = (f) => S.value = f),
1312
+ c(n, {
1313
+ modelValue: C.value,
1314
+ "onUpdate:modelValue": r[1] || (r[1] = (p) => C.value = p),
1321
1315
  card: "",
1322
1316
  "card-orientation": "horizontal",
1323
1317
  "checked-group": "protocol",
1324
1318
  "data-testid": "gateway-service-protocol-radio",
1325
- description: r(l)("gateway_services.form.sections.keys.protocol.description"),
1326
- label: r(l)("gateway_services.form.sections.keys.protocol.label"),
1327
- "selected-value": pe.protocol,
1328
- onChange: ge
1319
+ description: o(l)("gateway_services.form.sections.keys.protocol.description"),
1320
+ label: o(l)("gateway_services.form.sections.keys.protocol.label"),
1321
+ "selected-value": fe.protocol,
1322
+ onChange: ve
1329
1323
  }, null, 8, ["modelValue", "description", "label", "selected-value"])
1330
1324
  ]),
1331
- n(Ue, { name: "slide-fade" }, {
1332
- default: d(() => [
1333
- S.value === "url" ? (V(), R("div", Dt, [
1334
- n(_, {
1325
+ c(Te, { name: "slide-fade" }, {
1326
+ default: u(() => [
1327
+ C.value === "url" ? (V(), A("div", Mt, [
1328
+ c(_, {
1335
1329
  modelValue: e.fields.url,
1336
- "onUpdate:modelValue": o[2] || (o[2] = (f) => e.fields.url = f),
1330
+ "onUpdate:modelValue": r[2] || (r[2] = (p) => e.fields.url = p),
1337
1331
  modelModifiers: { trim: !0 },
1338
1332
  class: "gateway-service-url-input gateway-service-form-margin-bottom",
1339
1333
  "data-testid": "gateway-service-url-input",
1340
- error: Ie.value,
1341
- "error-message": Z("url"),
1342
- label: r(l)("gateway_services.form.fields.upstream_url.label"),
1334
+ error: Pe.value,
1335
+ "error-message": H("url"),
1336
+ label: o(l)("gateway_services.form.fields.upstream_url.label"),
1343
1337
  "label-attributes": {
1344
- info: s.config.app === "konnect" ? r(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : r(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
1338
+ info: s.config.app === "konnect" ? o(l)("gateway_services.form.fields.upstream_url.tooltip_for_konnect") : o(l)("gateway_services.form.fields.upstream_url.tooltip_for_km"),
1345
1339
  tooltipAttributes: { maxWidth: "400" }
1346
1340
  },
1347
1341
  name: "url",
1348
- placeholder: r(l)("gateway_services.form.fields.upstream_url.placeholder"),
1342
+ placeholder: o(l)("gateway_services.form.fields.upstream_url.placeholder"),
1349
1343
  required: "",
1350
- onInput: _e
1351
- }, Ve({ _: 2 }, [
1344
+ onInput: ye
1345
+ }, ke({ _: 2 }, [
1352
1346
  s.hideTrySampleApiButton ? void 0 : {
1353
1347
  name: "after",
1354
- fn: d(() => [
1355
- n(b, {
1348
+ fn: u(() => [
1349
+ c(h, {
1356
1350
  appearance: "tertiary",
1357
1351
  "data-testid": "try-sample-api",
1358
1352
  size: "small",
1359
- onClick: ye
1353
+ onClick: ge
1360
1354
  }, {
1361
- default: d(() => [
1362
- U(h(r(l)("gateway_services.form.buttons.try_sample")), 1)
1355
+ default: u(() => [
1356
+ T(b(o(l)("gateway_services.form.buttons.try_sample")), 1)
1363
1357
  ]),
1364
1358
  _: 1
1365
1359
  })
@@ -1367,57 +1361,57 @@ const X = {
1367
1361
  key: "0"
1368
1362
  }
1369
1363
  ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
1370
- ])) : T("", !0)
1364
+ ])) : R("", !0)
1371
1365
  ]),
1372
1366
  _: 1
1373
1367
  })
1374
1368
  ])),
1375
- n(Ue, { name: "slide-fade" }, {
1376
- default: d(() => [
1377
- S.value === "protocol" || z.value ? (V(), R("div", Bt, [
1378
- n(k, {
1369
+ c(Te, { name: "slide-fade" }, {
1370
+ default: u(() => [
1371
+ C.value === "protocol" || j.value ? (V(), A("div", Dt, [
1372
+ c(k, {
1379
1373
  modelValue: e.fields.protocol,
1380
- "onUpdate:modelValue": o[3] || (o[3] = (f) => e.fields.protocol = f),
1374
+ "onUpdate:modelValue": r[3] || (r[3] = (p) => e.fields.protocol = p),
1381
1375
  "data-testid": "gateway-service-protocol-select",
1382
- items: te,
1383
- label: r(l)("gateway_services.form.fields.protocol.label"),
1376
+ items: ee,
1377
+ label: o(l)("gateway_services.form.fields.protocol.label"),
1384
1378
  "label-attributes": {
1385
- info: r(l)("gateway_services.form.fields.protocol.tooltip"),
1379
+ info: o(l)("gateway_services.form.fields.protocol.tooltip"),
1386
1380
  tooltipAttributes: { maxWidth: "400" }
1387
1381
  },
1388
1382
  readonly: e.isReadonly,
1389
1383
  required: "",
1390
1384
  width: "100%",
1391
- onSelected: me
1385
+ onSelected: pe
1392
1386
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"]),
1393
- n(_, {
1387
+ c(_, {
1394
1388
  modelValue: e.fields.host,
1395
- "onUpdate:modelValue": o[4] || (o[4] = (f) => e.fields.host = f),
1389
+ "onUpdate:modelValue": r[4] || (r[4] = (p) => e.fields.host = p),
1396
1390
  modelModifiers: { trim: !0 },
1397
1391
  class: "gateway-service-form-margin-top",
1398
1392
  "data-testid": "gateway-service-host-input",
1399
1393
  error: !!e.formFieldErrors.host,
1400
- "error-message": Z("host"),
1401
- label: r(l)("gateway_services.form.fields.host.label"),
1394
+ "error-message": H("host"),
1395
+ label: o(l)("gateway_services.form.fields.host.label"),
1402
1396
  "label-attributes": {
1403
- info: r(l)("gateway_services.form.fields.host.tooltip"),
1397
+ info: o(l)("gateway_services.form.fields.host.tooltip"),
1404
1398
  tooltipAttributes: { maxWidth: "400" }
1405
1399
  },
1406
1400
  name: "host",
1407
- placeholder: r(l)("gateway_services.form.fields.host.placeholder"),
1401
+ placeholder: o(l)("gateway_services.form.fields.host.placeholder"),
1408
1402
  required: "",
1409
- onInput: o[5] || (o[5] = (f) => M("host"))
1410
- }, Ve({ _: 2 }, [
1403
+ onInput: r[5] || (r[5] = (p) => x("host"))
1404
+ }, ke({ _: 2 }, [
1411
1405
  s.hideTrySampleApiButton ? void 0 : {
1412
1406
  name: "after",
1413
- fn: d(() => [
1414
- n(b, {
1407
+ fn: u(() => [
1408
+ c(h, {
1415
1409
  appearance: "tertiary",
1416
1410
  size: "small",
1417
- onClick: ye
1411
+ onClick: ge
1418
1412
  }, {
1419
- default: d(() => [
1420
- U(h(r(l)("gateway_services.form.buttons.try_sample")), 1)
1413
+ default: u(() => [
1414
+ T(b(o(l)("gateway_services.form.buttons.try_sample")), 1)
1421
1415
  ]),
1422
1416
  _: 1
1423
1417
  })
@@ -1425,75 +1419,75 @@ const X = {
1425
1419
  key: "0"
1426
1420
  }
1427
1421
  ]), 1032, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"]),
1428
- be.value ? (V(), R("div", Kt, [
1429
- n(_, {
1422
+ he.value ? (V(), A("div", Bt, [
1423
+ c(_, {
1430
1424
  modelValue: e.fields.path,
1431
- "onUpdate:modelValue": o[6] || (o[6] = (f) => e.fields.path = f),
1425
+ "onUpdate:modelValue": r[6] || (r[6] = (p) => e.fields.path = p),
1432
1426
  modelModifiers: { trim: !0 },
1433
1427
  class: "gateway-service-form-margin-top",
1434
1428
  "data-testid": "gateway-service-path-input",
1435
1429
  error: !!e.formFieldErrors.path,
1436
- "error-message": Z("path"),
1437
- label: r(l)("gateway_services.form.fields.path.label"),
1430
+ "error-message": H("path"),
1431
+ label: o(l)("gateway_services.form.fields.path.label"),
1438
1432
  "label-attributes": {
1439
- info: r(l)("gateway_services.form.fields.path.tooltip"),
1433
+ info: o(l)("gateway_services.form.fields.path.tooltip"),
1440
1434
  tooltipAttributes: { maxWidth: "400" }
1441
1435
  },
1442
1436
  name: "path",
1443
- placeholder: r(l)("gateway_services.form.fields.path.placeholder"),
1444
- onInput: o[7] || (o[7] = (f) => M("path"))
1437
+ placeholder: o(l)("gateway_services.form.fields.path.placeholder"),
1438
+ onInput: r[7] || (r[7] = (p) => x("path"))
1445
1439
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder"])
1446
- ])) : T("", !0),
1447
- n(_, {
1440
+ ])) : R("", !0),
1441
+ c(_, {
1448
1442
  modelValue: e.fields.port,
1449
1443
  "onUpdate:modelValue": [
1450
- o[8] || (o[8] = (f) => e.fields.port = f),
1451
- o[10] || (o[10] = () => {
1452
- e.fields.port = H(e.fields.port + "");
1444
+ r[8] || (r[8] = (p) => e.fields.port = p),
1445
+ r[10] || (r[10] = () => {
1446
+ e.fields.port = z(e.fields.port + "");
1453
1447
  })
1454
1448
  ],
1455
1449
  class: "gateway-service-form-margin-top",
1456
1450
  "data-testid": "gateway-service-port-input",
1457
1451
  error: !!e.formFieldErrors.port,
1458
- "error-message": Z("port"),
1459
- label: r(l)("gateway_services.form.fields.port.label"),
1452
+ "error-message": H("port"),
1453
+ label: o(l)("gateway_services.form.fields.port.label"),
1460
1454
  "label-attributes": {
1461
- info: r(l)("gateway_services.form.fields.port.tooltip"),
1455
+ info: o(l)("gateway_services.form.fields.port.tooltip"),
1462
1456
  tooltipAttributes: { maxWidth: "400" }
1463
1457
  },
1464
1458
  name: "port",
1465
1459
  type: "number",
1466
- onInput: o[9] || (o[9] = (f) => M("port"))
1460
+ onInput: r[9] || (r[9] = (p) => x("port"))
1467
1461
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes"])
1468
- ])) : T("", !0)
1462
+ ])) : R("", !0)
1469
1463
  ]),
1470
1464
  _: 1
1471
1465
  }),
1472
- n(Q, {
1466
+ c(J, {
1473
1467
  modelValue: v.value,
1474
- "onUpdate:modelValue": o[26] || (o[26] = (f) => v.value = f),
1468
+ "onUpdate:modelValue": r[26] || (r[26] = (p) => v.value = p),
1475
1469
  "data-testid": "advanced-fields-collapse",
1476
1470
  "trigger-alignment": "leading",
1477
- "trigger-label": r(l)("gateway_services.form.sections.keys.viewAdvancedFields")
1471
+ "trigger-label": o(l)("gateway_services.form.sections.keys.viewAdvancedFields")
1478
1472
  }, {
1479
- default: d(() => [
1480
- n(Ue, { name: "slide-fade" }, {
1481
- default: d(() => [
1482
- v.value ? T("", !0) : (V(), R("div", Lt, [
1483
- E("div", qt, [
1484
- n(_, {
1473
+ default: u(() => [
1474
+ c(Te, { name: "slide-fade" }, {
1475
+ default: u(() => [
1476
+ v.value ? R("", !0) : (V(), A("div", Kt, [
1477
+ P("div", Lt, [
1478
+ c(_, {
1485
1479
  modelValue: e.fields.retries,
1486
1480
  "onUpdate:modelValue": [
1487
- o[11] || (o[11] = (f) => e.fields.retries = f),
1488
- o[12] || (o[12] = () => {
1489
- e.fields.retries = H(e.fields.retries + "");
1481
+ r[11] || (r[11] = (p) => e.fields.retries = p),
1482
+ r[12] || (r[12] = () => {
1483
+ e.fields.retries = z(e.fields.retries + "");
1490
1484
  })
1491
1485
  ],
1492
1486
  autocomplete: "off",
1493
1487
  "data-testid": "gateway-service-retries-input",
1494
- label: r(l)("gateway_services.form.fields.retries.label"),
1488
+ label: o(l)("gateway_services.form.fields.retries.label"),
1495
1489
  "label-attributes": {
1496
- info: r(l)("gateway_services.form.fields.retries.tooltip"),
1490
+ info: o(l)("gateway_services.form.fields.retries.tooltip"),
1497
1491
  tooltipAttributes: { maxWidth: "400" }
1498
1492
  },
1499
1493
  name: "retries",
@@ -1501,20 +1495,20 @@ const X = {
1501
1495
  type: "number"
1502
1496
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1503
1497
  ]),
1504
- E("div", Gt, [
1505
- n(_, {
1498
+ P("div", qt, [
1499
+ c(_, {
1506
1500
  modelValue: e.fields.connect_timeout,
1507
1501
  "onUpdate:modelValue": [
1508
- o[13] || (o[13] = (f) => e.fields.connect_timeout = f),
1509
- o[14] || (o[14] = () => {
1510
- e.fields.connect_timeout = H(e.fields.connect_timeout + "");
1502
+ r[13] || (r[13] = (p) => e.fields.connect_timeout = p),
1503
+ r[14] || (r[14] = () => {
1504
+ e.fields.connect_timeout = z(e.fields.connect_timeout + "");
1511
1505
  })
1512
1506
  ],
1513
1507
  autocomplete: "off",
1514
1508
  "data-testid": "gateway-service-connTimeout-input",
1515
- label: r(l)("gateway_services.form.fields.connect_timeout.label"),
1509
+ label: o(l)("gateway_services.form.fields.connect_timeout.label"),
1516
1510
  "label-attributes": {
1517
- info: r(l)("gateway_services.form.fields.connect_timeout.tooltip"),
1511
+ info: o(l)("gateway_services.form.fields.connect_timeout.tooltip"),
1518
1512
  tooltipAttributes: { maxWidth: "400" }
1519
1513
  },
1520
1514
  name: "connTimeout",
@@ -1522,20 +1516,20 @@ const X = {
1522
1516
  type: "number"
1523
1517
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1524
1518
  ]),
1525
- E("div", Nt, [
1526
- n(_, {
1519
+ P("div", Gt, [
1520
+ c(_, {
1527
1521
  modelValue: e.fields.write_timeout,
1528
1522
  "onUpdate:modelValue": [
1529
- o[15] || (o[15] = (f) => e.fields.write_timeout = f),
1530
- o[16] || (o[16] = () => {
1531
- e.fields.write_timeout = H(e.fields.write_timeout + "");
1523
+ r[15] || (r[15] = (p) => e.fields.write_timeout = p),
1524
+ r[16] || (r[16] = () => {
1525
+ e.fields.write_timeout = z(e.fields.write_timeout + "");
1532
1526
  })
1533
1527
  ],
1534
1528
  autocomplete: "off",
1535
1529
  "data-testid": "gateway-service-writeTimeout-input",
1536
- label: r(l)("gateway_services.form.fields.write_timeout.label"),
1530
+ label: o(l)("gateway_services.form.fields.write_timeout.label"),
1537
1531
  "label-attributes": {
1538
- info: r(l)("gateway_services.form.fields.write_timeout.tooltip"),
1532
+ info: o(l)("gateway_services.form.fields.write_timeout.tooltip"),
1539
1533
  tooltipAttributes: { maxWidth: "400" }
1540
1534
  },
1541
1535
  name: "writeTimeout",
@@ -1543,20 +1537,20 @@ const X = {
1543
1537
  type: "number"
1544
1538
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1545
1539
  ]),
1546
- E("div", Wt, [
1547
- n(_, {
1540
+ P("div", Nt, [
1541
+ c(_, {
1548
1542
  modelValue: e.fields.read_timeout,
1549
1543
  "onUpdate:modelValue": [
1550
- o[17] || (o[17] = (f) => e.fields.read_timeout = f),
1551
- o[18] || (o[18] = () => {
1552
- e.fields.read_timeout = H(e.fields.read_timeout + "");
1544
+ r[17] || (r[17] = (p) => e.fields.read_timeout = p),
1545
+ r[18] || (r[18] = () => {
1546
+ e.fields.read_timeout = z(e.fields.read_timeout + "");
1553
1547
  })
1554
1548
  ],
1555
1549
  autocomplete: "off",
1556
1550
  "data-testid": "gateway-service-readTimeout-input",
1557
- label: r(l)("gateway_services.form.fields.read_timeout.label"),
1551
+ label: o(l)("gateway_services.form.fields.read_timeout.label"),
1558
1552
  "label-attributes": {
1559
- info: r(l)("gateway_services.form.fields.read_timeout.tooltip"),
1553
+ info: o(l)("gateway_services.form.fields.read_timeout.tooltip"),
1560
1554
  tooltipAttributes: { maxWidth: "400" }
1561
1555
  },
1562
1556
  name: "readTimeout",
@@ -1564,99 +1558,99 @@ const X = {
1564
1558
  type: "number"
1565
1559
  }, null, 8, ["modelValue", "label", "label-attributes", "readonly"])
1566
1560
  ]),
1567
- we.value ? (V(), R("div", Ot, [
1568
- n(_, {
1561
+ be.value ? (V(), A("div", Wt, [
1562
+ c(_, {
1569
1563
  modelValue: e.fields.client_certificate,
1570
- "onUpdate:modelValue": o[19] || (o[19] = (f) => e.fields.client_certificate = f),
1564
+ "onUpdate:modelValue": r[19] || (r[19] = (p) => e.fields.client_certificate = p),
1571
1565
  modelModifiers: { trim: !0 },
1572
1566
  autocomplete: "off",
1573
1567
  "data-testid": "gateway-service-clientCert-input",
1574
1568
  error: !!e.formFieldErrors.client_certificate,
1575
- label: r(l)("gateway_services.form.fields.client_certificate.label"),
1569
+ label: o(l)("gateway_services.form.fields.client_certificate.label"),
1576
1570
  "label-attributes": {
1577
- info: r(l)("gateway_services.form.fields.client_certificate.tooltip"),
1571
+ info: o(l)("gateway_services.form.fields.client_certificate.tooltip"),
1578
1572
  tooltipAttributes: { maxWidth: "400" }
1579
1573
  },
1580
1574
  name: "clientCert",
1581
- placeholder: r(l)("gateway_services.form.fields.client_certificate.placeholder"),
1575
+ placeholder: o(l)("gateway_services.form.fields.client_certificate.placeholder"),
1582
1576
  readonly: e.isReadonly,
1583
1577
  type: "text",
1584
- onInput: o[20] || (o[20] = (f) => he("client_certificate"))
1578
+ onInput: r[20] || (r[20] = (p) => _e("client_certificate"))
1585
1579
  }, null, 8, ["modelValue", "error", "label", "label-attributes", "placeholder", "readonly"])
1586
- ])) : T("", !0),
1587
- Ae.value ? (V(), R("div", jt, [
1588
- n(_, {
1580
+ ])) : R("", !0),
1581
+ Fe.value ? (V(), A("div", Ot, [
1582
+ c(_, {
1589
1583
  modelValue: e.fields.ca_certificates,
1590
- "onUpdate:modelValue": o[21] || (o[21] = (f) => e.fields.ca_certificates = f),
1584
+ "onUpdate:modelValue": r[21] || (r[21] = (p) => e.fields.ca_certificates = p),
1591
1585
  modelModifiers: { trim: !0 },
1592
1586
  autocomplete: "off",
1593
1587
  "data-testid": "gateway-service-ca-certs-input",
1594
1588
  error: !!e.formFieldErrors.ca_certificates,
1595
- label: r(l)("gateway_services.form.fields.ca_certificates.label"),
1589
+ label: o(l)("gateway_services.form.fields.ca_certificates.label"),
1596
1590
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } },
1597
- placeholder: r(l)("gateway_services.form.fields.ca_certificates.placeholder"),
1591
+ placeholder: o(l)("gateway_services.form.fields.ca_certificates.placeholder"),
1598
1592
  readonly: e.isReadonly,
1599
1593
  type: "text",
1600
- onInput: o[22] || (o[22] = (f) => he("ca_certificates"))
1594
+ onInput: r[22] || (r[22] = (p) => _e("ca_certificates"))
1601
1595
  }, {
1602
- "label-tooltip": d(() => [
1603
- n(r(q), {
1596
+ "label-tooltip": u(() => [
1597
+ c(o(B), {
1604
1598
  keypath: "gateway_services.form.fields.ca_certificates.tooltip",
1605
1599
  scope: "global"
1606
1600
  }, {
1607
- code1: d(() => [
1608
- E("code", null, h(r(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
1601
+ code1: u(() => [
1602
+ P("code", null, b(o(l)("gateway_services.form.fields.ca_certificates.code1")), 1)
1609
1603
  ]),
1610
- code2: d(() => [
1611
- E("code", null, h(r(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
1604
+ code2: u(() => [
1605
+ P("code", null, b(o(l)("gateway_services.form.fields.ca_certificates.code2")), 1)
1612
1606
  ]),
1613
1607
  _: 1
1614
1608
  })
1615
1609
  ]),
1616
1610
  _: 1
1617
1611
  }, 8, ["modelValue", "error", "label", "placeholder", "readonly"])
1618
- ])) : T("", !0),
1619
- Re.value ? (V(), R("div", zt, [
1620
- n(i, {
1612
+ ])) : R("", !0),
1613
+ Ae.value ? (V(), A("div", jt, [
1614
+ c(i, {
1621
1615
  modelValue: e.fields.tls_verify_enabled,
1622
- "onUpdate:modelValue": o[23] || (o[23] = (f) => e.fields.tls_verify_enabled = f),
1616
+ "onUpdate:modelValue": r[23] || (r[23] = (p) => e.fields.tls_verify_enabled = p),
1623
1617
  "data-testid": "gateway-service-tls-verify-checkbox",
1624
- description: r(l)("gateway_services.form.fields.tls_verify_enabled.help"),
1625
- label: r(l)("gateway_services.form.fields.tls_verify_enabled.label"),
1618
+ description: o(l)("gateway_services.form.fields.tls_verify_enabled.help"),
1619
+ label: o(l)("gateway_services.form.fields.tls_verify_enabled.label"),
1626
1620
  "label-attributes": { tooltipAttributes: { maxWidth: "400" } }
1627
1621
  }, {
1628
- tooltip: d(() => [
1629
- n(r(q), {
1622
+ tooltip: u(() => [
1623
+ c(o(B), {
1630
1624
  keypath: "gateway_services.form.fields.tls_verify_enabled.tooltip",
1631
1625
  scope: "global"
1632
1626
  }, {
1633
- code1: d(() => [
1634
- E("code", null, h(r(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1627
+ code1: u(() => [
1628
+ P("code", null, b(o(l)("gateway_services.form.fields.tls_verify_enabled.code1")), 1)
1635
1629
  ]),
1636
1630
  _: 1
1637
1631
  })
1638
1632
  ]),
1639
1633
  _: 1
1640
1634
  }, 8, ["modelValue", "description", "label"]),
1641
- e.fields.tls_verify_enabled ? (V(), R("div", Ht, [
1642
- n(m, {
1635
+ e.fields.tls_verify_enabled ? (V(), A("div", zt, [
1636
+ c(n, {
1643
1637
  modelValue: e.fields.tls_verify_value,
1644
- "onUpdate:modelValue": o[24] || (o[24] = (f) => e.fields.tls_verify_value = f),
1638
+ "onUpdate:modelValue": r[24] || (r[24] = (p) => e.fields.tls_verify_value = p),
1645
1639
  "data-testid": "gateway-service-tls-verify-true-option",
1646
- label: r(l)("gateway_services.form.fields.tls_verify_option.true.label"),
1640
+ label: o(l)("gateway_services.form.fields.tls_verify_option.true.label"),
1647
1641
  "selected-value": !0
1648
1642
  }, null, 8, ["modelValue", "label"])
1649
- ])) : T("", !0),
1650
- e.fields.tls_verify_enabled ? (V(), R("div", Zt, [
1651
- n(m, {
1643
+ ])) : R("", !0),
1644
+ e.fields.tls_verify_enabled ? (V(), A("div", Ht, [
1645
+ c(n, {
1652
1646
  modelValue: e.fields.tls_verify_value,
1653
- "onUpdate:modelValue": o[25] || (o[25] = (f) => e.fields.tls_verify_value = f),
1647
+ "onUpdate:modelValue": r[25] || (r[25] = (p) => e.fields.tls_verify_value = p),
1654
1648
  "data-testid": "gateway-service-tls-verify-false-option",
1655
- label: r(l)("gateway_services.form.fields.tls_verify_option.false.label"),
1649
+ label: o(l)("gateway_services.form.fields.tls_verify_option.false.label"),
1656
1650
  "selected-value": !1
1657
1651
  }, null, 8, ["modelValue", "label"])
1658
- ])) : T("", !0)
1659
- ])) : T("", !0)
1652
+ ])) : R("", !0)
1653
+ ])) : R("", !0)
1660
1654
  ]))
1661
1655
  ]),
1662
1656
  _: 1
@@ -1667,55 +1661,55 @@ const X = {
1667
1661
  ]),
1668
1662
  _: 1
1669
1663
  }, 8, ["description", "hide-info-header", "title"]),
1670
- n(r(Ge), {
1671
- description: r(l)("gateway_services.form.sections.general.description"),
1664
+ c(o(qe), {
1665
+ description: o(l)("gateway_services.form.sections.general.description"),
1672
1666
  "hide-info-header": s.hideSectionsInfo,
1673
- title: r(l)("gateway_services.form.sections.general.title")
1667
+ title: o(l)("gateway_services.form.sections.general.title")
1674
1668
  }, {
1675
- default: d(() => [
1676
- n(_, {
1669
+ default: u(() => [
1670
+ c(_, {
1677
1671
  modelValue: e.fields.name,
1678
- "onUpdate:modelValue": o[27] || (o[27] = (f) => e.fields.name = f),
1672
+ "onUpdate:modelValue": r[27] || (r[27] = (p) => e.fields.name = p),
1679
1673
  modelModifiers: { trim: !0 },
1680
1674
  autocomplete: "off",
1681
1675
  "data-testid": "gateway-service-name-input",
1682
- error: ee.value,
1683
- "error-message": ce.value,
1684
- label: r(l)("gateway_services.form.fields.name.label"),
1676
+ error: Y.value,
1677
+ "error-message": ne.value,
1678
+ label: o(l)("gateway_services.form.fields.name.label"),
1685
1679
  "label-attributes": {
1686
- info: r(l)("gateway_services.form.fields.name.tooltip"),
1680
+ info: o(l)("gateway_services.form.fields.name.tooltip"),
1687
1681
  tooltipAttributes: { maxWidth: "400" }
1688
1682
  },
1689
1683
  name: "name",
1690
- placeholder: r(l)("gateway_services.form.fields.name.placeholder"),
1684
+ placeholder: o(l)("gateway_services.form.fields.name.placeholder"),
1691
1685
  readonly: e.isReadonly,
1692
1686
  type: "text",
1693
- onInput: oe
1687
+ onInput: te
1694
1688
  }, null, 8, ["modelValue", "error", "error-message", "label", "label-attributes", "placeholder", "readonly"]),
1695
- n(Q, {
1689
+ c(J, {
1696
1690
  "data-testid": "tags-collapse",
1697
1691
  "trigger-alignment": "leading",
1698
- "trigger-label": r(l)("gateway_services.form.fields.tags.collapse")
1692
+ "trigger-label": o(l)("gateway_services.form.fields.tags.collapse")
1699
1693
  }, {
1700
- default: d(() => [
1701
- E("div", Jt, [
1702
- n(_, {
1694
+ default: u(() => [
1695
+ P("div", Zt, [
1696
+ c(_, {
1703
1697
  modelValue: e.fields.tags,
1704
- "onUpdate:modelValue": o[28] || (o[28] = (f) => e.fields.tags = f),
1698
+ "onUpdate:modelValue": r[28] || (r[28] = (p) => e.fields.tags = p),
1705
1699
  modelModifiers: { trim: !0 },
1706
1700
  autocomplete: "off",
1707
1701
  "data-testid": "gateway-service-tags-input",
1708
- help: r(l)("gateway_services.form.fields.tags.help"),
1709
- label: r(l)("gateway_services.form.fields.tags.label"),
1702
+ help: o(l)("gateway_services.form.fields.tags.help"),
1703
+ label: o(l)("gateway_services.form.fields.tags.label"),
1710
1704
  "label-attributes": {
1711
- info: r(l)("gateway_services.form.fields.tags.tooltip"),
1705
+ info: o(l)("gateway_services.form.fields.tags.tooltip"),
1712
1706
  tooltipAttributes: { maxWidth: "400" }
1713
1707
  },
1714
1708
  name: "tags",
1715
- placeholder: r(l)("gateway_services.form.fields.tags.placeholder"),
1709
+ placeholder: o(l)("gateway_services.form.fields.tags.placeholder"),
1716
1710
  readonly: e.isReadonly,
1717
1711
  type: "text",
1718
- onInput: o[29] || (o[29] = (f) => W("tags"))
1712
+ onInput: r[29] || (r[29] = (p) => G("tags"))
1719
1713
  }, null, 8, ["modelValue", "help", "label", "label-attributes", "placeholder", "readonly"])
1720
1714
  ])
1721
1715
  ]),
@@ -1724,33 +1718,33 @@ const X = {
1724
1718
  ]),
1725
1719
  _: 1
1726
1720
  }, 8, ["description", "hide-info-header", "title"]),
1727
- e.errorMessages.length ? (V(), se(ie, {
1721
+ e.errorMessages.length ? (V(), le(re, {
1728
1722
  key: 0,
1729
1723
  appearance: "danger",
1730
1724
  "data-testid": "form-error"
1731
1725
  }, {
1732
- default: d(() => [
1733
- E("ul", Qt, [
1734
- (V(!0), R(Qe, null, Xe(e.errorMessages, (f) => (V(), R("li", { key: f }, h(f), 1))), 128))
1726
+ default: u(() => [
1727
+ P("ul", Jt, [
1728
+ (V(!0), A(Je, null, Qe(e.errorMessages, (p) => (V(), A("li", { key: p }, b(p), 1))), 128))
1735
1729
  ])
1736
1730
  ]),
1737
1731
  _: 1
1738
- })) : T("", !0)
1732
+ })) : R("", !0)
1739
1733
  ]),
1740
1734
  _: 3
1741
1735
  }, 8, ["can-submit", "config", "edit-id", "entity-type", "fetch-url", "form-fields", "is-readonly"])
1742
1736
  ]);
1743
1737
  };
1744
1738
  }
1745
- }), uo = /* @__PURE__ */ ze(Xt, [["__scopeId", "data-v-72fe312f"]]), { validateHost: Yt, validatePort: eo, validateProtocol: to, validatePath: oo } = X.useUrlValidators(), fo = () => ({
1746
- validateHost: Yt,
1747
- validatePort: eo,
1748
- validateProtocol: to,
1749
- validatePath: oo
1739
+ }), co = /* @__PURE__ */ je(Qt, [["__scopeId", "data-v-8f8e7eca"]]), { validateHost: Xt, validatePort: Yt, validateProtocol: eo, validatePath: to } = Q.useUrlValidators(), uo = () => ({
1740
+ validateHost: Xt,
1741
+ validatePort: Yt,
1742
+ validateProtocol: eo,
1743
+ validatePath: to
1750
1744
  });
1751
1745
  export {
1752
- co as GatewayServiceConfigCard,
1753
- uo as GatewayServiceForm,
1754
- no as GatewayServiceList,
1755
- fo as useUrlValidator
1746
+ no as GatewayServiceConfigCard,
1747
+ co as GatewayServiceForm,
1748
+ ao as GatewayServiceList,
1749
+ uo as useUrlValidator
1756
1750
  };