@kong-ui-public/entities-shared 3.14.2 → 3.14.3

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.
@@ -617,7 +617,7 @@ const H = {
617
617
  for (const [r, i] of t)
618
618
  n[r] = i;
619
619
  return n;
620
- }, Vt = /* @__PURE__ */ ie(Mr, [["__scopeId", "data-v-68ca83ec"]]), Dr = /* @__PURE__ */ W({
620
+ }, Vt = /* @__PURE__ */ ie(Mr, [["__scopeId", "data-v-f7096c33"]]), Dr = /* @__PURE__ */ W({
621
621
  __name: "InternalLinkItem",
622
622
  props: {
623
623
  item: {
@@ -4162,7 +4162,7 @@ const xl = ["aria-labelledby"], Cl = { class: "form-section-wrapper" }, kl = {
4162
4162
  ]);
4163
4163
  };
4164
4164
  }
4165
- }), as = /* @__PURE__ */ ie(El, [["__scopeId", "data-v-60e3ef7c"]]), Fl = { class: "kong-ui-public-entity-empty-state" }, Ol = { class: "entity-empty-state-content" }, Ll = {
4165
+ }), as = /* @__PURE__ */ ie(El, [["__scopeId", "data-v-2e2c07e5"]]), Fl = { class: "kong-ui-public-entity-empty-state" }, Ol = { class: "entity-empty-state-content" }, Ll = {
4166
4166
  key: 0,
4167
4167
  class: "empty-state-image"
4168
4168
  }, Rl = {
@@ -1,4 +1,4 @@
1
- (function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","@kong/icons","vue-router"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["kong-ui-public-entities-shared"]={},A.Vue,A.axios,A["kong-ui-public-i18n"],A.Kongponents,A.KongIcons,A.VueRouter))})(this,function(A,t,qe,He,oe,Z,hn){"use strict";var Ye=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e.Secret="secret",e))(Ye||{}),We=(e=>(e.Edit="edit",e.Create="create",e))(We||{}),z=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(z||{}),fe=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.Other="other",e))(fe||{});const ae=Object.values(fe);var F=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(F||{}),H=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(H||{});function gn(){return{getAxiosInstance:(e={})=>{try{const n=t.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):qe.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),qe.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var n;return((n=e==null?void 0:e.response)==null?void 0:n.headers["x-datadog-trace-id"])||""}}}function yn(){return{debounce:(e,n)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},n)}}}}const we="khcp-user-table-preferences",Cn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function bn(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},n=()=>{const r=e(localStorage.getItem(we));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=n();o.set(r,i),localStorage.setItem(we,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:(r,i)=>{const o=n();return(o==null?void 0:o.get(r))||void 0||i||Cn},deleteAllTablePreferences:()=>{localStorage.removeItem(we)}}}function Se(e={}){const{getAxiosInstance:n}=gn();return{axiosInstance:n(e)}}const kn={global:{actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},deleteModal:{message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},baseForm:{actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON",terraform:"Terraform"},errors:{edit:"The entity could not be edited at this time."}},baseTable:{emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},baseConfigCard:{title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},emptyState:{learnMore:"Learn more",pricingTitle:"Pricing: "},filter:{filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},debouncedFilter:{errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},errors:{unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},validationErrors:{utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},toggleModal:{enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}}};function pe(){const e=He.createI18n("en-us",kn);return{i18n:e,i18nT:He.i18nTComponent(e)}}function ze(){const e=(l,a)=>(a==null?void 0:a[l])??void 0,n=(l,a)=>{if(l.length!==a.length)return!1;const c=new Set([...l,...a]);for(const s of c){const u=l.filter(d=>d===s).length,f=a.filter(d=>d===s).length;if(u!==f)return!1}return!0};return{getPropValue:e,objectsAreEqual:(l,a,c)=>{if(c){if(Object.keys(l).length===Object.keys(a).length)for(const s in l)if(Array.isArray(l[s])&&Array.isArray(a[s])){if(n(l[s],a[s]))continue;return!1}else{if(l[s]===a[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(l)===JSON.stringify(a)}catch{return!1}},sortAlpha:l=>(a,c)=>{let s=a[l]===void 0||a[l]===null?"":a[l],u=c[l]===void 0||c[l]===null?"":c[l];return Array.isArray(a[l])&&(s=a[l][0]),Array.isArray(c[l])&&(u=c[l][0]),s.localeCompare(u)},isValidUuid:l=>l?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(l):!1}}function xn(e,n,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=Se(e.axiosRequestConfig),{i18n:{t:l}}=pe(),{debounce:a}=yn(),c=a(async T=>{await b(T)},200),s=t.ref(!1),u=t.ref(""),f=t.ref(""),d=t.ref([]),m=t.ref([]),p=t.ref(void 0),C=t.computed(()=>{const T=`${e.apiBaseUrl}${t.unref(n)}`;return e.app==="konnect"?T.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"?T.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""):T}),{isValidUuid:y}=ze(),x=async()=>{try{s.value=!0;const{data:T}=await o.get(`${C.value}?size=${r}`);T!=null&&T.next||(p.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[]),m.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[],d.value=m.value}catch{d.value=[],u.value=l("debouncedFilter.errors.fetch")}finally{s.value=!1}},B=t.ref(""),b=async T=>{var E,_,g;if(B.value!==T){if(B.value=T??"",!T){d.value=m.value;return}if(p.value===void 0)try{if(s.value=!0,u.value="",f.value="",e.app==="konnect"){const h=`${C.value}/${T}`,{data:k}=await o.get(`${h}?size=${r}`);i.fetchedItemsKey in k?d.value=k[i.fetchedItemsKey]:k!=null&&k[i.exactMatchKey??"id"]?d.value=[k]:d.value=[]}else{const h=[];y(T)&&i.searchKeys.includes("id")?h.push((async()=>{const{data:$}=await o.get(`${C.value}/${T}`);return[$[i.fetchedItemsKey]??$]})()):h.push(...i.searchKeys.filter($=>$!=="id").map(async $=>{const{data:N}=await o.get(`${C.value}?${$}=${T}`);return N[i.fetchedItemsKey]}));const k=await Promise.all(h),w=new Set;d.value=[],(E=k==null?void 0:k.forEach)==null||E.call(k,$=>{var N;(N=$==null?void 0:$.forEach)==null||N.call($,I=>{w.has(I.id)||(w.add(I.id),d.value.push(I))})})}}catch(h){((_=h==null?void 0:h.response)==null?void 0:_.status)===404?f.value=l("debouncedFilter.errors.invalid"):(d.value=[],u.value=l("debouncedFilter.errors.fetch"))}finally{s.value=!1}else s.value=!0,f.value="",d.value=(g=p.value)==null?void 0:g.filter(h=>{var w;let k=!1;for(const $ of i.searchKeys){const N=typeof h[$]=="string"?(w=h[$])==null?void 0:w.toLowerCase():h[$];N!=null&&N.includes(T.toLowerCase())&&(k=!0)}return k}),(!d.value||!d.value.length)&&(f.value=l("debouncedFilter.errors.invalid")),s.value=!1}};return{loading:s,error:u,validationError:f,results:d,allRecords:p,loadItems:x,debouncedQueryChange:c}}function wn(e,n){const r=t.unref(n),i=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function Sn(){const{i18n:{t:e}}=pe();return{getMessageFromError:r=>{var i,o,l,a;if(!r)return e("errors.unexpected");if(((i=r==null?void 0:r.response)==null?void 0:i.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=r==null?void 0:r.response)!=null&&o.data){if(r.response.data.detail)return r.response.data.detail;if((l=r.response.data.details)!=null&&l.length)return r.response.data.details.map(c=>{let s=e("errors.unexpected");return c.messages&&typeof c.messages=="object"&&c.messages.length&&(s=c.messages.join(", ")),c.field?`${c.field} - ${s}`:s}).join("; ");if(r.response.data.message){const{message:c}=r.response.data;return Array.isArray(c)?(a=c[0])!=null&&a.constraints?Object.values(c[0].constraints)[0]:c[0]:c}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(c=>`${c} ${r.response.data[c]}`).join(", ")}return r.message||e("errors.unexpected")}}}function _n(e){const n=window.location.origin,r=n.endsWith("/")?n:`${n}/`;try{const i=e.join("/"),o=`${r}${i}`,l=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!l&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function Je(e,n){const r=t.ref(t.unref(e)),i=t.ref(t.unref(n)),o=t.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),l=t.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return a=>{const{page:c,pageSize:s,offset:u,sortColumnKey:f,sortColumnOrder:d,query:m}=a;try{let p=new URL(l.value.href);return o.value&&m?(p.search="",p=r.value.isExactMatch?new URL(`${p.href}/${m}`):new URL(`${p.href}?filter[name][contains]=${m}`)):(o.value||new URLSearchParams(m).forEach((C,y)=>{p.searchParams.append(y,C)}),f&&p.searchParams.append("sort_by",f),d==="desc"&&p.searchParams.append("sort_desc","1"),p.searchParams.append("size",String(s))),u&&c!==1&&p.searchParams.append("offset",String(u)),p.href}catch(p){return console.error("RouteList(fetcher)",p),i.value}}}const Ge=new Map;function An(e,n,r){const i=t.ref(!0),o=t.unref(n),{axiosInstance:l}=Se(e.axiosRequestConfig),a=Je(e,o),c=t.ref({status:z.Idle}),s=async d=>{var p;const m=t.toValue(r)||"data";try{c.value=i.value?{status:z.InitialLoad}:{status:z.Loading},i.value=!1;let C=a(d);C.includes("filter[name]")&&(C=`${C}&page[size]=${d.pageSize}&page[number]=${d.page}`);const y=await l.get(C);if(y.status>=400)throw y;const x=y.data,B=m&&m.replace(/[^\w-_]/gi,"");let b;x[B]?b=Array.isArray(x[B])?x[B]:[x[B]]:Array.isArray(x)?b=x:b=Object.keys(x).length?[x]:[];const T={data:b,total:b.length,...x.offset?{pagination:{offset:x.offset}}:null};return T.data.length===0&&!d.query?c.value={status:z.NoRecords,response:T}:c.value={status:z.Idle,response:T},T}catch(C){const y={data:[],total:0};return d.query&&(((p=C.response)==null?void 0:p.status)===404||C.status===404)?(c.value={status:z.NoResults,response:y,error:C.response?C:{response:C}},y):(c.value={status:z.Error,response:y,error:C.response?C:{response:C}},y)}},u=e.cacheIdentifier,f=Qe(u);return{fetcher:s,fetcherState:c,fetcherCacheKey:f}}function Qe(e){if(e){let n=Ge.get(e);return n||(n=t.ref(1),Ge.set(e,n)),n}return t.ref(1)}function Bn(){const e=(i,o="_")=>i?i.split(o).map(l=>l.toLowerCase()==="id"?l.toUpperCase():l.charAt(0).toUpperCase()+l.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:i=>i?i.replace(n,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const Ze=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Xe=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(Ze);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},et=e=>e==="*"||e==="x"||e==="X",tt=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},En=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],Tn=(e,n)=>{if(et(e)||et(n))return 0;const[r,i]=En(tt(e),tt(n));return r>i?1:r<i?-1:0},nt=(e,n)=>{for(let r=0;r<Math.max(e.length,n.length);r++){const i=Tn(e[r]||"0",n[r]||"0");if(i!==0)return i}return 0},$n=(e,n)=>{const r=Xe(e),i=Xe(n),o=r.pop(),l=i.pop(),a=nt(r,i);return a!==0?a:o&&l?nt(o.split("."),l.split(".")):o||l?o?-1:1:0},rt=(e,n,r)=>{Nn(r);const i=$n(e,n);return it[r].includes(i)},it={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ot=Object.keys(it),Nn=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ot.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ot.join("|")}`)},In=e=>typeof e=="string"&&/^[v\d]/.test(e)&&Ze.test(e);function Fn(e){const{gatewayInfo:n,supportedRange:r}=e;if(!n)return!0;const{edition:i,version:o}=n;if(!In(o))return console.error("Invalid version"),!1;const l=r[i];if(!l)return!1;const[a,c]=l;return!(a&&rt(o,a,"<")||c&&rt(o,c,">"))}function On(e){const n=t.ref(0),r=t.ref(0),i=t.ref(!1);return t.watch(e,l=>{l&&!i.value&&(n.value=l.offsetWidth,r.value=l.scrollWidth,i.value=!0)}),{isTruncated:t.computed(()=>n.value<r.value)}}function Ln(){const{i18n:{t:e}}=pe();return{utf8Name:r=>/^[\p{N}\p{L}.\-_~]*$/u.test(r)?"":e("validationErrors.utf8Name")}}const _e=Symbol("schema"),Dn=e=>{t.provide(_e,e)},Vn=e=>{var o,l;const n=t.inject(_e,void 0),r=(l=(o=n==null?void 0:n.value)==null?void 0:o.fields)==null?void 0:l.find(a=>Object.keys(a)[0]===e),i=t.toRef(r==null?void 0:r[e]);return t.provide(_e,i),i};function Rn(e){let n="";const r=t.ref(!1),i=t.ref(null),o=t.computed(()=>{let a;return r.value?a=!0:i.value?a=i.value.hasData||e&&t.toValue(e):a=!1,!a});return{tableState:i,hasRecords:r,hideTableToolbar:o,handleStateChange:a=>{a.hasData?r.value=!0:a.state==="success"&&!a.hasData&&(!e||!n)&&(r.value=!1),e&&(n=t.toValue(e)),i.value={...a}}}}const O={useAxios:Se,useDebouncedFilter:xn,useDeleteUrlBuilder:wn,useErrors:Sn,useExternalLinkCreator:_n,useFetcher:An,useFetcherCacheKey:Qe,useFetchUrlBuilder:Je,useHelpers:ze,useStringHelpers:Bn,useI18n:pe,useGatewayFeatureSupported:Fn,useTruncationDetector:On,useValidators:Ln,useSchemaProvider:Dn,useSubSchema:Vn,useTableState:Rn},Kn={key:0,class:"config-card-fieldset-title"},Mn=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:r}}=O.useI18n(),{convertKeyToTitle:i}=O.useStringHelpers(),o=t.computed(()=>n.item.key??"json-array-item"),l=t.computed(()=>n.item.value??n.item),a=t.computed(()=>{const s=JSON.parse(JSON.stringify(l.value));return n.isArrayItem&&delete s.name,s}),c=t.computed(()=>{var s;return n.isArrayItem?(s=l.value)!=null&&s.name?i(l.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:n.index}):""});return(s,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",Kn,[t.createElementVNode("b",null,t.toDisplayString(c.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(a.value),(f,d)=>(t.openBlock(),t.createBlock(Ae,{key:`${o.value}-property-${d}`,item:{key:f,label:t.unref(i)(f),value:a.value[f]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Y=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},at=Y(Mn,[["__scopeId","data-v-68ca83ec"]]),lt=Y(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=l=>r.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),vn=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),jn="#0044f4",Un="#e0e4ea",Pn="#afb7c5",qn="#0044f4",Hn="1px",Yn="16px",Wn="20px",zn={class:"config-card-details-row"},Jn=["data-testid"],Gn=["data-testid"],Qn=["data-testid"],Zn=["data-testid"],Xn={key:1},er=["data-testid"],tr=["data-testid"],nr=["data-testid"],rr=["data-testid"],ir={name:"ConfigCardItem",components:{JsonCardItem:at,StatusBadge:vn,InternalLinkItem:lt}},or=t.defineComponent({...ir,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:n}){t.useCssVars(b=>({"3ccdd5d2":f.value?"none":`solid ${t.unref(Hn)} ${t.unref(Un)}`,"4b1da305":u.value&&c.value?"block":"flex",cd20788a:u.value&&c.value?"100%":r.slim?"50%":"25%",cd1becd4:u.value&&c.value?"100%":r.slim?"50%":"75%"}));const r=e,i=n,o=t.useSlots(),{i18n:{t:l,formatUnixTimeStamp:a}}=O.useI18n(),c=t.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),s=t.computed(()=>!!(r.item.tooltip||o["label-tooltip"])),u=t.computed(()=>r.item.type===F.Json||r.item.type===F.JsonArray),f=t.computed(()=>r.item.type===F.JsonArray),d=O.useSubSchema(r.item.key),m=t.computed(()=>{var b;return r.item.type?r.item.type:(b=d==null?void 0:d.value)!=null&&b.encrypted?F.Redacted:void 0}),p=t.computed(()=>{switch(m.value){case F.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case F.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case F.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case F.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case F.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:a(r.item.value)};case F.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case F.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case F.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:r.item.value}};case F.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case F.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:b=>{i("navigation-click",b)}}};case F.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case F.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case F.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),C=t.ref(),y=t.ref(),{isTruncated:x}=O.useTruncationDetector(C),{isTruncated:B}=O.useTruncationDetector(y);return(b,T)=>{const E=t.resolveComponent("KTooltip"),_=t.resolveComponent("KLabel"),g=t.resolveComponent("KBadge"),h=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",zn,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(b.$slots,"label",{item:e.item},()=>[t.createVNode(_,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createVNode(E,{text:t.unref(x)?e.item.label:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"labelContent",ref:C,class:"label-content"},t.toDisplayString(e.item.label),513)]),_:1},8,["text"])]),_:2},[s.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(b.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,Gn)]),key:"0"}:void 0]),1024)],!0)],8,Jn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(b.$slots,e.item.key,{rowValue:e.item.value},()=>[c.value?(t.openBlock(),t.createElementBlock("div",Xn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.value.tag),t.normalizeProps(t.guardReactiveProps(p.value.attrs)),{default:t.withCtx(()=>[p.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(g,{key:`${e.item.key}-badge-tag-${w}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${w}`,tooltip:k,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,er)):t.createCommentVNode("",!0),p.value.additionalComponent==="KCopy"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(h,t.mergeProps({ref_for:!0},p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${w}`,"data-testid":`${e.item.key}-copy-uuid-${w}`,text:k}),null,16,["data-testid","text"]))),128))],8,tr)):p.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(g,{key:`${e.item.key}-badge-method-${w}`,appearance:Object.values(t.unref(oe.BadgeMethodAppearances)).includes(k.toLowerCase())?k.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${w}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,nr)):t.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(at,{key:`json-array-item-${w}`,index:w,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,rr)):(t.openBlock(),t.createBlock(E,{key:4,text:t.unref(B)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:y,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(p.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,Zn))],!0)],8,Qn)])}}}),Ae=Y(or,[["__scopeId","data-v-761f7e64"]]),ar={class:"json-config"},lr={key:0,class:"json-endpoint"},Be=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(o=>({"454fa8c4":`${i.value}ch`}));const n=e,r=t.computed(()=>n.entityRecord),i=t.computed(()=>{var a;if(!n.fetcherUrl)return 0;const o=(a=n.fetcherUrl)==null?void 0:a.split("/");return o.length<2?0:41+(n.requestMethod==="post"?o[o.length-1]:o[o.length-2]).length});return(o,l)=>{const a=t.resolveComponent("KBadge"),c=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",ar,[n.fetcherUrl?(t.openBlock(),t.createElementBlock("div",lr,[t.createVNode(a,{appearance:n.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(c,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),n.entityRecord?(t.openBlock(),t.createBlock(c,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):t.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ct(e){return typeof e>"u"||e===null}function cr(e){return typeof e=="object"&&e!==null}function sr(e){return Array.isArray(e)?e:ct(e)?[]:[e]}function dr(e,n){var r,i,o,l;if(n)for(l=Object.keys(n),r=0,i=l.length;r<i;r+=1)o=l[r],e[o]=n[o];return e}function ur(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function fr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var pr=ct,mr=cr,hr=sr,gr=ur,yr=fr,Cr=dr,R={isNothing:pr,isObject:mr,toArray:hr,repeat:gr,isNegativeZero:yr,extend:Cr};function st(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
1
+ (function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("axios"),require("@kong-ui-public/i18n"),require("@kong/kongponents"),require("@kong/icons"),require("vue-router")):typeof define=="function"&&define.amd?define(["exports","vue","axios","@kong-ui-public/i18n","@kong/kongponents","@kong/icons","vue-router"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["kong-ui-public-entities-shared"]={},A.Vue,A.axios,A["kong-ui-public-i18n"],A.Kongponents,A.KongIcons,A.VueRouter))})(this,function(A,t,qe,He,oe,Z,hn){"use strict";var Ye=(e=>(e.GatewayService="service",e.Route="route",e.Consumer="consumer",e.ConsumerGroup="consumer group",e.Plugin="plugin",e.Upstream="upstream",e.Certificate="certificate",e.CACertificate="ca certificate",e.SNI="SNI",e.Key="key",e.KeySet="key set",e.Vault="vault",e.Application="application",e.Developer="developer",e.acls="ACL Credential",e["basic-auth"]="Basic Auth Credential",e["key-auth"]="Key Auth Credential",e["key-auth-enc"]="Key Auth Encrypted Credential",e.oauth2="OAuth 2.0 Credential",e["hmac-auth"]="HMAC Credential",e.jwt="JWT Credential",e.Target="target",e.Policy="policy",e.Secret="secret",e))(Ye||{}),We=(e=>(e.Edit="edit",e.Create="create",e))(We||{}),z=(e=>(e[e.InitialLoad=0]="InitialLoad",e[e.Loading=1]="Loading",e[e.Idle=2]="Idle",e[e.NoResults=3]="NoResults",e[e.NoRecords=4]="NoRecords",e[e.Error=5]="Error",e))(z||{}),fe=(e=>(e.CaCertificate="ca_certificate",e.Certificate="certificate",e.Consumer="consumer",e.ConsumerGroup="consumer_group",e.GatewayService="service",e.Key="key",e.KeySet="set",e.Plugin="plugin",e.Route="route",e.SNI="sni",e.Upstream="upstream",e.Target="target",e.Vault="vault",e.Other="other",e))(fe||{});const ae=Object.values(fe);var F=(e=>(e.ID="id",e.IdArray="id-array",e.Text="plain-text",e.Date="date",e.Redacted="redacted",e.RedactedArray="redacted-array",e.Json="json",e.JsonArray="json-array",e.BadgeTag="badge-tag",e.CopyBadge="copy-badge",e.BadgeStatus="badge-status",e.BadgeMethod="badge-method",e.LinkInternal="link-internal",e.LinkExternal="link-external",e))(F||{}),H=(e=>(e.Basic="basic",e.Advanced="advanced",e.Plugin="plugin",e))(H||{});function gn(){return{getAxiosInstance:(e={})=>{try{const n=t.inject("get-axios-instance",void 0);return typeof n=="function"?n(e):qe.create({withCredentials:!0,timeout:3e4,...e})}catch(n){return console.warn("getAxiosInstance:",n.message||n),qe.create({withCredentials:!0,timeout:3e4,...e})}},getTraceIdFromError:e=>{var n;return((n=e==null?void 0:e.response)==null?void 0:n.headers["x-datadog-trace-id"])||""}}}function yn(){return{debounce:(e,n)=>{let r;return(...i)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...i)},n)}}}}const we="khcp-user-table-preferences",Cn={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0,columnVisibility:{}};function bn(){const e=r=>{if(typeof r=="string")try{return JSON.parse(r)}catch(i){console.error("useTablePreferences(tryParseJson)",i);return}},n=()=>{const r=e(localStorage.getItem(we));return!r||!Object.keys(r).length?new Map:new Map(Object.entries(r))};return{setTablePreferences:(r,i)=>{try{const o=n();o.set(r,i),localStorage.setItem(we,JSON.stringify(Object.fromEntries(o.entries())))}catch(o){console.error("useTablePreferences(setTablePreferences)",o)}},getTablePreferences:(r,i)=>{const o=n();return(o==null?void 0:o.get(r))||void 0||i||Cn},deleteAllTablePreferences:()=>{localStorage.removeItem(we)}}}function Se(e={}){const{getAxiosInstance:n}=gn();return{axiosInstance:n(e)}}const kn={global:{actions:{copyId:"Copy ID",copied_id:'Copied "{id}" to the clipboard',copyToClipboard:"Copied successfully!",copyToClipboardFailed:"Failed to copy to the clipboard"}},deleteModal:{message:"Are you sure you want to delete this {entityType}?",messageWithName:"Are you sure you want to delete this {entityType} {entityName}?"},baseForm:{actions:{viewConfiguration:"View Configuration",save:"Save",cancel:"Cancel",back:"Back"},configuration:{title:"Configuration",message:"Export configurations for core Kong Gateway objects, like services, routes, and plugins, to either YAML or JSON. This allows for straightforward importing into APIOps tools like decK with YAML, or Insomnia and cURL with JSON.",yaml:"YAML",json:"JSON",terraform:"Terraform"},errors:{edit:"The entity could not be edited at this time."}},baseTable:{emptyState:{noSearchResultsTitle:"No results found",noSearchResultsMessage:"Please adjust the criteria and try again.",noSearchResultsCtaText:"Clear"}},baseConfigCard:{title:"Configuration",actions:{copy:"Copy JSON"},sections:{advanced:"Advanced",plugin:"Plugin Specific Configuration"},commonFields:{id_label:"ID",name_label:"Name",enabled_label:"Enabled",enabled_tooltip:"Enabled is FTW",updated_at_label:"Last Updated",created_at_label:"Created",tags_label:"Tags",link:"Link"},statusBadge:{enabledLabel:"Enabled",disabledLabel:"Disabled"},copy:{tooltip:"Copy {label}",success:"Copied!"},errors:{load:"The entity configuration data could not be loaded at this time.",copy:"Failed to copy to clipboard"},general:{entryTitle:"Entry {index}",structuredFormat:"Structured"}},emptyState:{learnMore:"Learn more",pricingTitle:"Pricing: "},filter:{filterButtonText:"Filter",fieldLabel:"Filter by:",inputPlaceholder:"Enter a value",selectPlaceholder:"Select an item",applyButtonText:"Apply",clearButtonText:"Clear",clearAllButtonText:"Clear all filters"},debouncedFilter:{errors:{fetch:"Could not fetch available items",invalid:"Please select a valid value"}},errors:{unexpected:"An unexpected error has occurred",dataKeyUndefined:'The data key "{dataKey}" does not exist in the response.'},validationErrors:{utf8Name:"The name can be any string containing characters, letters, numbers, or the following characters: ., -, _, or ~. Do not use spaces."},toggleModal:{enable:{title:"Enable {entityType}",message:"Are you sure you want to enable the {entityType} {entityName}?",confirmText:"Yes, enable"},disable:{title:"Disable {entityType}",message:"Are you sure you want to disable the {entityType} {entityName}?",confirmText:"Yes, disable"}}};function pe(){const e=He.createI18n("en-us",kn);return{i18n:e,i18nT:He.i18nTComponent(e)}}function ze(){const e=(l,a)=>(a==null?void 0:a[l])??void 0,n=(l,a)=>{if(l.length!==a.length)return!1;const c=new Set([...l,...a]);for(const s of c){const u=l.filter(d=>d===s).length,f=a.filter(d=>d===s).length;if(u!==f)return!1}return!0};return{getPropValue:e,objectsAreEqual:(l,a,c)=>{if(c){if(Object.keys(l).length===Object.keys(a).length)for(const s in l)if(Array.isArray(l[s])&&Array.isArray(a[s])){if(n(l[s],a[s]))continue;return!1}else{if(l[s]===a[s])continue;return!1}else return!1;return!0}try{return JSON.stringify(l)===JSON.stringify(a)}catch{return!1}},sortAlpha:l=>(a,c)=>{let s=a[l]===void 0||a[l]===null?"":a[l],u=c[l]===void 0||c[l]===null?"":c[l];return Array.isArray(a[l])&&(s=a[l][0]),Array.isArray(c[l])&&(u=c[l][0]),s.localeCompare(u)},isValidUuid:l=>l?/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/.test(l):!1}}function xn(e,n,r,i={fetchedItemsKey:"data",searchKeys:["id"]}){r||(r="1000");const{axiosInstance:o}=Se(e.axiosRequestConfig),{i18n:{t:l}}=pe(),{debounce:a}=yn(),c=a(async T=>{await b(T)},200),s=t.ref(!1),u=t.ref(""),f=t.ref(""),d=t.ref([]),m=t.ref([]),p=t.ref(void 0),C=t.computed(()=>{const T=`${e.apiBaseUrl}${t.unref(n)}`;return e.app==="konnect"?T.replace(/{controlPlaneId}/gi,(e==null?void 0:e.controlPlaneId)||""):e.app==="kongManager"?T.replace(/\/{workspace}/gi,e!=null&&e.workspace?`/${e.workspace}`:""):T}),{isValidUuid:y}=ze(),x=async()=>{try{s.value=!0;const{data:T}=await o.get(`${C.value}?size=${r}`);T!=null&&T.next||(p.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[]),m.value=i.fetchedItemsKey in T?T[i.fetchedItemsKey]:[],d.value=m.value}catch{d.value=[],u.value=l("debouncedFilter.errors.fetch")}finally{s.value=!1}},B=t.ref(""),b=async T=>{var E,_,g;if(B.value!==T){if(B.value=T??"",!T){d.value=m.value;return}if(p.value===void 0)try{if(s.value=!0,u.value="",f.value="",e.app==="konnect"){const h=`${C.value}/${T}`,{data:k}=await o.get(`${h}?size=${r}`);i.fetchedItemsKey in k?d.value=k[i.fetchedItemsKey]:k!=null&&k[i.exactMatchKey??"id"]?d.value=[k]:d.value=[]}else{const h=[];y(T)&&i.searchKeys.includes("id")?h.push((async()=>{const{data:$}=await o.get(`${C.value}/${T}`);return[$[i.fetchedItemsKey]??$]})()):h.push(...i.searchKeys.filter($=>$!=="id").map(async $=>{const{data:N}=await o.get(`${C.value}?${$}=${T}`);return N[i.fetchedItemsKey]}));const k=await Promise.all(h),w=new Set;d.value=[],(E=k==null?void 0:k.forEach)==null||E.call(k,$=>{var N;(N=$==null?void 0:$.forEach)==null||N.call($,I=>{w.has(I.id)||(w.add(I.id),d.value.push(I))})})}}catch(h){((_=h==null?void 0:h.response)==null?void 0:_.status)===404?f.value=l("debouncedFilter.errors.invalid"):(d.value=[],u.value=l("debouncedFilter.errors.fetch"))}finally{s.value=!1}else s.value=!0,f.value="",d.value=(g=p.value)==null?void 0:g.filter(h=>{var w;let k=!1;for(const $ of i.searchKeys){const N=typeof h[$]=="string"?(w=h[$])==null?void 0:w.toLowerCase():h[$];N!=null&&N.includes(T.toLowerCase())&&(k=!0)}return k}),(!d.value||!d.value.length)&&(f.value=l("debouncedFilter.errors.invalid")),s.value=!1}};return{loading:s,error:u,validationError:f,results:d,allRecords:p,loadItems:x,debouncedQueryChange:c}}function wn(e,n){const r=t.unref(n),i=t.computed(()=>e.apiBaseUrl.startsWith("/")?new URL(`${window.location.origin}${r}`):new URL(r));return i.value.search="",o=>`${i.value.href}/${o}`}function Sn(){const{i18n:{t:e}}=pe();return{getMessageFromError:r=>{var i,o,l,a;if(!r)return e("errors.unexpected");if(((i=r==null?void 0:r.response)==null?void 0:i.status)===401)return console.warn("getMessageFromError: User auth token is expired or missing, returning empty message."),"";if((o=r==null?void 0:r.response)!=null&&o.data){if(r.response.data.detail)return r.response.data.detail;if((l=r.response.data.details)!=null&&l.length)return r.response.data.details.map(c=>{let s=e("errors.unexpected");return c.messages&&typeof c.messages=="object"&&c.messages.length&&(s=c.messages.join(", ")),c.field?`${c.field} - ${s}`:s}).join("; ");if(r.response.data.message){const{message:c}=r.response.data;return Array.isArray(c)?(a=c[0])!=null&&a.constraints?Object.values(c[0].constraints)[0]:c[0]:c}if(typeof r.response.data=="string")return r.response.data;if(typeof r.response.data=="object")return Object.keys(r.response.data).map(c=>`${c} ${r.response.data[c]}`).join(", ")}return r.message||e("errors.unexpected")}}}function _n(e){const n=window.location.origin,r=n.endsWith("/")?n:`${n}/`;try{const i=e.join("/"),o=`${r}${i}`,l=e.some(c=>c.trim()==="");if(/^(https:\/\/(www\.)?([a-zA-Z0-9-]+\.){1,}[a-zA-Z]{2,}(:[0-9]+)?(\/[^\/]+)*)$|^(https|http):\/\/localhost(:[0-9]+)?(\/[^\/]+)*$/.test(o)&&!l&&new URL(o))return`${r}${i}`;throw new Error("Invalid url")}catch(i){return console.warn("Failed to build valid URL:",i),""}}function Je(e,n){const r=t.ref(t.unref(e)),i=t.ref(t.unref(n)),o=t.computed(()=>!!(r.value.app==="konnect"||r.value.isExactMatch)),l=t.computed(()=>i.value.startsWith("/")?new URL(`${window.location.origin}${i.value}`):new URL(i.value));return a=>{const{page:c,pageSize:s,offset:u,sortColumnKey:f,sortColumnOrder:d,query:m}=a;try{let p=new URL(l.value.href);return o.value&&m?(p.search="",p=r.value.isExactMatch?new URL(`${p.href}/${m}`):new URL(`${p.href}?filter[name][contains]=${m}`)):(o.value||new URLSearchParams(m).forEach((C,y)=>{p.searchParams.append(y,C)}),f&&p.searchParams.append("sort_by",f),d==="desc"&&p.searchParams.append("sort_desc","1"),p.searchParams.append("size",String(s))),u&&c!==1&&p.searchParams.append("offset",String(u)),p.href}catch(p){return console.error("RouteList(fetcher)",p),i.value}}}const Ge=new Map;function An(e,n,r){const i=t.ref(!0),o=t.unref(n),{axiosInstance:l}=Se(e.axiosRequestConfig),a=Je(e,o),c=t.ref({status:z.Idle}),s=async d=>{var p;const m=t.toValue(r)||"data";try{c.value=i.value?{status:z.InitialLoad}:{status:z.Loading},i.value=!1;let C=a(d);C.includes("filter[name]")&&(C=`${C}&page[size]=${d.pageSize}&page[number]=${d.page}`);const y=await l.get(C);if(y.status>=400)throw y;const x=y.data,B=m&&m.replace(/[^\w-_]/gi,"");let b;x[B]?b=Array.isArray(x[B])?x[B]:[x[B]]:Array.isArray(x)?b=x:b=Object.keys(x).length?[x]:[];const T={data:b,total:b.length,...x.offset?{pagination:{offset:x.offset}}:null};return T.data.length===0&&!d.query?c.value={status:z.NoRecords,response:T}:c.value={status:z.Idle,response:T},T}catch(C){const y={data:[],total:0};return d.query&&(((p=C.response)==null?void 0:p.status)===404||C.status===404)?(c.value={status:z.NoResults,response:y,error:C.response?C:{response:C}},y):(c.value={status:z.Error,response:y,error:C.response?C:{response:C}},y)}},u=e.cacheIdentifier,f=Qe(u);return{fetcher:s,fetcherState:c,fetcherCacheKey:f}}function Qe(e){if(e){let n=Ge.get(e);return n||(n=t.ref(1),Ge.set(e,n)),n}return t.ref(1)}function Bn(){const e=(i,o="_")=>i?i.split(o).map(l=>l.toLowerCase()==="id"?l.toUpperCase():l.charAt(0).toUpperCase()+l.substring(1)).join(" "):"",n=/(?:^|[\s-:'"])\w/g;return{capitalize:i=>i?i.replace(n,o=>o.toUpperCase()):"",convertKeyToTitle:e}}const Ze=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Xe=e=>{if(typeof e!="string")throw new TypeError("Invalid argument expected string");const n=e.match(Ze);if(!n)throw new Error(`Invalid argument not valid semver ('${e}' received)`);return n.shift(),n},et=e=>e==="*"||e==="x"||e==="X",tt=e=>{const n=parseInt(e,10);return isNaN(n)?e:n},En=(e,n)=>typeof e!=typeof n?[String(e),String(n)]:[e,n],Tn=(e,n)=>{if(et(e)||et(n))return 0;const[r,i]=En(tt(e),tt(n));return r>i?1:r<i?-1:0},nt=(e,n)=>{for(let r=0;r<Math.max(e.length,n.length);r++){const i=Tn(e[r]||"0",n[r]||"0");if(i!==0)return i}return 0},$n=(e,n)=>{const r=Xe(e),i=Xe(n),o=r.pop(),l=i.pop(),a=nt(r,i);return a!==0?a:o&&l?nt(o.split("."),l.split(".")):o||l?o?-1:1:0},rt=(e,n,r)=>{Nn(r);const i=$n(e,n);return it[r].includes(i)},it={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1],"!=":[-1,1]},ot=Object.keys(it),Nn=e=>{if(typeof e!="string")throw new TypeError(`Invalid operator type, expected string but got ${typeof e}`);if(ot.indexOf(e)===-1)throw new Error(`Invalid operator, expected one of ${ot.join("|")}`)},In=e=>typeof e=="string"&&/^[v\d]/.test(e)&&Ze.test(e);function Fn(e){const{gatewayInfo:n,supportedRange:r}=e;if(!n)return!0;const{edition:i,version:o}=n;if(!In(o))return console.error("Invalid version"),!1;const l=r[i];if(!l)return!1;const[a,c]=l;return!(a&&rt(o,a,"<")||c&&rt(o,c,">"))}function On(e){const n=t.ref(0),r=t.ref(0),i=t.ref(!1);return t.watch(e,l=>{l&&!i.value&&(n.value=l.offsetWidth,r.value=l.scrollWidth,i.value=!0)}),{isTruncated:t.computed(()=>n.value<r.value)}}function Ln(){const{i18n:{t:e}}=pe();return{utf8Name:r=>/^[\p{N}\p{L}.\-_~]*$/u.test(r)?"":e("validationErrors.utf8Name")}}const _e=Symbol("schema"),Dn=e=>{t.provide(_e,e)},Vn=e=>{var o,l;const n=t.inject(_e,void 0),r=(l=(o=n==null?void 0:n.value)==null?void 0:o.fields)==null?void 0:l.find(a=>Object.keys(a)[0]===e),i=t.toRef(r==null?void 0:r[e]);return t.provide(_e,i),i};function Rn(e){let n="";const r=t.ref(!1),i=t.ref(null),o=t.computed(()=>{let a;return r.value?a=!0:i.value?a=i.value.hasData||e&&t.toValue(e):a=!1,!a});return{tableState:i,hasRecords:r,hideTableToolbar:o,handleStateChange:a=>{a.hasData?r.value=!0:a.state==="success"&&!a.hasData&&(!e||!n)&&(r.value=!1),e&&(n=t.toValue(e)),i.value={...a}}}}const O={useAxios:Se,useDebouncedFilter:xn,useDeleteUrlBuilder:wn,useErrors:Sn,useExternalLinkCreator:_n,useFetcher:An,useFetcherCacheKey:Qe,useFetchUrlBuilder:Je,useHelpers:ze,useStringHelpers:Bn,useI18n:pe,useGatewayFeatureSupported:Fn,useTruncationDetector:On,useValidators:Ln,useSchemaProvider:Dn,useSubSchema:Vn,useTableState:Rn},Kn={key:0,class:"config-card-fieldset-title"},Mn=t.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(e){const n=e,{i18n:{t:r}}=O.useI18n(),{convertKeyToTitle:i}=O.useStringHelpers(),o=t.computed(()=>n.item.key??"json-array-item"),l=t.computed(()=>n.item.value??n.item),a=t.computed(()=>{const s=JSON.parse(JSON.stringify(l.value));return n.isArrayItem&&delete s.name,s}),c=t.computed(()=>{var s;return n.isArrayItem?(s=l.value)!=null&&s.name?i(l.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:n.index}):""});return(s,u)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.isArrayItem?"fieldset":"div"),{class:t.normalizeClass(e.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:t.withCtx(()=>[e.isArrayItem?(t.openBlock(),t.createElementBlock("legend",Kn,[t.createElementVNode("b",null,t.toDisplayString(c.value),1)])):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(Object.keys(a.value),(f,d)=>(t.openBlock(),t.createBlock(Ae,{key:`${o.value}-property-${d}`,item:{key:f,label:t.unref(i)(f),value:a.value[f]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),Y=(e,n)=>{const r=e.__vccOpts||e;for(const[i,o]of n)r[i]=o;return r},at=Y(Mn,[["__scopeId","data-v-f7096c33"]]),lt=Y(t.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KButton");return t.openBlock(),t.createElementBlock("div",null,[t.createVNode(o,{appearance:"tertiary",class:"navigation-button",onClick:i[0]||(i[0]=l=>r.$emit("navigation-click",e.item))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.item.value||t.unref(n)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),[["__scopeId","data-v-c96811e5"]]),vn=t.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(e){const{i18n:{t:n}}=O.useI18n();return(r,i)=>{const o=t.resolveComponent("KBadge");return t.openBlock(),t.createBlock(o,{appearance:e.status?"success":"neutral"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.status?t.unref(n)("baseConfigCard.statusBadge.enabledLabel"):t.unref(n)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),jn="#0044f4",Un="#e0e4ea",Pn="#afb7c5",qn="#0044f4",Hn="1px",Yn="16px",Wn="20px",zn={class:"config-card-details-row"},Jn=["data-testid"],Gn=["data-testid"],Qn=["data-testid"],Zn=["data-testid"],Xn={key:1},er=["data-testid"],tr=["data-testid"],nr=["data-testid"],rr=["data-testid"],ir={name:"ConfigCardItem",components:{JsonCardItem:at,StatusBadge:vn,InternalLinkItem:lt}},or=t.defineComponent({...ir,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(e,{emit:n}){t.useCssVars(b=>({"3ccdd5d2":f.value?"none":`solid ${t.unref(Hn)} ${t.unref(Un)}`,"4b1da305":u.value&&c.value?"block":"flex",cd20788a:u.value&&c.value?"100%":r.slim?"50%":"25%",cd1becd4:u.value&&c.value?"100%":r.slim?"50%":"75%"}));const r=e,i=n,o=t.useSlots(),{i18n:{t:l,formatUnixTimeStamp:a}}=O.useI18n(),c=t.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),s=t.computed(()=>!!(r.item.tooltip||o["label-tooltip"])),u=t.computed(()=>r.item.type===F.Json||r.item.type===F.JsonArray),f=t.computed(()=>r.item.type===F.JsonArray),d=O.useSubSchema(r.item.key),m=t.computed(()=>{var b;return r.item.type?r.item.type:(b=d==null?void 0:d.value)!=null&&b.encrypted?F.Redacted:void 0}),p=t.computed(()=>{switch(m.value){case F.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case F.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case F.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case F.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case F.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:a(r.item.value)};case F.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case F.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case F.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:r.item.value}};case F.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case F.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:b=>{i("navigation-click",b)}}};case F.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case F.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case F.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),C=t.ref(),y=t.ref(),{isTruncated:x}=O.useTruncationDetector(C),{isTruncated:B}=O.useTruncationDetector(y);return(b,T)=>{const E=t.resolveComponent("KTooltip"),_=t.resolveComponent("KLabel"),g=t.resolveComponent("KBadge"),h=t.resolveComponent("KCopy");return t.openBlock(),t.createElementBlock("div",zn,[t.createElementVNode("div",{class:"config-card-details-label","data-testid":`${e.item.key}-label`},[t.renderSlot(b.$slots,"label",{item:e.item},()=>[t.createVNode(_,{"tooltip-attributes":{maxWidth:"500px"}},t.createSlots({default:t.withCtx(()=>[t.createVNode(E,{text:t.unref(x)?e.item.label:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"labelContent",ref:C,class:"label-content"},t.toDisplayString(e.item.label),513)]),_:1},8,["text"])]),_:2},[s.value?{name:"tooltip",fn:t.withCtx(()=>[t.createElementVNode("div",{"data-testid":`${e.item.key}-label-tooltip`},[t.renderSlot(b.$slots,"label-tooltip",{},()=>[t.createTextVNode(t.toDisplayString(e.item.tooltip),1)],!0)],8,Gn)]),key:"0"}:void 0]),1024)],!0)],8,Jn),t.createElementVNode("div",{class:"config-card-details-value","data-testid":`${e.item.key}-property-value`},[t.renderSlot(b.$slots,e.item.key,{rowValue:e.item.value},()=>[c.value?(t.openBlock(),t.createElementBlock("div",Xn,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(p.value.tag),t.normalizeProps(t.guardReactiveProps(p.value.attrs)),{default:t.withCtx(()=>[p.value.additionalComponent==="KBadge"?(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-badge-tags`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(g,{key:`${e.item.key}-badge-tag-${w}`,class:"config-badge","data-testid":`${e.item.key}-badge-tag-${w}`,tooltip:k,"truncation-tooltip":""},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,er)):t.createCommentVNode("",!0),p.value.additionalComponent==="KCopy"?(t.openBlock(),t.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${e.item.key}-copy-uuid-array`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(h,t.mergeProps({ref_for:!0},p.value.childAttrs,{key:`${e.item.key}-copy-uuid-${w}`,"data-testid":`${e.item.key}-copy-uuid-${w}`,text:k}),null,16,["data-testid","text"]))),128))],8,tr)):p.value.additionalComponent==="KMethodBadge"?(t.openBlock(),t.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${e.item.key}-badge-methods`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(g,{key:`${e.item.key}-badge-method-${w}`,appearance:Object.values(t.unref(oe.BadgeMethodAppearances)).includes(k.toLowerCase())?k.toLowerCase():"custom",class:"config-badge","data-testid":`${e.item.key}-badge-method-${w}`},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(k),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,nr)):t.createCommentVNode("",!0),p.value.additionalComponent==="JsonCardItem"?(t.openBlock(),t.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.item.value,(k,w)=>(t.openBlock(),t.createBlock(at,{key:`json-array-item-${w}`,index:w,"is-array-item":"",item:k},null,8,["index","item"]))),128))],8,rr)):(t.openBlock(),t.createBlock(E,{key:4,text:t.unref(B)?e.item.value:""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:y,class:t.normalizeClass(["attrs-data-text",{truncated:e.truncated}])},t.toDisplayString(p.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(t.openBlock(),t.createElementBlock("div",{key:0,"data-testid":`${e.item.key}-no-value`}," – ",8,Zn))],!0)],8,Qn)])}}}),Ae=Y(or,[["__scopeId","data-v-761f7e64"]]),ar={class:"json-config"},lr={key:0,class:"json-endpoint"},Be=t.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},requestMethod:{type:String,required:!1,default:""}},setup(e){t.useCssVars(o=>({"454fa8c4":`${i.value}ch`}));const n=e,r=t.computed(()=>n.entityRecord),i=t.computed(()=>{var a;if(!n.fetcherUrl)return 0;const o=(a=n.fetcherUrl)==null?void 0:a.split("/");return o.length<2?0:41+(n.requestMethod==="post"?o[o.length-1]:o[o.length-2]).length});return(o,l)=>{const a=t.resolveComponent("KBadge"),c=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",ar,[n.fetcherUrl?(t.openBlock(),t.createElementBlock("div",lr,[t.createVNode(a,{appearance:n.requestMethod},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),t.createVNode(c,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"json","single-line":"",theme:"dark"},null,8,["code"])])):t.createCommentVNode("",!0),n.entityRecord?(t.openBlock(),t.createBlock(c,{key:1,id:"json-codeblock",class:t.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.value,null,2),language:"json",theme:"dark"},null,8,["class","code"])):t.createCommentVNode("",!0)])}}});/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function ct(e){return typeof e>"u"||e===null}function cr(e){return typeof e=="object"&&e!==null}function sr(e){return Array.isArray(e)?e:ct(e)?[]:[e]}function dr(e,n){var r,i,o,l;if(n)for(l=Object.keys(n),r=0,i=l.length;r<i;r+=1)o=l[r],e[o]=n[o];return e}function ur(e,n){var r="",i;for(i=0;i<n;i+=1)r+=e;return r}function fr(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var pr=ct,mr=cr,hr=sr,gr=ur,yr=fr,Cr=dr,R={isNothing:pr,isObject:mr,toArray:hr,repeat:gr,isNegativeZero:yr,extend:Cr};function st(e,n){var r="",i=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(r+='in "'+e.mark.name+'" '),r+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(r+=`
2
2
 
3
3
  `+e.mark.snippet),i+" "+r):i}function le(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=st(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}le.prototype=Object.create(Error.prototype),le.prototype.constructor=le,le.prototype.toString=function(n){return this.name+": "+st(this,n)};var U=le;function Ee(e,n,r,i,o){var l="",a="",c=Math.floor(o/2)-1;return i-n>c&&(l=" ... ",n=i-c+l.length),r-i>c&&(a=" ...",r=i+c-a.length),{str:l+e.slice(n,r).replace(/\t/g,"→")+a,pos:i-n+l.length}}function Te(e,n){return R.repeat(" ",n-e.length)+e}function br(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],o=[],l,a=-1;l=r.exec(e.buffer);)o.push(l.index),i.push(l.index+l[0].length),e.position<=l.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var c="",s,u,f=Math.min(e.line+n.linesAfter,o.length).toString().length,d=n.maxLength-(n.indent+f+3);for(s=1;s<=n.linesBefore&&!(a-s<0);s++)u=Ee(e.buffer,i[a-s],o[a-s],e.position-(i[a]-i[a-s]),d),c=R.repeat(" ",n.indent)+Te((e.line-s+1).toString(),f)+" | "+u.str+`
4
4
  `+c;for(u=Ee(e.buffer,i[a],o[a],e.position,d),c+=R.repeat(" ",n.indent)+Te((e.line+1).toString(),f)+" | "+u.str+`
@@ -48,4 +48,4 @@
48
48
  `,u+=`${P}${P}id = konnect_gateway_${f}.my_${f}.id
49
49
  `,u+=`${P}}
50
50
  `),u+=`}
51
- `,u});return(c,s)=>{const u=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",No,[n.entityRecord?(t.openBlock(),t.createBlock(u,{key:0,id:"terraform-codeblock",code:a.value,language:"terraform",theme:"dark"},null,8,["code"])):t.createCommentVNode("",!0)])}}}),Io={key:0,class:"config-card-display-form"},Fo=["data-testid"],Oo={key:0,class:"config-card-prop-section-title"},un=Y(t.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ae.includes(e)},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json","terraform"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""}},setup(e){const n=e,r=t.useSlots(),{i18n:{t:i}}=O.useI18n(),o=a=>!!(a.tooltip||r[`${a.key}-label-tooltip`]),l=t.computed(()=>{if(!n.record)return n.record;const a=JSON.parse(JSON.stringify(n.record));return delete a.created_at,delete a.updated_at,a});return(a,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Io,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,s=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${s}-props`,class:t.normalizeClass(`config-card-details-${s}-props`),"data-testid":`config-card-details-${s}-props`},[s!=="basic"?(t.openBlock(),t.createElementBlock("div",Oo,t.toDisplayString(s==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[s],u=>(t.openBlock(),t.createBlock(Ae,{key:u.key,item:u},t.createSlots({label:t.withCtx(()=>[t.renderSlot(a.$slots,`${u.key}-label`,{row:u},void 0,!0)]),[u.key]:t.withCtx(({rowValue:f})=>[t.renderSlot(a.$slots,u.key,{row:u,rowValue:f},void 0,!0)]),_:2},[o(u)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(a.$slots,`${u.key}-label-tooltip`,{row:u},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Fo))),128))])):t.createCommentVNode("",!0),e.format==="json"&&l.value?(t.openBlock(),t.createBlock(Be,{key:1,config:n.config,"entity-record":l.value,"fetcher-url":n.fetcherUrl,"request-method":"get"},null,8,["config","entity-record","fetcher-url"])):t.createCommentVNode("",!0),e.format==="yaml"&&l.value?(t.openBlock(),t.createBlock(je,{key:2,"entity-record":l.value},null,8,["entity-record"])):t.createCommentVNode("",!0),e.format==="terraform"&&l.value?(t.openBlock(),t.createBlock(Ue,{key:3,"entity-record":l.value,"entity-type":n.entityType},null,8,["entity-record","entity-type"])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d15be7fe"]]),Lo={class:"config-card-title","data-testid":"config-card-title"},Do={class:"config-card-actions"},Vo=["href"],Ro={class:"config-card-details-section"},Ko=Y(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ae.includes(e)},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"}},emits:["loading","fetch:success","fetch:error"],setup(e,{emit:n}){var _;const r=n,i=e,{i18n:{t:o}}=O.useI18n(),{getMessageFromError:l}=O.useErrors(),{convertKeyToTitle:a}=O.useStringHelpers();O.useSubSchema(i.pluginConfigKey);const{axiosInstance:c}=O.useAxios((_=i.config)==null?void 0:_.axiosRequestConfig),s=[{label:o("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:o("baseForm.configuration.json"),value:"json"},{label:o("baseForm.configuration.yaml"),value:"yaml"}];i.config.app==="konnect"&&s.splice(2,0,{label:o("baseForm.configuration.terraform"),value:"terraform"});const u=t.ref("structured"),f=g=>{u.value=g==null?void 0:g.value},d={id:{type:F.ID,label:o("baseConfigCard.commonFields.id_label"),order:0,section:H.Basic},name:{order:1,section:H.Basic},enabled:{type:F.BadgeStatus,order:2,section:H.Basic},updated_at:{type:F.Date,label:o("baseConfigCard.commonFields.updated_at_label"),order:3,section:H.Basic},created_at:{type:F.Date,label:o("baseConfigCard.commonFields.created_at_label"),order:4,section:H.Basic},tags:{type:F.BadgeTag,order:-1,section:H.Basic}},m=t.ref(!1),p=t.ref(!1),C=t.ref(""),y=t.ref({}),x=t.computed(()=>{var k,w,$;if(!y.value)return[];const g=[],h=Object.keys(y.value).length;for(const N in y.value){const I=(w=(k=i.configSchema)==null?void 0:k[N])==null?void 0:w.order,K=($=d[N])==null?void 0:$.order;let L=h;(K||K===0)&&(L=K===-1?h+1:K),I&&(L=I===-1?h+1:I),g.push([N,L])}return g.sort(function(N,I){return N[1]-I[1]}),g.map(N=>{var xe,mn;const I=N[0],K=(xe=y.value)==null?void 0:xe[I],L=((mn=i.configSchema)==null?void 0:mn[I])||{},V=d[I];return{key:I,value:K,hidden:L.hidden||!1,type:L.type??((V==null?void 0:V.type)||F.Text),label:L.label??((V==null?void 0:V.label)||a(I)),tooltip:L.tooltip??((V==null?void 0:V.tooltip)||void 0),section:L.section??((V==null?void 0:V.section)||H.Advanced)}}).filter(N=>!N.hidden&&N.key!==i.pluginConfigKey)}),B=t.computed(()=>{var w,$;if(!y.value||!i.pluginConfigKey)return[];const g=y.value[i.pluginConfigKey]||{},h=Object.keys(g).length,k=[];for(const N in g){const I=($=(w=i.pluginConfigSchema)==null?void 0:w[N])==null?void 0:$.order,K=g[N];let L=K!=null&&K!==""?h-1:h;I&&(L=I===-1?h+1:I),k.push([N,L])}return k.sort(function(N,I){return N[1]-I[1]}),k.map(N=>{var V;const I=N[0],K=g[I],L=((V=i.pluginConfigSchema)==null?void 0:V[I])||{};return{key:I,value:K,hidden:L.hidden||!1,type:L.type??F.Text,label:L.label??a(I),tooltip:L.tooltip??void 0,section:H.Plugin}}).filter(N=>!N.hidden)}),b=t.computed(()=>{var g,h,k,w;return{basic:(g=x.value)==null?void 0:g.filter($=>$.section===H.Basic),advanced:(h=x.value)==null?void 0:h.filter($=>$.section===H.Advanced),plugin:(w=B.value)==null?void 0:w.concat((k=x.value)==null?void 0:k.filter($=>$.section===H.Plugin))}}),T=t.computed(()=>{const g=[];return b.value.basic.length&&g.push("basic"),b.value.advanced.length&&g.push("advanced"),b.value.plugin.length&&g.push("plugin"),g}),E=t.computed(()=>{var h,k;let g=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,((h=i.config)==null?void 0:h.controlPlaneId)||""):i.config.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(k=i.config)!=null&&k.workspace?`/${i.config.workspace}`:"")),g=g.replace(/{id}/gi,i.config.entityId),g});return t.watch(m,g=>{r("loading",g)},{immediate:!0}),t.onBeforeMount(async()=>{p.value=!1,m.value=!0;try{const{data:g}=await c.get(E.value);if(i.dataKey)if(typeof g[i.dataKey]<"u")y.value={...g[i.dataKey]};else throw new Error(o("errors.dataKeyUndefined",{dataKey:i.dataKey}));else y.value={...g};Object.keys(i.configSchema).filter(k=>i.configSchema[k].forceShow).forEach(k=>{y.value&&typeof y.value[k]>"u"&&(y.value[k]=null)}),r("fetch:success",g)}catch(g){const h=l(g);C.value=h.startsWith("code")?o("baseConfigCard.errors.load"):h,p.value=!0,r("fetch:error",g)}finally{m.value=!1}}),(g,h)=>{const k=t.resolveComponent("KLabel"),w=t.resolveComponent("KSelect"),$=t.resolveComponent("KButton"),N=t.resolveComponent("KSkeleton"),I=t.resolveComponent("KEmptyState"),K=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(K,{class:"kong-ui-entity-base-config-card","title-tag":e.titleTag},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Do,[t.renderSlot(g.$slots,"actions",{},void 0,!0),t.createVNode(k,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1}),t.createVNode(w,{"data-testid":"select-config-format",items:s,onChange:f}),e.configCardDoc?(t.openBlock(),t.createBlock($,{key:0,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Z.BookIcon),{size:t.unref(Wn)},null,8,["size"])],8,Vo)]),_:1})):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[m.value?(t.openBlock(),t.createBlock(N,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):p.value?(t.openBlock(),t.createBlock(I,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(C.value),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",Ro,[t.createVNode(un,{config:e.config,"entity-type":e.entityType,"fetcher-url":E.value,format:u.value,"prop-list-types":T.value,"property-collections":b.value,record:y.value},t.createSlots({_:2},[t.renderList(Object.keys(g.$slots),L=>({name:L,fn:t.withCtx(({row:V,rowValue:xe})=>[t.renderSlot(g.$slots,L,{row:V,rowValue:xe},void 0,!0)])}))]),1032,["config","entity-type","fetcher-url","format","prop-list-types","property-collections","record"])])]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("span",Lo,[t.renderSlot(g.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),[["__scopeId","data-v-7ef5c755"]]),Mo=["novalidate"],vo={class:"form-actions","data-testid":"form-actions"},jo=Y(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},entityType:{type:String,required:!0,validator:e=>ae.includes(e)},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:n}){var E;const r=n,i=e,o=hn.useRouter(),{i18n:{t:l}}=O.useI18n(),{getMessageFromError:a}=O.useErrors(),{axiosInstance:c}=O.useAxios((E=i.config)==null?void 0:E.axiosRequestConfig),s=t.ref(!1),u=t.computed(()=>!!i.editId),f=t.ref(!1),d=t.ref(""),m=t.computed(()=>i.canSubmit===!1||i.isReadonly),p=t.ref(!1),C=t.computed(()=>{var g,h;let _=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((g=i.config)==null?void 0:g.controlPlaneId)||""):i.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(h=i.config)!=null&&h.workspace?`/${i.config.workspace}`:"")),i.editId?(_=_.replace(/{id}/gi,i.editId),_):(_=_.replace(/\/{id}/gi,""),_)}),y=()=>{p.value=!p.value},x=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):B()},B=()=>{r("cancel")},b=()=>{m.value||r("submit")},T=t.ref([{title:l("baseForm.configuration.json"),hash:"#json"},{title:l("baseForm.configuration.yaml"),hash:"#yaml"}]);return i.config.app==="konnect"&&i.entityType!==fe.Other&&T.value.splice(1,0,{title:l("baseForm.configuration.terraform"),hash:"#terraform"}),t.watch(()=>s.value,_=>{r("loading",_)},{immediate:!0}),t.onBeforeMount(async()=>{if(i.editId)try{f.value=!1,s.value=!0;const{data:_}=await c.get(C.value);r("fetch:success",_)}catch(_){const g=a(_);d.value=g.startsWith("code")?l("baseForm.errors.edit"):g,f.value=!0,r("fetch:error",_)}finally{s.value=!1}}),(_,g)=>{const h=t.resolveComponent("KSkeleton"),k=t.resolveComponent("KEmptyState"),w=t.resolveComponent("KAlert"),$=t.resolveComponent("KButton"),N=t.resolveComponent("KTabs"),I=t.resolveComponent("KSlideout");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.wrapperComponent),{class:"kong-ui-entity-base-form"},{default:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(h,{key:0,type:"form"})):f.value?(t.openBlock(),t.createBlock(k,{key:1,"action-button-text":t.unref(l)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:x},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(d.value),1)]),_:1},8,["action-button-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:i.noValidate,onReset:t.withModifiers(B,["prevent"]),onSubmit:t.withModifiers(b,["prevent"])},[t.renderSlot(_.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(w,{key:0,appearance:"danger","data-testid":"form-error",message:e.errorMessage},null,8,["message"])):t.createCommentVNode("",!0),t.createElementVNode("div",vo,[t.renderSlot(_.$slots,"form-actions",{},()=>[t.createVNode($,{appearance:"tertiary","data-testid":`${e.entityType}-${u.value?"edit":"create"}-form-view-configuration`,onClick:g[0]||(g[0]=K=>y())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),t.createVNode($,{appearance:"secondary","data-testid":`${e.entityType}-${u.value?"edit":"create"}-form-cancel`,disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),t.createVNode($,{appearance:"primary","data-testid":`${e.entityType}-${u.value?"edit":"create"}-form-submit`,disabled:m.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)])],40,Mo)),t.createVNode(I,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":60,title:t.unref(l)("baseForm.configuration.title"),visible:p.value,onClose:g[1]||(g[1]=K=>y())},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(l)("baseForm.configuration.message")),1),t.createVNode(N,{"data-testid":"form-view-configuration-slideout-tabs",tabs:T.value},{json:t.withCtx(()=>[t.createVNode(Be,{config:e.config,"entity-record":i.formFields,"fetcher-url":C.value,"request-method":i.editId?"put":"post"},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(je,{"entity-record":i.formFields},null,8,["entity-record"])]),terraform:t.withCtx(()=>[t.createVNode(Ue,{"entity-record":i.formFields,"entity-type":e.entityType},null,8,["entity-record","entity-type"])]),_:1},8,["tabs"])]),_:1},8,["title","visible"])]),_:3})}}}),[["__scopeId","data-v-6210a67a"]]),Uo=["data-truncate"],Po=Y(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(e){const n=e,r=t.computed(()=>{var x;return((x=n.rowEl)==null?void 0:x.querySelector(`[data-testid="${n.keyName}"]`))||null}),i=t.computed(()=>{var x;return((x=r.value)==null?void 0:x.querySelector('[data-truncate="true"]'))||null}),o=t.computed(()=>{var B,b;const x=(B=n.rowEl)==null?void 0:B.querySelectorAll("td");return x?((b=x[0])==null?void 0:b.getAttribute("data-testid"))===n.keyName:!0}),l=t.computed(()=>o.value||n.tooltip);let a;const c=()=>{a&&(a.disconnect(),a=void 0)},s=()=>{var B,b,T;let x=((B=r.value)==null?void 0:B.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const E=window.getComputedStyle(r.value);x-=(parseFloat(E.paddingLeft)||0)+(parseFloat(E.paddingRight)||0)}f.value=((b=i.value)==null?void 0:b.getBoundingClientRect().width)||0,d.value=x,m.value=((T=u.value)==null?void 0:T.innerText)||""},u=t.ref({}),f=t.ref(0),d=t.ref(0),m=t.ref(""),p=t.computed(()=>[i.value,r.value]),C=t.watch(p,x=>{if(l.value&&(c(),"ResizeObserver"in window&&window)){a=new ResizeObserver(B=>{window.requestAnimationFrame(()=>{!Array.isArray(B)||!B.length||s()})});for(const B of x)B&&a.observe(B)}},{immediate:!0,flush:"post",deep:!0}),y=t.computed(()=>l.value?f.value>d.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{C()}),(x,B)=>{const b=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:u,class:"content-wrapper"},[l.value?(t.openBlock(),t.createElementBlock("span",{key:0,"data-truncate":l.value||void 0},[t.createVNode(b,{"max-width":"300",placement:"bottom-start",text:y.value?m.value:""},{default:t.withCtx(()=>[t.renderSlot(x.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Uo)):t.renderSlot(x.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-b252463e"]]),qo={class:"toolbar-container"},Ho={key:0,class:"toolbar-button-container"},Yo=Y(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},rowKey:{type:[String,Function],default:"id"},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:null},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},defaultTablePreferences:{type:Object,default:null,required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1},hidePagination:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:void 0}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=O.useI18n(),l=t.computed(()=>{var h,k;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(h=r.errorMessage)==null?void 0:h.title,message:(k=r.errorMessage)==null?void 0:k.message}}),a=t.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),c=t.computed(()=>{const h=[];return Object.keys(r.tableHeaders).forEach(w=>{const $=r.tableHeaders[w];h.push({label:$.label??w,key:w,sortable:$.sortable??!1,hidable:$.hidable??!0})}),r.enableEntityActions&&h.push({key:"actions",hideLabel:!0}),h}),s=h=>({"data-rowid":h.id,"data-testid":h.name,...r.rowAttributes(h)}),u=t.ref({}),f=h=>{var k;return(k=u.value)==null?void 0:k.$el.querySelector(`[data-rowid="${h.id}"]`)},d=h=>{const k={"data-testid":h.headerKey,...r.cellAttributes(h)};return h.colIndex===0&&(k.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),k},m=()=>{i("empty-state-cta-clicked"),p()},p=()=>{i("clear-search-input")},C=t.computed(()=>r.disableRowClick?void 0:(h,k)=>{i("click:row",k)}),y=h=>{i("sort",h)},{hideTableToolbar:x,handleStateChange:B}=O.useTableState(()=>r.query),{setTablePreferences:b,getTablePreferences:T}=bn(),E=t.ref(T(a.value,r.defaultTablePreferences)),_=t.computed(()=>{const h=T(a.value);return{...r.initialFetcherParams,...h}}),g=h=>{E.value=h,c.value.forEach(k=>{!("hidable"in k)||!E.value.columnVisibility||k.hidable===!1&&(E.value.columnVisibility[k.key]=!0)}),a.value&&b(a.value,h)};return(h,k)=>{const w=t.resolveComponent("KTableData"),$=t.resolveComponent("KCard");return t.openBlock(),t.createBlock($,{class:"kong-ui-entity-base-table",title:e.title,"title-tag":e.titleTag},{default:t.withCtx(()=>[t.createVNode(w,{ref_key:"tableRefs",ref:u,"cache-identifier":a.value,"cell-attrs":d,"client-sort":e.enableClientSort,"empty-state-action-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?void 0:e.emptyStateOptions.ctaPath,"empty-state-icon-variant":e.query?"search":"kong","empty-state-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,error:l.value.hasError,"error-state-message":l.value.message,"error-state-title":l.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),headers:c.value,"hide-pagination":e.hidePagination,"hide-pagination-when-optional":"","hide-toolbar":e.hideToolbar??t.unref(x),"initial-fetcher-params":_.value,loading:e.isLoading,"pagination-attributes":{disablePageJump:e.disablePaginationPageJump,offset:e.paginationType==="offset"},"resize-columns":"","row-attrs":s,"row-key":e.rowKey,"search-input":e.query,"sort-handler-function":e.enableClientSort?e.sortHandlerFunction:void 0,sortable:!e.disableSorting,"table-preferences":E.value,onEmptyStateActionClick:m,"onRow:click":C.value,onSort:k[0]||(k[0]=N=>y(N)),onState:t.unref(B),"onUpdate:tablePreferences":g},t.createSlots({toolbar:t.withCtx(()=>[t.createElementVNode("div",qo,[t.renderSlot(h.$slots,"toolbar-filter",{},void 0,!0),h.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",Ho,[t.renderSlot(h.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)])]),"action-items":t.withCtx(({row:N})=>[t.renderSlot(h.$slots,"actions",{row:N},void 0,!0)]),_:2},[t.renderList(e.tableHeaders,(N,I)=>({name:I,fn:t.withCtx(({row:K,rowKey:L,rowValue:V})=>[t.createVNode(Po,{"key-name":String(I),"row-el":f(K),tooltip:N.tooltip},{default:t.withCtx(()=>[t.renderSlot(h.$slots,I,{row:K,rowKey:L,rowValue:V},()=>[t.createTextVNode(t.toDisplayString(V),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),e.query?void 0:{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.createVNode(t.unref(Z.AddIcon))]),key:"0"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click","onState"])]),_:3},8,["title","title-tag"])}}}),[["__scopeId","data-v-0998625e"]]),Wo={key:0,class:"kong-ui-entity-delete-error"},zo={key:1,class:"description"},Jo=Y(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18nT:r}=O.useI18n(),i=e,o=n,l=t.computed(()=>i.needConfirm?i.entityName:""),a=()=>{o("cancel")},c=()=>{o("proceed")};return(s,u)=>{const f=t.resolveComponent("KAlert"),d=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(d,{"action-button-appearance":"danger","action-button-disabled":e.actionPending,"action-button-text":"Yes, delete",class:"kong-ui-entity-delete-modal","confirmation-text":l.value,title:e.title,visible:e.visible,onCancel:a,onProceed:c},{default:t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",Wo,[t.createVNode(f,{appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:i.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.entityType),1)]),_:2},[i.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(i.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),i.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",zo,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(i.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-button-disabled","confirmation-text","title","visible"])}}}),[["__scopeId","data-v-4361d622"]]),Go={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Qo={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Zo=["fill"],Xo={mask:"url(#mask0_180_20349)"},ea=["fill"],fn=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${jn})`}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",Go,[t.createElementVNode("mask",Qo,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,Zo)]),t.createElementVNode("g",Xo,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,ea)])]))}}),ta={key:1,class:"kong-ui-entity-filter"},na={class:"kong-ui-entity-filter-menu"},ra=["data-testid"],ia=["onClick","onKeydown"],oa={class:"menu-item-indicator"},aa={class:"menu-item-body"},la=["for"],ca={class:"menu-item-buttons"},sa={class:"filter-clear-button-container"},da=Y(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const{i18n:{t:r}}=O.useI18n(),i=e,o=n,l=t.ref(!1),a=t.ref({}),c=t.ref(new Set),s=t.computed(()=>{const E=[];return new URLSearchParams(i.modelValue).forEach((_,g)=>{_!==""&&E.push(g)}),E}),u=t.computed(()=>{const E=i.config.fields;return Object.keys(E).filter(_=>{var g;return(g=E==null?void 0:E[_])==null?void 0:g.searchable}).map(_=>({label:E[_].label||_,value:_,expanded:!1}))});t.watch(()=>i.modelValue,E=>{a.value={},new URLSearchParams(E).forEach((_,g)=>{a.value[g]=_})});const f=()=>{l.value=!l.value},d=E=>{c.value.has(E)?c.value.delete(E):c.value.add(E)},m=E=>{o("update:modelValue",E)},p=()=>{m("")},C=E=>`filter-${E}`,y=E=>{var _,g;return(((g=(_=i.config.schema)==null?void 0:_[E])==null?void 0:g.values)??[]).map(h=>({value:h,label:h}))},x=E=>{var _,g;return((g=(_=i.config.schema)==null?void 0:_[E])==null?void 0:g.type)??"text"},B=E=>{a.value={...a.value,[E]:""},T()},b=()=>{a.value={},T(!0)},T=(E=!1)=>{const _=Object.keys(a.value).reduce((g,h)=>(a.value[h]&&(g[h]=`${a.value[h]}`),g),{});E&&(l.value=!1),o("update:modelValue",new URLSearchParams(_).toString())};return(E,_)=>{const g=t.resolveComponent("KInput"),h=t.resolveComponent("KButton"),k=t.resolveComponent("KSelect");return e.config.isExactMatch?(t.openBlock(),t.createBlock(g,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":m},{before:t.withCtx(()=>[t.createVNode(fn)]),after:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(Z.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:p},null,512),[[t.vShow,e.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",ta,[t.createVNode(h,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:t.withCtx(()=>[t.createVNode(fn),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(s.value.length>0?`(${s.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[t.vShow,l.value]]),t.withDirectives(t.createElementVNode("div",na,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,w=>{var $,N;return t.openBlock(),t.createElementBlock("div",{key:w.value,class:"kong-ui-entity-filter-menu-item","data-testid":w.value},[t.createElementVNode("span",{class:t.normalizeClass(["menu-item-title",{expanded:c.value.has(w.value)}]),role:"button",tabindex:"0",onClick:I=>d(w.value),onKeydown:t.withKeys(I=>d(w.value),["enter"])},[t.createTextVNode(t.toDisplayString(w.label)+" ",1),t.withDirectives(t.createElementVNode("span",oa,null,512),[[t.vShow,s.value.includes(w.value)]]),t.createVNode(t.unref(Z.ChevronDownIcon),{class:t.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(w.value)}]),color:t.unref(Pn)},null,8,["class","color"])],42,ia),t.withDirectives(t.createElementVNode("div",aa,[t.createElementVNode("label",{class:"menu-item-label",for:C(w.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,la),((N=($=e.config.schema)==null?void 0:$[w.value])==null?void 0:N.type)==="select"?(t.openBlock(),t.createBlock(k,{key:0,id:C(w.value),modelValue:a.value[w.value],"onUpdate:modelValue":I=>a.value[w.value]=I,items:y(w.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(g,{key:1,id:C(w.value),modelValue:a.value[w.value],"onUpdate:modelValue":I=>a.value[w.value]=I,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:x(w.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[t.vShow,c.value.has(w.value)]]),t.withDirectives(t.createElementVNode("div",ca,[t.createVNode(h,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:_[0]||(_[0]=I=>T(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(h,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:I=>B(w.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])],512),[[t.vShow,c.value.has(w.value)]])],8,ra)}),128)),t.createElementVNode("div",sa,[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:b},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[t.vShow,l.value]])]))}}}),[["__scopeId","data-v-10fa27a5"]]),ua=t.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18n:{t:r},i18nT:i}=O.useI18n(),o=e,l=n,a=t.ref(!1),c=t.computed(()=>o.action==="enable"?r("toggleModal.enable.title",{entityType:o.entityType}):r("toggleModal.disable.title",{entityType:o.entityType})),s=t.computed(()=>o.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),u=()=>l("cancel"),f=async()=>{if(o.onConfirm){a.value=!0;try{await o.onConfirm(),l("proceed")}catch(d){console.error(d)}finally{a.value=!1}}};return(d,m)=>{const p=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(p,{"action-button-disabled":a.value,"action-button-text":s.value,"data-testid":`${e.entityType}-${e.entityId}-toggle-prompt`,title:c.value,visible:e.visible,onCancel:u,onProceed:f},{default:t.withCtx(()=>[t.createVNode(t.unref(i),{keypath:`toggleModal.${o.action}.message`,scope:"global"},{entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.entityType),1)]),entityName:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),fa=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,r=t.ref(void 0),i=t.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,l)=>i.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):t.createCommentVNode("",!0)}});for(var v=[],Pe=0;Pe<256;++Pe)v.push((Pe+256).toString(16).slice(1));function pa(e,n=0){return(v[e[n+0]]+v[e[n+1]]+v[e[n+2]]+v[e[n+3]]+"-"+v[e[n+4]]+v[e[n+5]]+"-"+v[e[n+6]]+v[e[n+7]]+"-"+v[e[n+8]]+v[e[n+9]]+"-"+v[e[n+10]]+v[e[n+11]]+v[e[n+12]]+v[e[n+13]]+v[e[n+14]]+v[e[n+15]]).toLowerCase()}var ke,ma=new Uint8Array(16);function ha(){if(!ke&&(ke=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ke))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ke(ma)}var ga=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const pn={randomUUID:ga};function ya(e,n,r){if(pn.randomUUID&&!n&&!e)return pn.randomUUID();e=e||{};var i=e.random||(e.rng||ha)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,pa(i)}const Ca=["aria-labelledby"],ba={class:"form-section-wrapper"},ka={key:1,class:"form-section-description"},xa={key:2,class:"form-section-footer"},wa={class:"form-section-content"},Sa=Y(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(e){const n=t.useSlots(),r=ya();return(i,o)=>(t.openBlock(),t.createElementBlock("div",{"aria-labelledby":e.title?t.unref(r):void 0,class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}]),role:"group"},[t.createElementVNode("div",ba,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.titleTag),{key:0,id:t.unref(r),class:"form-section-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["id"])):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",ka,[t.renderSlot(i.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",xa,[t.renderSlot(i.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",wa,[t.renderSlot(i.$slots,"default",{},void 0,!0)])])],10,Ca))}}),[["__scopeId","data-v-b1f74200"]]),_a={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Aa={key:0,class:"deleted-entity"},Ba={key:1},Ea=["onClick"],Ta=Y(t.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,r=t.ref(),{isTruncated:i}=O.useTruncationDetector(r),{i18n:{t:o}}=O.useI18n(),l=o("global.actions.copyId"),a=t.ref(l),c=t.computed(()=>n.entityLinkData.deleted??!1),s=t.computed(()=>{var d;return(d=n.entityLinkData.id)!=null&&d.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id}),u=t.computed(()=>{var d;return`${(d=s.value)==null?void 0:d.toString().slice(0,5)} (deleted)`}),f=async d=>{await d(s.value||"")&&(a.value=o("global.actions.copyToClipboard"),setTimeout(()=>{a.value=l},1800))};return(d,m)=>{const p=t.resolveComponent("KTooltip"),C=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",_a,[c.value?(t.openBlock(),t.createElementBlock("div",Aa,t.toDisplayString(u.value),1)):s.value?s.value?(t.openBlock(),t.createBlock(C,{key:2,class:"entity-link","hide-icon":!e.newWindow,href:e.externalLink,target:e.newWindow?"_blank":"_self"},{default:t.withCtx(()=>[t.createVNode(p,{text:t.unref(i)&&e.entityLinkData.label||""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},t.toDisplayString(e.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ba,t.toDisplayString(" – "))),s.value&&e.allowCopy?(t.openBlock(),t.createBlock(p,{key:a.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:a.value},{default:t.withCtx(()=>[t.createVNode(y,null,{default:t.withCtx(({copyToClipboard:x})=>[t.createElementVNode("span",{class:"entity-link-copy-id",onClick:t.withModifiers(B=>f(x),["stop"])},[t.createVNode(t.unref(Z.CopyIcon),{class:"copy-icon",color:t.unref(qn),"data-testid":"copy-id",size:t.unref(Yn)},null,8,["color","size"])],8,Ea)]),_:1})]),_:1},8,["text"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-60e3ef7c"]]),$a={class:"kong-ui-public-entity-empty-state"},Na={class:"entity-empty-state-content"},Ia={key:0,class:"empty-state-image"},Fa={key:1,class:"entity-empty-state-title"},Oa={key:2,class:"entity-empty-state-description"},La={key:3,class:"entity-empty-state-pricing"},Da={key:0,class:"entity-empty-state-message"},Va={key:1,class:"entity-empty-state-action"},Ra={class:"entity-empty-state-card-container"},Ka={key:0,class:"feature-icon"},Ma={class:"card-header"},va=["title"],ja=Y(t.defineComponent({__name:"EntityEmptyState",props:{title:{type:String,default:""},description:{type:String,default:""},pricing:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},actionButtonText:{type:String,default:""},learnMore:{type:Boolean,default:!1},features:{type:Array,default:()=>[]}},emits:["click:create","click:learn-more"],setup(e){const n=e,{i18n:{t:r}}=O.useI18n(),i=t.ref(!1),o=t.computed(()=>i.value&&!!n.actionButtonText);return t.onBeforeMount(async()=>{i.value=await n.canCreate()}),(l,a)=>{const c=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",$a,[t.createElementVNode("div",Na,[l.$slots.image?(t.openBlock(),t.createElementBlock("div",Ia,[t.renderSlot(l.$slots,"image",{},void 0,!0)])):t.createCommentVNode("",!0),e.title||l.$slots.title?(t.openBlock(),t.createElementBlock("div",Fa,[t.createElementVNode("h1",null,[t.renderSlot(l.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)],!0)])])):t.createCommentVNode("",!0),e.description||l.$slots.default?(t.openBlock(),t.createElementBlock("div",Oa,[t.renderSlot(l.$slots,"default",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),e.pricing||l.$slots.pricing?(t.openBlock(),t.createElementBlock("div",La,[t.createElementVNode("p",null,[t.createElementVNode("b",null,t.toDisplayString(t.unref(r)("emptyState.pricingTitle")),1),a[2]||(a[2]=t.createTextVNode()),t.renderSlot(l.$slots,"pricing",{},()=>[t.createTextVNode(t.toDisplayString(e.pricing),1)],!0)])])):t.createCommentVNode("",!0)]),l.$slots.message?(t.openBlock(),t.createElementBlock("div",Da,[t.renderSlot(l.$slots,"message",{},void 0,!0)])):t.createCommentVNode("",!0),o.value||e.learnMore||l.$slots.actions?(t.openBlock(),t.createElementBlock("div",Va,[t.renderSlot(l.$slots,"actions",{},()=>[o.value?(t.openBlock(),t.createBlock(t.unref(oe.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:"large",onClick:a[0]||(a[0]=s=>l.$emit("click:create"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Z.AddIcon)),t.createTextVNode(" "+t.toDisplayString(e.actionButtonText),1)]),_:1})):t.createCommentVNode("",!0),e.learnMore?(t.openBlock(),t.createBlock(t.unref(oe.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:"large",onClick:a[1]||(a[1]=s=>l.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Z.BookIcon),{decorative:""}),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("emptyState.learnMore")),1)]),_:1})):t.createCommentVNode("",!0)],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",Ra,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.features,(s,u)=>(t.openBlock(),t.createBlock(c,{key:s,class:"entity-empty-state-card"},{title:t.withCtx(()=>[l.$slots[`feature-${u}-icon`]?(t.openBlock(),t.createElementBlock("div",Ka,[t.renderSlot(l.$slots,`feature-${u}-icon`,{},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",Ma,t.toDisplayString(s.title),1)]),default:t.withCtx(()=>[t.createElementVNode("div",{title:s.description},t.toDisplayString(s.description),9,va)]),_:2},1024))),128))])])}}}),[["__scopeId","data-v-6f342249"]]),Ua={key:1},Pa=t.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(e){const n=e,r=t.computed(()=>{if(Array.isArray(n.tags))return n.tags;if(typeof n.tags=="string")try{const i=JSON.parse(n.tags);return Array.isArray(i)?i:[]}catch{return[]}return[]});return(i,o)=>{var l;return((l=r.value)==null?void 0:l.length)>0?(t.openBlock(),t.createBlock(t.unref(oe.KTruncate),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,a=>(t.openBlock(),t.createBlock(t.unref(oe.KBadge),{key:a,"max-width":e.tagMaxWidth,onClick:o[0]||(o[0]=t.withModifiers(()=>{},["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(t.openBlock(),t.createElementBlock("span",Ua,"-"))}}}),{useAxios:qa,useDeleteUrlBuilder:Ha,useErrors:Ya,useExternalLinkCreator:Wa,useFetchUrlBuilder:za,useFetcher:Ja,useFetcherCacheKey:Ga,useDebouncedFilter:Qa,useStringHelpers:Za,useHelpers:Xa,useGatewayFeatureSupported:el,useTruncationDetector:tl,useValidators:nl,useSchemaProvider:rl,useTableState:il}=O;A.ConfigCardDisplay=un,A.ConfigCardItem=Ae,A.ConfigurationSchemaSection=H,A.ConfigurationSchemaType=F,A.EntityBaseConfigCard=Ko,A.EntityBaseForm=jo,A.EntityBaseFormType=We,A.EntityBaseTable=Yo,A.EntityDeleteModal=Jo,A.EntityEmptyState=ja,A.EntityFilter=da,A.EntityFormSection=Sa,A.EntityLink=Ta,A.EntityToggleModal=ua,A.EntityTypes=Ye,A.FetcherStatus=z,A.InternalLinkItem=lt,A.JsonCodeBlock=Be,A.PermissionsWrapper=fa,A.SupportedEntityType=fe,A.SupportedEntityTypesArray=ae,A.TableTags=Pa,A.TerraformCodeBlock=Ue,A.YamlCodeBlock=je,A.useAxios=qa,A.useDebouncedFilter=Qa,A.useDeleteUrlBuilder=Ha,A.useErrors=Ya,A.useExternalLinkCreator=Wa,A.useFetchUrlBuilder=za,A.useFetcher=Ja,A.useFetcherCacheKey=Ga,A.useGatewayFeatureSupported=el,A.useHelpers=Xa,A.useSchemaProvider=rl,A.useStringHelpers=Za,A.useTableState=il,A.useTruncationDetector=tl,A.useValidators=nl,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
51
+ `,u});return(c,s)=>{const u=t.resolveComponent("KCodeBlock");return t.openBlock(),t.createElementBlock("div",No,[n.entityRecord?(t.openBlock(),t.createBlock(u,{key:0,id:"terraform-codeblock",code:a.value,language:"terraform",theme:"dark"},null,8,["code"])):t.createCommentVNode("",!0)])}}}),Io={key:0,class:"config-card-display-form"},Fo=["data-testid"],Oo={key:0,class:"config-card-prop-section-title"},un=Y(t.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ae.includes(e)},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:e=>["structured","yaml","json","terraform"].includes(e)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""}},setup(e){const n=e,r=t.useSlots(),{i18n:{t:i}}=O.useI18n(),o=a=>!!(a.tooltip||r[`${a.key}-label-tooltip`]),l=t.computed(()=>{if(!n.record)return n.record;const a=JSON.parse(JSON.stringify(n.record));return delete a.created_at,delete a.updated_at,a});return(a,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[e.format==="structured"?(t.openBlock(),t.createElementBlock("div",Io,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propListTypes,s=>(t.openBlock(),t.createElementBlock("div",{key:`config-card-details-${s}-props`,class:t.normalizeClass(`config-card-details-${s}-props`),"data-testid":`config-card-details-${s}-props`},[s!=="basic"?(t.openBlock(),t.createElementBlock("div",Oo,t.toDisplayString(s==="advanced"?t.unref(i)("baseConfigCard.sections.advanced"):t.unref(i)("baseConfigCard.sections.plugin")),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.propertyCollections[s],u=>(t.openBlock(),t.createBlock(Ae,{key:u.key,item:u},t.createSlots({label:t.withCtx(()=>[t.renderSlot(a.$slots,`${u.key}-label`,{row:u},void 0,!0)]),[u.key]:t.withCtx(({rowValue:f})=>[t.renderSlot(a.$slots,u.key,{row:u,rowValue:f},void 0,!0)]),_:2},[o(u)?{name:"label-tooltip",fn:t.withCtx(()=>[t.renderSlot(a.$slots,`${u.key}-label-tooltip`,{row:u},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))),128))],10,Fo))),128))])):t.createCommentVNode("",!0),e.format==="json"&&l.value?(t.openBlock(),t.createBlock(Be,{key:1,config:n.config,"entity-record":l.value,"fetcher-url":n.fetcherUrl,"request-method":"get"},null,8,["config","entity-record","fetcher-url"])):t.createCommentVNode("",!0),e.format==="yaml"&&l.value?(t.openBlock(),t.createBlock(je,{key:2,"entity-record":l.value},null,8,["entity-record"])):t.createCommentVNode("",!0),e.format==="terraform"&&l.value?(t.openBlock(),t.createBlock(Ue,{key:3,"entity-record":l.value,"entity-type":n.entityType},null,8,["entity-record","entity-type"])):t.createCommentVNode("",!0)],64))}}),[["__scopeId","data-v-d15be7fe"]]),Lo={class:"config-card-title","data-testid":"config-card-title"},Do={class:"config-card-actions"},Vo=["href"],Ro={class:"config-card-details-section"},Ko=Y(t.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string"||!e.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:e=>ae.includes(e)},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"}},emits:["loading","fetch:success","fetch:error"],setup(e,{emit:n}){var _;const r=n,i=e,{i18n:{t:o}}=O.useI18n(),{getMessageFromError:l}=O.useErrors(),{convertKeyToTitle:a}=O.useStringHelpers();O.useSubSchema(i.pluginConfigKey);const{axiosInstance:c}=O.useAxios((_=i.config)==null?void 0:_.axiosRequestConfig),s=[{label:o("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:o("baseForm.configuration.json"),value:"json"},{label:o("baseForm.configuration.yaml"),value:"yaml"}];i.config.app==="konnect"&&s.splice(2,0,{label:o("baseForm.configuration.terraform"),value:"terraform"});const u=t.ref("structured"),f=g=>{u.value=g==null?void 0:g.value},d={id:{type:F.ID,label:o("baseConfigCard.commonFields.id_label"),order:0,section:H.Basic},name:{order:1,section:H.Basic},enabled:{type:F.BadgeStatus,order:2,section:H.Basic},updated_at:{type:F.Date,label:o("baseConfigCard.commonFields.updated_at_label"),order:3,section:H.Basic},created_at:{type:F.Date,label:o("baseConfigCard.commonFields.created_at_label"),order:4,section:H.Basic},tags:{type:F.BadgeTag,order:-1,section:H.Basic}},m=t.ref(!1),p=t.ref(!1),C=t.ref(""),y=t.ref({}),x=t.computed(()=>{var k,w,$;if(!y.value)return[];const g=[],h=Object.keys(y.value).length;for(const N in y.value){const I=(w=(k=i.configSchema)==null?void 0:k[N])==null?void 0:w.order,K=($=d[N])==null?void 0:$.order;let L=h;(K||K===0)&&(L=K===-1?h+1:K),I&&(L=I===-1?h+1:I),g.push([N,L])}return g.sort(function(N,I){return N[1]-I[1]}),g.map(N=>{var xe,mn;const I=N[0],K=(xe=y.value)==null?void 0:xe[I],L=((mn=i.configSchema)==null?void 0:mn[I])||{},V=d[I];return{key:I,value:K,hidden:L.hidden||!1,type:L.type??((V==null?void 0:V.type)||F.Text),label:L.label??((V==null?void 0:V.label)||a(I)),tooltip:L.tooltip??((V==null?void 0:V.tooltip)||void 0),section:L.section??((V==null?void 0:V.section)||H.Advanced)}}).filter(N=>!N.hidden&&N.key!==i.pluginConfigKey)}),B=t.computed(()=>{var w,$;if(!y.value||!i.pluginConfigKey)return[];const g=y.value[i.pluginConfigKey]||{},h=Object.keys(g).length,k=[];for(const N in g){const I=($=(w=i.pluginConfigSchema)==null?void 0:w[N])==null?void 0:$.order,K=g[N];let L=K!=null&&K!==""?h-1:h;I&&(L=I===-1?h+1:I),k.push([N,L])}return k.sort(function(N,I){return N[1]-I[1]}),k.map(N=>{var V;const I=N[0],K=g[I],L=((V=i.pluginConfigSchema)==null?void 0:V[I])||{};return{key:I,value:K,hidden:L.hidden||!1,type:L.type??F.Text,label:L.label??a(I),tooltip:L.tooltip??void 0,section:H.Plugin}}).filter(N=>!N.hidden)}),b=t.computed(()=>{var g,h,k,w;return{basic:(g=x.value)==null?void 0:g.filter($=>$.section===H.Basic),advanced:(h=x.value)==null?void 0:h.filter($=>$.section===H.Advanced),plugin:(w=B.value)==null?void 0:w.concat((k=x.value)==null?void 0:k.filter($=>$.section===H.Plugin))}}),T=t.computed(()=>{const g=[];return b.value.basic.length&&g.push("basic"),b.value.advanced.length&&g.push("advanced"),b.value.plugin.length&&g.push("plugin"),g}),E=t.computed(()=>{var h,k;let g=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,((h=i.config)==null?void 0:h.controlPlaneId)||""):i.config.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,(k=i.config)!=null&&k.workspace?`/${i.config.workspace}`:"")),g=g.replace(/{id}/gi,i.config.entityId),g});return t.watch(m,g=>{r("loading",g)},{immediate:!0}),t.onBeforeMount(async()=>{p.value=!1,m.value=!0;try{const{data:g}=await c.get(E.value);if(i.dataKey)if(typeof g[i.dataKey]<"u")y.value={...g[i.dataKey]};else throw new Error(o("errors.dataKeyUndefined",{dataKey:i.dataKey}));else y.value={...g};Object.keys(i.configSchema).filter(k=>i.configSchema[k].forceShow).forEach(k=>{y.value&&typeof y.value[k]>"u"&&(y.value[k]=null)}),r("fetch:success",g)}catch(g){const h=l(g);C.value=h.startsWith("code")?o("baseConfigCard.errors.load"):h,p.value=!0,r("fetch:error",g)}finally{m.value=!1}}),(g,h)=>{const k=t.resolveComponent("KLabel"),w=t.resolveComponent("KSelect"),$=t.resolveComponent("KButton"),N=t.resolveComponent("KSkeleton"),I=t.resolveComponent("KEmptyState"),K=t.resolveComponent("KCard");return t.openBlock(),t.createBlock(K,{class:"kong-ui-entity-base-config-card","title-tag":e.titleTag},t.createSlots({actions:t.withCtx(()=>[t.createElementVNode("div",Do,[t.renderSlot(g.$slots,"actions",{},void 0,!0),t.createVNode(k,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.label),1)]),_:1}),t.createVNode(w,{"data-testid":"select-config-format",items:s,onChange:f}),e.configCardDoc?(t.openBlock(),t.createBlock($,{key:0,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:t.withCtx(()=>[t.createElementVNode("a",{href:e.configCardDoc,rel:"noopener",target:"_blank"},[t.createVNode(t.unref(Z.BookIcon),{size:t.unref(Wn)},null,8,["size"])],8,Vo)]),_:1})):t.createCommentVNode("",!0)])]),default:t.withCtx(()=>[m.value?(t.openBlock(),t.createBlock(N,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):p.value?(t.openBlock(),t.createBlock(I,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(C.value),1)]),_:1})):t.createCommentVNode("",!0),t.createElementVNode("div",Ro,[t.createVNode(un,{config:e.config,"entity-type":e.entityType,"fetcher-url":E.value,format:u.value,"prop-list-types":T.value,"property-collections":b.value,record:y.value},t.createSlots({_:2},[t.renderList(Object.keys(g.$slots),L=>({name:L,fn:t.withCtx(({row:V,rowValue:xe})=>[t.renderSlot(g.$slots,L,{row:V,rowValue:xe},void 0,!0)])}))]),1032,["config","entity-type","fetcher-url","format","prop-list-types","property-collections","record"])])]),_:2},[e.hideTitle?void 0:{name:"title",fn:t.withCtx(()=>[t.createElementVNode("span",Lo,[t.renderSlot(g.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(t.unref(o)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),[["__scopeId","data-v-7ef5c755"]]),Mo=["novalidate"],vo={class:"form-actions","data-testid":"form-actions"},jo=Y(t.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:e=>!(!e||!["konnect","kongManager"].includes(e==null?void 0:e.app)||e.app==="konnect"&&!e.controlPlaneId||e.app==="kongManager"&&typeof e.workspace!="string")},editId:{type:String,required:!1,default:""},entityType:{type:String,required:!0,validator:e=>ae.includes(e)},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"}},emits:["loading","fetch:success","fetch:error","submit","cancel"],setup(e,{emit:n}){var E;const r=n,i=e,o=hn.useRouter(),{i18n:{t:l}}=O.useI18n(),{getMessageFromError:a}=O.useErrors(),{axiosInstance:c}=O.useAxios((E=i.config)==null?void 0:E.axiosRequestConfig),s=t.ref(!1),u=t.computed(()=>!!i.editId),f=t.ref(!1),d=t.ref(""),m=t.computed(()=>i.canSubmit===!1||i.isReadonly),p=t.ref(!1),C=t.computed(()=>{var g,h;let _=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"?_=_.replace(/{controlPlaneId}/gi,((g=i.config)==null?void 0:g.controlPlaneId)||""):i.config.app==="kongManager"&&(_=_.replace(/\/{workspace}/gi,(h=i.config)!=null&&h.workspace?`/${i.config.workspace}`:"")),i.editId?(_=_.replace(/{id}/gi,i.editId),_):(_=_.replace(/\/{id}/gi,""),_)}),y=()=>{p.value=!p.value},x=()=>{i.config.cancelRoute?o.push(i.config.cancelRoute):B()},B=()=>{r("cancel")},b=()=>{m.value||r("submit")},T=t.ref([{title:l("baseForm.configuration.json"),hash:"#json"},{title:l("baseForm.configuration.yaml"),hash:"#yaml"}]);return i.config.app==="konnect"&&i.entityType!==fe.Other&&T.value.splice(1,0,{title:l("baseForm.configuration.terraform"),hash:"#terraform"}),t.watch(()=>s.value,_=>{r("loading",_)},{immediate:!0}),t.onBeforeMount(async()=>{if(i.editId)try{f.value=!1,s.value=!0;const{data:_}=await c.get(C.value);r("fetch:success",_)}catch(_){const g=a(_);d.value=g.startsWith("code")?l("baseForm.errors.edit"):g,f.value=!0,r("fetch:error",_)}finally{s.value=!1}}),(_,g)=>{const h=t.resolveComponent("KSkeleton"),k=t.resolveComponent("KEmptyState"),w=t.resolveComponent("KAlert"),$=t.resolveComponent("KButton"),N=t.resolveComponent("KTabs"),I=t.resolveComponent("KSlideout");return t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.wrapperComponent),{class:"kong-ui-entity-base-form"},{default:t.withCtx(()=>[s.value?(t.openBlock(),t.createBlock(h,{key:0,type:"form"})):f.value?(t.openBlock(),t.createBlock(k,{key:1,"action-button-text":t.unref(l)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:x},{default:t.withCtx(()=>[t.createElementVNode("h3",null,t.toDisplayString(d.value),1)]),_:1},8,["action-button-text"])):(t.openBlock(),t.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:i.noValidate,onReset:t.withModifiers(B,["prevent"]),onSubmit:t.withModifiers(b,["prevent"])},[t.renderSlot(_.$slots,"default",{},void 0,!0),e.errorMessage?(t.openBlock(),t.createBlock(w,{key:0,appearance:"danger","data-testid":"form-error",message:e.errorMessage},null,8,["message"])):t.createCommentVNode("",!0),t.createElementVNode("div",vo,[t.renderSlot(_.$slots,"form-actions",{},()=>[t.createVNode($,{appearance:"tertiary","data-testid":`${e.entityType}-${u.value?"edit":"create"}-form-view-configuration`,onClick:g[0]||(g[0]=K=>y())},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),t.createVNode($,{appearance:"secondary","data-testid":`${e.entityType}-${u.value?"edit":"create"}-form-cancel`,disabled:e.isReadonly,type:"reset"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),t.createVNode($,{appearance:"primary","data-testid":`${e.entityType}-${u.value?"edit":"create"}-form-submit`,disabled:m.value,type:"submit"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(l)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)])],40,Mo)),t.createVNode(I,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":60,title:t.unref(l)("baseForm.configuration.title"),visible:p.value,onClose:g[1]||(g[1]=K=>y())},{default:t.withCtx(()=>[t.createElementVNode("div",null,t.toDisplayString(t.unref(l)("baseForm.configuration.message")),1),t.createVNode(N,{"data-testid":"form-view-configuration-slideout-tabs",tabs:T.value},{json:t.withCtx(()=>[t.createVNode(Be,{config:e.config,"entity-record":i.formFields,"fetcher-url":C.value,"request-method":i.editId?"put":"post"},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:t.withCtx(()=>[t.createVNode(je,{"entity-record":i.formFields},null,8,["entity-record"])]),terraform:t.withCtx(()=>[t.createVNode(Ue,{"entity-record":i.formFields,"entity-type":e.entityType},null,8,["entity-record","entity-type"])]),_:1},8,["tabs"])]),_:1},8,["title","visible"])]),_:3})}}}),[["__scopeId","data-v-6210a67a"]]),Uo=["data-truncate"],Po=Y(t.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(e){const n=e,r=t.computed(()=>{var x;return((x=n.rowEl)==null?void 0:x.querySelector(`[data-testid="${n.keyName}"]`))||null}),i=t.computed(()=>{var x;return((x=r.value)==null?void 0:x.querySelector('[data-truncate="true"]'))||null}),o=t.computed(()=>{var B,b;const x=(B=n.rowEl)==null?void 0:B.querySelectorAll("td");return x?((b=x[0])==null?void 0:b.getAttribute("data-testid"))===n.keyName:!0}),l=t.computed(()=>o.value||n.tooltip);let a;const c=()=>{a&&(a.disconnect(),a=void 0)},s=()=>{var B,b,T;let x=((B=r.value)==null?void 0:B.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const E=window.getComputedStyle(r.value);x-=(parseFloat(E.paddingLeft)||0)+(parseFloat(E.paddingRight)||0)}f.value=((b=i.value)==null?void 0:b.getBoundingClientRect().width)||0,d.value=x,m.value=((T=u.value)==null?void 0:T.innerText)||""},u=t.ref({}),f=t.ref(0),d=t.ref(0),m=t.ref(""),p=t.computed(()=>[i.value,r.value]),C=t.watch(p,x=>{if(l.value&&(c(),"ResizeObserver"in window&&window)){a=new ResizeObserver(B=>{window.requestAnimationFrame(()=>{!Array.isArray(B)||!B.length||s()})});for(const B of x)B&&a.observe(B)}},{immediate:!0,flush:"post",deep:!0}),y=t.computed(()=>l.value?f.value>d.value:!1);return t.onMounted(()=>{s()}),t.onUnmounted(()=>{C()}),(x,B)=>{const b=t.resolveComponent("KTooltip");return t.openBlock(),t.createElementBlock("span",{ref_key:"contentRef",ref:u,class:"content-wrapper"},[l.value?(t.openBlock(),t.createElementBlock("span",{key:0,"data-truncate":l.value||void 0},[t.createVNode(b,{"max-width":"300",placement:"bottom-start",text:y.value?m.value:""},{default:t.withCtx(()=>[t.renderSlot(x.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Uo)):t.renderSlot(x.$slots,"default",{key:1},void 0,!0)],512)}}}),[["__scopeId","data-v-b252463e"]]),qo={class:"toolbar-container"},Ho={key:0,class:"toolbar-button-container"},Yo=Y(t.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},rowKey:{type:[String,Function],default:"id"},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:null},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},disablePaginationPageJump:{type:Boolean,default:void 0},disableSorting:{type:Boolean,default:void 0},paginationType:{type:String,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:"",required:!0},defaultTablePreferences:{type:Object,default:null,required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1},hidePagination:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:void 0}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked"],setup(e,{emit:n}){const r=e,i=n,{i18n:{t:o}}=O.useI18n(),l=t.computed(()=>{var h,k;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(h=r.errorMessage)==null?void 0:h.title,message:(k=r.errorMessage)==null?void 0:k.message}}),a=t.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),c=t.computed(()=>{const h=[];return Object.keys(r.tableHeaders).forEach(w=>{const $=r.tableHeaders[w];h.push({label:$.label??w,key:w,sortable:$.sortable??!1,hidable:$.hidable??!0})}),r.enableEntityActions&&h.push({key:"actions",hideLabel:!0}),h}),s=h=>({"data-rowid":h.id,"data-testid":h.name,...r.rowAttributes(h)}),u=t.ref({}),f=h=>{var k;return(k=u.value)==null?void 0:k.$el.querySelector(`[data-rowid="${h.id}"]`)},d=h=>{const k={"data-testid":h.headerKey,...r.cellAttributes(h)};return h.colIndex===0&&(k.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),k},m=()=>{i("empty-state-cta-clicked"),p()},p=()=>{i("clear-search-input")},C=t.computed(()=>r.disableRowClick?void 0:(h,k)=>{i("click:row",k)}),y=h=>{i("sort",h)},{hideTableToolbar:x,handleStateChange:B}=O.useTableState(()=>r.query),{setTablePreferences:b,getTablePreferences:T}=bn(),E=t.ref(T(a.value,r.defaultTablePreferences)),_=t.computed(()=>{const h=T(a.value);return{...r.initialFetcherParams,...h}}),g=h=>{E.value=h,c.value.forEach(k=>{!("hidable"in k)||!E.value.columnVisibility||k.hidable===!1&&(E.value.columnVisibility[k.key]=!0)}),a.value&&b(a.value,h)};return(h,k)=>{const w=t.resolveComponent("KTableData"),$=t.resolveComponent("KCard");return t.openBlock(),t.createBlock($,{class:"kong-ui-entity-base-table",title:e.title,"title-tag":e.titleTag},{default:t.withCtx(()=>[t.createVNode(w,{ref_key:"tableRefs",ref:u,"cache-identifier":a.value,"cell-attrs":d,"client-sort":e.enableClientSort,"empty-state-action-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsCtaText"):e.emptyStateOptions.ctaText,"empty-state-action-route":e.query?void 0:e.emptyStateOptions.ctaPath,"empty-state-icon-variant":e.query?"search":"kong","empty-state-message":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsMessage"):e.emptyStateOptions.message,"empty-state-title":e.query?t.unref(o)("baseTable.emptyState.noSearchResultsTitle"):e.emptyStateOptions.title,error:l.value.hasError,"error-state-message":l.value.message,"error-state-title":l.value.title,fetcher:e.fetcher,"fetcher-cache-key":String(e.fetcherCacheKey),headers:c.value,"hide-pagination":e.hidePagination,"hide-pagination-when-optional":"","hide-toolbar":e.hideToolbar??t.unref(x),"initial-fetcher-params":_.value,loading:e.isLoading,"pagination-attributes":{disablePageJump:e.disablePaginationPageJump,offset:e.paginationType==="offset"},"resize-columns":"","row-attrs":s,"row-key":e.rowKey,"search-input":e.query,"sort-handler-function":e.enableClientSort?e.sortHandlerFunction:void 0,sortable:!e.disableSorting,"table-preferences":E.value,onEmptyStateActionClick:m,"onRow:click":C.value,onSort:k[0]||(k[0]=N=>y(N)),onState:t.unref(B),"onUpdate:tablePreferences":g},t.createSlots({toolbar:t.withCtx(()=>[t.createElementVNode("div",qo,[t.renderSlot(h.$slots,"toolbar-filter",{},void 0,!0),h.$slots["toolbar-button"]?(t.openBlock(),t.createElementBlock("div",Ho,[t.renderSlot(h.$slots,"toolbar-button",{},void 0,!0)])):t.createCommentVNode("",!0)])]),"action-items":t.withCtx(({row:N})=>[t.renderSlot(h.$slots,"actions",{row:N},void 0,!0)]),_:2},[t.renderList(e.tableHeaders,(N,I)=>({name:I,fn:t.withCtx(({row:K,rowKey:L,rowValue:V})=>[t.createVNode(Po,{"key-name":String(I),"row-el":f(K),tooltip:N.tooltip},{default:t.withCtx(()=>[t.renderSlot(h.$slots,I,{row:K,rowKey:L,rowValue:V},()=>[t.createTextVNode(t.toDisplayString(V),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),e.query?void 0:{name:"empty-state-action-icon",fn:t.withCtx(()=>[t.createVNode(t.unref(Z.AddIcon))]),key:"0"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click","onState"])]),_:3},8,["title","title-tag"])}}}),[["__scopeId","data-v-0998625e"]]),Wo={key:0,class:"kong-ui-entity-delete-error"},zo={key:1,class:"description"},Jo=Y(t.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0,default:!1},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18nT:r}=O.useI18n(),i=e,o=n,l=t.computed(()=>i.needConfirm?i.entityName:""),a=()=>{o("cancel")},c=()=>{o("proceed")};return(s,u)=>{const f=t.resolveComponent("KAlert"),d=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(d,{"action-button-appearance":"danger","action-button-disabled":e.actionPending,"action-button-text":"Yes, delete",class:"kong-ui-entity-delete-modal","confirmation-text":l.value,title:e.title,visible:e.visible,onCancel:a,onProceed:c},{default:t.withCtx(()=>[e.error?(t.openBlock(),t.createElementBlock("div",Wo,[t.createVNode(f,{appearance:"danger"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.error),1)]),_:1})])):t.createCommentVNode("",!0),t.createVNode(t.unref(r),{class:"message",keypath:i.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},t.createSlots({entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.entityType),1)]),_:2},[i.entityName?{name:"entityName",fn:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(i.entityName),1)]),key:"0"}:void 0]),1032,["keypath"]),i.description||s.$slots.description?(t.openBlock(),t.createElementBlock("div",zo,[t.renderSlot(s.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(i.description),1)],!0)])):t.createCommentVNode("",!0)]),_:3},8,["action-button-disabled","confirmation-text","title","visible"])}}}),[["__scopeId","data-v-4361d622"]]),Go={fill:"none",height:"20",viewBox:"0 0 20 20",width:"20",xmlns:"http://www.w3.org/2000/svg"},Qo={id:"mask0_180_20349",height:"20",maskUnits:"userSpaceOnUse",style:{"mask-type":"alpha"},width:"20",x:"0",y:"0"},Zo=["fill"],Xo={mask:"url(#mask0_180_20349)"},ea=["fill"],fn=t.defineComponent({__name:"IconFilter",props:{color:{type:String,default:`var(--kong-ui-entity-filter-color, ${jn})`}},setup(e){return(n,r)=>(t.openBlock(),t.createElementBlock("svg",Go,[t.createElementVNode("mask",Qo,[t.createElementVNode("rect",{fill:e.color,height:"20",width:"20"},null,8,Zo)]),t.createElementVNode("g",Xo,[t.createElementVNode("path",{d:"M8 14.5V13H12V14.5H8ZM5 10.75V9.25H15V10.75H5ZM3 7V5.5H17V7H3Z",fill:e.color},null,8,ea)])]))}}),ta={key:1,class:"kong-ui-entity-filter"},na={class:"kong-ui-entity-filter-menu"},ra=["data-testid"],ia=["onClick","onKeydown"],oa={class:"menu-item-indicator"},aa={class:"menu-item-body"},la=["for"],ca={class:"menu-item-buttons"},sa={class:"filter-clear-button-container"},da=Y(t.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:n}){const{i18n:{t:r}}=O.useI18n(),i=e,o=n,l=t.ref(!1),a=t.ref({}),c=t.ref(new Set),s=t.computed(()=>{const E=[];return new URLSearchParams(i.modelValue).forEach((_,g)=>{_!==""&&E.push(g)}),E}),u=t.computed(()=>{const E=i.config.fields;return Object.keys(E).filter(_=>{var g;return(g=E==null?void 0:E[_])==null?void 0:g.searchable}).map(_=>({label:E[_].label||_,value:_,expanded:!1}))});t.watch(()=>i.modelValue,E=>{a.value={},new URLSearchParams(E).forEach((_,g)=>{a.value[g]=_})});const f=()=>{l.value=!l.value},d=E=>{c.value.has(E)?c.value.delete(E):c.value.add(E)},m=E=>{o("update:modelValue",E)},p=()=>{m("")},C=E=>`filter-${E}`,y=E=>{var _,g;return(((g=(_=i.config.schema)==null?void 0:_[E])==null?void 0:g.values)??[]).map(h=>({value:h,label:h}))},x=E=>{var _,g;return((g=(_=i.config.schema)==null?void 0:_[E])==null?void 0:g.type)??"text"},B=E=>{a.value={...a.value,[E]:""},T()},b=()=>{a.value={},T(!0)},T=(E=!1)=>{const _=Object.keys(a.value).reduce((g,h)=>(a.value[h]&&(g[h]=`${a.value[h]}`),g),{});E&&(l.value=!1),o("update:modelValue",new URLSearchParams(_).toString())};return(E,_)=>{const g=t.resolveComponent("KInput"),h=t.resolveComponent("KButton"),k=t.resolveComponent("KSelect");return e.config.isExactMatch?(t.openBlock(),t.createBlock(g,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":e.modelValue,placeholder:e.config.placeholder,"onUpdate:modelValue":m},{before:t.withCtx(()=>[t.createVNode(fn)]),after:t.withCtx(()=>[t.withDirectives(t.createVNode(t.unref(Z.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:p},null,512),[[t.vShow,e.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(t.openBlock(),t.createElementBlock("div",ta,[t.createVNode(h,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:t.withCtx(()=>[t.createVNode(fn),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("filter.filterButtonText"))+" "+t.toDisplayString(s.value.length>0?`(${s.value.length})`:""),1)]),_:1}),t.withDirectives(t.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[t.vShow,l.value]]),t.withDirectives(t.createElementVNode("div",na,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,w=>{var $,N;return t.openBlock(),t.createElementBlock("div",{key:w.value,class:"kong-ui-entity-filter-menu-item","data-testid":w.value},[t.createElementVNode("span",{class:t.normalizeClass(["menu-item-title",{expanded:c.value.has(w.value)}]),role:"button",tabindex:"0",onClick:I=>d(w.value),onKeydown:t.withKeys(I=>d(w.value),["enter"])},[t.createTextVNode(t.toDisplayString(w.label)+" ",1),t.withDirectives(t.createElementVNode("span",oa,null,512),[[t.vShow,s.value.includes(w.value)]]),t.createVNode(t.unref(Z.ChevronDownIcon),{class:t.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(w.value)}]),color:t.unref(Pn)},null,8,["class","color"])],42,ia),t.withDirectives(t.createElementVNode("div",aa,[t.createElementVNode("label",{class:"menu-item-label",for:C(w.value)},t.toDisplayString(t.unref(r)("filter.fieldLabel")),9,la),((N=($=e.config.schema)==null?void 0:$[w.value])==null?void 0:N.type)==="select"?(t.openBlock(),t.createBlock(k,{key:0,id:C(w.value),modelValue:a.value[w.value],"onUpdate:modelValue":I=>a.value[w.value]=I,items:y(w.value),placeholder:t.unref(r)("filter.selectPlaceholder")},null,8,["id","modelValue","onUpdate:modelValue","items","placeholder"])):(t.openBlock(),t.createBlock(g,{key:1,id:C(w.value),modelValue:a.value[w.value],"onUpdate:modelValue":I=>a.value[w.value]=I,autocomplete:"off",placeholder:t.unref(r)("filter.inputPlaceholder"),type:x(w.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[t.vShow,c.value.has(w.value)]]),t.withDirectives(t.createElementVNode("div",ca,[t.createVNode(h,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:_[0]||(_[0]=I=>T(!0))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.applyButtonText")),1)]),_:1}),t.createVNode(h,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:I=>B(w.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearButtonText")),1)]),_:2},1032,["onClick"])],512),[[t.vShow,c.value.has(w.value)]])],8,ra)}),128)),t.createElementVNode("div",sa,[t.createVNode(h,{appearance:"tertiary",size:"small",onClick:b},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[t.vShow,l.value]])]))}}}),[["__scopeId","data-v-10fa27a5"]]),ua=t.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(e,{emit:n}){const{i18n:{t:r},i18nT:i}=O.useI18n(),o=e,l=n,a=t.ref(!1),c=t.computed(()=>o.action==="enable"?r("toggleModal.enable.title",{entityType:o.entityType}):r("toggleModal.disable.title",{entityType:o.entityType})),s=t.computed(()=>o.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),u=()=>l("cancel"),f=async()=>{if(o.onConfirm){a.value=!0;try{await o.onConfirm(),l("proceed")}catch(d){console.error(d)}finally{a.value=!1}}};return(d,m)=>{const p=t.resolveComponent("KPrompt");return t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(p,{"action-button-disabled":a.value,"action-button-text":s.value,"data-testid":`${e.entityType}-${e.entityId}-toggle-prompt`,title:c.value,visible:e.visible,onCancel:u,onProceed:f},{default:t.withCtx(()=>[t.createVNode(t.unref(i),{keypath:`toggleModal.${o.action}.message`,scope:"global"},{entityType:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.entityType),1)]),entityName:t.withCtx(()=>[t.createElementVNode("strong",null,t.toDisplayString(e.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),fa=t.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(e){const n=e,r=t.ref(void 0),i=t.computed(()=>r.value===!0||r.value!==void 0&&n.forceShow===!0);return t.watch(()=>n.authFunction,async()=>{r.value=await n.authFunction()},{immediate:!0}),(o,l)=>i.value?t.renderSlot(o.$slots,"default",{key:0,isAllowed:r.value}):t.createCommentVNode("",!0)}});for(var v=[],Pe=0;Pe<256;++Pe)v.push((Pe+256).toString(16).slice(1));function pa(e,n=0){return(v[e[n+0]]+v[e[n+1]]+v[e[n+2]]+v[e[n+3]]+"-"+v[e[n+4]]+v[e[n+5]]+"-"+v[e[n+6]]+v[e[n+7]]+"-"+v[e[n+8]]+v[e[n+9]]+"-"+v[e[n+10]]+v[e[n+11]]+v[e[n+12]]+v[e[n+13]]+v[e[n+14]]+v[e[n+15]]).toLowerCase()}var ke,ma=new Uint8Array(16);function ha(){if(!ke&&(ke=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ke))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ke(ma)}var ga=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const pn={randomUUID:ga};function ya(e,n,r){if(pn.randomUUID&&!n&&!e)return pn.randomUUID();e=e||{};var i=e.random||(e.rng||ha)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,pa(i)}const Ca=["aria-labelledby"],ba={class:"form-section-wrapper"},ka={key:1,class:"form-section-description"},xa={key:2,class:"form-section-footer"},wa={class:"form-section-content"},Sa=Y(t.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(e){const n=t.useSlots(),r=ya();return(i,o)=>(t.openBlock(),t.createElementBlock("div",{"aria-labelledby":e.title?t.unref(r):void 0,class:t.normalizeClass(["kong-ui-entity-form-section",{"has-divider":e.hasDivider}]),role:"group"},[t.createElementVNode("div",ba,[e.hideInfoHeader?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["form-section-info",{sticky:e.stickyInfoHeader}])},[e.title?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.titleTag),{key:0,id:t.unref(r),class:"form-section-title"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["id"])):t.createCommentVNode("",!0),e.description||t.unref(n).description?(t.openBlock(),t.createElementBlock("div",ka,[t.renderSlot(i.$slots,"description",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),t.unref(n).footer?(t.openBlock(),t.createElementBlock("div",xa,[t.renderSlot(i.$slots,"footer",{},void 0,!0)])):t.createCommentVNode("",!0)],2)),t.createElementVNode("div",wa,[t.renderSlot(i.$slots,"default",{},void 0,!0)])])],10,Ca))}}),[["__scopeId","data-v-b1f74200"]]),_a={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Aa={key:0,class:"deleted-entity"},Ba={key:1},Ea=["onClick"],Ta=Y(t.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(e){const n=e,r=t.ref(),{isTruncated:i}=O.useTruncationDetector(r),{i18n:{t:o}}=O.useI18n(),l=o("global.actions.copyId"),a=t.ref(l),c=t.computed(()=>n.entityLinkData.deleted??!1),s=t.computed(()=>{var d;return(d=n.entityLinkData.id)!=null&&d.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id}),u=t.computed(()=>{var d;return`${(d=s.value)==null?void 0:d.toString().slice(0,5)} (deleted)`}),f=async d=>{await d(s.value||"")&&(a.value=o("global.actions.copyToClipboard"),setTimeout(()=>{a.value=l},1800))};return(d,m)=>{const p=t.resolveComponent("KTooltip"),C=t.resolveComponent("KExternalLink"),y=t.resolveComponent("KClipboardProvider");return t.openBlock(),t.createElementBlock("div",_a,[c.value?(t.openBlock(),t.createElementBlock("div",Aa,t.toDisplayString(u.value),1)):s.value?s.value?(t.openBlock(),t.createBlock(C,{key:2,class:"entity-link","hide-icon":!e.newWindow,href:e.externalLink,target:e.newWindow?"_blank":"_self"},{default:t.withCtx(()=>[t.createVNode(p,{text:t.unref(i)&&e.entityLinkData.label||""},{default:t.withCtx(()=>[t.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},t.toDisplayString(e.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ba,t.toDisplayString(" – "))),s.value&&e.allowCopy?(t.openBlock(),t.createBlock(p,{key:a.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:a.value},{default:t.withCtx(()=>[t.createVNode(y,null,{default:t.withCtx(({copyToClipboard:x})=>[t.createElementVNode("span",{class:"entity-link-copy-id",onClick:t.withModifiers(B=>f(x),["stop"])},[t.createVNode(t.unref(Z.CopyIcon),{class:"copy-icon",color:t.unref(qn),"data-testid":"copy-id",size:t.unref(Yn)},null,8,["color","size"])],8,Ea)]),_:1})]),_:1},8,["text"])):t.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-2e2c07e5"]]),$a={class:"kong-ui-public-entity-empty-state"},Na={class:"entity-empty-state-content"},Ia={key:0,class:"empty-state-image"},Fa={key:1,class:"entity-empty-state-title"},Oa={key:2,class:"entity-empty-state-description"},La={key:3,class:"entity-empty-state-pricing"},Da={key:0,class:"entity-empty-state-message"},Va={key:1,class:"entity-empty-state-action"},Ra={class:"entity-empty-state-card-container"},Ka={key:0,class:"feature-icon"},Ma={class:"card-header"},va=["title"],ja=Y(t.defineComponent({__name:"EntityEmptyState",props:{title:{type:String,default:""},description:{type:String,default:""},pricing:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},actionButtonText:{type:String,default:""},learnMore:{type:Boolean,default:!1},features:{type:Array,default:()=>[]}},emits:["click:create","click:learn-more"],setup(e){const n=e,{i18n:{t:r}}=O.useI18n(),i=t.ref(!1),o=t.computed(()=>i.value&&!!n.actionButtonText);return t.onBeforeMount(async()=>{i.value=await n.canCreate()}),(l,a)=>{const c=t.resolveComponent("KCard");return t.openBlock(),t.createElementBlock("div",$a,[t.createElementVNode("div",Na,[l.$slots.image?(t.openBlock(),t.createElementBlock("div",Ia,[t.renderSlot(l.$slots,"image",{},void 0,!0)])):t.createCommentVNode("",!0),e.title||l.$slots.title?(t.openBlock(),t.createElementBlock("div",Fa,[t.createElementVNode("h1",null,[t.renderSlot(l.$slots,"title",{},()=>[t.createTextVNode(t.toDisplayString(e.title),1)],!0)])])):t.createCommentVNode("",!0),e.description||l.$slots.default?(t.openBlock(),t.createElementBlock("div",Oa,[t.renderSlot(l.$slots,"default",{},()=>[t.createElementVNode("p",null,t.toDisplayString(e.description),1)],!0)])):t.createCommentVNode("",!0),e.pricing||l.$slots.pricing?(t.openBlock(),t.createElementBlock("div",La,[t.createElementVNode("p",null,[t.createElementVNode("b",null,t.toDisplayString(t.unref(r)("emptyState.pricingTitle")),1),a[2]||(a[2]=t.createTextVNode()),t.renderSlot(l.$slots,"pricing",{},()=>[t.createTextVNode(t.toDisplayString(e.pricing),1)],!0)])])):t.createCommentVNode("",!0)]),l.$slots.message?(t.openBlock(),t.createElementBlock("div",Da,[t.renderSlot(l.$slots,"message",{},void 0,!0)])):t.createCommentVNode("",!0),o.value||e.learnMore||l.$slots.actions?(t.openBlock(),t.createElementBlock("div",Va,[t.renderSlot(l.$slots,"actions",{},()=>[o.value?(t.openBlock(),t.createBlock(t.unref(oe.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:"large",onClick:a[0]||(a[0]=s=>l.$emit("click:create"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Z.AddIcon)),t.createTextVNode(" "+t.toDisplayString(e.actionButtonText),1)]),_:1})):t.createCommentVNode("",!0),e.learnMore?(t.openBlock(),t.createBlock(t.unref(oe.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:"large",onClick:a[1]||(a[1]=s=>l.$emit("click:learn-more"))},{default:t.withCtx(()=>[t.createVNode(t.unref(Z.BookIcon),{decorative:""}),t.createTextVNode(" "+t.toDisplayString(t.unref(r)("emptyState.learnMore")),1)]),_:1})):t.createCommentVNode("",!0)],!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",Ra,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.features,(s,u)=>(t.openBlock(),t.createBlock(c,{key:s,class:"entity-empty-state-card"},{title:t.withCtx(()=>[l.$slots[`feature-${u}-icon`]?(t.openBlock(),t.createElementBlock("div",Ka,[t.renderSlot(l.$slots,`feature-${u}-icon`,{},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",Ma,t.toDisplayString(s.title),1)]),default:t.withCtx(()=>[t.createElementVNode("div",{title:s.description},t.toDisplayString(s.description),9,va)]),_:2},1024))),128))])])}}}),[["__scopeId","data-v-6f342249"]]),Ua={key:1},Pa=t.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(e){const n=e,r=t.computed(()=>{if(Array.isArray(n.tags))return n.tags;if(typeof n.tags=="string")try{const i=JSON.parse(n.tags);return Array.isArray(i)?i:[]}catch{return[]}return[]});return(i,o)=>{var l;return((l=r.value)==null?void 0:l.length)>0?(t.openBlock(),t.createBlock(t.unref(oe.KTruncate),{key:0},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value,a=>(t.openBlock(),t.createBlock(t.unref(oe.KBadge),{key:a,"max-width":e.tagMaxWidth,onClick:o[0]||(o[0]=t.withModifiers(()=>{},["stop"]))},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(t.openBlock(),t.createElementBlock("span",Ua,"-"))}}}),{useAxios:qa,useDeleteUrlBuilder:Ha,useErrors:Ya,useExternalLinkCreator:Wa,useFetchUrlBuilder:za,useFetcher:Ja,useFetcherCacheKey:Ga,useDebouncedFilter:Qa,useStringHelpers:Za,useHelpers:Xa,useGatewayFeatureSupported:el,useTruncationDetector:tl,useValidators:nl,useSchemaProvider:rl,useTableState:il}=O;A.ConfigCardDisplay=un,A.ConfigCardItem=Ae,A.ConfigurationSchemaSection=H,A.ConfigurationSchemaType=F,A.EntityBaseConfigCard=Ko,A.EntityBaseForm=jo,A.EntityBaseFormType=We,A.EntityBaseTable=Yo,A.EntityDeleteModal=Jo,A.EntityEmptyState=ja,A.EntityFilter=da,A.EntityFormSection=Sa,A.EntityLink=Ta,A.EntityToggleModal=ua,A.EntityTypes=Ye,A.FetcherStatus=z,A.InternalLinkItem=lt,A.JsonCodeBlock=Be,A.PermissionsWrapper=fa,A.SupportedEntityType=fe,A.SupportedEntityTypesArray=ae,A.TableTags=Pa,A.TerraformCodeBlock=Ue,A.YamlCodeBlock=je,A.useAxios=qa,A.useDebouncedFilter=Qa,A.useDeleteUrlBuilder=Ha,A.useErrors=Ya,A.useExternalLinkCreator=Wa,A.useFetchUrlBuilder=za,A.useFetcher=Ja,A.useFetcherCacheKey=Ga,A.useGatewayFeatureSupported=el,A.useHelpers=Xa,A.useSchemaProvider=rl,A.useStringHelpers=Za,A.useTableState=il,A.useTruncationDetector=tl,A.useValidators=nl,Object.defineProperty(A,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .config-card-fieldset[data-v-68ca83ec]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-68ca83ec]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-0998625e]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-0998625e]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-60e3ef7c]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-60e3ef7c]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-60e3ef7c] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-60e3ef7c]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-60e3ef7c]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-60e3ef7c]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-6f342249]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:32px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-6f342249]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-6f342249]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-6f342249]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-6f342249]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-6f342249],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-6f342249]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-6f342249],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-6f342249]{margin:6px}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-6f342249]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-6f342249]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-6f342249]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-6f342249]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-6f342249]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-6f342249] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-6f342249] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-6f342249] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}
1
+ .config-card-fieldset[data-v-f7096c33]{border:solid 1px #e0e4ea;border-radius:4px;margin-bottom:8px;margin-top:4px}.config-card-fieldset-title[data-v-f7096c33]{font-size:14px;padding:0 8px;width:auto}fieldset.config-card-fieldset .config-card-details-row{width:unset}.config-card-json-item .config-card-details-row,fieldset.config-card-fieldset .config-card-details-row{margin:0 16px}.config-card-json-item .config-card-details-row:last-of-type,fieldset.config-card-fieldset .config-card-details-row:last-of-type{border-bottom:none}[data-v-c96811e5] .k-button.navigation-button{font-size:14px;font-weight:400}.config-card-details-row[data-v-761f7e64]{align-items:center;border-bottom:var(--3ccdd5d2);box-sizing:border-box;display:var(--4b1da305);padding:16px 16px 16px 0;width:100%}.config-card-details-row .config-card-details-label[data-v-761f7e64]{box-sizing:border-box;padding-right:16px;width:var(--cd20788a)}.config-card-details-row .config-card-details-label label[data-v-761f7e64]{color:#3a3f51;display:inline-flex;max-width:100%}.config-card-details-row .config-card-details-label label .label-content[data-v-761f7e64]{line-height:initial;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-label label .k-popover[data-v-761f7e64]{min-width:0}.config-card-details-row .config-card-details-value[data-v-761f7e64]{box-sizing:border-box;width:var(--cd1becd4)}.config-card-details-row .config-card-details-value .truncated[data-v-761f7e64]{display:inline-block;line-height:initial;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.config-card-details-row .config-card-details-value span.attrs-data-text[data-v-761f7e64]{overflow-wrap:anywhere}.config-card-details-row .config-card-details-value .copy-uuid-array[data-v-761f7e64] .k-copy:not(:last-of-type){margin-bottom:8px}.config-card-details-row .config-card-details-value .method-badge-array[data-v-761f7e64]{display:flex;flex-wrap:wrap;row-gap:10px}.config-card-details-row .config-badge[data-v-761f7e64]{margin-right:4px}.config-card-details-row[data-v-761f7e64] .k-label{margin-bottom:0}.config-card-details-row[data-v-761f7e64] .k-label .kong-icon-infoFilled{display:flex}.config-card-details-row[data-v-761f7e64] .config-card-details-row{width:auto}.json-content.k-code-block{border-top-left-radius:0;border-top-right-radius:0}.json-endpoint{align-items:baseline;background-color:#000933;border-bottom:1px solid rgba(255,255,255,.2);border-top-left-radius:8px;border-top-right-radius:8px;display:flex;padding:8px 0 8px 12px}.json-endpoint .k-code-block{flex:auto;z-index:2}.json-endpoint .k-code-block .code-block-content{padding-bottom:0;padding-top:0}.json-endpoint .k-code-block .code-block-secondary-actions{margin-top:0!important}.json-endpoint code{direction:rtl;max-width:var(--454fa8c4);overflow:hidden!important;text-align:left;text-overflow:ellipsis;white-space:nowrap}.config-card-prop-section-title[data-v-d15be7fe]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card .config-card-actions[data-v-7ef5c755]{align-items:center;display:flex}.kong-ui-entity-base-config-card .config-card-actions .config-format-select-label[data-v-7ef5c755]{margin-bottom:0;margin-right:8px}.kong-ui-entity-base-config-card .config-card-prop-section-title[data-v-7ef5c755]{color:#000933;font-size:16px;font-weight:600;margin-bottom:16px;margin-top:48px}.kong-ui-entity-base-config-card[data-v-7ef5c755] .config-card-details-row:last-of-type{border-bottom:none}.kong-ui-entity-base-config-card .book-icon[data-v-7ef5c755]{margin-left:8px;padding:0}.kong-ui-entity-base-form[data-v-6210a67a]{box-sizing:border-box;max-width:1536px;width:100%}.kong-ui-entity-base-form .form-actions[data-v-6210a67a]{align-items:center;display:flex;justify-content:flex-end;margin-top:24px}.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:last-of-type,.kong-ui-entity-base-form .form-actions[data-v-6210a67a] .k-button:nth-last-of-type(2){margin-left:16px}.kong-ui-entity-base-form[data-v-6210a67a] .k-slideout-title{color:#000933!important;font-size:24px!important;font-weight:700!important;line-height:32px!important;margin-bottom:16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .k-card.content-card{padding:0 16px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item>div.tab-link.has-panels{color:#6c7489!important;font-size:14px!important;font-weight:700!important;line-height:24px!important}.kong-ui-entity-base-form[data-v-6210a67a] .tab-item.active>div.tab-link.has-panels{color:#000933!important;font-weight:600!important}.content-wrapper[data-v-b252463e] .k-tooltip{word-break:break-all}.kong-ui-entity-base-table .toolbar-container[data-v-0998625e]{align-items:center;display:flex;width:100%}.kong-ui-entity-base-table .toolbar-button-container[data-v-0998625e]{margin-left:auto}.kong-ui-entity-base-table :deep(.k-table){table-layout:fixed}.kong-ui-entity-delete-modal .message[data-v-4361d622],.kong-ui-entity-delete-modal .description[data-v-4361d622]{line-height:24px;margin:0}.kong-ui-entity-delete-modal .message strong[data-v-4361d622]{font-weight:600}.kong-ui-entity-delete-modal .description[data-v-4361d622]{margin-top:32px}.kong-ui-entity-delete-error[data-v-4361d622]{margin-bottom:16px}.kong-ui-entity-filter-input[data-v-10fa27a5]{width:100%}.kong-ui-entity-filter-clear[data-v-10fa27a5]{cursor:pointer}.kong-ui-entity-filter[data-v-10fa27a5]{display:flex;position:relative}.kong-ui-entity-filter[data-v-10fa27a5] .menu-content{flex-direction:column}.kong-ui-entity-filter[data-v-10fa27a5] .k-menu-item-divider hr{margin:12px 0}.kong-ui-entity-filter-backdrop[data-v-10fa27a5]{bottom:0;left:0;position:fixed;right:0;top:0;z-index:1050}.kong-ui-entity-filter-menu[data-v-10fa27a5]{background-color:#fff;border:1px solid #afb7c5;border-radius:4px;box-shadow:0 4px 20px #e0e4ea;left:0;margin-top:16px;padding:8px 0 12px;position:absolute;top:100%;width:300px;z-index:1060}.kong-ui-entity-filter-menu-item[data-v-10fa27a5]{border-bottom:1px solid #e0e4ea;color:#6c7489;font-size:12px;font-weight:400;line-height:16px;list-style:none;margin:0 20px;padding:16px 0;position:relative;white-space:nowrap}.menu-item-title[data-v-10fa27a5]{align-items:center;cursor:pointer;display:flex;line-height:24px}.menu-item-title.expanded[data-v-10fa27a5]{color:#232633}.menu-item-expand-icon[data-v-10fa27a5]{margin-left:auto}.menu-item-expand-icon.expanded[data-v-10fa27a5]{transform:rotate(180deg)}.menu-item-indicator[data-v-10fa27a5]{background-color:#0044f4;border-radius:50%;height:4px;margin-left:4px;width:4px}.menu-item-body[data-v-10fa27a5]{align-items:center;display:flex;justify-content:space-between;margin-top:16px}.menu-item-body[data-v-10fa27a5] .input{padding-bottom:4px!important;padding-top:4px!important}.menu-item-body[data-v-10fa27a5] .k-input{width:100%}.menu-item-body[data-v-10fa27a5] .k-select-input .input{font-size:12px}.menu-item-body[data-v-10fa27a5] .k-select-input .input::placeholder{color:#00000073!important;font-size:12px}.menu-item-label[data-v-10fa27a5]{margin-bottom:0;margin-right:12px}.menu-item-buttons[data-v-10fa27a5]{display:flex;justify-content:space-between;margin:10px 0 6px}.filter-clear-button-container[data-v-10fa27a5]{padding:12px 20px 0}fieldset[data-v-b1f74200]{margin:0;min-width:0;padding:0}.kong-ui-entity-form-section[data-v-b1f74200]{border:0}.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{column-gap:16px;display:flex;flex-direction:column;padding-bottom:64px;row-gap:12px;width:100%}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper[data-v-b1f74200]{flex-direction:row}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{flex:1}@media (min-width: 1024px){.kong-ui-entity-form-section .form-section-wrapper .form-section-info[data-v-b1f74200]{max-width:350px}.kong-ui-entity-form-section .form-section-wrapper .form-section-info.sticky[data-v-b1f74200]{height:fit-content;margin-bottom:16px;position:sticky;top:16px}}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-title[data-v-b1f74200]{color:#000933;font-size:16px;font-weight:700;line-height:20px;margin-bottom:8px;margin-top:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description p[data-v-b1f74200],.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-description[data-v-b1f74200] p{color:#000933;font-size:14px;font-weight:400;line-height:20px;margin:0}.kong-ui-entity-form-section .form-section-wrapper .form-section-info .form-section-footer[data-v-b1f74200]{margin-top:32px}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]{flex:1}.kong-ui-entity-form-section .form-section-wrapper .form-section-content[data-v-b1f74200]>*:not(:first-child){margin-top:24px}.kong-ui-entity-form-section.has-divider .form-section-wrapper[data-v-b1f74200]{border-bottom:1px solid #e0e4ea}.kong-ui-public-entity-link[data-v-2e2c07e5]{align-items:center;display:flex}.kong-ui-public-entity-link .deleted-entity[data-v-2e2c07e5]{font-style:italic}.kong-ui-public-entity-link .entity-link[data-v-2e2c07e5]{display:flex}.kong-ui-public-entity-link .entity-link[data-v-2e2c07e5] .external-link-icon{color:#0044f4;margin-left:4px;padding:2px}.kong-ui-public-entity-link .entity-link-label[data-v-2e2c07e5]{display:inline-block;font-weight:400;max-width:20ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kong-ui-public-entity-link .copy-uuid-tooltip[data-v-2e2c07e5]{align-items:center;cursor:pointer;display:flex}.kong-ui-public-entity-link .copy-uuid-tooltip .entity-link-copy-id[data-v-2e2c07e5]{margin-left:2px}.kong-ui-public-entity-empty-state[data-v-6f342249]{align-items:center;background-color:#fff;box-sizing:border-box;display:flex;flex-direction:column;font-family:Inter,Roboto,Helvetica,sans-serif;gap:32px;padding:64px 0;width:100%}@media (min-width: 640px){.kong-ui-public-entity-empty-state[data-v-6f342249]{padding:64px 96px}}.kong-ui-public-entity-empty-state .empty-state-image[data-v-6f342249]{margin-bottom:8px}.kong-ui-public-entity-empty-state .entity-empty-state-content[data-v-6f342249]{align-items:center;display:flex;flex-direction:column;gap:8px;text-align:center;width:100%}.kong-ui-public-entity-empty-state .entity-empty-state-content .entity-empty-state-title h1[data-v-6f342249]{align-items:center;color:#000933;display:flex;font-size:24px;font-weight:700;gap:8px;line-height:32px;margin:0}.kong-ui-public-entity-empty-state .entity-empty-state-description[data-v-6f342249],.kong-ui-public-entity-empty-state .entity-empty-state-pricing[data-v-6f342249]{color:#52596e;font-size:14px;font-weight:400;line-height:20px;max-width:640px}.kong-ui-public-entity-empty-state .entity-empty-state-description p[data-v-6f342249],.kong-ui-public-entity-empty-state .entity-empty-state-pricing p[data-v-6f342249]{margin:6px}.kong-ui-public-entity-empty-state .entity-empty-state-action[data-v-6f342249]{align-items:center;display:flex;gap:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-6f342249]{display:flex;flex-wrap:wrap;gap:16px;justify-content:space-around;width:312px}@media (min-width: 640px){.kong-ui-public-entity-empty-state .entity-empty-state-card-container[data-v-6f342249]{width:640px}}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-6f342249]{background-color:#f9fafb;border:1px solid #e0e4ea;border-radius:6px;color:#afb7c5;gap:8px;height:160px;padding:20px;width:312px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-6f342249]{color:#3a3f51;display:flex;margin-bottom:12px}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card .feature-icon[data-v-6f342249] .kui-icon{height:20px!important;width:20px!important}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-6f342249] .card-title{font-size:14px;font-weight:600}.kong-ui-public-entity-empty-state .entity-empty-state-card-container .entity-empty-state-card[data-v-6f342249] .card-content{-webkit-box-orient:vertical;color:#6c7489;display:-webkit-box;-webkit-line-clamp:3;line-clamp:3;overflow:hidden}
@@ -1 +1 @@
1
- {"version":3,"file":"JsonCardItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/JsonCardItem.vue"],"names":[],"mappings":"AAwGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;;;cAmKzB,QAAQ,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;;;;;;;;;;cAA1C,QAAQ,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;AAP9D,wBAmBG"}
1
+ {"version":3,"file":"JsonCardItem.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-base-config-card/JsonCardItem.vue"],"names":[],"mappings":"AAyGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;;;cAmKzB,QAAQ,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;;;;;;;;;;cAA1C,QAAQ,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;;;;;;;;;;;;;;;AAP9D,wBAmBG"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-link/EntityLink.vue"],"names":[],"mappings":"AAsKA,OAAO,KAAK,EAAE,QAAQ,EAAO,MAAM,KAAK,CAAA;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;;;cAuP7B,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;cAAxB,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAP5C,wBA0BG"}
1
+ {"version":3,"file":"EntityLink.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/entity-link/EntityLink.vue"],"names":[],"mappings":"AAuKA,OAAO,KAAK,EAAE,QAAQ,EAAO,MAAM,KAAK,CAAA;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;;;cAuP7B,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;cAAxB,QAAQ,CAAC,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;AAP5C,wBA0BG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kong-ui-public/entities-shared",
3
- "version": "3.14.2",
3
+ "version": "3.14.3",
4
4
  "type": "module",
5
5
  "main": "./dist/entities-shared.umd.js",
6
6
  "module": "./dist/entities-shared.es.js",