@kong-ui-public/entities-shared 3.59.2-pr.3642.c9df003fa.0 → 3.59.2

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.
@@ -29,7 +29,7 @@
29
29
  `+o.slice(b,w),b=w+1),T=F;return K+=`
30
30
  `,o.length-b>m&&T>b?K+=o.slice(b,T)+`
31
31
  `+o.slice(T+1):K+=o.slice(b),K.slice(1)}function je(o){let m="",E=0;for(let C=0;C<o.length;E>=65536?C+=2:C++){E=ve(o,C);const b=oe[E];!b&&he(E)?(m+=o[C],E>=65536&&(m+=o[C+1])):m+=b||pe(E)}return m}function Fe(o,m,E){let C="";const b=o.tag;for(let w=0,T=E.length;w<T;w+=1){let F=E[w];o.replacer&&(F=o.replacer.call(E,String(w),F)),(k(o,m,F,!1,!1)||typeof F>"u"&&k(o,m,null,!1,!1))&&(C!==""&&(C+=","+(o.condenseFlow?"":" ")),C+=o.dump)}o.tag=b,o.dump="["+C+"]"}function Le(o,m,E,C){let b="";const w=o.tag;for(let T=0,F=E.length;T<F;T+=1){let K=E[T];o.replacer&&(K=o.replacer.call(E,String(T),K)),(k(o,m+1,K,!0,!0,!1,!0)||typeof K>"u"&&k(o,m+1,null,!0,!0,!1,!0))&&((!C||b!=="")&&(b+=X(o,m)),o.dump&&u===o.dump.charCodeAt(0)?b+="-":b+="- ",b+=o.dump)}o.tag=w,o.dump=b||"[]"}function Ue(o,m,E){let C="";const b=o.tag,w=Object.keys(E);for(let T=0,F=w.length;T<F;T+=1){let K="";C!==""&&(K+=", "),o.condenseFlow&&(K+='"');const U=w[T];let z=E[U];o.replacer&&(z=o.replacer.call(E,U,z)),k(o,m,U,!1,!1)&&(o.dump.length>1024&&(K+="? "),K+=o.dump+(o.condenseFlow?'"':"")+":"+(o.condenseFlow?"":" "),k(o,m,z,!1,!1)&&(K+=o.dump,C+=K))}o.tag=b,o.dump="{"+C+"}"}function t(o,m,E,C){let b="";const w=o.tag,T=Object.keys(E);if(o.sortKeys===!0)T.sort();else if(typeof o.sortKeys=="function")T.sort(o.sortKeys);else if(o.sortKeys)throw new r("sortKeys must be a boolean or a function");for(let F=0,K=T.length;F<K;F+=1){let U="";(!C||b!=="")&&(U+=X(o,m));const z=T[F];let ee=E[z];if(o.replacer&&(ee=o.replacer.call(E,z,ee)),!k(o,m+1,z,!0,!0,!0))continue;const re=o.tag!==null&&o.tag!=="?"||o.dump&&o.dump.length>1024;re&&(o.dump&&u===o.dump.charCodeAt(0)?U+="?":U+="? "),U+=o.dump,re&&(U+=X(o,m)),k(o,m+1,ee,!0,re)&&(o.dump&&u===o.dump.charCodeAt(0)?U+=":":U+=": ",U+=o.dump,b+=U)}o.tag=w,o.dump=b||"{}"}function p(o,m,E){const C=E?o.explicitTypes:o.implicitTypes;for(let b=0,w=C.length;b<w;b+=1){const T=C[b];if((T.instanceOf||T.predicate)&&(!T.instanceOf||typeof m=="object"&&m instanceof T.instanceOf)&&(!T.predicate||T.predicate(m))){if(E?T.multi&&T.representName?o.tag=T.representName(m):o.tag=T.tag:o.tag="?",T.represent){const F=o.styleMap[T.tag]||T.defaultStyle;let K;if(d.call(T.represent)==="[object Function]")K=T.represent(m,F);else if(l.call(T.represent,F))K=T.represent[F](m,F);else throw new r("!<"+T.tag+'> tag resolver accepts not "'+F+'" style');o.dump=K}return!0}}return!1}function k(o,m,E,C,b,w,T){o.tag=null,o.dump=E,p(o,E,!1)||p(o,E,!0);const F=d.call(o.dump),K=C;C&&(C=o.flowLevel<0||o.flowLevel>m);const U=F==="[object Object]"||F==="[object Array]";let z,ee;if(U&&(z=o.duplicates.indexOf(E),ee=z!==-1),(o.tag!==null&&o.tag!=="?"||ee||o.indent!==2&&m>0)&&(b=!1),ee&&o.usedDuplicates[z])o.dump="*ref_"+z;else{if(U&&ee&&!o.usedDuplicates[z]&&(o.usedDuplicates[z]=!0),F==="[object Object]")C&&Object.keys(o.dump).length!==0?(t(o,m,o.dump,b),ee&&(o.dump="&ref_"+z+o.dump)):(Ue(o,m,o.dump),ee&&(o.dump="&ref_"+z+" "+o.dump));else if(F==="[object Array]")C&&o.dump.length!==0?(o.noArrayIndent&&!T&&m>0?Le(o,m-1,o.dump,b):Le(o,m,o.dump,b),ee&&(o.dump="&ref_"+z+o.dump)):(Fe(o,m,o.dump),ee&&(o.dump="&ref_"+z+" "+o.dump));else if(F==="[object String]")o.tag!=="?"&&qe(o,o.dump,m,w,K);else{if(F==="[object Undefined]")return!1;if(o.skipInvalid)return!1;throw new r("unacceptable kind of an object to dump "+F)}if(o.tag!==null&&o.tag!=="?"){let re=encodeURI(o.tag[0]==="!"?o.tag.slice(1):o.tag).replace(/!/g,"%21");o.tag[0]==="!"?re="!"+re:re.slice(0,18)==="tag:yaml.org,2002:"?re="!!"+re.slice(18):re="!<"+re+">",o.dump=re+" "+o.dump}}return!0}function S(o,m){const E=[],C=[];v(o,E,C);const b=C.length;for(let w=0;w<b;w+=1)m.duplicates.push(E[C[w]]);m.usedDuplicates=new Array(b)}function v(o,m,E){if(o!==null&&typeof o=="object"){const C=m.indexOf(o);if(C!==-1)E.indexOf(C)===-1&&E.push(C);else if(m.push(o),Array.isArray(o))for(let b=0,w=o.length;b<w;b+=1)v(o[b],m,E);else{const b=Object.keys(o);for(let w=0,T=b.length;w<T;w+=1)v(o[b[w]],m,E)}}}function I(o,m){m=m||{};const E=new Q(m);E.noRefs||S(o,E);let C=o;return E.replacer&&(C=E.replacer.call({"":C},"",C)),k(E,0,C,!0,!0)?E.dump+`
32
- `:""}return pt.dump=I,pt}var Gt;function oo(){if(Gt)return de;Gt=1;const n=to(),r=no();function i(d,l){return function(){throw new Error("Function yaml."+d+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}return de.Type=fe(),de.Schema=on(),de.FAILSAFE_SCHEMA=cn(),de.JSON_SCHEMA=pn(),de.CORE_SCHEMA=mn(),de.DEFAULT_SCHEMA=vt(),de.load=n.load,de.loadAll=n.loadAll,de.dump=r.dump,de.YAMLException=_e(),de.types={binary:hn(),float:fn(),map:an(),null:sn(),pairs:kn(),set:Cn(),timestamp:yn(),bool:un(),int:dn(),merge:gn(),omap:vn(),seq:ln(),str:rn()},de.safeLoad=i("safeLoad","load"),de.safeLoadAll=i("safeLoadAll","loadAll"),de.safeDump=i("safeDump","dump"),de}var io=oo();const kt=Zn(io),{Type:br,Schema:Sr,FAILSAFE_SCHEMA:Br,JSON_SCHEMA:Tr,CORE_SCHEMA:Ar,DEFAULT_SCHEMA:Er,load:wr,loadAll:xr,dump:Nr,YAMLException:_r,types:Ir,safeLoad:$r,safeLoadAll:Or,safeDump:Vr}=kt,ro=e.defineComponent({__name:"DeckCallout",emits:["click-cta","dismiss"],setup(n){const{i18n:{t:r},i18nT:i}=g.composables.useI18n();return(d,l)=>{const s=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(s,{class:"deck-callout",dismissible:"",onDismiss:l[1]||(l[1]=a=>d.$emit("dismiss"))},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{keypath:"deckCallout.body"},{cta:e.withCtx(()=>[e.createElementVNode("button",{class:"cta",type:"button",onClick:l[0]||(l[0]=a=>d.$emit("click-cta"))},e.toDisplayString(e.unref(r)("deckCallout.cta")),1)]),_:1})]),_:1})}}}),lo=g._export_sfc(ro,[["__scopeId","data-v-0bf1334c"]]),Ct=e.defineComponent({inheritAttrs:!1,__name:"YamlCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},deckCalloutPreferenceKey:{type:String,required:!1,default:""}},emits:["deck-callout:click-cta","deck-callout:dismiss"],setup(n,{emit:r}){const i=n,d=r,l=e.ref("visible"),s=c=>{const f=Object.fromEntries(Object.entries(c).filter(([,h])=>h!==null&&h!==""&&(Array.isArray(h)?h.length!==0:!0)));return Object.keys(f).length===0&&f.constructor===Object?"":kt.dump(f).trim()},a=e.computed(()=>s(i.entityRecord)),u=e.computed(()=>s(i.unredactedRecord||i.entityRecord));e.watch(()=>i.deckCalloutPreferenceKey,c=>{if(c){const f=localStorage.getItem(c);l.value=f==="dismissed"?"dismissed":"visible"}},{immediate:!0}),e.watch(l,c=>{const f=i.deckCalloutPreferenceKey;f&&localStorage.setItem(f,c)});function y(){l.value="dismissed",d("deck-callout:dismiss")}return(c,f)=>{const h=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.deckCalloutPreferenceKey&&l.value==="visible"?(e.openBlock(),e.createBlock(lo,{key:0,onClickCta:f[0]||(f[0]=N=>c.$emit("deck-callout:click-cta")),onDismiss:f[1]||(f[1]=N=>y())})):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({class:"yaml-config config-card-code-block"},c.$attrs),[i.entityRecord?(e.openBlock(),e.createBlock(h,{key:0,id:"yaml-codeblock",code:a.value,"copy-code":u.value,"data-dd-privacy":"mask",language:"yaml","max-height":e.unref(g.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["code","copy-code","max-height","onCodeBlockRender"])):e.createCommentVNode("",!0)],16)],64)}}}),ao={class:"terraform-config config-card-code-block"},ae=" ",Wt="TF_MULTILINE_EOT",mt="cloud_gateway_addon",bt=e.defineComponent({__name:"TerraformCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},credentialType:{type:String,default:""},subEntityType:{type:String,default:""}},setup(n){const r=n,i=e.computed(()=>{const B=r.entityRecord;if(!B||typeof B!="object")return!1;const _=B.config;return!_||typeof _!="object"?!1:typeof _.managed_cache<"u"||typeof _.capacity_config<"u"}),d=e.computed(()=>typeof r.entityType=="string"&&r.entityType.length>0?r.entityType:i.value?mt:g.SupportedEntityType.Partial),l=e.computed(()=>g.EventGatewayTypesArray.includes(d.value)),s=e.computed(()=>g.IdentityTypesArray.includes(d.value)),a=(B,_)=>{if(B.includes(`
32
+ `:""}return pt.dump=I,pt}var Gt;function oo(){if(Gt)return de;Gt=1;const n=to(),r=no();function i(d,l){return function(){throw new Error("Function yaml."+d+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}return de.Type=fe(),de.Schema=on(),de.FAILSAFE_SCHEMA=cn(),de.JSON_SCHEMA=pn(),de.CORE_SCHEMA=mn(),de.DEFAULT_SCHEMA=vt(),de.load=n.load,de.loadAll=n.loadAll,de.dump=r.dump,de.YAMLException=_e(),de.types={binary:hn(),float:fn(),map:an(),null:sn(),pairs:kn(),set:Cn(),timestamp:yn(),bool:un(),int:dn(),merge:gn(),omap:vn(),seq:ln(),str:rn()},de.safeLoad=i("safeLoad","load"),de.safeLoadAll=i("safeLoadAll","loadAll"),de.safeDump=i("safeDump","dump"),de}var io=oo();const kt=Zn(io),{Type:Cr,Schema:br,FAILSAFE_SCHEMA:Sr,JSON_SCHEMA:Br,CORE_SCHEMA:Tr,DEFAULT_SCHEMA:Ar,load:Er,loadAll:wr,dump:xr,YAMLException:Nr,types:_r,safeLoad:Ir,safeLoadAll:$r,safeDump:Or}=kt,ro=e.defineComponent({__name:"DeckCallout",emits:["click-cta","dismiss"],setup(n){const{i18n:{t:r},i18nT:i}=g.composables.useI18n();return(d,l)=>{const s=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(s,{class:"deck-callout",dismissible:"",onDismiss:l[1]||(l[1]=a=>d.$emit("dismiss"))},{default:e.withCtx(()=>[e.createVNode(e.unref(i),{keypath:"deckCallout.body"},{cta:e.withCtx(()=>[e.createElementVNode("button",{class:"cta",type:"button",onClick:l[0]||(l[0]=a=>d.$emit("click-cta"))},e.toDisplayString(e.unref(r)("deckCallout.cta")),1)]),_:1})]),_:1})}}}),lo=g._export_sfc(ro,[["__scopeId","data-v-0bf1334c"]]),Ct=e.defineComponent({inheritAttrs:!1,__name:"YamlCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},deckCalloutPreferenceKey:{type:String,required:!1,default:""}},emits:["deck-callout:click-cta","deck-callout:dismiss"],setup(n,{emit:r}){const i=n,d=r,l=e.ref("visible"),s=c=>{const f=Object.fromEntries(Object.entries(c).filter(([,h])=>h!==null&&h!==""&&(Array.isArray(h)?h.length!==0:!0)));return Object.keys(f).length===0&&f.constructor===Object?"":kt.dump(f).trim()},a=e.computed(()=>s(i.entityRecord)),u=e.computed(()=>s(i.unredactedRecord||i.entityRecord));e.watch(()=>i.deckCalloutPreferenceKey,c=>{if(c){const f=localStorage.getItem(c);l.value=f==="dismissed"?"dismissed":"visible"}},{immediate:!0}),e.watch(l,c=>{const f=i.deckCalloutPreferenceKey;f&&localStorage.setItem(f,c)});function y(){l.value="dismissed",d("deck-callout:dismiss")}return(c,f)=>{const h=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.deckCalloutPreferenceKey&&l.value==="visible"?(e.openBlock(),e.createBlock(lo,{key:0,onClickCta:f[0]||(f[0]=N=>c.$emit("deck-callout:click-cta")),onDismiss:f[1]||(f[1]=N=>y())})):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({class:"yaml-config config-card-code-block"},c.$attrs),[i.entityRecord?(e.openBlock(),e.createBlock(h,{key:0,id:"yaml-codeblock",code:a.value,"copy-code":u.value,"data-dd-privacy":"mask",language:"yaml","max-height":e.unref(g.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["code","copy-code","max-height","onCodeBlockRender"])):e.createCommentVNode("",!0)],16)],64)}}}),ao={class:"terraform-config config-card-code-block"},ae=" ",Wt="TF_MULTILINE_EOT",mt="cloud_gateway_addon",bt=e.defineComponent({__name:"TerraformCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},credentialType:{type:String,default:""},subEntityType:{type:String,default:""}},setup(n){const r=n,i=e.computed(()=>{const B=r.entityRecord;if(!B||typeof B!="object")return!1;const _=B.config;return!_||typeof _!="object"?!1:typeof _.managed_cache<"u"||typeof _.capacity_config<"u"}),d=e.computed(()=>typeof r.entityType=="string"&&r.entityType.length>0?r.entityType:i.value?mt:g.SupportedEntityType.Partial),l=e.computed(()=>g.EventGatewayTypesArray.includes(d.value)),s=e.computed(()=>g.IdentityTypesArray.includes(d.value)),a=(B,_)=>{if(B.includes(`
33
33
  `)){const A=_+ae,x=B.split(`
34
34
  `).map(D=>`${A}${D}`).join(`
35
35
  `);return`<<-${Wt}
@@ -66,5 +66,5 @@ ${B.value}
66
66
  ${W.value}
67
67
  '@ | ${A}`,y.value=`@'
68
68
  ${B.value}
69
- '@ | ${A}`)}),(A,x)=>{const D=e.resolveComponent("KSelect"),H=e.resolveComponent("KBadge"),ne=e.resolveComponent("KCodeBlock"),L=e.resolveComponent("KAlert"),q=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"deck-config config-card-code-block"},A.$attrs),[e.createVNode(D,{modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=V=>h.value=V),items:f},{"item-template":e.withCtx(({item:V})=>[V.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(ce.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(ce.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(V.label),1)]),"selected-item-template":e.withCtx(({item:V})=>[V.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(ce.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(ce.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(V.label),1)]),_:1},8,["modelValue"]),e.createElementVNode("div",so,e.toDisplayString(e.unref(s)("deckCodeBlock.steps.step_1")),1),n.isCustomizing?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(l),{key:0,"data-testid":`deck-hint-${n.app}`,keypath:`deckCodeBlock.hint.${n.app}`,tag:"p"},e.createSlots({link:e.withCtx(()=>[e.createVNode(e.unref(Te.KExternalLink),{href:n.app==="konnect"?"https://developer.konghq.com/deck/get-started/":"https://developer.konghq.com/deck/gateway/configuration/"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d).t("deckCodeBlock.documentation")),1)]),_:1},8,["href"])]),_:2},[n.app==="konnect"?{name:"token",fn:e.withCtx(()=>[e.createVNode(H,null,{default:e.withCtx(()=>[...x[4]||(x[4]=[e.createTextVNode("DECK_KONNECT_TOKEN",-1)])]),_:1})]),key:"0"}:void 0]),1032,["data-testid","keypath"])),n.app==="konnect"?(e.openBlock(),e.createBlock(ne,{key:1,id:"deck-env-codeblock",class:e.normalizeClass({customization:i.isCustomizing}),code:_.value,language:h.value,"single-line":"",theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","language","theme","onCodeBlockRender"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(L,{key:2,class:"copy-konnect-pat-alert"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("deckCodeBlock.customization.copy_pat")),1)]),_:1})):i.isCustomizing&&i.generateKonnectPat?(e.openBlock(),e.createElementBlock("div",uo,[e.createVNode(q,{appearance:"secondary","data-testid":"generate-konnect-pat-button",onClick:x[1]||(x[1]=V=>c.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("deckCodeBlock.customization.generate_pat")),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(s)("deckCodeBlock.customization.reuse_pat")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",fo,e.toDisplayString(e.unref(s)("deckCodeBlock.steps.step_2")),1),i.entityRecord&&!i.isCustomizing?(e.openBlock(),e.createBlock(ne,{key:4,id:"deck-codeblock",class:e.normalizeClass({customization:i.isCustomizing}),code:u.value,"copy-code":y.value,"data-dd-privacy":"mask",language:h.value,"max-height":e.unref(g.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","copy-code","language","max-height","theme","onCodeBlockRender"])):i.entityRecord&&i.isCustomizing&&e.unref(r)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("div",po,e.toDisplayString(e.unref(s)("deckCodeBlock.customization.secret_advise")),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{modelValue:y.value,"onUpdate:modelValue":x[2]||(x[2]=V=>y.value=V),language:h.value},null,8,["modelValue","language"])),e.createVNode(L,{class:"customization-footer-reminder"},{icon:e.withCtx(()=>[e.createVNode(e.unref(ce.InfoIcon))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(s)("deckCodeBlock.customization.footer_reminder")),1)]),_:1})],64)):e.createCommentVNode("",!0)],16),i.isCustomizing&&i.generateKonnectPat?(e.openBlock(),e.createBlock(bn,{key:0,"generate-konnect-pat":i.generateKonnectPat,visible:c.value,onDismiss:x[3]||(x[3]=V=>c.value=!1),onGenerated:P},null,8,["generate-konnect-pat","visible"])):e.createCommentVNode("",!0)],64)}}}),Jt=g._export_sfc(mo,[["__scopeId","data-v-a158b294"]]),St=e.defineComponent({inheritAttrs:!1,__name:"DeckCodeBlock",props:{app:{},entityRecord:{},unredactedRecord:{},entityType:{},geoApiServerUrl:{},controlPlaneName:{},kongAdminApiUrl:{},workspace:{},customizationOptions:{type:[Boolean,Object]},isCustomizationModalVisible:{type:Boolean}},emits:["customization-close"],setup(n){const r=n,{i18n:{t:i}}=g.composables.useI18n(),d=e.computed(()=>{if(r.app==="konnect"&&r.customizationOptions&&typeof r.customizationOptions!="boolean")return r.customizationOptions.generateKonnectPat});return(l,s)=>{const a=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.entityRecord?(e.openBlock(),e.createBlock(Jt,e.mergeProps({key:0},l.$attrs,{app:r.app,"control-plane-name":r.app==="konnect"?r.controlPlaneName:void 0,"entity-record":r.entityRecord,"entity-type":r.entityType,"geo-api-server-url":r.app==="konnect"?r.geoApiServerUrl:void 0,"kong-admin-api-url":r.app==="kongManager"?r.kongAdminApiUrl:void 0,"unredacted-record":r.unredactedRecord,workspace:r.workspace||void 0}),null,16,["app","control-plane-name","entity-record","entity-type","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0),r.entityRecord?(e.openBlock(),e.createBlock(a,{key:1,"action-button-appearance":"tertiary","action-button-text":e.unref(i)("baseConfigCard.actions.deck_customize_cancel"),"hide-cancel-button":"","max-width":"640px",title:e.unref(i)("deckCodeBlock.customization.title"),visible:r.isCustomizationModalVisible,onCancel:s[0]||(s[0]=u=>l.$emit("customization-close")),onProceed:s[1]||(s[1]=u=>l.$emit("customization-close"))},{default:e.withCtx(()=>[e.createVNode(Jt,{app:r.app,"control-plane-name":r.app==="konnect"?r.controlPlaneName:void 0,"entity-record":r.entityRecord,"entity-type":r.entityType,"generate-konnect-pat":d.value,"geo-api-server-url":r.app==="konnect"?r.geoApiServerUrl:void 0,"is-customizing":"","kong-admin-api-url":r.app==="kongManager"?r.kongAdminApiUrl:void 0,"unredacted-record":r.unredactedRecord,workspace:r.workspace||void 0},null,8,["app","control-plane-name","entity-record","entity-type","generate-konnect-pat","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])]),_:1},8,["action-button-text","title","visible"])):e.createCommentVNode("",!0)],64)}}}),yo={key:0,class:"config-card-display-form"},go=["data-testid"],ho={key:0,class:"config-card-prop-section-title"},vo=e.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:n=>g.CONFIG_CARD_FORMATS.includes(n)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},codeBlockRecord:{type:Object,default:void 0},codeBlockRecordRedacted:{type:Object,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,default:!1},fetcherUrl:{type:String,required:!1,default:""},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},isDeckCustomizationVisible:{type:Boolean,required:!1,default:!1}},emits:["deck-customization:close","request-deck-format"],setup(n){const r=n,i=e.useSlots(),{i18n:{t:d}}=g.composables.useI18n(),l=N=>!!(N.tooltip||i[`${N.key}-label-tooltip`]),s=N=>{if(N==null)return;let $=JSON.parse(JSON.stringify(N));return r.codeBlockRecordFormatter&&($=r.codeBlockRecordFormatter($,r.format)),r.preserveCodeBlockTimestamps||(delete $.created_at,delete $.updated_at),$},a=e.computed(()=>s(r.codeBlockRecordRedacted||r.codeBlockRecord||r.record)),u=e.computed(()=>s(r.codeBlockRecord||r.record)),y=e.computed(()=>r.fetcherUrl.replace(/(\?|&)__ui_data=true/,"")),{isDeckEnabled:c,deckCustomizationOptions:f,deckCalloutPreferenceKey:h}=g.composables.useBaseEntityDeckOptions(()=>r.config,()=>r.entityType);return(N,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.format==="structured"?(e.openBlock(),e.createElementBlock("div",yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propListTypes,W=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${W}-props`,class:e.normalizeClass(`config-card-details-${W}-props`),"data-testid":`config-card-details-${W}-props`},[W!=="basic"?(e.openBlock(),e.createElementBlock("div",ho,e.toDisplayString(W==="advanced"?e.unref(d)("baseConfigCard.sections.advanced"):W==="plugin"?e.unref(d)("baseConfigCard.sections.plugin"):e.unref(d)("baseConfigCard.sections.policy")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propertyCollections[W],B=>e.renderSlot(N.$slots,`config-card-item-${B.key}`,{row:B},()=>[(e.openBlock(),e.createBlock(gt,{key:B.key,item:B},e.createSlots({label:e.withCtx(()=>[e.renderSlot(N.$slots,`${B.key}-label`,{row:B},void 0,!0)]),[B.key]:e.withCtx(({rowValue:_})=>[e.renderSlot(N.$slots,B.key,{row:B,rowValue:_},void 0,!0)]),_:2},[l(B)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(N.$slots,`${B.key}-label-tooltip`,{row:B},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))],!0)),256))],10,go))),128))])):e.createCommentVNode("",!0),n.format==="json"&&a.value?(e.openBlock(),e.createBlock(ht,{key:1,config:r.config,"entity-record":a.value,"fetcher-url":y.value,"request-method":"get","unredacted-record":u.value},null,8,["config","entity-record","fetcher-url","unredacted-record"])):e.createCommentVNode("",!0),n.format==="yaml"&&a.value?(e.openBlock(),e.createBlock(Ct,{key:2,"deck-callout-preference-key":e.unref(c)?e.unref(h):void 0,"entity-record":a.value,"unredacted-record":u.value,"onDeckCallout:clickCta":$[0]||($[0]=W=>N.$emit("request-deck-format"))},null,8,["deck-callout-preference-key","entity-record","unredacted-record"])):e.createCommentVNode("",!0),n.format==="terraform"&&a.value?(e.openBlock(),e.createBlock(bt,{key:3,"entity-record":a.value,"entity-type":r.entityType,"sub-entity-type":r.subEntityType,"unredacted-record":u.value},null,8,["entity-record","entity-type","sub-entity-type","unredacted-record"])):e.createCommentVNode("",!0),n.format==="deck"&&a.value?(e.openBlock(),e.createBlock(St,{key:4,app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(f),"entity-record":a.value,"entity-type":r.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":n.isDeckCustomizationVisible,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,"unredacted-record":u.value,workspace:n.config.workspace||void 0,onCustomizationClose:$[1]||($[1]=W=>N.$emit("deck-customization:close"))},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0)],64))}}),Sn=g._export_sfc(vo,[["__scopeId","data-v-83075649"]]),ko="#0044f4",Co="#afb7c5",bo="#0044f4",So="16px",xe="20px",Xt="8px",Qt="12px",Bo={class:"config-card-title","data-testid":"config-card-title"},To={class:"config-card-actions"},Ao={class:"row"},Eo=["href"],wo={key:2,class:"config-card-details-section"},xo=e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n?.app)||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},policyConfigKey:{type:String,required:!1,default:""},policyConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},recordResolver:{type:Function,required:!1,default:n=>n},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},codeBlockRecordResolver:{type:Function,required:!1,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,required:!1,default:!1},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"},formatsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","configFormatChange"],setup(n,{emit:r}){const i=r,d=n,{i18n:{t:l}}=g.composables.useI18n(),{getMessageFromError:s}=g.composables.useErrors(),{convertKeyToTitle:a}=g.composables.useStringHelpers(),u=g.composables.useSchema();g.composables.useSubSchema(d.pluginConfigKey);const{axiosInstance:y}=g.composables.useAxios(d.config?.axiosRequestConfig),c=e.ref(!1),{isDeckEnabled:f,deckCustomizationOptions:h}=g.composables.useBaseEntityDeckOptions(()=>d.config,()=>d.entityType),N=e.computed(()=>{const O=[{label:l("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:l("baseForm.configuration.json"),value:"json"},{label:l("baseForm.configuration.yaml"),value:"yaml"}];d.config.app==="konnect"&&O.splice(2,0,{label:l("baseForm.configuration.terraform"),value:"terraform"}),f.value&&O.push({label:l("baseForm.configuration.deck"),value:"deck"});const G=new Set(d.formatsToHide);return O.filter(Q=>Q.value==="structured"||!G.has(Q.value))}),$=e.ref("structured"),W=O=>{$.value=O?.value,i("configFormatChange",$.value)},B=(O,G)=>{localStorage.setItem(O,G)};e.watch($,O=>{d.config.formatPreferenceKey&&B(d.config.formatPreferenceKey,O)}),e.onMounted(()=>{if(d.config.formatPreferenceKey){const O=localStorage.getItem(d.config.formatPreferenceKey),G=N.value;O&&G.some(Q=>Q.value===O)?$.value=O:$.value=G[0]?.value??"structured",B(d.config.formatPreferenceKey,$.value)}});const _={id:{type:g.ConfigurationSchemaType.ID,label:l("baseConfigCard.commonFields.id_label"),order:0,section:g.ConfigurationSchemaSection.Basic},name:{order:1,section:g.ConfigurationSchemaSection.Basic},enabled:{type:g.ConfigurationSchemaType.BadgeStatus,order:2,section:g.ConfigurationSchemaSection.Basic},updated_at:{type:g.ConfigurationSchemaType.Date,label:l("baseConfigCard.commonFields.updated_at_label"),order:3,section:g.ConfigurationSchemaSection.Basic},created_at:{type:g.ConfigurationSchemaType.Date,label:l("baseConfigCard.commonFields.created_at_label"),order:4,section:g.ConfigurationSchemaSection.Basic},tags:{type:g.ConfigurationSchemaType.BadgeTag,order:-1,section:g.ConfigurationSchemaSection.Basic},labels:{type:g.ConfigurationSchemaType.BadgeTag,order:-1,section:g.ConfigurationSchemaSection.Basic},partials:{type:g.ConfigurationSchemaType.LinkInternal,label:l("baseConfigCard.commonFields.partial_label"),order:-1,section:g.ConfigurationSchemaSection.Basic}},P=e.ref(!1),A=e.ref(!1),x=e.ref(""),D=e.ref({}),H=e.ref(null),ne=e.computed(()=>{if(!(!d.codeBlockRecordResolver||H.value==null))return d.codeBlockRecordResolver(H.value)}),L=e.ref(!1),{redactByConfigSchema:q,redactByApiSchema:V,isObjectRecord:Y,getApiSchemaField:j}=g.composables.useHelpers(),M=e.computed(()=>{const O=ne.value||D.value;let G=O;if(Y(O)&&Array.isArray(u?.value?.fields)){const Q={};for(const J in O){const X=j(u?.value?.fields,J);Q[J]=X?V(O[J],X):O[J]}G=Q}return G=q(G,d.configSchema),d.codeBlockRecordResolver?d.codeBlockRecordResolver(G):G}),te=e.computed(()=>{if(!D.value)return[];const O=[],G=Object.keys(D.value).length;for(const Q in D.value){if(Q==="__ui_data")continue;const J=d.configSchema?.[Q]?.order,X=_[Q]?.order;let ie=G;(X||X===0)&&(ie=X===-1?G+1:X),J&&(ie=J===-1?G+1:J),O.push([Q,ie])}return O.sort(function(Q,J){return Q[1]-J[1]}),O.map(Q=>{const J=Q[0],X=D.value?.[J],ie=d.configSchema?.[J]||{},Z=_[J];return{key:J,value:X,hidden:ie.hidden||!1,type:ie.type??(Z?.type||g.ConfigurationSchemaType.Text),label:ie.label??(Z?.label||a(J)),tooltip:ie.tooltip??(Z?.tooltip||void 0),section:ie.section??(Z?.section||g.ConfigurationSchemaSection.Advanced)}}).filter(Q=>!Q.hidden&&Q.key!==d.pluginConfigKey)}),oe=e.computed(()=>{if(!D.value||!d.pluginConfigKey)return[];const O=D.value[d.pluginConfigKey]||{},G=Object.keys(O).length,Q=[];for(const J in O){const X=d.pluginConfigSchema?.[J]?.order,ie=O[J];let Z=ie!=null&&ie!==""?G-1:G;X&&(Z=X===-1?G+1:X),Q.push([J,Z])}return Q.sort(function(J,X){return J[1]-X[1]}),Q.map(J=>{const X=J[0],ie=O[X],Z=d.pluginConfigSchema?.[X]||{};return{key:X,value:ie,hidden:Z.hidden||!1,type:Z.type??g.ConfigurationSchemaType.Text,label:Z.label??a(X),tooltip:Z.tooltip??void 0,section:g.ConfigurationSchemaSection.Plugin}}).filter(J=>!J.hidden)}),me=e.computed(()=>{if(!D.value||!d.policyConfigKey)return[];const O=D.value[d.policyConfigKey]||{},G=Object.keys(O).length,Q=[];for(const J in O){const X=d.policyConfigSchema?.[J]?.order,ie=O[J];let Z=ie!=null&&ie!==""?G-1:G;X&&(Z=X===-1?G+1:X),Q.push([J,Z])}return Q.sort(function(J,X){return J[1]-X[1]}),Q.map(J=>{const X=J[0],ie=O[X],Z=d.policyConfigSchema?.[X]||{};return{key:X,value:ie,hidden:Z.hidden||!1,type:Z.type??g.ConfigurationSchemaType.Text,label:Z.label??a(X),tooltip:Z.tooltip??void 0,section:g.ConfigurationSchemaSection.Policy}}).filter(J=>!J.hidden)}),R=e.computed(()=>({basic:te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Basic),advanced:te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Advanced),plugin:oe.value?.concat(te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Plugin)),policy:me.value?.concat(te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Policy))})),ge=e.computed(()=>{const O=[];return R.value.basic.length&&O.push("basic"),R.value.advanced.length&&O.push("advanced"),R.value.plugin.length&&O.push("plugin"),R.value.policy.length&&O.push("policy"),O}),pe=e.computed(()=>{let O=`${d.config.apiBaseUrl}${d.fetchUrl}`;return d.config.app==="konnect"&&(O=O.replace(/{controlPlaneId}/gi,d.config?.controlPlaneId||"")),O.replace(/\/{workspace}/gi,d.config?.workspace?`/${d.config.workspace}`:"").replace(/{id}/gi,d.config.entityId)});return e.watch(P,O=>{i("loading",O)},{immediate:!0}),e.onBeforeMount(async()=>{A.value=!1,P.value=!0;try{const{data:O}=await y.get(pe.value);if(H.value=O,d.dataKey)if(typeof O[d.dataKey]<"u")D.value={...O[d.dataKey]};else throw new Error(l("errors.dataKeyUndefined",{dataKey:d.dataKey}));else d.recordResolver?D.value={...d.recordResolver(O)}:D.value={...O};Object.keys(d.configSchema).filter(Q=>d.configSchema[Q].forceShow).forEach(Q=>{D.value&&typeof D.value[Q]>"u"&&(D.value[Q]=null)}),i("fetch:success",O)}catch(O){H.value=null;const G=s(O);x.value=G.startsWith("code")?l("baseConfigCard.errors.load"):G,A.value=!0,i("fetch:error",O)}finally{P.value=!1}}),(O,G)=>{const Q=e.resolveComponent("KCheckbox"),J=e.resolveComponent("KLabel"),X=e.resolveComponent("KSelect"),ie=e.resolveComponent("KButton"),Z=e.resolveComponent("KSkeleton"),he=e.resolveComponent("KEmptyState"),ye=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(ye,{class:"kong-ui-entity-base-config-card","title-tag":n.titleTag},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",To,[e.renderSlot(O.$slots,"actions",{},void 0,!0),$.value!=="structured"?(e.openBlock(),e.createBlock(Q,{key:0,modelValue:L.value,"onUpdate:modelValue":G[0]||(G[0]=ue=>L.value=ue),class:"sensitive-fields-checkbox","data-testid":"sensitive-fields-checkbox",label:e.unref(l)("baseConfigCard.actions.sensitive_fields"),"label-attributes":{info:e.unref(l)("baseConfigCard.actions.sensitive_fields_tooltip"),tooltipAttributes:{maxWidth:"200",placement:"top"}}},null,8,["modelValue","label","label-attributes"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ao,[e.createVNode(J,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:1}),e.createVNode(X,{modelValue:$.value,"onUpdate:modelValue":G[1]||(G[1]=ue=>$.value=ue),"data-testid":"select-config-format",items:N.value,onChange:W},null,8,["modelValue","items"])]),$.value==="deck"&&e.unref(h)?(e.openBlock(),e.createBlock(ie,{key:1,appearance:"secondary",class:"button-customize-deck","data-testid":"config-deck-customize-button",onClick:G[2]||(G[2]=ue=>c.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("baseConfigCard.actions.deck_customize")),1)]),_:1})):e.createCommentVNode("",!0),n.configCardDoc?(e.openBlock(),e.createBlock(ie,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:n.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(ce.BookIcon),{size:`var(--kui-icon-size-40, ${e.unref(xe)})`},null,8,["size"])],8,Eo)]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[P.value?(e.openBlock(),e.createBlock(Z,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):A.value?(e.openBlock(),e.createBlock(he,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(x.value),1)]),_:1})):(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(Sn,{"code-block-record":ne.value,"code-block-record-formatter":n.codeBlockRecordFormatter,"code-block-record-redacted":L.value?void 0:M.value,config:n.config,"entity-type":n.entityType,"fetcher-url":pe.value,format:$.value,"is-deck-customization-visible":c.value,"preserve-code-block-timestamps":n.preserveCodeBlockTimestamps,"prop-list-types":ge.value,"property-collections":R.value,record:D.value,"sub-entity-type":n.subEntityType,"onDeckCustomization:close":G[3]||(G[3]=ue=>c.value=!1),onRequestDeckFormat:G[4]||(G[4]=ue=>$.value="deck")},e.createSlots({_:2},[e.renderList(Object.keys(O.$slots),ue=>({name:ue,fn:e.withCtx(le=>[e.renderSlot(O.$slots,ue,e.mergeProps({record:D.value},le),void 0,!0)])}))]),1032,["code-block-record","code-block-record-formatter","code-block-record-redacted","config","entity-type","fetcher-url","format","is-deck-customization-visible","preserve-code-block-timestamps","prop-list-types","property-collections","record","sub-entity-type"])]))]),_:2},[n.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",Bo,[e.renderSlot(O.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),No=g._export_sfc(xo,[["__scopeId","data-v-9d8e57f1"]]),_o=["novalidate"],Io={key:0,class:"button-customize-deck-wrapper"},$o=e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n?.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string")},editId:{type:String,required:!1,default:null},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,required:!1,default:""},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"},actionTeleportTarget:{type:String,default:void 0},hideActions:{type:Boolean,default:!1},slidoutTopOffset:{type:Number,default:60},alignActionButtonToLeft:{type:Boolean,default:!1},saveButtonText:{type:String,default:void 0},cancelButtonText:{type:String,default:void 0},slideoutFetchUrl:{type:String,default:void 0},slideoutRequestMethod:{type:String,default:void 0},slideoutDeckEntityType:{type:String,default:void 0},tabsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","submit","cancel","codeBlockTabChange"],setup(n,{expose:r,emit:i}){const d=e.inject(g.PLUGIN_FORM_LAYOUT_STATE,e.ref(!1)),l=i,s=n,a=$n.useRouter(),{i18n:{t:u}}=g.composables.useI18n(),{getMessageFromError:y}=g.composables.useErrors(),{axiosInstance:c}=g.composables.useAxios(s.config?.axiosRequestConfig),f=e.ref(!1),h=e.computed(()=>!!s.editId),N=e.ref(!1),$=e.ref(""),W=e.computed(()=>s.canSubmit===!1||s.isReadonly),B=e.ref(!1),_=e.computed(()=>{let j=`${s.config.apiBaseUrl}${s.fetchUrl}`;return s.config.app==="konnect"&&(j=j.replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"")),j=j.replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:""),s.editId?(j=j.replace(/{id}/gi,s.editId),j):(j=j.replace(/\/{id}/gi,""),j)}),P=e.ref(!1),{isDeckEnabled:A,deckCustomizationOptions:x,deckCalloutPreferenceKey:D}=g.composables.useBaseFormDeckOptions(()=>s.config,()=>s.entityType),H=()=>{B.value=!B.value},ne=()=>{s.config.cancelRoute?a.push(s.config.cancelRoute):L()},L=()=>{l("cancel")},q=()=>{W.value||l("submit")},V=e.computed(()=>{const j=[{title:u("baseForm.configuration.json"),hash:"#json"},{title:u("baseForm.configuration.yaml"),hash:"#yaml"}];s.config.app==="konnect"&&s.entityType!==g.SupportedEntityType.Other&&j.splice(1,0,{title:u("baseForm.configuration.terraform"),hash:"#terraform"}),A.value&&j.push({title:u("baseForm.configuration.deck"),hash:"#deck"});const M=new Set(s.tabsToHide.map(te=>`#${te}`));return j.filter(te=>!M.has(te.hash))}),Y=e.ref(V.value[0]?.hash);return e.watch(V,j=>{j.some(M=>M.hash===Y.value)||(Y.value=j[0]?.hash)}),e.watch(()=>f.value,j=>{l("loading",j)},{immediate:!0}),e.onBeforeMount(async()=>{if(s.editId)try{N.value=!1,f.value=!0;const{data:j}=await c.get(_.value);l("fetch:success",j)}catch(j){const M=y(j);$.value=M.startsWith("code")?u("baseForm.errors.edit"):M,N.value=!0,l("fetch:error",j)}finally{f.value=!1}}),r({viewConfig:H,formCancel:L,formSubmit:q}),(j,M)=>{const te=e.resolveComponent("KSkeleton"),oe=e.resolveComponent("KEmptyState"),me=e.resolveComponent("KAlert"),R=e.resolveComponent("KButton"),ge=e.resolveComponent("KTabs"),pe=e.resolveComponent("KSlideout");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.wrapperComponent),{class:e.normalizeClass(["kong-ui-entity-base-form",{"new-form-layout":e.unref(d)&&n.entityType===e.unref(g.SupportedEntityType).Plugin}])},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(te,{key:0,type:"form"})):N.value?(e.openBlock(),e.createBlock(oe,{key:1,"action-button-text":e.unref(u)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:ne},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString($.value),1)]),_:1},8,["action-button-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:s.noValidate,onReset:e.withModifiers(L,["prevent"]),onSubmit:e.withModifiers(q,["prevent"])},[e.renderSlot(j.$slots,"default",{},void 0,!0),n.errorMessage?(e.openBlock(),e.createBlock(me,{key:0,appearance:"danger",class:"form-error","data-testid":"form-error",message:n.errorMessage},null,8,["message"])):e.createCommentVNode("",!0),n.hideActions?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.Teleport,{key:1,disabled:!n.actionTeleportTarget,to:n.actionTeleportTarget},[e.createElementVNode("div",{class:e.normalizeClass(["form-actions",{"form-actions-reverted":n.alignActionButtonToLeft}]),"data-testid":"form-actions"},[e.renderSlot(j.$slots,"form-actions",{},()=>[e.createVNode(R,{appearance:"tertiary","data-testid":`${n.entityType}-${h.value?"edit":"create"}-form-view-configuration`,onClick:M[0]||(M[0]=O=>H())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.value?e.unref(u)("baseForm.actions.hideConfiguration"):e.unref(u)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),e.createVNode(R,{appearance:"secondary","data-testid":`${n.entityType}-${h.value?"edit":"create"}-form-cancel`,disabled:n.isReadonly,type:"reset",onClick:M[1]||(M[1]=O=>!!n.actionTeleportTarget&&L())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelButtonText??e.unref(u)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),e.createVNode(R,{appearance:"primary","data-testid":`${n.entityType}-${h.value?"edit":"create"}-form-submit`,disabled:W.value,type:"submit",onClick:M[2]||(M[2]=O=>!!n.actionTeleportTarget&&q())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.saveButtonText??e.unref(u)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,_o)),e.createVNode(pe,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":n.slidoutTopOffset,title:e.unref(u)("baseForm.configuration.title"),visible:B.value,onClose:M[8]||(M[8]=O=>H())},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(j.$slots,"configuration-slideout-message",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseForm.configuration.message")),1)],!0)]),e.createVNode(ge,{modelValue:Y.value,"onUpdate:modelValue":M[6]||(M[6]=O=>Y.value=O),"data-testid":"form-view-configuration-slideout-tabs",tabs:V.value,onChange:M[7]||(M[7]=O=>l("codeBlockTabChange",O.replace("#","")))},{json:e.withCtx(()=>[e.createVNode(ht,{config:n.config,"entity-record":s.formFields,"fetcher-url":s.slideoutFetchUrl??_.value,"request-method":s.slideoutRequestMethod??(s.editId?"put":"post")},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:e.withCtx(()=>[e.createVNode(Ct,{"deck-callout-preference-key":e.unref(A)?e.unref(D):void 0,"entity-record":s.formFields,"onDeckCallout:clickCta":M[3]||(M[3]=O=>Y.value="#deck")},null,8,["deck-callout-preference-key","entity-record"])]),terraform:e.withCtx(()=>[e.createVNode(bt,{"entity-record":s.formFields,"entity-type":n.entityType,"sub-entity-type":n.subEntityType},null,8,["entity-record","entity-type","sub-entity-type"])]),deck:e.withCtx(()=>[e.unref(x)?(e.openBlock(),e.createElementBlock("div",Io,[e.createVNode(R,{appearance:"secondary",class:"button-customize-deck",onClick:M[4]||(M[4]=O=>P.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseConfigCard.actions.deck_customize")),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(St,{app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(x),"entity-record":s.formFields,"entity-type":s.slideoutDeckEntityType??n.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":P.value,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,workspace:n.config.workspace||void 0,onCustomizationClose:M[5]||(M[5]=O=>P.value=!1)},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","workspace"])]),_:1},8,["modelValue","tabs"])]),_:3},8,["offset-top","title","visible"])]),_:3},8,["class"])}}}),Oo=g._export_sfc($o,[["__scopeId","data-v-b3590221"]]),Vo=["data-truncate"],Do=e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(n){const r=n,i=e.computed(()=>r.rowEl?.querySelector(`[data-testid="${r.keyName}"]`)||null),d=e.computed(()=>i.value?.querySelector('[data-truncate="true"]')||null),l=e.computed(()=>{const _=r.rowEl?.querySelectorAll("td");return _?_[0]?.getAttribute("data-testid")===r.keyName:!0}),s=e.computed(()=>l.value||r.tooltip);let a;const u=()=>{a&&(a.disconnect(),a=void 0)},y=()=>{let _=i.value?.clientWidth||0;if(i.value&&"getComputedStyle"in window){const P=window.getComputedStyle(i.value);_-=(parseFloat(P.paddingLeft)||0)+(parseFloat(P.paddingRight)||0)}f.value=d.value?.getBoundingClientRect().width||0,h.value=_,N.value=c.value?.innerText||""},c=e.ref({}),f=e.ref(0),h=e.ref(0),N=e.ref(""),$=e.computed(()=>[d.value,i.value]),W=e.watch($,_=>{if(s.value&&(u(),"ResizeObserver"in window&&window)){a=new ResizeObserver(P=>{window.requestAnimationFrame(()=>{!Array.isArray(P)||!P.length||y()})});for(const P of _)P&&a.observe(P)}},{immediate:!0,flush:"post",deep:!0}),B=e.computed(()=>s.value?f.value>h.value:!1);return e.onMounted(()=>{y()}),e.onUnmounted(()=>{W()}),(_,P)=>{const A=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:c,class:"content-wrapper"},[s.value?(e.openBlock(),e.createElementBlock("span",{key:0,"data-truncate":s.value||void 0},[e.createVNode(A,{"max-width":"300",placement:"bottom-start",text:B.value?N.value:""},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Vo)):e.renderSlot(_.$slots,"default",{key:1},void 0,!0)],512)}}}),Ro=g._export_sfc(Do,[["__scopeId","data-v-a3a65cac"]]),Ko={class:"toolbar-container"},Fo={key:0,class:"toolbar-button-container"},Lo={key:0,class:"hidden"},Mo=e.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},paginationAttributes:{type:Object,default:()=>({})},hidePaginationWhenOptional:{type:Boolean,default:!0},disableSorting:{type:Boolean,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:""},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},disablePaginationPageJump:{type:Boolean,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof n=="boolean")},paginationType:{type:String,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(n))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(n,{emit:r}){const i=n,d=r,{i18n:{t:l}}=g.composables.useI18n(),s=e.computed(()=>typeof i.errorMessage=="string"?{hasError:!!i.errorMessage,title:i.errorMessage,message:void 0}:{hasError:!!i.errorMessage,title:i.errorMessage?.title,message:i.errorMessage?.message}),a=e.computed(()=>i.cacheIdentifier||i.preferencesStorageKey),u=e.computed(()=>{const V=[];return Object.keys(i.tableHeaders).forEach(j=>{const M=i.tableHeaders[j];V.push({label:M.label??j,key:j,sortable:M.sortable??!1,hidable:M.hidable??!0})}),i.enableEntityActions&&V.push({key:"actions",hideLabel:!0}),V}),y=V=>({"data-rowid":V.id,"data-testid":V.name,...i.rowAttributes(V)}),c=e.ref({}),f=V=>c.value?.$el.querySelector(`[data-rowid="${V.id}"]`),h=V=>{const Y={"data-testid":V.headerKey,...i.cellAttributes(V)};return V.colIndex===0&&(Y.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),Y},N=V=>{A(V),d("state",V)},$=()=>{d("empty-state-cta-clicked"),W()},W=()=>{d("clear-search-input")},B=e.computed(()=>i.disableRowClick?void 0:(V,Y)=>{d("click:row",Y)}),_=V=>{d("sort",V)},{hideTableToolbar:P,handleStateChange:A}=g.composables.useTableState(()=>i.query),{setTablePreferences:x,getTablePreferences:D}=g.de(),H=e.ref(D(a.value,i.defaultTablePreferences)),ne=e.computed(()=>{const V=D(a.value);return{...i.initialFetcherParams,...V}}),L=V=>{H.value=V,u.value.forEach(Y=>{!("hidable"in Y)||!H.value.columnVisibility||Y.hidable===!1&&(H.value.columnVisibility[Y.key]=!0)}),a.value&&x(a.value,V)},q=e.computed(()=>({disablePageJump:i.disablePaginationPageJump,offset:i.paginationType==="offset",...i.paginationAttributes}));return(V,Y)=>{const j=e.resolveComponent("KTableData"),M=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(M,{class:"kong-ui-entity-base-table",title:n.title,"title-tag":n.titleTag},{default:e.withCtx(()=>[e.createVNode(j,{ref_key:"tableRefs",ref:c,"cache-identifier":a.value,"cell-attrs":h,"client-sort":n.enableClientSort,"empty-state-action-message":n.query?e.unref(l)("baseTable.emptyState.noSearchResultsCtaText"):n.emptyStateOptions.ctaText,"empty-state-action-route":n.query?void 0:n.emptyStateOptions.ctaPath,"empty-state-icon-variant":n.query?"search":"kong","empty-state-message":n.query?e.unref(l)("baseTable.emptyState.noSearchResultsMessage"):n.emptyStateOptions.message,"empty-state-title":n.query?e.unref(l)("baseTable.emptyState.noSearchResultsTitle"):n.emptyStateOptions.title,error:s.value.hasError,"error-state-message":s.value.message,"error-state-title":s.value.title,fetcher:n.fetcher,"fetcher-cache-key":String(n.fetcherCacheKey),headers:u.value,"hide-pagination":n.hidePagination,"hide-pagination-when-optional":n.hidePaginationWhenOptional,"hide-toolbar":n.hideToolbar??e.unref(P),"initial-fetcher-params":ne.value,loading:n.isLoading,"pagination-attributes":q.value,"resize-columns":"","row-attrs":y,"row-key":n.rowKey,"search-input":n.query,"sort-handler-function":n.enableClientSort?n.sortHandlerFunction:void 0,sortable:!n.disableSorting,"table-preferences":H.value,onEmptyStateActionClick:$,"onRow:click":B.value,onSort:Y[0]||(Y[0]=te=>_(te)),onState:N,"onUpdate:tablePreferences":L},e.createSlots({toolbar:e.withCtx(()=>[e.createElementVNode("div",Ko,[e.renderSlot(V.$slots,"toolbar-filter",{},void 0,!0),V.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Fo,[e.renderSlot(V.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)])]),"action-items":e.withCtx(({row:te})=>[e.renderSlot(V.$slots,"actions",{row:te},void 0,!0)]),_:2},[V.$slots["empty-state"]?{name:"empty-state",fn:e.withCtx(()=>[e.renderSlot(V.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,e.renderList(n.tableHeaders,(te,oe)=>({name:oe,fn:e.withCtx(({row:me,rowValue:R})=>[e.createVNode(Ro,{"key-name":String(oe),"row-el":f(me),tooltip:te.tooltip},{default:e.withCtx(()=>[e.renderSlot(V.$slots,oe,{row:me,rowKey:n.rowKey,rowValue:R},()=>[e.createTextVNode(e.toDisplayString(R),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),n.query?void 0:{name:"empty-state-action-icon",fn:e.withCtx(()=>[e.createVNode(e.unref(ce.AddIcon))]),key:"1"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-pagination-when-optional","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click"]),V.$slots["outside-actions"]&&e.unref(P)?(e.openBlock(),e.createElementBlock("div",Lo,[e.renderSlot(V.$slots,"outside-actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),qo=g._export_sfc(Mo,[["__scopeId","data-v-09e101d4"]]),Po={key:0,class:"kong-ui-entity-delete-error"},jo={key:1,class:"description"},Uo={key:2,class:"extra"},Ho=e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},entityTypeDisplay:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},confirmDisabled:{type:Boolean,default:!1},error:{type:String,default:""},confirmationPrompt:{type:String,default:""},stackedCopy:{type:Boolean,default:!1}},emits:["cancel","proceed"],setup(n,{emit:r}){const{i18nT:i}=g.composables.useI18n(),d=n,l=r,s=e.computed(()=>d.entityTypeDisplay.trim()!==""?d.entityTypeDisplay:d.entityType),a=e.computed(()=>d.needConfirm?d.entityName:""),u=()=>{l("cancel")},y=()=>{l("proceed")};return(c,f)=>{const h=e.resolveComponent("KAlert"),N=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(N,{"action-button-appearance":"danger","action-button-disabled":n.actionPending||n.confirmDisabled,"action-button-text":"Yes, delete",class:e.normalizeClass(["kong-ui-entity-delete-modal",{"kong-ui-entity-delete-modal-stacked-copy":n.stackedCopy}]),"confirmation-prompt":n.confirmationPrompt||void 0,"confirmation-text":a.value,"data-testid":"entity-delete-modal",title:n.title,visible:n.visible,onCancel:u,onProceed:y},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["body",{"body-stacked-copy":n.stackedCopy}])},[n.error?(e.openBlock(),e.createElementBlock("div",Po,[e.createVNode(h,{appearance:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.error),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"message",{},()=>[e.createVNode(e.unref(i),{class:"message",keypath:d.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:2},[d.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(d.entityName),1)]),key:"0"}:void 0]),1032,["keypath"])],!0),d.description||c.$slots.description?(e.openBlock(),e.createElementBlock("div",jo,[e.renderSlot(c.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(d.description),1)],!0)])):e.createCommentVNode("",!0),c.$slots.extra?(e.openBlock(),e.createElementBlock("div",Uo,[e.renderSlot(c.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)],2)]),_:3},8,["action-button-disabled","class","confirmation-prompt","confirmation-text","title","visible"])}}}),zo=g._export_sfc(Ho,[["__scopeId","data-v-9cfe55b5"]]),Yo={key:1,class:"kong-ui-entity-filter"},Go={class:"kong-ui-entity-filter-menu"},Wo=["data-testid"],Jo=["onClick","onKeydown"],Xo={class:"menu-item-indicator"},Qo={class:"menu-item-body"},Zo=["for"],ei={class:"menu-item-buttons"},ti={class:"filter-clear-button-container"},ni=e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:r}){const{i18n:{t:i}}=g.composables.useI18n(),d=n,l=r,s=e.ref(!1),a=e.ref({}),u=e.ref(new Set),y=e.computed(()=>{const L=[];return new URLSearchParams(d.modelValue).forEach((q,V)=>{q!==""&&L.push(V)}),L}),c=e.computed(()=>{const L=d.config.fields;return Object.keys(L).filter(q=>L?.[q]?.searchable).map(q=>({label:L[q].label||q,value:q,expanded:!1}))});e.watch(()=>d.modelValue,L=>{a.value={},new URLSearchParams(L).forEach((q,V)=>{a.value[V]=q})});const f=()=>{s.value=!s.value},h=L=>{u.value.has(L)?u.value.delete(L):u.value.add(L)},N=L=>{l("update:modelValue",L)},$=()=>{N("")},W=L=>`filter-${L}`,B=L=>(d.config.schema?.[L]?.values??[]).map(q=>typeof q=="string"?{value:q,label:q}:q),_=L=>d.config.schema?.[L]?.type??"text",P=L=>{a.value={...a.value,[L]:""},x()},A=()=>{a.value={},x(!0)},x=(L=!1)=>{const q=Object.keys(a.value).reduce((V,Y)=>(a.value[Y]&&(V[Y]=`${a.value[Y]}`),V),{});L&&(s.value=!1),l("update:modelValue",new URLSearchParams(q).toString())},D=L=>!!d.config.schema?.[L]?.filterFunction,H=(L,q)=>{const V=d.config.schema?.[L];return V?.filterFunction===void 0?!0:V.filterFunction(q)},ne=(L,q)=>{a.value[L]=q?q.custom?String(q.label):String(q.value):""};return(L,q)=>{const V=e.resolveComponent("KInput"),Y=e.resolveComponent("KButton"),j=e.resolveComponent("KSelect");return n.config.isExactMatch?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":n.modelValue,placeholder:n.config.placeholder,"onUpdate:modelValue":N},{before:e.withCtx(()=>[e.createVNode(e.unref(ce.FilterIcon),{decorative:""})]),after:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(ce.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:$},null,512),[[e.vShow,n.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",Yo,[e.createVNode(Y,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.FilterIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("filter.filterButtonText"))+" "+e.toDisplayString(y.value.length>0?`(${y.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[e.vShow,s.value]]),e.withDirectives(e.createElementVNode("div",Go,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,M=>(e.openBlock(),e.createElementBlock("div",{key:M.value,class:"kong-ui-entity-filter-menu-item","data-testid":M.value},[e.createElementVNode("span",{class:e.normalizeClass(["menu-item-title",{expanded:u.value.has(M.value)}]),role:"button",tabindex:"0",onClick:te=>h(M.value),onKeydown:e.withKeys(te=>h(M.value),["enter"])},[e.createTextVNode(e.toDisplayString(M.label)+" ",1),e.withDirectives(e.createElementVNode("span",Xo,null,512),[[e.vShow,y.value.includes(M.value)]]),e.createVNode(e.unref(ce.ChevronDownIcon),{class:e.normalizeClass(["menu-item-expand-icon",{expanded:u.value.has(M.value)}]),color:`var(--kui-color-text-neutral-weak, ${e.unref(Co)})`},null,8,["class","color"])],42,Jo),e.withDirectives(e.createElementVNode("div",Qo,[e.createElementVNode("label",{class:"menu-item-label",for:W(M.value)},e.toDisplayString(e.unref(i)("filter.fieldLabel")),9,Zo),n.config.schema?.[M.value]?.type==="select"?(e.openBlock(),e.createBlock(j,{key:0,id:W(M.value),"enable-filtering":D(M.value),"enable-item-creation":n.config.schema?.[M.value]?.enableItemCreation,"filter-function":te=>H(M.value,te),items:B(M.value),"model-value":a.value[M.value],placeholder:e.unref(i)("filter.selectPlaceholder"),onChange:te=>ne(M.value,te)},null,8,["id","enable-filtering","enable-item-creation","filter-function","items","model-value","placeholder","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,id:W(M.value),modelValue:a.value[M.value],"onUpdate:modelValue":te=>a.value[M.value]=te,autocomplete:"off",placeholder:e.unref(i)("filter.inputPlaceholder"),type:_(M.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[e.vShow,u.value.has(M.value)]]),e.withDirectives(e.createElementVNode("div",ei,[e.createVNode(Y,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:q[0]||(q[0]=te=>x(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("filter.applyButtonText")),1)]),_:1}),e.createVNode(Y,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:te=>P(M.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("filter.clearButtonText")),1)]),_:1},8,["onClick"])],512),[[e.vShow,u.value.has(M.value)]])],8,Wo))),128)),e.createElementVNode("div",ti,[e.createVNode(Y,{appearance:"tertiary",size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("filter.clearAllButtonText")),1)]),_:1})])],512),[[e.vShow,s.value]])]))}}}),oi=g._export_sfc(ni,[["__scopeId","data-v-10015be6"]]),ii=e.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(n,{emit:r}){const{i18n:{t:i},i18nT:d}=g.composables.useI18n(),l=n,s=r,a=e.ref(!1),u=e.computed(()=>l.action==="enable"?i("toggleModal.enable.title",{entityType:l.entityType}):i("toggleModal.disable.title",{entityType:l.entityType})),y=e.computed(()=>l.action==="enable"?i("toggleModal.enable.confirmText"):i("toggleModal.disable.confirmText")),c=()=>s("cancel"),f=async()=>{if(l.onConfirm){a.value=!0;try{await l.onConfirm(),s("proceed")}catch(h){console.error(h)}finally{a.value=!1}}};return(h,N)=>{const $=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode($,{"action-button-disabled":a.value,"action-button-text":y.value,"data-testid":`${n.entityType}-${n.entityId}-toggle-prompt`,title:u.value,visible:n.visible,onCancel:c,onProceed:f},{default:e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:`toggleModal.${l.action}.message`,scope:"global"},{entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.entityType),1)]),entityName:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(n.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),ri=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(n){const r=n,i=e.ref(void 0),d=e.computed(()=>i.value===!0||i.value!==void 0&&r.forceShow===!0);return e.watch(()=>r.authFunction,async()=>{i.value=await r.authFunction()},{immediate:!0}),(l,s)=>d.value?e.renderSlot(l.$slots,"default",{key:0,isAllowed:i.value}):e.createCommentVNode("",!0)}}),se=[];for(let n=0;n<256;++n)se.push((n+256).toString(16).slice(1));function li(n,r=0){return(se[n[r+0]]+se[n[r+1]]+se[n[r+2]]+se[n[r+3]]+"-"+se[n[r+4]]+se[n[r+5]]+"-"+se[n[r+6]]+se[n[r+7]]+"-"+se[n[r+8]]+se[n[r+9]]+"-"+se[n[r+10]]+se[n[r+11]]+se[n[r+12]]+se[n[r+13]]+se[n[r+14]]+se[n[r+15]]).toLowerCase()}const ai=new Uint8Array(16);function ci(){return crypto.getRandomValues(ai)}function si(n,r,i){return crypto.randomUUID?crypto.randomUUID():ui(n)}function ui(n,r,i){n=n||{};const d=n.random??n.rng?.()??ci();if(d.length<16)throw new Error("Random bytes length must be >= 16");return d[6]=d[6]&15|64,d[8]=d[8]&63|128,li(d)}const di=["aria-labelledby"],fi={class:"form-section-wrapper"},pi={key:1,class:"form-section-description"},mi={key:2,class:"form-section-footer"},yi={class:"form-section-content"},gi=e.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(n){const r=e.useSlots(),i=si();return(d,l)=>(e.openBlock(),e.createElementBlock("div",{"aria-labelledby":n.title?e.unref(i):void 0,class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":n.hasDivider}]),role:"group"},[e.createElementVNode("div",fi,[n.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:n.stickyInfoHeader}])},[n.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.titleTag),{key:0,id:e.unref(i),class:"form-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["id"])):e.createCommentVNode("",!0),n.description||e.unref(r).description?(e.openBlock(),e.createElementBlock("div",pi,[e.renderSlot(d.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(r).footer?(e.openBlock(),e.createElementBlock("div",mi,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",yi,[e.renderSlot(d.$slots,"default",{},void 0,!0)])])],10,di))}}),hi=g._export_sfc(gi,[["__scopeId","data-v-ccd29028"]]),vi={class:"header"},ki={key:0,class:"step","data-testid":"form-block-step"},Ci={class:"header-content"},bi={class:"header-title","data-testid":"header-title"},Si={key:0,class:"header-description","data-testid":"header-description"},Bi={key:1,class:"header-extra","data-testid":"header-extra"},Ti={class:"content","data-testid":"form-block-content"},Ai=e.defineComponent({__name:"EntityFormBlock",props:{step:{default:()=>{}},title:{default:""},description:{default:""}},setup(n){const r=e.useSlots();return(i,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-entity-form-block",{stepped:n.step!==void 0||r.step}])},[e.createElementVNode("header",vi,[n.step!==void 0||r.step?(e.openBlock(),e.createElementBlock("div",ki,[e.renderSlot(i.$slots,"step",{},()=>[e.createTextVNode(e.toDisplayString(n.step),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ci,[e.createElementVNode("h2",bi,[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)]),n.description||r.description?(e.openBlock(),e.createElementBlock("div",Si,[e.renderSlot(i.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0)]),r.extra?(e.openBlock(),e.createElementBlock("div",Bi,[e.renderSlot(i.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Ti,[e.renderSlot(i.$slots,"default",{},void 0,!0)])],2))}}),Ei=g._export_sfc(Ai,[["__scopeId","data-v-7dd2f21d"]]),wi={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},xi={key:0,class:"deleted-entity"},Ni={key:1},_i=["onClick"],Ii=e.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(n){const r=n,i=e.ref(),{isTruncated:d}=g.composables.useTruncationDetector(i),{i18n:{t:l}}=g.composables.useI18n(),s=l("global.actions.copyId"),a=e.ref(s),u=e.computed(()=>r.entityLinkData.deleted??!1),y=e.computed(()=>r.entityLinkData.id?.toString().includes(":")?r.entityLinkData.id.toString().split(":")[1]:r.entityLinkData.id),c=e.computed(()=>`${y.value?.toString().slice(0,5)} (deleted)`),f=async h=>{await h(y.value||"")&&(a.value=l("global.actions.copyToClipboard"),setTimeout(()=>{a.value=s},1800))};return(h,N)=>{const $=e.resolveComponent("KTooltip"),W=e.resolveComponent("KExternalLink"),B=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",wi,[u.value?(e.openBlock(),e.createElementBlock("div",xi,e.toDisplayString(c.value),1)):y.value?y.value?(e.openBlock(),e.createBlock(W,{key:2,class:"entity-link","hide-icon":!n.newWindow,href:n.externalLink,target:n.newWindow?"_blank":"_self"},{default:e.withCtx(()=>[e.createVNode($,{text:e.unref(d)&&n.entityLinkData.label||""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:i,class:"entity-link-label"},e.toDisplayString(n.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ni,e.toDisplayString(" – "))),y.value&&n.allowCopy?(e.openBlock(),e.createBlock($,{key:a.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:a.value},{default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(({copyToClipboard:_})=>[e.createElementVNode("span",{class:"entity-link-copy-id",onClick:e.withModifiers(P=>f(_),["stop"])},[e.createVNode(e.unref(ce.CopyIcon),{class:"copy-icon",color:`var(--kui-color-text-primary, ${e.unref(bo)})`,"data-testid":"copy-id",size:`var(--kui-icon-size-30, ${e.unref(So)})`},null,8,["color","size"])],8,_i)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0)])}}}),$i=g._export_sfc(Ii,[["__scopeId","data-v-6668aea9"]]),Oi={class:"kong-ui-public-entity-empty-state"},Vi={class:"entity-empty-state-content"},Di={key:0,class:"empty-state-image"},Ri={key:1,class:"entity-empty-state-title"},Ki={key:2,class:"entity-empty-state-description"},Fi={key:3,class:"entity-empty-state-pricing"},Li={key:0,class:"entity-empty-state-message"},Mi={key:1,class:"entity-empty-state-action"},qi={key:2,class:"entity-empty-state-card-container"},Pi={key:0,class:"feature-icon"},ji={class:"card-header"},Ui=["title"],Hi={key:3,class:"entity-empty-state-bottom-container"},zi=e.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:n=>yt.includes(n)},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(n){const r=n,{i18n:{t:i}}=g.composables.useI18n(),d=e.ref(!1),l=e.computed(()=>d.value&&!!r.actionButtonText),s=e.computed(()=>yt.includes(r.appearance)?r.appearance:["primary",r.appearance]);return e.onBeforeMount(async()=>{d.value=await r.canCreate()}),e.onMounted(()=>e.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
70
- Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(a,u)=>{const y=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Oi,[e.createElementVNode("div",Vi,[a.$slots.image?(e.openBlock(),e.createElementBlock("div",Di,[e.renderSlot(a.$slots,"image",{},void 0,!0)])):e.createCommentVNode("",!0),n.title||a.$slots.title?(e.openBlock(),e.createElementBlock("div",Ri,[e.createElementVNode("h1",{class:e.normalizeClass(s.value)},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],2)])):e.createCommentVNode("",!0),n.description||a.$slots.default?(e.openBlock(),e.createElementBlock("div",Ki,[e.renderSlot(a.$slots,"default",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),n.pricing||a.$slots.pricing?(e.openBlock(),e.createElementBlock("div",Fi,[e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString(e.unref(i)("emptyState.pricingTitle")),1),u[2]||(u[2]=e.createTextVNode()),e.renderSlot(a.$slots,"pricing",{},()=>[e.createTextVNode(e.toDisplayString(n.pricing),1)],!0)])])):e.createCommentVNode("",!0)]),a.$slots.message?(e.openBlock(),e.createElementBlock("div",Li,[e.renderSlot(a.$slots,"message",{},void 0,!0)])):e.createCommentVNode("",!0),l.value||n.learnMore||a.$slots.actions?(e.openBlock(),e.createElementBlock("div",Mi,[e.renderSlot(a.$slots,"actions",{},()=>[l.value?(e.openBlock(),e.createBlock(e.unref(Te.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:n.appearance==="secondary"?"medium":"large",onClick:u[0]||(u[0]=c=>a.$emit("click:create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.AddIcon)),e.createTextVNode(" "+e.toDisplayString(n.actionButtonText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0),n.learnMore?(e.openBlock(),e.createBlock(e.unref(Te.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:n.appearance==="secondary"?"medium":"large",onClick:u[1]||(u[1]=c=>a.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("emptyState.learnMore")),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),n.features.length?(e.openBlock(),e.createElementBlock("div",qi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.features,(c,f)=>(e.openBlock(),e.createBlock(y,{key:`feature-${f}-card`,class:"entity-empty-state-card"},{title:e.withCtx(()=>[a.$slots[`feature-${f}-icon`]?(e.openBlock(),e.createElementBlock("div",Pi,[e.renderSlot(a.$slots,`feature-${f}-icon`,{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ji,e.toDisplayString(c.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{title:c.description},e.toDisplayString(c.description),9,Ui)]),_:2},1024))),128))])):e.createCommentVNode("",!0),a.$slots.bottom?(e.openBlock(),e.createElementBlock("div",Hi,[e.renderSlot(a.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),Yi=g._export_sfc(zi,[["__scopeId","data-v-0b2e9081"]]),Gi={key:0,class:"sensitive-input-error-message","data-testid":"sensitive-input-error-message"},Wi={class:"sensitive-input-textarea-actions"},Ji={key:2,class:"sensitive-input-hint","data-testid":"sensitive-input-hint"},Xi={class:"sensitive-input-hint-text"},Qi="••••••••••••••",Zi=e.defineComponent({__name:"SensitiveInput",props:{modelValue:{default:""},mode:{default:"create"},generator:{type:Function},showOneTimeHint:{type:Boolean,default:!1},labels:{},label:{},labelAttributes:{},placeholder:{},help:{},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{},multiline:{type:Boolean,default:!1}},emits:["update:modelValue","rotate","generate","generated"],setup(n,{expose:r,emit:i}){e.useCssVars(q=>({v41f8c11f:ne.value}));const d=i,{i18n:{t:l}}=g.composables.useI18n(),s=e.ref(n.mode==="edit"?"masked":"editing"),a=e.ref(!1),u=e.ref(!1),y=e.computed(()=>s.value==="masked"),c=Qi,f=e.computed(()=>n.placeholder??l("sensitiveInput.placeholder")),h=e.computed(()=>n.labels?.rotateLabel??l("sensitiveInput.rotateKey")),N=e.computed(()=>n.labels?.generateLabel??l("sensitiveInput.generateKey")),$=e.computed(()=>n.labels?.hintLabel??l("sensitiveInput.oneTimeHint")),W=e.computed(()=>y.value||a.value?"text":"password");e.watch(()=>n.showOneTimeHint,q=>{q&&(a.value=!0)},{immediate:!0});const B=q=>{d("update:modelValue",q)},_=(q=!0)=>{s.value="editing",a.value=!1,q&&d("rotate")};r({enterEditing:()=>_(!1)});const P=()=>{a.value=!a.value},A=async()=>{if(!(!n.generator||u.value)){u.value=!0,d("generate");try{const q=await n.generator();d("update:modelValue",q),a.value=!0,d("generated",q)}finally{u.value=!1}}},x=e.useTemplateRef("rootElement");let D,H;const ne=e.ref(`calc(${Qt} + ${xe} + ${Xt})`),L=()=>{const q=x.value?.querySelector(".after-content-wrapper");q&&(ne.value=`calc(${Qt} + ${q.offsetWidth}px + ${Xt})`)};return e.onMounted(()=>{const q=x.value?.querySelector(".after-content-wrapper");D=new ResizeObserver(()=>{H=window.requestAnimationFrame(()=>L())}),q&&D.observe(q),L()}),e.onBeforeUnmount(()=>{D?.disconnect(),H!==void 0&&window.cancelAnimationFrame(H)}),(q,V)=>{const Y=e.resolveComponent("KButton"),j=e.resolveComponent("KInput"),M=e.resolveComponent("KTextArea"),te=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:x,class:"kong-ui-public-sensitive-input"},[n.multiline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(M,{autocomplete:"off","character-limit":!1,"data-testid":"sensitive-input",disabled:n.disabled||void 0,error:n.error,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":y.value?e.unref(c):n.modelValue,placeholder:y.value?void 0:f.value,readonly:y.value||n.readonly||void 0,required:n.required||void 0,resizable:"","onUpdate:modelValue":B},null,8,["disabled","error","help","label","label-attributes","model-value","placeholder","readonly","required"]),n.error&&n.errorMessage?(e.openBlock(),e.createElementBlock("p",Gi,e.toDisplayString(n.errorMessage),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Wi,[y.value?(e.openBlock(),e.createBlock(Y,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:V[1]||(V[1]=oe=>_(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1})):n.generator?(e.openBlock(),e.createBlock(Y,{key:1,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||u.value,size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createBlock(j,{key:0,autocomplete:"off","data-testid":"sensitive-input",disabled:n.disabled,error:n.error,"error-message":n.errorMessage,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":y.value?e.unref(c):n.modelValue,placeholder:y.value?void 0:f.value,readonly:y.value||n.readonly,required:n.required,type:W.value,"onUpdate:modelValue":B},{after:e.withCtx(()=>[y.value?(e.openBlock(),e.createBlock(Y,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:V[0]||(V[0]=oe=>_(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.generator?(e.openBlock(),e.createBlock(Y,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||u.value,size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value?e.unref(ce.VisibilityOffIcon):e.unref(ce.VisibilityIcon)),{"aria-label":a.value?e.unref(l)("sensitiveInput.hideKey"):e.unref(l)("sensitiveInput.showKey"),class:"sensitive-input-toggle",color:"currentColor","data-testid":"sensitive-input-toggle",role:"button",size:`var(--kui-icon-size-40, ${e.unref(xe)})`,tabindex:"0",onClick:P,onKeydown:e.withKeys(e.withModifiers(P,["prevent"]),["enter","space"])},null,40,["aria-label","size","onKeydown"]))],64))]),_:1},8,["disabled","error","error-message","help","label","label-attributes","model-value","placeholder","readonly","required","type"])),n.showOneTimeHint?(e.openBlock(),e.createElementBlock("div",Ji,[e.createVNode(e.unref(ce.InfoIcon),{class:"sensitive-input-hint-icon",color:`var(--kui-color-text-info, ${e.unref(ko)})`,size:`var(--kui-icon-size-40, ${e.unref(xe)})`},null,8,["color","size"]),e.createElementVNode("span",Xi,e.toDisplayString($.value),1),e.createVNode(te,null,{default:e.withCtx(({copyToClipboard:oe})=>[e.createVNode(Y,{appearance:"none",class:"sensitive-input-action sensitive-input-copy","data-testid":"sensitive-input-copy",icon:!0,onClick:me=>oe(n.modelValue)},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.CopyIcon),{color:"currentColor",size:`var(--kui-icon-size-40, ${e.unref(xe)})`},null,8,["size"]),e.createTextVNode(" "+e.toDisplayString(e.unref(l)("sensitiveInput.copy")),1)]),_:1},8,["onClick"])]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(q.$slots,"alert",{},void 0,!0)],512)}}}),er=g._export_sfc(Zi,[["__scopeId","data-v-ae0726c4"]]),tr={key:1},nr=e.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(n){const r=n,i=e.computed(()=>{if(Array.isArray(r.tags))return r.tags;if(typeof r.tags=="string")try{const d=JSON.parse(r.tags);return Array.isArray(d)?d:[]}catch{return[]}return[]});return(d,l)=>i.value?.length>0?(e.openBlock(),e.createBlock(e.unref(Te.KTruncate),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createBlock(e.unref(Te.KBadge),{key:s,"max-width":n.tagMaxWidth,onClick:l[0]||(l[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(e.openBlock(),e.createElementBlock("span",tr,"-"))}}),{useAxios:or,useDeleteUrlBuilder:ir,useBaseEntityDeckOptions:rr,useBaseFormDeckOptions:lr,useErrors:ar,useExternalLinkCreator:cr,useFetchUrlBuilder:sr,useFetcher:ur,useFetcherCacheKey:dr,useDebouncedFilter:fr,useStringHelpers:pr,useHelpers:mr,useGatewayFeatureSupported:yr,useTruncationDetector:gr,useValidators:hr,useSchema:vr,useSchemaProvider:kr,useTableState:Cr}=g.composables;exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=g.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT;exports.CONFIG_CARD_FORMATS=g.CONFIG_CARD_FORMATS;exports.ConfigurationSchemaSection=g.ConfigurationSchemaSection;exports.ConfigurationSchemaType=g.ConfigurationSchemaType;exports.DECK_COMMAND_EDITOR_KEY=g.DECK_COMMAND_EDITOR_KEY;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=g.DECK_COMMAND_EDITOR_MISSING_WARNING;exports.EventGatewayTypesArray=g.EventGatewayTypesArray;exports.FetcherStatus=g.FetcherStatus;exports.IdentityTypesArray=g.IdentityTypesArray;exports.PLUGIN_FORM_LAYOUT_STATE=g.PLUGIN_FORM_LAYOUT_STATE;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=g.SHIKI_MAX_HIGHLIGHT_LENGTH;exports.SupportedEntityDeckArray=g.SupportedEntityDeckArray;exports.SupportedEntityType=g.SupportedEntityType;exports.SupportedEntityTypesArray=g.SupportedEntityTypesArray;exports.isSupportedDeckEntityType=g.isSupportedDeckEntityType;exports.Appearances=yt;exports.BASE_FORM_CONFIG_TABS=On;exports.ConfigCardDisplay=Sn;exports.ConfigCardItem=gt;exports.DeckCodeBlock=St;exports.EntityBaseConfigCard=No;exports.EntityBaseForm=Oo;exports.EntityBaseFormType=en;exports.EntityBaseTable=qo;exports.EntityDeleteModal=zo;exports.EntityEmptyState=Yi;exports.EntityFilter=oi;exports.EntityFormBlock=Ei;exports.EntityFormSection=hi;exports.EntityLink=$i;exports.EntityToggleModal=ii;exports.EntityTypes=Zt;exports.GeneratePatModal=bn;exports.InternalLinkItem=nn;exports.JsonCodeBlock=ht;exports.PermissionsWrapper=ri;exports.SensitiveInput=er;exports.TableTags=nr;exports.TerraformCodeBlock=bt;exports.YamlCodeBlock=Ct;exports.highlightCodeBlock=Se;exports.useAxios=or;exports.useBaseEntityDeckOptions=rr;exports.useBaseFormDeckOptions=lr;exports.useDebouncedFilter=fr;exports.useDeleteUrlBuilder=ir;exports.useErrors=ar;exports.useExternalLinkCreator=cr;exports.useFetchUrlBuilder=sr;exports.useFetcher=ur;exports.useFetcherCacheKey=dr;exports.useGatewayFeatureSupported=yr;exports.useHelpers=mr;exports.useSchema=vr;exports.useSchemaProvider=kr;exports.useStringHelpers=pr;exports.useTableState=Cr;exports.useTruncationDetector=gr;exports.useValidators=hr;
69
+ '@ | ${A}`)}),(A,x)=>{const D=e.resolveComponent("KSelect"),H=e.resolveComponent("KBadge"),ne=e.resolveComponent("KCodeBlock"),L=e.resolveComponent("KAlert"),q=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"deck-config config-card-code-block"},A.$attrs),[e.createVNode(D,{modelValue:h.value,"onUpdate:modelValue":x[0]||(x[0]=V=>h.value=V),items:f},{"item-template":e.withCtx(({item:V})=>[V.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(ce.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(ce.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(V.label),1)]),"selected-item-template":e.withCtx(({item:V})=>[V.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(ce.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(ce.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(V.label),1)]),_:1},8,["modelValue"]),e.createElementVNode("div",so,e.toDisplayString(e.unref(s)("deckCodeBlock.steps.step_1")),1),n.isCustomizing?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(l),{key:0,"data-testid":`deck-hint-${n.app}`,keypath:`deckCodeBlock.hint.${n.app}`,tag:"p"},e.createSlots({link:e.withCtx(()=>[e.createVNode(e.unref(Te.KExternalLink),{href:n.app==="konnect"?"https://developer.konghq.com/deck/get-started/":"https://developer.konghq.com/deck/gateway/configuration/"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d).t("deckCodeBlock.documentation")),1)]),_:1},8,["href"])]),_:2},[n.app==="konnect"?{name:"token",fn:e.withCtx(()=>[e.createVNode(H,null,{default:e.withCtx(()=>[...x[4]||(x[4]=[e.createTextVNode("DECK_KONNECT_TOKEN",-1)])]),_:1})]),key:"0"}:void 0]),1032,["data-testid","keypath"])),n.app==="konnect"?(e.openBlock(),e.createBlock(ne,{key:1,id:"deck-env-codeblock",class:e.normalizeClass({customization:i.isCustomizing}),code:_.value,language:h.value,"single-line":"",theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","language","theme","onCodeBlockRender"])):e.createCommentVNode("",!0),a.value?(e.openBlock(),e.createBlock(L,{key:2,class:"copy-konnect-pat-alert"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("deckCodeBlock.customization.copy_pat")),1)]),_:1})):i.isCustomizing&&i.generateKonnectPat?(e.openBlock(),e.createElementBlock("div",uo,[e.createVNode(q,{appearance:"secondary","data-testid":"generate-konnect-pat-button",onClick:x[1]||(x[1]=V=>c.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("deckCodeBlock.customization.generate_pat")),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(s)("deckCodeBlock.customization.reuse_pat")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",fo,e.toDisplayString(e.unref(s)("deckCodeBlock.steps.step_2")),1),i.entityRecord&&!i.isCustomizing?(e.openBlock(),e.createBlock(ne,{key:4,id:"deck-codeblock",class:e.normalizeClass({customization:i.isCustomizing}),code:u.value,"copy-code":y.value,"data-dd-privacy":"mask",language:h.value,"max-height":e.unref(g.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","copy-code","language","max-height","theme","onCodeBlockRender"])):i.entityRecord&&i.isCustomizing&&e.unref(r)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("div",po,e.toDisplayString(e.unref(s)("deckCodeBlock.customization.secret_advise")),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(r)),{modelValue:y.value,"onUpdate:modelValue":x[2]||(x[2]=V=>y.value=V),language:h.value},null,8,["modelValue","language"])),e.createVNode(L,{class:"customization-footer-reminder"},{icon:e.withCtx(()=>[e.createVNode(e.unref(ce.InfoIcon))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(s)("deckCodeBlock.customization.footer_reminder")),1)]),_:1})],64)):e.createCommentVNode("",!0)],16),i.isCustomizing&&i.generateKonnectPat?(e.openBlock(),e.createBlock(bn,{key:0,"generate-konnect-pat":i.generateKonnectPat,visible:c.value,onDismiss:x[3]||(x[3]=V=>c.value=!1),onGenerated:P},null,8,["generate-konnect-pat","visible"])):e.createCommentVNode("",!0)],64)}}}),Jt=g._export_sfc(mo,[["__scopeId","data-v-a158b294"]]),St=e.defineComponent({inheritAttrs:!1,__name:"DeckCodeBlock",props:{app:{},entityRecord:{},unredactedRecord:{},entityType:{},geoApiServerUrl:{},controlPlaneName:{},kongAdminApiUrl:{},workspace:{},customizationOptions:{type:[Boolean,Object]},isCustomizationModalVisible:{type:Boolean}},emits:["customization-close"],setup(n){const r=n,{i18n:{t:i}}=g.composables.useI18n(),d=e.computed(()=>{if(r.app==="konnect"&&r.customizationOptions&&typeof r.customizationOptions!="boolean")return r.customizationOptions.generateKonnectPat});return(l,s)=>{const a=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.entityRecord?(e.openBlock(),e.createBlock(Jt,e.mergeProps({key:0},l.$attrs,{app:r.app,"control-plane-name":r.app==="konnect"?r.controlPlaneName:void 0,"entity-record":r.entityRecord,"entity-type":r.entityType,"geo-api-server-url":r.app==="konnect"?r.geoApiServerUrl:void 0,"kong-admin-api-url":r.app==="kongManager"?r.kongAdminApiUrl:void 0,"unredacted-record":r.unredactedRecord,workspace:r.workspace||void 0}),null,16,["app","control-plane-name","entity-record","entity-type","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0),r.entityRecord?(e.openBlock(),e.createBlock(a,{key:1,"action-button-appearance":"tertiary","action-button-text":e.unref(i)("baseConfigCard.actions.deck_customize_cancel"),"hide-cancel-button":"","max-width":"640px",title:e.unref(i)("deckCodeBlock.customization.title"),visible:r.isCustomizationModalVisible,onCancel:s[0]||(s[0]=u=>l.$emit("customization-close")),onProceed:s[1]||(s[1]=u=>l.$emit("customization-close"))},{default:e.withCtx(()=>[e.createVNode(Jt,{app:r.app,"control-plane-name":r.app==="konnect"?r.controlPlaneName:void 0,"entity-record":r.entityRecord,"entity-type":r.entityType,"generate-konnect-pat":d.value,"geo-api-server-url":r.app==="konnect"?r.geoApiServerUrl:void 0,"is-customizing":"","kong-admin-api-url":r.app==="kongManager"?r.kongAdminApiUrl:void 0,"unredacted-record":r.unredactedRecord,workspace:r.workspace||void 0},null,8,["app","control-plane-name","entity-record","entity-type","generate-konnect-pat","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])]),_:1},8,["action-button-text","title","visible"])):e.createCommentVNode("",!0)],64)}}}),yo={key:0,class:"config-card-display-form"},go=["data-testid"],ho={key:0,class:"config-card-prop-section-title"},vo=e.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:n=>g.CONFIG_CARD_FORMATS.includes(n)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},codeBlockRecord:{type:Object,default:void 0},codeBlockRecordRedacted:{type:Object,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,default:!1},fetcherUrl:{type:String,required:!1,default:""},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},isDeckCustomizationVisible:{type:Boolean,required:!1,default:!1}},emits:["deck-customization:close","request-deck-format"],setup(n){const r=n,i=e.useSlots(),{i18n:{t:d}}=g.composables.useI18n(),l=N=>!!(N.tooltip||i[`${N.key}-label-tooltip`]),s=N=>{if(N==null)return;let $=JSON.parse(JSON.stringify(N));return r.codeBlockRecordFormatter&&($=r.codeBlockRecordFormatter($,r.format)),r.preserveCodeBlockTimestamps||(delete $.created_at,delete $.updated_at),$},a=e.computed(()=>s(r.codeBlockRecordRedacted||r.codeBlockRecord||r.record)),u=e.computed(()=>s(r.codeBlockRecord||r.record)),y=e.computed(()=>r.fetcherUrl.replace(/(\?|&)__ui_data=true/,"")),{isDeckEnabled:c,deckCustomizationOptions:f,deckCalloutPreferenceKey:h}=g.composables.useBaseEntityDeckOptions(()=>r.config,()=>r.entityType);return(N,$)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.format==="structured"?(e.openBlock(),e.createElementBlock("div",yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propListTypes,W=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${W}-props`,class:e.normalizeClass(`config-card-details-${W}-props`),"data-testid":`config-card-details-${W}-props`},[W!=="basic"?(e.openBlock(),e.createElementBlock("div",ho,e.toDisplayString(W==="advanced"?e.unref(d)("baseConfigCard.sections.advanced"):W==="plugin"?e.unref(d)("baseConfigCard.sections.plugin"):e.unref(d)("baseConfigCard.sections.policy")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propertyCollections[W],B=>e.renderSlot(N.$slots,`config-card-item-${B.key}`,{row:B},()=>[(e.openBlock(),e.createBlock(gt,{key:B.key,item:B},e.createSlots({label:e.withCtx(()=>[e.renderSlot(N.$slots,`${B.key}-label`,{row:B},void 0,!0)]),[B.key]:e.withCtx(({rowValue:_})=>[e.renderSlot(N.$slots,B.key,{row:B,rowValue:_},void 0,!0)]),_:2},[l(B)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(N.$slots,`${B.key}-label-tooltip`,{row:B},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))],!0)),256))],10,go))),128))])):e.createCommentVNode("",!0),n.format==="json"&&a.value?(e.openBlock(),e.createBlock(ht,{key:1,config:r.config,"entity-record":a.value,"fetcher-url":y.value,"request-method":"get","unredacted-record":u.value},null,8,["config","entity-record","fetcher-url","unredacted-record"])):e.createCommentVNode("",!0),n.format==="yaml"&&a.value?(e.openBlock(),e.createBlock(Ct,{key:2,"deck-callout-preference-key":e.unref(c)?e.unref(h):void 0,"entity-record":a.value,"unredacted-record":u.value,"onDeckCallout:clickCta":$[0]||($[0]=W=>N.$emit("request-deck-format"))},null,8,["deck-callout-preference-key","entity-record","unredacted-record"])):e.createCommentVNode("",!0),n.format==="terraform"&&a.value?(e.openBlock(),e.createBlock(bt,{key:3,"entity-record":a.value,"entity-type":r.entityType,"sub-entity-type":r.subEntityType,"unredacted-record":u.value},null,8,["entity-record","entity-type","sub-entity-type","unredacted-record"])):e.createCommentVNode("",!0),n.format==="deck"&&a.value?(e.openBlock(),e.createBlock(St,{key:4,app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(f),"entity-record":a.value,"entity-type":r.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":n.isDeckCustomizationVisible,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,"unredacted-record":u.value,workspace:n.config.workspace||void 0,onCustomizationClose:$[1]||($[1]=W=>N.$emit("deck-customization:close"))},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0)],64))}}),Sn=g._export_sfc(vo,[["__scopeId","data-v-83075649"]]),ko="#0044f4",Co="#afb7c5",bo="#0044f4",So="16px",xe="20px",Xt="8px",Qt="12px",Bo={class:"config-card-title","data-testid":"config-card-title"},To={class:"config-card-actions"},Ao={class:"row"},Eo=["href"],wo={key:2,class:"config-card-details-section"},xo=e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n?.app)||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},policyConfigKey:{type:String,required:!1,default:""},policyConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},recordResolver:{type:Function,required:!1,default:n=>n},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},codeBlockRecordResolver:{type:Function,required:!1,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,required:!1,default:!1},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"},formatsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","configFormatChange"],setup(n,{emit:r}){const i=r,d=n,{i18n:{t:l}}=g.composables.useI18n(),{getMessageFromError:s}=g.composables.useErrors(),{convertKeyToTitle:a}=g.composables.useStringHelpers(),u=g.composables.useSchema();g.composables.useSubSchema(d.pluginConfigKey);const{axiosInstance:y}=g.composables.useAxios(d.config?.axiosRequestConfig),c=e.ref(!1),{isDeckEnabled:f,deckCustomizationOptions:h}=g.composables.useBaseEntityDeckOptions(()=>d.config,()=>d.entityType),N=e.computed(()=>{const O=[{label:l("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:l("baseForm.configuration.json"),value:"json"},{label:l("baseForm.configuration.yaml"),value:"yaml"}];d.config.app==="konnect"&&O.splice(2,0,{label:l("baseForm.configuration.terraform"),value:"terraform"}),f.value&&O.push({label:l("baseForm.configuration.deck"),value:"deck"});const G=new Set(d.formatsToHide);return O.filter(Q=>Q.value==="structured"||!G.has(Q.value))}),$=e.ref("structured"),W=O=>{$.value=O?.value,i("configFormatChange",$.value)},B=(O,G)=>{localStorage.setItem(O,G)};e.watch($,O=>{d.config.formatPreferenceKey&&B(d.config.formatPreferenceKey,O)}),e.onMounted(()=>{if(d.config.formatPreferenceKey){const O=localStorage.getItem(d.config.formatPreferenceKey),G=N.value;O&&G.some(Q=>Q.value===O)?$.value=O:$.value=G[0]?.value??"structured",B(d.config.formatPreferenceKey,$.value)}});const _={id:{type:g.ConfigurationSchemaType.ID,label:l("baseConfigCard.commonFields.id_label"),order:0,section:g.ConfigurationSchemaSection.Basic},name:{order:1,section:g.ConfigurationSchemaSection.Basic},enabled:{type:g.ConfigurationSchemaType.BadgeStatus,order:2,section:g.ConfigurationSchemaSection.Basic},updated_at:{type:g.ConfigurationSchemaType.Date,label:l("baseConfigCard.commonFields.updated_at_label"),order:3,section:g.ConfigurationSchemaSection.Basic},created_at:{type:g.ConfigurationSchemaType.Date,label:l("baseConfigCard.commonFields.created_at_label"),order:4,section:g.ConfigurationSchemaSection.Basic},tags:{type:g.ConfigurationSchemaType.BadgeTag,order:-1,section:g.ConfigurationSchemaSection.Basic},labels:{type:g.ConfigurationSchemaType.BadgeTag,order:-1,section:g.ConfigurationSchemaSection.Basic},partials:{type:g.ConfigurationSchemaType.LinkInternal,label:l("baseConfigCard.commonFields.partial_label"),order:-1,section:g.ConfigurationSchemaSection.Basic}},P=e.ref(!1),A=e.ref(!1),x=e.ref(""),D=e.ref({}),H=e.ref(null),ne=e.computed(()=>{if(!(!d.codeBlockRecordResolver||H.value==null))return d.codeBlockRecordResolver(H.value)}),L=e.ref(!1),{redactByConfigSchema:q,redactByApiSchema:V,isObjectRecord:Y,getApiSchemaField:j}=g.composables.useHelpers(),M=e.computed(()=>{const O=ne.value||D.value;let G=O;if(Y(O)&&Array.isArray(u?.value?.fields)){const Q={};for(const J in O){const X=j(u?.value?.fields,J);Q[J]=X?V(O[J],X):O[J]}G=Q}return G=q(G,d.configSchema),d.codeBlockRecordResolver?d.codeBlockRecordResolver(G):G}),te=e.computed(()=>{if(!D.value)return[];const O=[],G=Object.keys(D.value).length;for(const Q in D.value){if(Q==="__ui_data")continue;const J=d.configSchema?.[Q]?.order,X=_[Q]?.order;let ie=G;(X||X===0)&&(ie=X===-1?G+1:X),J&&(ie=J===-1?G+1:J),O.push([Q,ie])}return O.sort(function(Q,J){return Q[1]-J[1]}),O.map(Q=>{const J=Q[0],X=D.value?.[J],ie=d.configSchema?.[J]||{},Z=_[J];return{key:J,value:X,hidden:ie.hidden||!1,type:ie.type??(Z?.type||g.ConfigurationSchemaType.Text),label:ie.label??(Z?.label||a(J)),tooltip:ie.tooltip??(Z?.tooltip||void 0),section:ie.section??(Z?.section||g.ConfigurationSchemaSection.Advanced)}}).filter(Q=>!Q.hidden&&Q.key!==d.pluginConfigKey)}),oe=e.computed(()=>{if(!D.value||!d.pluginConfigKey)return[];const O=D.value[d.pluginConfigKey]||{},G=Object.keys(O).length,Q=[];for(const J in O){const X=d.pluginConfigSchema?.[J]?.order,ie=O[J];let Z=ie!=null&&ie!==""?G-1:G;X&&(Z=X===-1?G+1:X),Q.push([J,Z])}return Q.sort(function(J,X){return J[1]-X[1]}),Q.map(J=>{const X=J[0],ie=O[X],Z=d.pluginConfigSchema?.[X]||{};return{key:X,value:ie,hidden:Z.hidden||!1,type:Z.type??g.ConfigurationSchemaType.Text,label:Z.label??a(X),tooltip:Z.tooltip??void 0,section:g.ConfigurationSchemaSection.Plugin}}).filter(J=>!J.hidden)}),me=e.computed(()=>{if(!D.value||!d.policyConfigKey)return[];const O=D.value[d.policyConfigKey]||{},G=Object.keys(O).length,Q=[];for(const J in O){const X=d.policyConfigSchema?.[J]?.order,ie=O[J];let Z=ie!=null&&ie!==""?G-1:G;X&&(Z=X===-1?G+1:X),Q.push([J,Z])}return Q.sort(function(J,X){return J[1]-X[1]}),Q.map(J=>{const X=J[0],ie=O[X],Z=d.policyConfigSchema?.[X]||{};return{key:X,value:ie,hidden:Z.hidden||!1,type:Z.type??g.ConfigurationSchemaType.Text,label:Z.label??a(X),tooltip:Z.tooltip??void 0,section:g.ConfigurationSchemaSection.Policy}}).filter(J=>!J.hidden)}),R=e.computed(()=>({basic:te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Basic),advanced:te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Advanced),plugin:oe.value?.concat(te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Plugin)),policy:me.value?.concat(te.value?.filter(O=>O.section===g.ConfigurationSchemaSection.Policy))})),ge=e.computed(()=>{const O=[];return R.value.basic.length&&O.push("basic"),R.value.advanced.length&&O.push("advanced"),R.value.plugin.length&&O.push("plugin"),R.value.policy.length&&O.push("policy"),O}),pe=e.computed(()=>{let O=`${d.config.apiBaseUrl}${d.fetchUrl}`;return d.config.app==="konnect"&&(O=O.replace(/{controlPlaneId}/gi,d.config?.controlPlaneId||"")),O.replace(/\/{workspace}/gi,d.config?.workspace?`/${d.config.workspace}`:"").replace(/{id}/gi,d.config.entityId)});return e.watch(P,O=>{i("loading",O)},{immediate:!0}),e.onBeforeMount(async()=>{A.value=!1,P.value=!0;try{const{data:O}=await y.get(pe.value);if(H.value=O,d.dataKey)if(typeof O[d.dataKey]<"u")D.value={...O[d.dataKey]};else throw new Error(l("errors.dataKeyUndefined",{dataKey:d.dataKey}));else d.recordResolver?D.value={...d.recordResolver(O)}:D.value={...O};Object.keys(d.configSchema).filter(Q=>d.configSchema[Q].forceShow).forEach(Q=>{D.value&&typeof D.value[Q]>"u"&&(D.value[Q]=null)}),i("fetch:success",O)}catch(O){H.value=null;const G=s(O);x.value=G.startsWith("code")?l("baseConfigCard.errors.load"):G,A.value=!0,i("fetch:error",O)}finally{P.value=!1}}),(O,G)=>{const Q=e.resolveComponent("KCheckbox"),J=e.resolveComponent("KLabel"),X=e.resolveComponent("KSelect"),ie=e.resolveComponent("KButton"),Z=e.resolveComponent("KSkeleton"),he=e.resolveComponent("KEmptyState"),ye=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(ye,{class:"kong-ui-entity-base-config-card","title-tag":n.titleTag},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",To,[e.renderSlot(O.$slots,"actions",{},void 0,!0),$.value!=="structured"?(e.openBlock(),e.createBlock(Q,{key:0,modelValue:L.value,"onUpdate:modelValue":G[0]||(G[0]=ue=>L.value=ue),class:"sensitive-fields-checkbox","data-testid":"sensitive-fields-checkbox",label:e.unref(l)("baseConfigCard.actions.sensitive_fields"),"label-attributes":{info:e.unref(l)("baseConfigCard.actions.sensitive_fields_tooltip"),tooltipAttributes:{maxWidth:"200",placement:"top"}}},null,8,["modelValue","label","label-attributes"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ao,[e.createVNode(J,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:1}),e.createVNode(X,{modelValue:$.value,"onUpdate:modelValue":G[1]||(G[1]=ue=>$.value=ue),"data-testid":"select-config-format",items:N.value,onChange:W},null,8,["modelValue","items"])]),$.value==="deck"&&e.unref(h)?(e.openBlock(),e.createBlock(ie,{key:1,appearance:"secondary",class:"button-customize-deck","data-testid":"config-deck-customize-button",onClick:G[2]||(G[2]=ue=>c.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("baseConfigCard.actions.deck_customize")),1)]),_:1})):e.createCommentVNode("",!0),n.configCardDoc?(e.openBlock(),e.createBlock(ie,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:n.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(ce.BookIcon),{size:`var(--kui-icon-size-40, ${e.unref(xe)})`},null,8,["size"])],8,Eo)]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[P.value?(e.openBlock(),e.createBlock(Z,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):A.value?(e.openBlock(),e.createBlock(he,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(x.value),1)]),_:1})):(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode(Sn,{"code-block-record":ne.value,"code-block-record-formatter":n.codeBlockRecordFormatter,"code-block-record-redacted":L.value?void 0:M.value,config:n.config,"entity-type":n.entityType,"fetcher-url":pe.value,format:$.value,"is-deck-customization-visible":c.value,"preserve-code-block-timestamps":n.preserveCodeBlockTimestamps,"prop-list-types":ge.value,"property-collections":R.value,record:D.value,"sub-entity-type":n.subEntityType,"onDeckCustomization:close":G[3]||(G[3]=ue=>c.value=!1),onRequestDeckFormat:G[4]||(G[4]=ue=>$.value="deck")},e.createSlots({_:2},[e.renderList(Object.keys(O.$slots),ue=>({name:ue,fn:e.withCtx(le=>[e.renderSlot(O.$slots,ue,e.mergeProps({record:D.value},le),void 0,!0)])}))]),1032,["code-block-record","code-block-record-formatter","code-block-record-redacted","config","entity-type","fetcher-url","format","is-deck-customization-visible","preserve-code-block-timestamps","prop-list-types","property-collections","record","sub-entity-type"])]))]),_:2},[n.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",Bo,[e.renderSlot(O.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),No=g._export_sfc(xo,[["__scopeId","data-v-9d8e57f1"]]),_o=["novalidate"],Io={key:0,class:"button-customize-deck-wrapper"},$o=e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n?.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string")},editId:{type:String,required:!1,default:null},entityType:{type:String,required:!0,validator:n=>g.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,required:!1,default:""},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"},actionTeleportTarget:{type:String,default:void 0},hideActions:{type:Boolean,default:!1},slidoutTopOffset:{type:Number,default:60},alignActionButtonToLeft:{type:Boolean,default:!1},saveButtonText:{type:String,default:void 0},cancelButtonText:{type:String,default:void 0},slideoutFetchUrl:{type:String,default:void 0},slideoutRequestMethod:{type:String,default:void 0},slideoutDeckEntityType:{type:String,default:void 0},tabsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","submit","cancel","codeBlockTabChange"],setup(n,{expose:r,emit:i}){const d=e.inject(g.PLUGIN_FORM_LAYOUT_STATE,e.ref(!1)),l=i,s=n,a=$n.useRouter(),{i18n:{t:u}}=g.composables.useI18n(),{getMessageFromError:y}=g.composables.useErrors(),{axiosInstance:c}=g.composables.useAxios(s.config?.axiosRequestConfig),f=e.ref(!1),h=e.computed(()=>!!s.editId),N=e.ref(!1),$=e.ref(""),W=e.computed(()=>s.canSubmit===!1||s.isReadonly),B=e.ref(!1),_=e.computed(()=>{let j=`${s.config.apiBaseUrl}${s.fetchUrl}`;return s.config.app==="konnect"&&(j=j.replace(/{controlPlaneId}/gi,s.config?.controlPlaneId||"")),j=j.replace(/\/{workspace}/gi,s.config?.workspace?`/${s.config.workspace}`:""),s.editId?(j=j.replace(/{id}/gi,s.editId),j):(j=j.replace(/\/{id}/gi,""),j)}),P=e.ref(!1),{isDeckEnabled:A,deckCustomizationOptions:x,deckCalloutPreferenceKey:D}=g.composables.useBaseFormDeckOptions(()=>s.config,()=>s.entityType),H=()=>{B.value=!B.value},ne=()=>{s.config.cancelRoute?a.push(s.config.cancelRoute):L()},L=()=>{l("cancel")},q=()=>{W.value||l("submit")},V=e.computed(()=>{const j=[{title:u("baseForm.configuration.json"),hash:"#json"},{title:u("baseForm.configuration.yaml"),hash:"#yaml"}];s.config.app==="konnect"&&s.entityType!==g.SupportedEntityType.Other&&j.splice(1,0,{title:u("baseForm.configuration.terraform"),hash:"#terraform"}),A.value&&j.push({title:u("baseForm.configuration.deck"),hash:"#deck"});const M=new Set(s.tabsToHide.map(te=>`#${te}`));return j.filter(te=>!M.has(te.hash))}),Y=e.ref(V.value[0]?.hash);return e.watch(V,j=>{j.some(M=>M.hash===Y.value)||(Y.value=j[0]?.hash)}),e.watch(()=>f.value,j=>{l("loading",j)},{immediate:!0}),e.onBeforeMount(async()=>{if(s.editId)try{N.value=!1,f.value=!0;const{data:j}=await c.get(_.value);l("fetch:success",j)}catch(j){const M=y(j);$.value=M.startsWith("code")?u("baseForm.errors.edit"):M,N.value=!0,l("fetch:error",j)}finally{f.value=!1}}),r({viewConfig:H,formCancel:L,formSubmit:q}),(j,M)=>{const te=e.resolveComponent("KSkeleton"),oe=e.resolveComponent("KEmptyState"),me=e.resolveComponent("KAlert"),R=e.resolveComponent("KButton"),ge=e.resolveComponent("KTabs"),pe=e.resolveComponent("KSlideout");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.wrapperComponent),{class:e.normalizeClass(["kong-ui-entity-base-form",{"new-form-layout":e.unref(d)&&n.entityType===e.unref(g.SupportedEntityType).Plugin}])},{default:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(te,{key:0,type:"form"})):N.value?(e.openBlock(),e.createBlock(oe,{key:1,"action-button-text":e.unref(u)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:ne},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString($.value),1)]),_:1},8,["action-button-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:s.noValidate,onReset:e.withModifiers(L,["prevent"]),onSubmit:e.withModifiers(q,["prevent"])},[e.renderSlot(j.$slots,"default",{},void 0,!0),n.errorMessage?(e.openBlock(),e.createBlock(me,{key:0,appearance:"danger",class:"form-error","data-testid":"form-error",message:n.errorMessage},null,8,["message"])):e.createCommentVNode("",!0),n.hideActions?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.Teleport,{key:1,disabled:!n.actionTeleportTarget,to:n.actionTeleportTarget},[e.createElementVNode("div",{class:e.normalizeClass(["form-actions",{"form-actions-reverted":n.alignActionButtonToLeft}]),"data-testid":"form-actions"},[e.renderSlot(j.$slots,"form-actions",{},()=>[e.createVNode(R,{appearance:"tertiary","data-testid":`${n.entityType}-${h.value?"edit":"create"}-form-view-configuration`,onClick:M[0]||(M[0]=O=>H())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.value?e.unref(u)("baseForm.actions.hideConfiguration"):e.unref(u)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),e.createVNode(R,{appearance:"secondary","data-testid":`${n.entityType}-${h.value?"edit":"create"}-form-cancel`,disabled:n.isReadonly,type:"reset",onClick:M[1]||(M[1]=O=>!!n.actionTeleportTarget&&L())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelButtonText??e.unref(u)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),e.createVNode(R,{appearance:"primary","data-testid":`${n.entityType}-${h.value?"edit":"create"}-form-submit`,disabled:W.value,type:"submit",onClick:M[2]||(M[2]=O=>!!n.actionTeleportTarget&&q())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.saveButtonText??e.unref(u)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,_o)),e.createVNode(pe,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":n.slidoutTopOffset,title:e.unref(u)("baseForm.configuration.title"),visible:B.value,onClose:M[8]||(M[8]=O=>H())},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(j.$slots,"configuration-slideout-message",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseForm.configuration.message")),1)],!0)]),e.createVNode(ge,{modelValue:Y.value,"onUpdate:modelValue":M[6]||(M[6]=O=>Y.value=O),"data-testid":"form-view-configuration-slideout-tabs",tabs:V.value,onChange:M[7]||(M[7]=O=>l("codeBlockTabChange",O.replace("#","")))},{json:e.withCtx(()=>[e.createVNode(ht,{config:n.config,"entity-record":s.formFields,"fetcher-url":s.slideoutFetchUrl??_.value,"request-method":s.slideoutRequestMethod??(s.editId?"put":"post")},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:e.withCtx(()=>[e.createVNode(Ct,{"deck-callout-preference-key":e.unref(A)?e.unref(D):void 0,"entity-record":s.formFields,"onDeckCallout:clickCta":M[3]||(M[3]=O=>Y.value="#deck")},null,8,["deck-callout-preference-key","entity-record"])]),terraform:e.withCtx(()=>[e.createVNode(bt,{"entity-record":s.formFields,"entity-type":n.entityType,"sub-entity-type":n.subEntityType},null,8,["entity-record","entity-type","sub-entity-type"])]),deck:e.withCtx(()=>[e.unref(x)?(e.openBlock(),e.createElementBlock("div",Io,[e.createVNode(R,{appearance:"secondary",class:"button-customize-deck",onClick:M[4]||(M[4]=O=>P.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseConfigCard.actions.deck_customize")),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(St,{app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(x),"entity-record":s.formFields,"entity-type":s.slideoutDeckEntityType??n.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":P.value,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,workspace:n.config.workspace||void 0,onCustomizationClose:M[5]||(M[5]=O=>P.value=!1)},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","workspace"])]),_:1},8,["modelValue","tabs"])]),_:3},8,["offset-top","title","visible"])]),_:3},8,["class"])}}}),Oo=g._export_sfc($o,[["__scopeId","data-v-b3590221"]]),Vo=["data-truncate"],Do=e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(n){const r=n,i=e.computed(()=>r.rowEl?.querySelector(`[data-testid="${r.keyName}"]`)||null),d=e.computed(()=>i.value?.querySelector('[data-truncate="true"]')||null),l=e.computed(()=>{const _=r.rowEl?.querySelectorAll("td");return _?_[0]?.getAttribute("data-testid")===r.keyName:!0}),s=e.computed(()=>l.value||r.tooltip);let a;const u=()=>{a&&(a.disconnect(),a=void 0)},y=()=>{let _=i.value?.clientWidth||0;if(i.value&&"getComputedStyle"in window){const P=window.getComputedStyle(i.value);_-=(parseFloat(P.paddingLeft)||0)+(parseFloat(P.paddingRight)||0)}f.value=d.value?.getBoundingClientRect().width||0,h.value=_,N.value=c.value?.innerText||""},c=e.ref({}),f=e.ref(0),h=e.ref(0),N=e.ref(""),$=e.computed(()=>[d.value,i.value]),W=e.watch($,_=>{if(s.value&&(u(),"ResizeObserver"in window&&window)){a=new ResizeObserver(P=>{window.requestAnimationFrame(()=>{!Array.isArray(P)||!P.length||y()})});for(const P of _)P&&a.observe(P)}},{immediate:!0,flush:"post",deep:!0}),B=e.computed(()=>s.value?f.value>h.value:!1);return e.onMounted(()=>{y()}),e.onUnmounted(()=>{W()}),(_,P)=>{const A=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:c,class:"content-wrapper"},[s.value?(e.openBlock(),e.createElementBlock("span",{key:0,"data-truncate":s.value||void 0},[e.createVNode(A,{"max-width":"300",placement:"bottom-start",text:B.value?N.value:""},{default:e.withCtx(()=>[e.renderSlot(_.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Vo)):e.renderSlot(_.$slots,"default",{key:1},void 0,!0)],512)}}}),Ro=g._export_sfc(Do,[["__scopeId","data-v-a3a65cac"]]),Ko={class:"toolbar-container"},Fo={key:0,class:"toolbar-button-container"},Lo={key:0,class:"hidden"},Mo=e.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},paginationAttributes:{type:Object,default:()=>({})},hidePaginationWhenOptional:{type:Boolean,default:!0},disableSorting:{type:Boolean,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:""},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},disablePaginationPageJump:{type:Boolean,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof n=="boolean")},paginationType:{type:String,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(n))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(n,{emit:r}){const i=n,d=r,{i18n:{t:l}}=g.composables.useI18n(),s=e.computed(()=>typeof i.errorMessage=="string"?{hasError:!!i.errorMessage,title:i.errorMessage,message:void 0}:{hasError:!!i.errorMessage,title:i.errorMessage?.title,message:i.errorMessage?.message}),a=e.computed(()=>i.cacheIdentifier||i.preferencesStorageKey),u=e.computed(()=>{const V=[];return Object.keys(i.tableHeaders).forEach(j=>{const M=i.tableHeaders[j];V.push({label:M.label??j,key:j,sortable:M.sortable??!1,hidable:M.hidable??!0})}),i.enableEntityActions&&V.push({key:"actions",hideLabel:!0}),V}),y=V=>({"data-rowid":V.id,"data-testid":V.name,...i.rowAttributes(V)}),c=e.ref({}),f=V=>c.value?.$el.querySelector(`[data-rowid="${V.id}"]`),h=V=>{const Y={"data-testid":V.headerKey,...i.cellAttributes(V)};return V.colIndex===0&&(Y.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),Y},N=V=>{A(V),d("state",V)},$=()=>{d("empty-state-cta-clicked"),W()},W=()=>{d("clear-search-input")},B=e.computed(()=>i.disableRowClick?void 0:(V,Y)=>{d("click:row",Y)}),_=V=>{d("sort",V)},{hideTableToolbar:P,handleStateChange:A}=g.composables.useTableState(()=>i.query),{setTablePreferences:x,getTablePreferences:D}=g.de(),H=e.ref(D(a.value,i.defaultTablePreferences)),ne=e.computed(()=>{const V=D(a.value);return{...i.initialFetcherParams,...V}}),L=V=>{H.value=V,u.value.forEach(Y=>{!("hidable"in Y)||!H.value.columnVisibility||Y.hidable===!1&&(H.value.columnVisibility[Y.key]=!0)}),a.value&&x(a.value,V)},q=e.computed(()=>({disablePageJump:i.disablePaginationPageJump,offset:i.paginationType==="offset",...i.paginationAttributes}));return(V,Y)=>{const j=e.resolveComponent("KTableData"),M=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(M,{class:"kong-ui-entity-base-table",title:n.title,"title-tag":n.titleTag},{default:e.withCtx(()=>[e.createVNode(j,{ref_key:"tableRefs",ref:c,"cache-identifier":a.value,"cell-attrs":h,"client-sort":n.enableClientSort,"empty-state-action-message":n.query?e.unref(l)("baseTable.emptyState.noSearchResultsCtaText"):n.emptyStateOptions.ctaText,"empty-state-action-route":n.query?void 0:n.emptyStateOptions.ctaPath,"empty-state-icon-variant":n.query?"search":"kong","empty-state-message":n.query?e.unref(l)("baseTable.emptyState.noSearchResultsMessage"):n.emptyStateOptions.message,"empty-state-title":n.query?e.unref(l)("baseTable.emptyState.noSearchResultsTitle"):n.emptyStateOptions.title,error:s.value.hasError,"error-state-message":s.value.message,"error-state-title":s.value.title,fetcher:n.fetcher,"fetcher-cache-key":String(n.fetcherCacheKey),headers:u.value,"hide-pagination":n.hidePagination,"hide-pagination-when-optional":n.hidePaginationWhenOptional,"hide-toolbar":n.hideToolbar??e.unref(P),"initial-fetcher-params":ne.value,loading:n.isLoading,"pagination-attributes":q.value,"resize-columns":"","row-attrs":y,"row-key":n.rowKey,"search-input":n.query,"sort-handler-function":n.enableClientSort?n.sortHandlerFunction:void 0,sortable:!n.disableSorting,"table-preferences":H.value,onEmptyStateActionClick:$,"onRow:click":B.value,onSort:Y[0]||(Y[0]=te=>_(te)),onState:N,"onUpdate:tablePreferences":L},e.createSlots({toolbar:e.withCtx(()=>[e.createElementVNode("div",Ko,[e.renderSlot(V.$slots,"toolbar-filter",{},void 0,!0),V.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Fo,[e.renderSlot(V.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)])]),"action-items":e.withCtx(({row:te})=>[e.renderSlot(V.$slots,"actions",{row:te},void 0,!0)]),_:2},[V.$slots["empty-state"]?{name:"empty-state",fn:e.withCtx(()=>[e.renderSlot(V.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,e.renderList(n.tableHeaders,(te,oe)=>({name:oe,fn:e.withCtx(({row:me,rowValue:R})=>[e.createVNode(Ro,{"key-name":String(oe),"row-el":f(me),tooltip:te.tooltip},{default:e.withCtx(()=>[e.renderSlot(V.$slots,oe,{row:me,rowKey:n.rowKey,rowValue:R},()=>[e.createTextVNode(e.toDisplayString(R),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),n.query?void 0:{name:"empty-state-action-icon",fn:e.withCtx(()=>[e.createVNode(e.unref(ce.AddIcon))]),key:"1"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-pagination-when-optional","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click"]),V.$slots["outside-actions"]&&e.unref(P)?(e.openBlock(),e.createElementBlock("div",Lo,[e.renderSlot(V.$slots,"outside-actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),qo=g._export_sfc(Mo,[["__scopeId","data-v-09e101d4"]]),Po={key:0,class:"kong-ui-entity-delete-error"},jo={key:1,class:"description"},Uo=e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},entityTypeDisplay:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""},confirmationPrompt:{type:String,default:""},stackedCopy:{type:Boolean,default:!1}},emits:["cancel","proceed"],setup(n,{emit:r}){const{i18nT:i}=g.composables.useI18n(),d=n,l=r,s=e.computed(()=>d.entityTypeDisplay.trim()!==""?d.entityTypeDisplay:d.entityType),a=e.computed(()=>d.needConfirm?d.entityName:""),u=()=>{l("cancel")},y=()=>{l("proceed")};return(c,f)=>{const h=e.resolveComponent("KAlert"),N=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(N,{"action-button-appearance":"danger","action-button-disabled":n.actionPending,"action-button-text":"Yes, delete",class:e.normalizeClass(["kong-ui-entity-delete-modal",{"kong-ui-entity-delete-modal-stacked-copy":n.stackedCopy}]),"confirmation-prompt":n.confirmationPrompt||void 0,"confirmation-text":a.value,"data-testid":"entity-delete-modal",title:n.title,visible:n.visible,onCancel:u,onProceed:y},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["body",{"body-stacked-copy":n.stackedCopy}])},[n.error?(e.openBlock(),e.createElementBlock("div",Po,[e.createVNode(h,{appearance:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.error),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(c.$slots,"message",{},()=>[e.createVNode(e.unref(i),{class:"message",keypath:d.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:2},[d.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(d.entityName),1)]),key:"0"}:void 0]),1032,["keypath"])],!0),d.description||c.$slots.description?(e.openBlock(),e.createElementBlock("div",jo,[e.renderSlot(c.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(d.description),1)],!0)])):e.createCommentVNode("",!0)],2)]),_:3},8,["action-button-disabled","class","confirmation-prompt","confirmation-text","title","visible"])}}}),Ho=g._export_sfc(Uo,[["__scopeId","data-v-fc366e0c"]]),zo={key:1,class:"kong-ui-entity-filter"},Yo={class:"kong-ui-entity-filter-menu"},Go=["data-testid"],Wo=["onClick","onKeydown"],Jo={class:"menu-item-indicator"},Xo={class:"menu-item-body"},Qo=["for"],Zo={class:"menu-item-buttons"},ei={class:"filter-clear-button-container"},ti=e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:r}){const{i18n:{t:i}}=g.composables.useI18n(),d=n,l=r,s=e.ref(!1),a=e.ref({}),u=e.ref(new Set),y=e.computed(()=>{const L=[];return new URLSearchParams(d.modelValue).forEach((q,V)=>{q!==""&&L.push(V)}),L}),c=e.computed(()=>{const L=d.config.fields;return Object.keys(L).filter(q=>L?.[q]?.searchable).map(q=>({label:L[q].label||q,value:q,expanded:!1}))});e.watch(()=>d.modelValue,L=>{a.value={},new URLSearchParams(L).forEach((q,V)=>{a.value[V]=q})});const f=()=>{s.value=!s.value},h=L=>{u.value.has(L)?u.value.delete(L):u.value.add(L)},N=L=>{l("update:modelValue",L)},$=()=>{N("")},W=L=>`filter-${L}`,B=L=>(d.config.schema?.[L]?.values??[]).map(q=>typeof q=="string"?{value:q,label:q}:q),_=L=>d.config.schema?.[L]?.type??"text",P=L=>{a.value={...a.value,[L]:""},x()},A=()=>{a.value={},x(!0)},x=(L=!1)=>{const q=Object.keys(a.value).reduce((V,Y)=>(a.value[Y]&&(V[Y]=`${a.value[Y]}`),V),{});L&&(s.value=!1),l("update:modelValue",new URLSearchParams(q).toString())},D=L=>!!d.config.schema?.[L]?.filterFunction,H=(L,q)=>{const V=d.config.schema?.[L];return V?.filterFunction===void 0?!0:V.filterFunction(q)},ne=(L,q)=>{a.value[L]=q?q.custom?String(q.label):String(q.value):""};return(L,q)=>{const V=e.resolveComponent("KInput"),Y=e.resolveComponent("KButton"),j=e.resolveComponent("KSelect");return n.config.isExactMatch?(e.openBlock(),e.createBlock(V,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":n.modelValue,placeholder:n.config.placeholder,"onUpdate:modelValue":N},{before:e.withCtx(()=>[e.createVNode(e.unref(ce.FilterIcon),{decorative:""})]),after:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(ce.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:$},null,512),[[e.vShow,n.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",zo,[e.createVNode(Y,{appearance:"tertiary","data-testid":"filter-button",onClick:f},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.FilterIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("filter.filterButtonText"))+" "+e.toDisplayString(y.value.length>0?`(${y.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:f},null,512),[[e.vShow,s.value]]),e.withDirectives(e.createElementVNode("div",Yo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,M=>(e.openBlock(),e.createElementBlock("div",{key:M.value,class:"kong-ui-entity-filter-menu-item","data-testid":M.value},[e.createElementVNode("span",{class:e.normalizeClass(["menu-item-title",{expanded:u.value.has(M.value)}]),role:"button",tabindex:"0",onClick:te=>h(M.value),onKeydown:e.withKeys(te=>h(M.value),["enter"])},[e.createTextVNode(e.toDisplayString(M.label)+" ",1),e.withDirectives(e.createElementVNode("span",Jo,null,512),[[e.vShow,y.value.includes(M.value)]]),e.createVNode(e.unref(ce.ChevronDownIcon),{class:e.normalizeClass(["menu-item-expand-icon",{expanded:u.value.has(M.value)}]),color:`var(--kui-color-text-neutral-weak, ${e.unref(Co)})`},null,8,["class","color"])],42,Wo),e.withDirectives(e.createElementVNode("div",Xo,[e.createElementVNode("label",{class:"menu-item-label",for:W(M.value)},e.toDisplayString(e.unref(i)("filter.fieldLabel")),9,Qo),n.config.schema?.[M.value]?.type==="select"?(e.openBlock(),e.createBlock(j,{key:0,id:W(M.value),"enable-filtering":D(M.value),"enable-item-creation":n.config.schema?.[M.value]?.enableItemCreation,"filter-function":te=>H(M.value,te),items:B(M.value),"model-value":a.value[M.value],placeholder:e.unref(i)("filter.selectPlaceholder"),onChange:te=>ne(M.value,te)},null,8,["id","enable-filtering","enable-item-creation","filter-function","items","model-value","placeholder","onChange"])):(e.openBlock(),e.createBlock(V,{key:1,id:W(M.value),modelValue:a.value[M.value],"onUpdate:modelValue":te=>a.value[M.value]=te,autocomplete:"off",placeholder:e.unref(i)("filter.inputPlaceholder"),type:_(M.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[e.vShow,u.value.has(M.value)]]),e.withDirectives(e.createElementVNode("div",Zo,[e.createVNode(Y,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:q[0]||(q[0]=te=>x(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("filter.applyButtonText")),1)]),_:1}),e.createVNode(Y,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:te=>P(M.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("filter.clearButtonText")),1)]),_:1},8,["onClick"])],512),[[e.vShow,u.value.has(M.value)]])],8,Go))),128)),e.createElementVNode("div",ei,[e.createVNode(Y,{appearance:"tertiary",size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("filter.clearAllButtonText")),1)]),_:1})])],512),[[e.vShow,s.value]])]))}}}),ni=g._export_sfc(ti,[["__scopeId","data-v-10015be6"]]),oi=e.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(n,{emit:r}){const{i18n:{t:i},i18nT:d}=g.composables.useI18n(),l=n,s=r,a=e.ref(!1),u=e.computed(()=>l.action==="enable"?i("toggleModal.enable.title",{entityType:l.entityType}):i("toggleModal.disable.title",{entityType:l.entityType})),y=e.computed(()=>l.action==="enable"?i("toggleModal.enable.confirmText"):i("toggleModal.disable.confirmText")),c=()=>s("cancel"),f=async()=>{if(l.onConfirm){a.value=!0;try{await l.onConfirm(),s("proceed")}catch(h){console.error(h)}finally{a.value=!1}}};return(h,N)=>{const $=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode($,{"action-button-disabled":a.value,"action-button-text":y.value,"data-testid":`${n.entityType}-${n.entityId}-toggle-prompt`,title:u.value,visible:n.visible,onCancel:c,onProceed:f},{default:e.withCtx(()=>[e.createVNode(e.unref(d),{keypath:`toggleModal.${l.action}.message`,scope:"global"},{entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.entityType),1)]),entityName:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(n.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),ii=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(n){const r=n,i=e.ref(void 0),d=e.computed(()=>i.value===!0||i.value!==void 0&&r.forceShow===!0);return e.watch(()=>r.authFunction,async()=>{i.value=await r.authFunction()},{immediate:!0}),(l,s)=>d.value?e.renderSlot(l.$slots,"default",{key:0,isAllowed:i.value}):e.createCommentVNode("",!0)}}),se=[];for(let n=0;n<256;++n)se.push((n+256).toString(16).slice(1));function ri(n,r=0){return(se[n[r+0]]+se[n[r+1]]+se[n[r+2]]+se[n[r+3]]+"-"+se[n[r+4]]+se[n[r+5]]+"-"+se[n[r+6]]+se[n[r+7]]+"-"+se[n[r+8]]+se[n[r+9]]+"-"+se[n[r+10]]+se[n[r+11]]+se[n[r+12]]+se[n[r+13]]+se[n[r+14]]+se[n[r+15]]).toLowerCase()}const li=new Uint8Array(16);function ai(){return crypto.getRandomValues(li)}function ci(n,r,i){return crypto.randomUUID?crypto.randomUUID():si(n)}function si(n,r,i){n=n||{};const d=n.random??n.rng?.()??ai();if(d.length<16)throw new Error("Random bytes length must be >= 16");return d[6]=d[6]&15|64,d[8]=d[8]&63|128,ri(d)}const ui=["aria-labelledby"],di={class:"form-section-wrapper"},fi={key:1,class:"form-section-description"},pi={key:2,class:"form-section-footer"},mi={class:"form-section-content"},yi=e.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(n){const r=e.useSlots(),i=ci();return(d,l)=>(e.openBlock(),e.createElementBlock("div",{"aria-labelledby":n.title?e.unref(i):void 0,class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":n.hasDivider}]),role:"group"},[e.createElementVNode("div",di,[n.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:n.stickyInfoHeader}])},[n.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.titleTag),{key:0,id:e.unref(i),class:"form-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["id"])):e.createCommentVNode("",!0),n.description||e.unref(r).description?(e.openBlock(),e.createElementBlock("div",fi,[e.renderSlot(d.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(r).footer?(e.openBlock(),e.createElementBlock("div",pi,[e.renderSlot(d.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",mi,[e.renderSlot(d.$slots,"default",{},void 0,!0)])])],10,ui))}}),gi=g._export_sfc(yi,[["__scopeId","data-v-ccd29028"]]),hi={class:"header"},vi={key:0,class:"step","data-testid":"form-block-step"},ki={class:"header-content"},Ci={class:"header-title","data-testid":"header-title"},bi={key:0,class:"header-description","data-testid":"header-description"},Si={key:1,class:"header-extra","data-testid":"header-extra"},Bi={class:"content","data-testid":"form-block-content"},Ti=e.defineComponent({__name:"EntityFormBlock",props:{step:{default:()=>{}},title:{default:""},description:{default:""}},setup(n){const r=e.useSlots();return(i,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-entity-form-block",{stepped:n.step!==void 0||r.step}])},[e.createElementVNode("header",hi,[n.step!==void 0||r.step?(e.openBlock(),e.createElementBlock("div",vi,[e.renderSlot(i.$slots,"step",{},()=>[e.createTextVNode(e.toDisplayString(n.step),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ki,[e.createElementVNode("h2",Ci,[e.renderSlot(i.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)]),n.description||r.description?(e.openBlock(),e.createElementBlock("div",bi,[e.renderSlot(i.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0)]),r.extra?(e.openBlock(),e.createElementBlock("div",Si,[e.renderSlot(i.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Bi,[e.renderSlot(i.$slots,"default",{},void 0,!0)])],2))}}),Ai=g._export_sfc(Ti,[["__scopeId","data-v-7dd2f21d"]]),Ei={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},wi={key:0,class:"deleted-entity"},xi={key:1},Ni=["onClick"],_i=e.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(n){const r=n,i=e.ref(),{isTruncated:d}=g.composables.useTruncationDetector(i),{i18n:{t:l}}=g.composables.useI18n(),s=l("global.actions.copyId"),a=e.ref(s),u=e.computed(()=>r.entityLinkData.deleted??!1),y=e.computed(()=>r.entityLinkData.id?.toString().includes(":")?r.entityLinkData.id.toString().split(":")[1]:r.entityLinkData.id),c=e.computed(()=>`${y.value?.toString().slice(0,5)} (deleted)`),f=async h=>{await h(y.value||"")&&(a.value=l("global.actions.copyToClipboard"),setTimeout(()=>{a.value=s},1800))};return(h,N)=>{const $=e.resolveComponent("KTooltip"),W=e.resolveComponent("KExternalLink"),B=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ei,[u.value?(e.openBlock(),e.createElementBlock("div",wi,e.toDisplayString(c.value),1)):y.value?y.value?(e.openBlock(),e.createBlock(W,{key:2,class:"entity-link","hide-icon":!n.newWindow,href:n.externalLink,target:n.newWindow?"_blank":"_self"},{default:e.withCtx(()=>[e.createVNode($,{text:e.unref(d)&&n.entityLinkData.label||""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:i,class:"entity-link-label"},e.toDisplayString(n.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",xi,e.toDisplayString(" – "))),y.value&&n.allowCopy?(e.openBlock(),e.createBlock($,{key:a.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:a.value},{default:e.withCtx(()=>[e.createVNode(B,null,{default:e.withCtx(({copyToClipboard:_})=>[e.createElementVNode("span",{class:"entity-link-copy-id",onClick:e.withModifiers(P=>f(_),["stop"])},[e.createVNode(e.unref(ce.CopyIcon),{class:"copy-icon",color:`var(--kui-color-text-primary, ${e.unref(bo)})`,"data-testid":"copy-id",size:`var(--kui-icon-size-30, ${e.unref(So)})`},null,8,["color","size"])],8,Ni)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0)])}}}),Ii=g._export_sfc(_i,[["__scopeId","data-v-6668aea9"]]),$i={class:"kong-ui-public-entity-empty-state"},Oi={class:"entity-empty-state-content"},Vi={key:0,class:"empty-state-image"},Di={key:1,class:"entity-empty-state-title"},Ri={key:2,class:"entity-empty-state-description"},Ki={key:3,class:"entity-empty-state-pricing"},Fi={key:0,class:"entity-empty-state-message"},Li={key:1,class:"entity-empty-state-action"},Mi={key:2,class:"entity-empty-state-card-container"},qi={key:0,class:"feature-icon"},Pi={class:"card-header"},ji=["title"],Ui={key:3,class:"entity-empty-state-bottom-container"},Hi=e.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:n=>yt.includes(n)},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(n){const r=n,{i18n:{t:i}}=g.composables.useI18n(),d=e.ref(!1),l=e.computed(()=>d.value&&!!r.actionButtonText),s=e.computed(()=>yt.includes(r.appearance)?r.appearance:["primary",r.appearance]);return e.onBeforeMount(async()=>{d.value=await r.canCreate()}),e.onMounted(()=>e.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
70
+ Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(a,u)=>{const y=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",$i,[e.createElementVNode("div",Oi,[a.$slots.image?(e.openBlock(),e.createElementBlock("div",Vi,[e.renderSlot(a.$slots,"image",{},void 0,!0)])):e.createCommentVNode("",!0),n.title||a.$slots.title?(e.openBlock(),e.createElementBlock("div",Di,[e.createElementVNode("h1",{class:e.normalizeClass(s.value)},[e.renderSlot(a.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],2)])):e.createCommentVNode("",!0),n.description||a.$slots.default?(e.openBlock(),e.createElementBlock("div",Ri,[e.renderSlot(a.$slots,"default",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),n.pricing||a.$slots.pricing?(e.openBlock(),e.createElementBlock("div",Ki,[e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString(e.unref(i)("emptyState.pricingTitle")),1),u[2]||(u[2]=e.createTextVNode()),e.renderSlot(a.$slots,"pricing",{},()=>[e.createTextVNode(e.toDisplayString(n.pricing),1)],!0)])])):e.createCommentVNode("",!0)]),a.$slots.message?(e.openBlock(),e.createElementBlock("div",Fi,[e.renderSlot(a.$slots,"message",{},void 0,!0)])):e.createCommentVNode("",!0),l.value||n.learnMore||a.$slots.actions?(e.openBlock(),e.createElementBlock("div",Li,[e.renderSlot(a.$slots,"actions",{},()=>[l.value?(e.openBlock(),e.createBlock(e.unref(Te.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:n.appearance==="secondary"?"medium":"large",onClick:u[0]||(u[0]=c=>a.$emit("click:create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.AddIcon)),e.createTextVNode(" "+e.toDisplayString(n.actionButtonText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0),n.learnMore?(e.openBlock(),e.createBlock(e.unref(Te.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:n.appearance==="secondary"?"medium":"large",onClick:u[1]||(u[1]=c=>a.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(i)("emptyState.learnMore")),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),n.features.length?(e.openBlock(),e.createElementBlock("div",Mi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.features,(c,f)=>(e.openBlock(),e.createBlock(y,{key:`feature-${f}-card`,class:"entity-empty-state-card"},{title:e.withCtx(()=>[a.$slots[`feature-${f}-icon`]?(e.openBlock(),e.createElementBlock("div",qi,[e.renderSlot(a.$slots,`feature-${f}-icon`,{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Pi,e.toDisplayString(c.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{title:c.description},e.toDisplayString(c.description),9,ji)]),_:2},1024))),128))])):e.createCommentVNode("",!0),a.$slots.bottom?(e.openBlock(),e.createElementBlock("div",Ui,[e.renderSlot(a.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),zi=g._export_sfc(Hi,[["__scopeId","data-v-0b2e9081"]]),Yi={key:0,class:"sensitive-input-error-message","data-testid":"sensitive-input-error-message"},Gi={class:"sensitive-input-textarea-actions"},Wi={key:2,class:"sensitive-input-hint","data-testid":"sensitive-input-hint"},Ji={class:"sensitive-input-hint-text"},Xi="••••••••••••••",Qi=e.defineComponent({__name:"SensitiveInput",props:{modelValue:{default:""},mode:{default:"create"},generator:{type:Function},showOneTimeHint:{type:Boolean,default:!1},labels:{},label:{},labelAttributes:{},placeholder:{},help:{},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{},multiline:{type:Boolean,default:!1}},emits:["update:modelValue","rotate","generate","generated"],setup(n,{expose:r,emit:i}){e.useCssVars(q=>({v41f8c11f:ne.value}));const d=i,{i18n:{t:l}}=g.composables.useI18n(),s=e.ref(n.mode==="edit"?"masked":"editing"),a=e.ref(!1),u=e.ref(!1),y=e.computed(()=>s.value==="masked"),c=Xi,f=e.computed(()=>n.placeholder??l("sensitiveInput.placeholder")),h=e.computed(()=>n.labels?.rotateLabel??l("sensitiveInput.rotateKey")),N=e.computed(()=>n.labels?.generateLabel??l("sensitiveInput.generateKey")),$=e.computed(()=>n.labels?.hintLabel??l("sensitiveInput.oneTimeHint")),W=e.computed(()=>y.value||a.value?"text":"password");e.watch(()=>n.showOneTimeHint,q=>{q&&(a.value=!0)},{immediate:!0});const B=q=>{d("update:modelValue",q)},_=(q=!0)=>{s.value="editing",a.value=!1,q&&d("rotate")};r({enterEditing:()=>_(!1)});const P=()=>{a.value=!a.value},A=async()=>{if(!(!n.generator||u.value)){u.value=!0,d("generate");try{const q=await n.generator();d("update:modelValue",q),a.value=!0,d("generated",q)}finally{u.value=!1}}},x=e.useTemplateRef("rootElement");let D,H;const ne=e.ref(`calc(${Qt} + ${xe} + ${Xt})`),L=()=>{const q=x.value?.querySelector(".after-content-wrapper");q&&(ne.value=`calc(${Qt} + ${q.offsetWidth}px + ${Xt})`)};return e.onMounted(()=>{const q=x.value?.querySelector(".after-content-wrapper");D=new ResizeObserver(()=>{H=window.requestAnimationFrame(()=>L())}),q&&D.observe(q),L()}),e.onBeforeUnmount(()=>{D?.disconnect(),H!==void 0&&window.cancelAnimationFrame(H)}),(q,V)=>{const Y=e.resolveComponent("KButton"),j=e.resolveComponent("KInput"),M=e.resolveComponent("KTextArea"),te=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:x,class:"kong-ui-public-sensitive-input"},[n.multiline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(M,{autocomplete:"off","character-limit":!1,"data-testid":"sensitive-input",disabled:n.disabled||void 0,error:n.error,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":y.value?e.unref(c):n.modelValue,placeholder:y.value?void 0:f.value,readonly:y.value||n.readonly||void 0,required:n.required||void 0,resizable:"","onUpdate:modelValue":B},null,8,["disabled","error","help","label","label-attributes","model-value","placeholder","readonly","required"]),n.error&&n.errorMessage?(e.openBlock(),e.createElementBlock("p",Yi,e.toDisplayString(n.errorMessage),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Gi,[y.value?(e.openBlock(),e.createBlock(Y,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:V[1]||(V[1]=oe=>_(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1})):n.generator?(e.openBlock(),e.createBlock(Y,{key:1,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||u.value,size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createBlock(j,{key:0,autocomplete:"off","data-testid":"sensitive-input",disabled:n.disabled,error:n.error,"error-message":n.errorMessage,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":y.value?e.unref(c):n.modelValue,placeholder:y.value?void 0:f.value,readonly:y.value||n.readonly,required:n.required,type:W.value,"onUpdate:modelValue":B},{after:e.withCtx(()=>[y.value?(e.openBlock(),e.createBlock(Y,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:V[0]||(V[0]=oe=>_(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h.value),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.generator?(e.openBlock(),e.createBlock(Y,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||u.value,size:"small",onClick:A},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(N.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.value?e.unref(ce.VisibilityOffIcon):e.unref(ce.VisibilityIcon)),{"aria-label":a.value?e.unref(l)("sensitiveInput.hideKey"):e.unref(l)("sensitiveInput.showKey"),class:"sensitive-input-toggle",color:"currentColor","data-testid":"sensitive-input-toggle",role:"button",size:`var(--kui-icon-size-40, ${e.unref(xe)})`,tabindex:"0",onClick:P,onKeydown:e.withKeys(e.withModifiers(P,["prevent"]),["enter","space"])},null,40,["aria-label","size","onKeydown"]))],64))]),_:1},8,["disabled","error","error-message","help","label","label-attributes","model-value","placeholder","readonly","required","type"])),n.showOneTimeHint?(e.openBlock(),e.createElementBlock("div",Wi,[e.createVNode(e.unref(ce.InfoIcon),{class:"sensitive-input-hint-icon",color:`var(--kui-color-text-info, ${e.unref(ko)})`,size:`var(--kui-icon-size-40, ${e.unref(xe)})`},null,8,["color","size"]),e.createElementVNode("span",Ji,e.toDisplayString($.value),1),e.createVNode(te,null,{default:e.withCtx(({copyToClipboard:oe})=>[e.createVNode(Y,{appearance:"none",class:"sensitive-input-action sensitive-input-copy","data-testid":"sensitive-input-copy",icon:!0,onClick:me=>oe(n.modelValue)},{default:e.withCtx(()=>[e.createVNode(e.unref(ce.CopyIcon),{color:"currentColor",size:`var(--kui-icon-size-40, ${e.unref(xe)})`},null,8,["size"]),e.createTextVNode(" "+e.toDisplayString(e.unref(l)("sensitiveInput.copy")),1)]),_:1},8,["onClick"])]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(q.$slots,"alert",{},void 0,!0)],512)}}}),Zi=g._export_sfc(Qi,[["__scopeId","data-v-ae0726c4"]]),er={key:1},tr=e.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(n){const r=n,i=e.computed(()=>{if(Array.isArray(r.tags))return r.tags;if(typeof r.tags=="string")try{const d=JSON.parse(r.tags);return Array.isArray(d)?d:[]}catch{return[]}return[]});return(d,l)=>i.value?.length>0?(e.openBlock(),e.createBlock(e.unref(Te.KTruncate),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,s=>(e.openBlock(),e.createBlock(e.unref(Te.KBadge),{key:s,"max-width":n.tagMaxWidth,onClick:l[0]||(l[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(e.openBlock(),e.createElementBlock("span",er,"-"))}}),{useAxios:nr,useDeleteUrlBuilder:or,useBaseEntityDeckOptions:ir,useBaseFormDeckOptions:rr,useErrors:lr,useExternalLinkCreator:ar,useFetchUrlBuilder:cr,useFetcher:sr,useFetcherCacheKey:ur,useDebouncedFilter:dr,useStringHelpers:fr,useHelpers:pr,useGatewayFeatureSupported:mr,useTruncationDetector:yr,useValidators:gr,useSchema:hr,useSchemaProvider:vr,useTableState:kr}=g.composables;exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=g.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT;exports.CONFIG_CARD_FORMATS=g.CONFIG_CARD_FORMATS;exports.ConfigurationSchemaSection=g.ConfigurationSchemaSection;exports.ConfigurationSchemaType=g.ConfigurationSchemaType;exports.DECK_COMMAND_EDITOR_KEY=g.DECK_COMMAND_EDITOR_KEY;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=g.DECK_COMMAND_EDITOR_MISSING_WARNING;exports.EventGatewayTypesArray=g.EventGatewayTypesArray;exports.FetcherStatus=g.FetcherStatus;exports.IdentityTypesArray=g.IdentityTypesArray;exports.PLUGIN_FORM_LAYOUT_STATE=g.PLUGIN_FORM_LAYOUT_STATE;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=g.SHIKI_MAX_HIGHLIGHT_LENGTH;exports.SupportedEntityDeckArray=g.SupportedEntityDeckArray;exports.SupportedEntityType=g.SupportedEntityType;exports.SupportedEntityTypesArray=g.SupportedEntityTypesArray;exports.isSupportedDeckEntityType=g.isSupportedDeckEntityType;exports.Appearances=yt;exports.BASE_FORM_CONFIG_TABS=On;exports.ConfigCardDisplay=Sn;exports.ConfigCardItem=gt;exports.DeckCodeBlock=St;exports.EntityBaseConfigCard=No;exports.EntityBaseForm=Oo;exports.EntityBaseFormType=en;exports.EntityBaseTable=qo;exports.EntityDeleteModal=Ho;exports.EntityEmptyState=zi;exports.EntityFilter=ni;exports.EntityFormBlock=Ai;exports.EntityFormSection=gi;exports.EntityLink=Ii;exports.EntityToggleModal=oi;exports.EntityTypes=Zt;exports.GeneratePatModal=bn;exports.InternalLinkItem=nn;exports.JsonCodeBlock=ht;exports.PermissionsWrapper=ii;exports.SensitiveInput=Zi;exports.TableTags=tr;exports.TerraformCodeBlock=bt;exports.YamlCodeBlock=Ct;exports.highlightCodeBlock=Se;exports.useAxios=nr;exports.useBaseEntityDeckOptions=ir;exports.useBaseFormDeckOptions=rr;exports.useDebouncedFilter=dr;exports.useDeleteUrlBuilder=or;exports.useErrors=lr;exports.useExternalLinkCreator=ar;exports.useFetchUrlBuilder=cr;exports.useFetcher=sr;exports.useFetcherCacheKey=ur;exports.useGatewayFeatureSupported=mr;exports.useHelpers=pr;exports.useSchema=hr;exports.useSchemaProvider=vr;exports.useStringHelpers=fr;exports.useTableState=kr;exports.useTruncationDetector=yr;exports.useValidators=gr;