@kong-ui-public/entities-shared 3.65.1 → 3.65.2-pr.3750.1fe8160b2.0

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.
@@ -70,4 +70,4 @@ ${$.value}
70
70
  '@ | ${g}`,f.value=`@'
71
71
  ${m.value}
72
72
  '@ | ${g}`)}),(g,k)=>{const E=e.resolveComponent("KSelect"),_=e.resolveComponent("KBadge"),F=e.resolveComponent("KCodeBlock"),S=e.resolveComponent("KAlert"),T=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"deck-config config-card-code-block"},g.$attrs),[e.createVNode(E,{modelValue:y.value,"onUpdate:modelValue":k[0]||(k[0]=b=>y.value=b),items:s},{"item-template":e.withCtx(({item:b})=>[b.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(M.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(M.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(b.label),1)]),"selected-item-template":e.withCtx(({item:b})=>[b.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(M.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(M.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(b.label),1)]),_:1},8,["modelValue"]),e.createElementVNode("div",Ka,e.toDisplayString(e.unref(i)("deckCodeBlock.steps.step_1")),1),t.isCustomizing?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(r),{key:0,"data-testid":`deck-hint-${t.app}`,keypath:`deckCodeBlock.hint.${t.app}`,tag:"p"},e.createSlots({link:e.withCtx(()=>[e.createVNode(e.unref(te.KExternalLink),{href:t.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(a).t("deckCodeBlock.documentation")),1)]),_:1},8,["href"])]),_:2},[t.app==="konnect"?{name:"token",fn:e.withCtx(()=>[e.createVNode(_,null,{default:e.withCtx(()=>[...k[4]||(k[4]=[e.createTextVNode("DECK_KONNECT_TOKEN",-1)])]),_:1})]),key:"0"}:void 0]),1032,["data-testid","keypath"])),t.app==="konnect"?(e.openBlock(),e.createBlock(F,{key:1,id:"deck-env-codeblock",class:e.normalizeClass({customization:o.isCustomizing}),code:h.value,language:y.value,"single-line":"",theme:t.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Q)},null,8,["class","code","language","theme","onCodeBlockRender"])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createBlock(S,{key:2,class:"copy-konnect-pat-alert"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("deckCodeBlock.customization.copy_pat")),1)]),_:1})):o.isCustomizing&&o.generateKonnectPat?(e.openBlock(),e.createElementBlock("div",Fa,[e.createVNode(T,{appearance:"secondary","data-testid":"generate-konnect-pat-button",onClick:k[1]||(k[1]=b=>d.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("deckCodeBlock.customization.generate_pat")),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(i)("deckCodeBlock.customization.reuse_pat")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",Da,e.toDisplayString(e.unref(i)("deckCodeBlock.steps.step_2")),1),o.entityRecord&&!o.isCustomizing?(e.openBlock(),e.createBlock(F,{key:4,id:"deck-codeblock",class:e.normalizeClass({customization:o.isCustomizing}),code:c.value,"copy-code":f.value,"data-dd-privacy":"mask",language:y.value,"max-height":e.unref(u.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT),theme:t.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Q)},null,8,["class","code","copy-code","language","max-height","theme","onCodeBlockRender"])):o.entityRecord&&o.isCustomizing&&e.unref(n)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("div",La,e.toDisplayString(e.unref(i)("deckCodeBlock.customization.secret_advise")),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(n)),{modelValue:f.value,"onUpdate:modelValue":k[2]||(k[2]=b=>f.value=b),language:y.value},null,8,["modelValue","language"])),e.createVNode(S,{class:"customization-footer-reminder"},{icon:e.withCtx(()=>[e.createVNode(e.unref(M.InfoIcon))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(i)("deckCodeBlock.customization.footer_reminder")),1)]),_:1})],64)):e.createCommentVNode("",!0)],16),o.isCustomizing&&o.generateKonnectPat?(e.openBlock(),e.createBlock(It,{key:0,"generate-konnect-pat":o.generateKonnectPat,visible:d.value,onDismiss:k[3]||(k[3]=b=>d.value=!1),onGenerated:N},null,8,["generate-konnect-pat","visible"])):e.createCommentVNode("",!0)],64)}}}),st=u._export_sfc(Pa,[["__scopeId","data-v-81758ed8"]]),He=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(t){const n=t,{i18n:{t:o}}=u.composables.useI18n(),a=e.computed(()=>{if(n.app==="konnect"&&n.customizationOptions&&typeof n.customizationOptions!="boolean")return n.customizationOptions.generateKonnectPat});return(r,i)=>{const l=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[n.entityRecord?(e.openBlock(),e.createBlock(st,e.mergeProps({key:0},r.$attrs,{app:n.app,"control-plane-name":n.app==="konnect"?n.controlPlaneName:void 0,"entity-record":n.entityRecord,"entity-type":n.entityType,"geo-api-server-url":n.app==="konnect"?n.geoApiServerUrl:void 0,"kong-admin-api-url":n.app==="kongManager"?n.kongAdminApiUrl:void 0,"unredacted-record":n.unredactedRecord,workspace:n.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),n.entityRecord?(e.openBlock(),e.createBlock(l,{key:1,"action-button-appearance":"tertiary","action-button-text":e.unref(o)("baseConfigCard.actions.deck_customize_cancel"),"hide-cancel-button":"","max-width":"640px",title:e.unref(o)("deckCodeBlock.customization.title"),visible:n.isCustomizationModalVisible,onCancel:i[0]||(i[0]=c=>r.$emit("customization-close")),onProceed:i[1]||(i[1]=c=>r.$emit("customization-close"))},{default:e.withCtx(()=>[e.createVNode(st,{app:n.app,"control-plane-name":n.app==="konnect"?n.controlPlaneName:void 0,"entity-record":n.entityRecord,"entity-type":n.entityType,"generate-konnect-pat":a.value,"geo-api-server-url":n.app==="konnect"?n.geoApiServerUrl:void 0,"is-customizing":"","kong-admin-api-url":n.app==="kongManager"?n.kongAdminApiUrl:void 0,"unredacted-record":n.unredactedRecord,workspace:n.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)}}}),Ma={key:0,class:"config-card-display-form"},qa=["data-testid"],Ua={key:0,class:"config-card-prop-section-title"},za=e.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:t=>u.SupportedEntityTypesArray.includes(t)},subEntityType:{type:String,default:""},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:t=>u.CONFIG_CARD_FORMATS.includes(t)},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:t=>t},isDeckCustomizationVisible:{type:Boolean,required:!1,default:!1}},emits:["deck-customization:close","request-deck-format"],setup(t){const n=t,o=e.useSlots(),{i18n:{t:a}}=u.composables.useI18n(),r=p=>!!(p.tooltip||o[`${p.key}-label-tooltip`]),i=p=>{if(p==null)return;let v=JSON.parse(JSON.stringify(p));return n.codeBlockRecordFormatter&&(v=n.codeBlockRecordFormatter(v,n.format)),n.preserveCodeBlockTimestamps||(delete v.created_at,delete v.updated_at),v},l=e.computed(()=>i(n.codeBlockRecordRedacted||n.codeBlockRecord||n.record)),c=e.computed(()=>i(n.codeBlockRecord||n.record)),f=e.computed(()=>n.fetcherUrl.replace(/(\?|&)__ui_data=true/,"")),{isDeckEnabled:d,deckCustomizationOptions:s,deckCalloutPreferenceKey:y}=u.composables.useBaseEntityDeckOptions(()=>n.config,()=>n.entityType);return(p,v)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.format==="structured"?(e.openBlock(),e.createElementBlock("div",Ma,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.propListTypes,$=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${$}-props`,class:e.normalizeClass(`config-card-details-${$}-props`),"data-testid":`config-card-details-${$}-props`},[$!=="basic"?(e.openBlock(),e.createElementBlock("div",Ua,e.toDisplayString($==="advanced"?e.unref(a)("baseConfigCard.sections.advanced"):$==="plugin"?e.unref(a)("baseConfigCard.sections.plugin"):e.unref(a)("baseConfigCard.sections.policy")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.propertyCollections[$],m=>e.renderSlot(p.$slots,`config-card-item-${m.key}`,{row:m},()=>[(e.openBlock(),e.createBlock(Re,{key:m.key,item:m},e.createSlots({label:e.withCtx(()=>[e.renderSlot(p.$slots,`${m.key}-label`,{row:m},void 0,!0)]),[m.key]:e.withCtx(({rowValue:h})=>[e.renderSlot(p.$slots,m.key,{row:m,rowValue:h},void 0,!0)]),_:2},[r(m)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(p.$slots,`${m.key}-label-tooltip`,{row:m},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))],!0)),256))],10,qa))),128))])):e.createCommentVNode("",!0),t.format==="json"&&l.value?(e.openBlock(),e.createBlock(Ke,{key:1,config:n.config,"entity-record":l.value,"fetcher-url":f.value,"request-method":"get","unredacted-record":c.value},null,8,["config","entity-record","fetcher-url","unredacted-record"])):e.createCommentVNode("",!0),t.format==="yaml"&&l.value?(e.openBlock(),e.createBlock(ze,{key:2,"deck-callout-preference-key":e.unref(d)?e.unref(y):void 0,"entity-record":l.value,"unredacted-record":c.value,"onDeckCallout:clickCta":v[0]||(v[0]=$=>p.$emit("request-deck-format"))},null,8,["deck-callout-preference-key","entity-record","unredacted-record"])):e.createCommentVNode("",!0),t.format==="terraform"&&l.value?(e.openBlock(),e.createBlock(je,{key:3,"entity-record":l.value,"entity-type":n.entityType,"sub-entity-type":n.subEntityType,"unredacted-record":c.value},null,8,["entity-record","entity-type","sub-entity-type","unredacted-record"])):e.createCommentVNode("",!0),t.format==="deck"&&l.value?(e.openBlock(),e.createBlock(He,{key:4,app:t.config.app,"control-plane-name":t.config.app==="konnect"?t.config.controlPlaneName:void 0,"customization-options":e.unref(s),"entity-record":l.value,"entity-type":n.entityType,"geo-api-server-url":t.config.app==="konnect"?t.config.geoApiServerUrl:void 0,"is-customization-modal-visible":t.isDeckCustomizationVisible,"kong-admin-api-url":t.config.app==="kongManager"?t.config.apiBaseUrl:void 0,"unredacted-record":c.value,workspace:t.config.workspace||void 0,onCustomizationClose:v[1]||(v[1]=$=>p.$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))}}),At=u._export_sfc(za,[["__scopeId","data-v-83075649"]]),ja={class:"config-card-title","data-testid":"config-card-title"},Ha={class:"config-card-actions"},Ga={class:"row"},Ya=["href"],Wa={key:2,class:"config-card-details-section"},Ja=e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t?.app)||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:t=>u.SupportedEntityTypesArray.includes(t)},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:t=>t},codeBlockRecordFormatter:{type:Function,required:!1,default:t=>t},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(t,{emit:n}){const o=n,a=t,{i18n:{t:r}}=u.composables.useI18n(),{getMessageFromError:i}=u.composables.useErrors(),{convertKeyToTitle:l}=u.composables.useStringHelpers(),c=u.composables.useSchema();u.composables.useSubSchema(a.pluginConfigKey);const{axiosInstance:f}=u.composables.useAxios(a.config?.axiosRequestConfig),d=e.ref(!1),{isDeckEnabled:s,deckCustomizationOptions:y}=u.composables.useBaseEntityDeckOptions(()=>a.config,()=>a.entityType),p=e.computed(()=>{const C=[{label:r("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:r("baseForm.configuration.json"),value:"json"},{label:r("baseForm.configuration.yaml"),value:"yaml"}];a.config.app==="konnect"&&C.splice(2,0,{label:r("baseForm.configuration.terraform"),value:"terraform"}),s.value&&C.push({label:r("baseForm.configuration.deck"),value:"deck"});const w=new Set(a.formatsToHide);return C.filter(O=>O.value==="structured"||!w.has(O.value))}),v=e.ref("structured"),$=C=>{v.value=C?.value,o("configFormatChange",v.value)},m=(C,w)=>{localStorage.setItem(C,w)};e.watch(v,C=>{a.config.formatPreferenceKey&&m(a.config.formatPreferenceKey,C)}),e.onMounted(()=>{if(a.config.formatPreferenceKey){const C=localStorage.getItem(a.config.formatPreferenceKey),w=p.value;C&&w.some(O=>O.value===C)?v.value=C:v.value=w[0]?.value??"structured",m(a.config.formatPreferenceKey,v.value)}});const h={id:{type:u.ConfigurationSchemaType.ID,label:r("baseConfigCard.commonFields.id_label"),order:0,section:u.ConfigurationSchemaSection.Basic},name:{order:1,section:u.ConfigurationSchemaSection.Basic},enabled:{type:u.ConfigurationSchemaType.BadgeStatus,order:2,section:u.ConfigurationSchemaSection.Basic},updated_at:{type:u.ConfigurationSchemaType.Date,label:r("baseConfigCard.commonFields.updated_at_label"),order:3,section:u.ConfigurationSchemaSection.Basic},created_at:{type:u.ConfigurationSchemaType.Date,label:r("baseConfigCard.commonFields.created_at_label"),order:4,section:u.ConfigurationSchemaSection.Basic},tags:{type:u.ConfigurationSchemaType.BadgeTag,order:-1,section:u.ConfigurationSchemaSection.Basic},labels:{type:u.ConfigurationSchemaType.BadgeTag,order:-1,section:u.ConfigurationSchemaSection.Basic},partials:{type:u.ConfigurationSchemaType.LinkInternal,label:r("baseConfigCard.commonFields.partial_label"),order:-1,section:u.ConfigurationSchemaSection.Basic}},N=e.ref(!1),g=e.ref(!1),k=e.ref(""),E=e.ref({}),_=e.ref(null),F=e.computed(()=>{if(!(!a.codeBlockRecordResolver||_.value==null))return a.codeBlockRecordResolver(_.value)}),S=e.ref(!1),{redactByConfigSchema:T,redactByApiSchema:b,isObjectRecord:A,getApiSchemaField:I}=u.composables.useHelpers(),B=e.computed(()=>{const C=F.value||E.value;let w=C;if(A(C)&&Array.isArray(c?.value?.fields)){const O={};for(const x in C){const V=I(c?.value?.fields,x);O[x]=V?b(C[x],V):C[x]}w=O}return w=T(w,a.configSchema),a.codeBlockRecordResolver?a.codeBlockRecordResolver(w):w}),K=e.computed(()=>{if(!E.value)return[];const C=[],w=Object.keys(E.value).length;for(const O in E.value){if(O==="__ui_data")continue;const x=a.configSchema?.[O]?.order,V=h[O]?.order;let D=w;(V||V===0)&&(D=V===-1?w+1:V),x&&(D=x===-1?w+1:x),C.push([O,D])}return C.sort(function(O,x){return O[1]-x[1]}),C.map(O=>{const x=O[0],V=E.value?.[x],D=a.configSchema?.[x]||{},L=h[x];return{key:x,value:V,hidden:D.hidden||!1,type:D.type??(L?.type||u.ConfigurationSchemaType.Text),label:D.label??(L?.label||l(x)),tooltip:D.tooltip??(L?.tooltip||void 0),section:D.section??(L?.section||u.ConfigurationSchemaSection.Advanced)}}).filter(O=>!O.hidden&&O.key!==a.pluginConfigKey)}),H=e.computed(()=>{if(!E.value||!a.pluginConfigKey)return[];const C=E.value[a.pluginConfigKey]||{},w=Object.keys(C).length,O=[];for(const x in C){const V=a.pluginConfigSchema?.[x]?.order,D=C[x];let L=D!=null&&D!==""?w-1:w;V&&(L=V===-1?w+1:V),O.push([x,L])}return O.sort(function(x,V){return x[1]-V[1]}),O.map(x=>{const V=x[0],D=C[V],L=a.pluginConfigSchema?.[V]||{};return{key:V,value:D,hidden:L.hidden||!1,type:L.type??u.ConfigurationSchemaType.Text,label:L.label??l(V),tooltip:L.tooltip??void 0,section:u.ConfigurationSchemaSection.Plugin}}).filter(x=>!x.hidden)}),J=e.computed(()=>{if(!E.value||!a.policyConfigKey)return[];const C=E.value[a.policyConfigKey]||{},w=Object.keys(C).length,O=[];for(const x in C){const V=a.policyConfigSchema?.[x]?.order,D=C[x];let L=D!=null&&D!==""?w-1:w;V&&(L=V===-1?w+1:V),O.push([x,L])}return O.sort(function(x,V){return x[1]-V[1]}),O.map(x=>{const V=x[0],D=C[V],L=a.policyConfigSchema?.[V]||{};return{key:V,value:D,hidden:L.hidden||!1,type:L.type??u.ConfigurationSchemaType.Text,label:L.label??l(V),tooltip:L.tooltip??void 0,section:u.ConfigurationSchemaSection.Policy}}).filter(x=>!x.hidden)}),j=e.computed(()=>({basic:K.value?.filter(C=>C.section===u.ConfigurationSchemaSection.Basic),advanced:K.value?.filter(C=>C.section===u.ConfigurationSchemaSection.Advanced),plugin:H.value?.concat(K.value?.filter(C=>C.section===u.ConfigurationSchemaSection.Plugin)),policy:J.value?.concat(K.value?.filter(C=>C.section===u.ConfigurationSchemaSection.Policy))})),ve=e.computed(()=>{const C=[];return j.value.basic.length&&C.push("basic"),j.value.advanced.length&&C.push("advanced"),j.value.plugin.length&&C.push("plugin"),j.value.policy.length&&C.push("policy"),C}),de=e.computed(()=>{let C=`${a.config.apiBaseUrl}${a.fetchUrl}`;return a.config.app==="konnect"&&(C=C.replace(/{controlPlaneId}/gi,a.config?.controlPlaneId||"")),C.replace(/\/{workspace}/gi,a.config?.workspace?`/${a.config.workspace}`:"").replace(/{id}/gi,a.config.entityId)});return e.watch(N,C=>{o("loading",C)},{immediate:!0}),e.onBeforeMount(async()=>{g.value=!1,N.value=!0;try{const{data:C}=await f.get(de.value);if(_.value=C,a.dataKey)if(typeof C[a.dataKey]<"u")E.value={...C[a.dataKey]};else throw new Error(r("errors.dataKeyUndefined",{dataKey:a.dataKey}));else a.recordResolver?E.value={...a.recordResolver(C)}:E.value={...C};Object.keys(a.configSchema).filter(O=>a.configSchema[O].forceShow).forEach(O=>{E.value&&typeof E.value[O]>"u"&&(E.value[O]=null)}),o("fetch:success",C)}catch(C){_.value=null;const w=i(C);k.value=w.startsWith("code")?r("baseConfigCard.errors.load"):w,g.value=!0,o("fetch:error",C)}finally{N.value=!1}}),(C,w)=>{const O=e.resolveComponent("KCheckbox"),x=e.resolveComponent("KLabel"),V=e.resolveComponent("KSelect"),D=e.resolveComponent("KButton"),L=e.resolveComponent("KSkeleton"),_t=e.resolveComponent("KEmptyState"),wt=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(wt,{class:"kong-ui-entity-base-config-card","title-tag":t.titleTag},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",Ha,[e.renderSlot(C.$slots,"actions",{},void 0,!0),v.value!=="structured"?(e.openBlock(),e.createBlock(O,{key:0,modelValue:S.value,"onUpdate:modelValue":w[0]||(w[0]=G=>S.value=G),class:"sensitive-fields-checkbox","data-testid":"sensitive-fields-checkbox",label:e.unref(r)("baseConfigCard.actions.sensitive_fields"),"label-attributes":{info:e.unref(r)("baseConfigCard.actions.sensitive_fields_tooltip"),tooltipAttributes:{maxWidth:"200",placement:"top"}}},null,8,["modelValue","label","label-attributes"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ga,[e.createVNode(x,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1}),e.createVNode(V,{modelValue:v.value,"onUpdate:modelValue":w[1]||(w[1]=G=>v.value=G),"data-testid":"select-config-format",items:p.value,onChange:$},null,8,["modelValue","items"])]),v.value==="deck"&&e.unref(y)?(e.openBlock(),e.createBlock(D,{key:1,appearance:"secondary",class:"button-customize-deck","data-testid":"config-deck-customize-button",onClick:w[2]||(w[2]=G=>d.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("baseConfigCard.actions.deck_customize")),1)]),_:1})):e.createCommentVNode("",!0),t.configCardDoc?(e.openBlock(),e.createBlock(D,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(M.BookIcon),{size:`var(--kui-icon-size-40, ${e.unref(oe)})`},null,8,["size"])],8,Ya)]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[N.value?(e.openBlock(),e.createBlock(L,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):g.value?(e.openBlock(),e.createBlock(_t,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(k.value),1)]),_:1})):(e.openBlock(),e.createElementBlock("div",Wa,[e.createVNode(At,{"code-block-record":F.value,"code-block-record-formatter":t.codeBlockRecordFormatter,"code-block-record-redacted":S.value?void 0:B.value,config:t.config,"entity-type":t.entityType,"fetcher-url":de.value,format:v.value,"is-deck-customization-visible":d.value,"preserve-code-block-timestamps":t.preserveCodeBlockTimestamps,"prop-list-types":ve.value,"property-collections":j.value,record:E.value,"sub-entity-type":t.subEntityType,"onDeckCustomization:close":w[3]||(w[3]=G=>d.value=!1),onRequestDeckFormat:w[4]||(w[4]=G=>v.value="deck")},e.createSlots({_:2},[e.renderList(Object.keys(C.$slots),G=>({name:G,fn:e.withCtx(xt=>[e.renderSlot(C.$slots,G,e.mergeProps({record:E.value},xt),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},[t.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",ja,[e.renderSlot(C.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),Xa=u._export_sfc(Ja,[["__scopeId","data-v-9d8e57f1"]]),Qa=["novalidate"],Za={key:0,class:"button-customize-deck-wrapper"},er=e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t?.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},editId:{type:String,required:!1,default:null},entityType:{type:String,required:!0,validator:t=>u.SupportedEntityTypesArray.includes(t)},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(t,{expose:n,emit:o}){const a=e.inject(u.PLUGIN_FORM_LAYOUT_STATE,e.ref(!1)),r=o,i=t,l=Ut.useRouter(),{i18n:{t:c}}=u.composables.useI18n(),{getMessageFromError:f}=u.composables.useErrors(),{axiosInstance:d}=u.composables.useAxios(i.config?.axiosRequestConfig),s=e.ref(!1),y=e.computed(()=>!!i.editId),p=e.ref(!1),v=e.ref(""),$=e.computed(()=>i.canSubmit===!1||i.isReadonly),m=e.ref(!1),h=e.computed(()=>{let I=`${i.config.apiBaseUrl}${i.fetchUrl}`;return i.config.app==="konnect"&&(I=I.replace(/{controlPlaneId}/gi,i.config?.controlPlaneId||"")),I=I.replace(/\/{workspace}/gi,i.config?.workspace?`/${i.config.workspace}`:""),i.editId?(I=I.replace(/{id}/gi,i.editId),I):(I=I.replace(/\/{id}/gi,""),I)}),N=e.ref(!1),{isDeckEnabled:g,deckCustomizationOptions:k,deckCalloutPreferenceKey:E}=u.composables.useBaseFormDeckOptions(()=>i.config,()=>i.entityType),_=()=>{m.value=!m.value},F=()=>{i.config.cancelRoute?l.push(i.config.cancelRoute):S()},S=()=>{r("cancel")},T=()=>{$.value||r("submit")},b=e.computed(()=>{const I=[{title:c("baseForm.configuration.json"),hash:"#json"},{title:c("baseForm.configuration.yaml"),hash:"#yaml"}];i.config.app==="konnect"&&i.entityType!==u.SupportedEntityType.Other&&I.splice(1,0,{title:c("baseForm.configuration.terraform"),hash:"#terraform"}),g.value&&I.push({title:c("baseForm.configuration.deck"),hash:"#deck"});const B=new Set(i.tabsToHide.map(K=>`#${K}`));return I.filter(K=>!B.has(K.hash))}),A=e.ref(b.value[0]?.hash);return e.watch(b,I=>{I.some(B=>B.hash===A.value)||(A.value=I[0]?.hash)}),e.watch(()=>s.value,I=>{r("loading",I)},{immediate:!0}),e.onBeforeMount(async()=>{if(i.editId)try{p.value=!1,s.value=!0;const{data:I}=await d.get(h.value);r("fetch:success",I)}catch(I){const B=f(I);v.value=B.startsWith("code")?c("baseForm.errors.edit"):B,p.value=!0,r("fetch:error",I)}finally{s.value=!1}}),n({viewConfig:_,formCancel:S,formSubmit:T}),(I,B)=>{const K=e.resolveComponent("KSkeleton"),H=e.resolveComponent("KEmptyState"),J=e.resolveComponent("KAlert"),j=e.resolveComponent("KButton"),ve=e.resolveComponent("KTabs"),de=e.resolveComponent("KSlideout");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.wrapperComponent),{class:e.normalizeClass(["kong-ui-entity-base-form",{"new-form-layout":e.unref(a)&&t.entityType===e.unref(u.SupportedEntityType).Plugin}])},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createBlock(K,{key:0,type:"form"})):p.value?(e.openBlock(),e.createBlock(H,{key:1,"action-button-text":e.unref(c)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:F},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(v.value),1)]),_:1},8,["action-button-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:i.noValidate,onReset:e.withModifiers(S,["prevent"]),onSubmit:e.withModifiers(T,["prevent"])},[e.renderSlot(I.$slots,"default",{},void 0,!0),t.errorMessage?(e.openBlock(),e.createBlock(J,{key:0,appearance:"danger",class:"form-error","data-testid":"form-error",message:t.errorMessage},null,8,["message"])):e.createCommentVNode("",!0),t.hideActions?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.Teleport,{key:1,disabled:!t.actionTeleportTarget,to:t.actionTeleportTarget},[e.createElementVNode("div",{class:e.normalizeClass(["form-actions",{"form-actions-reverted":t.alignActionButtonToLeft}]),"data-testid":"form-actions"},[e.renderSlot(I.$slots,"form-actions",{},()=>[e.createVNode(j,{appearance:"tertiary","data-testid":`${t.entityType}-${y.value?"edit":"create"}-form-view-configuration`,onClick:B[0]||(B[0]=C=>_())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(m.value?e.unref(c)("baseForm.actions.hideConfiguration"):e.unref(c)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),e.createVNode(j,{appearance:"secondary","data-testid":`${t.entityType}-${y.value?"edit":"create"}-form-cancel`,disabled:t.isReadonly,type:"reset",onClick:B[1]||(B[1]=C=>!!t.actionTeleportTarget&&S())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText??e.unref(c)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),e.createVNode(j,{appearance:"primary","data-testid":`${t.entityType}-${y.value?"edit":"create"}-form-submit`,disabled:$.value,type:"submit",onClick:B[2]||(B[2]=C=>!!t.actionTeleportTarget&&T())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.saveButtonText??e.unref(c)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,Qa)),e.createVNode(de,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":t.slidoutTopOffset,title:e.unref(c)("baseForm.configuration.title"),visible:m.value,onClose:B[8]||(B[8]=C=>_())},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(I.$slots,"configuration-slideout-message",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("baseForm.configuration.message")),1)],!0)]),e.createVNode(ve,{modelValue:A.value,"onUpdate:modelValue":B[6]||(B[6]=C=>A.value=C),"data-testid":"form-view-configuration-slideout-tabs",tabs:b.value,onChange:B[7]||(B[7]=C=>r("codeBlockTabChange",C.replace("#","")))},{json:e.withCtx(()=>[e.createVNode(Ke,{config:t.config,"entity-record":i.formFields,"fetcher-url":i.slideoutFetchUrl??h.value,"request-method":i.slideoutRequestMethod??(i.editId?"put":"post")},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:e.withCtx(()=>[e.createVNode(ze,{"deck-callout-preference-key":e.unref(g)?e.unref(E):void 0,"entity-record":i.formFields,"onDeckCallout:clickCta":B[3]||(B[3]=C=>A.value="#deck")},null,8,["deck-callout-preference-key","entity-record"])]),terraform:e.withCtx(()=>[e.createVNode(je,{"entity-record":i.formFields,"entity-type":t.entityType,"sub-entity-type":t.subEntityType},null,8,["entity-record","entity-type","sub-entity-type"])]),deck:e.withCtx(()=>[e.unref(k)?(e.openBlock(),e.createElementBlock("div",Za,[e.createVNode(j,{appearance:"secondary",class:"button-customize-deck",onClick:B[4]||(B[4]=C=>N.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("baseConfigCard.actions.deck_customize")),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(He,{app:t.config.app,"control-plane-name":t.config.app==="konnect"?t.config.controlPlaneName:void 0,"customization-options":e.unref(k),"entity-record":i.formFields,"entity-type":i.slideoutDeckEntityType??t.entityType,"geo-api-server-url":t.config.app==="konnect"?t.config.geoApiServerUrl:void 0,"is-customization-modal-visible":N.value,"kong-admin-api-url":t.config.app==="kongManager"?t.config.apiBaseUrl:void 0,workspace:t.config.workspace||void 0,onCustomizationClose:B[5]||(B[5]=C=>N.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"])}}}),tr=u._export_sfc(er,[["__scopeId","data-v-b3590221"]]),nr=["data-truncate"],or=e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(t){const n=t,o=e.computed(()=>n.rowEl?.querySelector(`[data-testid="${n.keyName}"]`)||null),a=e.computed(()=>o.value?.querySelector('[data-truncate="true"]')||null),r=e.computed(()=>{const h=n.rowEl?.querySelectorAll("td");return h?h[0]?.getAttribute("data-testid")===n.keyName:!0}),i=e.computed(()=>r.value||n.tooltip);let l;const c=()=>{l&&(l.disconnect(),l=void 0)},f=()=>{let h=o.value?.clientWidth||0;if(o.value&&"getComputedStyle"in window){const N=window.getComputedStyle(o.value);h-=(parseFloat(N.paddingLeft)||0)+(parseFloat(N.paddingRight)||0)}s.value=a.value?.getBoundingClientRect().width||0,y.value=h,p.value=d.value?.innerText||""},d=e.ref({}),s=e.ref(0),y=e.ref(0),p=e.ref(""),v=e.computed(()=>[a.value,o.value]),$=e.watch(v,h=>{if(i.value&&(c(),"ResizeObserver"in window&&window)){l=new ResizeObserver(N=>{window.requestAnimationFrame(()=>{!Array.isArray(N)||!N.length||f()})});for(const N of h)N&&l.observe(N)}},{immediate:!0,flush:"post",deep:!0}),m=e.computed(()=>i.value?s.value>y.value:!1);return e.onMounted(()=>{f()}),e.onUnmounted(()=>{$()}),(h,N)=>{const g=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:d,class:"content-wrapper"},[i.value?(e.openBlock(),e.createElementBlock("span",{key:0,"data-truncate":i.value||void 0},[e.createVNode(g,{"max-width":"300",placement:"bottom-start",text:m.value?p.value:""},{default:e.withCtx(()=>[e.renderSlot(h.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,nr)):e.renderSlot(h.$slots,"default",{},void 0,!0,1)],512)}}}),ar=u._export_sfc(or,[["__scopeId","data-v-a3a65cac"]]),rr={class:"toolbar-container"},ir={key:0,class:"toolbar-button-container"},lr={key:0,class:"hidden"},cr=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:t=>(t&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof t=="boolean")},paginationType:{type:String,default:void 0,validator:t=>(t&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(t))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(t,{emit:n}){const o=t,a=n,{i18n:{t:r}}=u.composables.useI18n(),i=e.computed(()=>typeof o.errorMessage=="string"?{hasError:!!o.errorMessage,title:o.errorMessage,message:void 0}:{hasError:!!o.errorMessage,title:o.errorMessage?.title,message:o.errorMessage?.message}),l=e.computed(()=>o.cacheIdentifier||o.preferencesStorageKey),c=e.computed(()=>{const b=[];return Object.keys(o.tableHeaders).forEach(I=>{const B=o.tableHeaders[I];b.push({label:B.label??I,key:I,sortable:B.sortable??!1,hidable:B.hidable??!0})}),o.enableEntityActions&&b.push({key:"actions",hideLabel:!0}),b}),f=b=>({"data-rowid":b.id,"data-testid":b.name,...o.rowAttributes(b)}),d=e.ref({}),s=b=>d.value?.$el.querySelector(`[data-rowid="${b.id}"]`),y=b=>{const A={"data-testid":b.headerKey,...o.cellAttributes(b)};return b.colIndex===0&&(A.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),A},p=b=>{g(b),a("state",b)},v=()=>{a("empty-state-cta-clicked"),$()},$=()=>{a("clear-search-input")},m=e.computed(()=>o.disableRowClick?void 0:(b,A)=>{a("click:row",A)}),h=b=>{a("sort",b)},{hideTableToolbar:N,handleStateChange:g}=u.composables.useTableState(()=>o.query),{setTablePreferences:k,getTablePreferences:E}=u.de(),_=e.ref(E(l.value,o.defaultTablePreferences)),F=e.computed(()=>{const b=E(l.value);return{...o.initialFetcherParams,...b}}),S=b=>{_.value=b,c.value.forEach(A=>{!("hidable"in A)||!_.value.columnVisibility||A.hidable===!1&&(_.value.columnVisibility[A.key]=!0)}),l.value&&k(l.value,b)},T=e.computed(()=>({disablePageJump:o.disablePaginationPageJump,offset:o.paginationType==="offset",...o.paginationAttributes}));return(b,A)=>{const I=e.resolveComponent("KTableData"),B=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(B,{class:"kong-ui-entity-base-table",title:t.title,"title-tag":t.titleTag},{default:e.withCtx(()=>[e.createVNode(I,{ref_key:"tableRefs",ref:d,"cache-identifier":l.value,"cell-attrs":y,"client-sort":t.enableClientSort,"empty-state-action-message":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsCtaText"):t.emptyStateOptions.ctaText,"empty-state-action-route":t.query?void 0:t.emptyStateOptions.ctaPath,"empty-state-icon-variant":t.query?"search":"kong","empty-state-message":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsMessage"):t.emptyStateOptions.message,"empty-state-title":t.query?e.unref(r)("baseTable.emptyState.noSearchResultsTitle"):t.emptyStateOptions.title,error:i.value.hasError,"error-state-message":i.value.message,"error-state-title":i.value.title,fetcher:t.fetcher,"fetcher-cache-key":String(t.fetcherCacheKey),headers:c.value,"hide-pagination":t.hidePagination,"hide-pagination-when-optional":t.hidePaginationWhenOptional,"hide-toolbar":t.hideToolbar??e.unref(N),"initial-fetcher-params":F.value,loading:t.isLoading,"pagination-attributes":T.value,"resize-columns":"","row-attrs":f,"row-key":t.rowKey,"search-input":t.query,"sort-handler-function":t.enableClientSort?t.sortHandlerFunction:void 0,sortable:!t.disableSorting,"table-preferences":_.value,onEmptyStateActionClick:v,"onRow:click":m.value,onSort:A[0]||(A[0]=K=>h(K)),onState:p,"onUpdate:tablePreferences":S},e.createSlots({toolbar:e.withCtx(()=>[e.createElementVNode("div",rr,[e.renderSlot(b.$slots,"toolbar-filter",{},void 0,!0),b.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",ir,[e.renderSlot(b.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)])]),"action-items":e.withCtx(({row:K})=>[e.renderSlot(b.$slots,"actions",{row:K},void 0,!0)]),_:2},[b.$slots["empty-state"]?{name:"empty-state",fn:e.withCtx(()=>[e.renderSlot(b.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,e.renderList(t.tableHeaders,(K,H)=>({name:H,fn:e.withCtx(({row:J,rowValue:j})=>[e.createVNode(ar,{"key-name":String(H),"row-el":s(J),tooltip:K.tooltip},{default:e.withCtx(()=>[e.renderSlot(b.$slots,H,{row:J,rowKey:t.rowKey,rowValue:j},()=>[e.createTextVNode(e.toDisplayString(j),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),t.query?void 0:{name:"empty-state-action-icon",fn:e.withCtx(()=>[e.createVNode(e.unref(M.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"]),b.$slots["outside-actions"]&&e.unref(N)?(e.openBlock(),e.createElementBlock("div",lr,[e.renderSlot(b.$slots,"outside-actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),sr=u._export_sfc(cr,[["__scopeId","data-v-09e101d4"]]),dr={key:0,class:"kong-ui-entity-delete-error"},ur={key:1,class:"description"},fr={key:2,class:"extra"},pr=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(t,{emit:n}){const{i18nT:o}=u.composables.useI18n(),a=t,r=n,i=e.computed(()=>a.entityTypeDisplay.trim()!==""?a.entityTypeDisplay:a.entityType),l=e.computed(()=>a.needConfirm?a.entityName:""),c=()=>{r("cancel")},f=()=>{r("proceed")};return(d,s)=>{const y=e.resolveComponent("KAlert"),p=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(p,{"action-button-appearance":"danger","action-button-disabled":t.actionPending||t.confirmDisabled,"action-button-text":"Yes, delete",class:e.normalizeClass(["kong-ui-entity-delete-modal",{"kong-ui-entity-delete-modal-stacked-copy":t.stackedCopy}]),"confirmation-prompt":t.confirmationPrompt||void 0,"confirmation-text":l.value,"data-testid":"entity-delete-modal",title:t.title,visible:t.visible,onCancel:c,onProceed:f},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["body",{"body-stacked-copy":t.stackedCopy}])},[t.error?(e.openBlock(),e.createElementBlock("div",dr,[e.createVNode(y,{appearance:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(d.$slots,"message",{},()=>[e.createVNode(e.unref(o),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"])],!0),a.description||d.$slots.description?(e.openBlock(),e.createElementBlock("div",ur,[e.renderSlot(d.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0),d.$slots.extra?(e.openBlock(),e.createElementBlock("div",fr,[e.renderSlot(d.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)],2)]),_:3},8,["action-button-disabled","class","confirmation-prompt","confirmation-text","title","visible"])}}}),mr=u._export_sfc(pr,[["__scopeId","data-v-61f55f42"]]),yr={key:1,class:"kong-ui-entity-filter"},gr={class:"kong-ui-entity-filter-menu"},vr=["data-testid"],kr=["onClick","onKeydown"],hr={class:"menu-item-indicator"},Cr={class:"menu-item-body"},br=["for"],Sr={class:"menu-item-buttons"},Tr={class:"filter-clear-button-container"},Br=e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(t,{emit:n}){const{i18n:{t:o}}=u.composables.useI18n(),a=t,r=n,i=e.ref(!1),l=e.ref({}),c=e.ref(new Set),f=e.computed(()=>{const S=[];return new URLSearchParams(a.modelValue).forEach((T,b)=>{T!==""&&S.push(b)}),S}),d=e.computed(()=>{const S=a.config.fields;return Object.keys(S).filter(T=>S?.[T]?.searchable).map(T=>({label:S[T].label||T,value:T,expanded:!1}))});e.watch(()=>a.modelValue,S=>{l.value={},new URLSearchParams(S).forEach((T,b)=>{l.value[b]=T})});const s=()=>{i.value=!i.value},y=S=>{c.value.has(S)?c.value.delete(S):c.value.add(S)},p=S=>{r("update:modelValue",S)},v=()=>{p("")},$=S=>`filter-${S}`,m=S=>(a.config.schema?.[S]?.values??[]).map(T=>typeof T=="string"?{value:T,label:T}:T),h=S=>a.config.schema?.[S]?.type??"text",N=S=>{l.value={...l.value,[S]:""},k()},g=()=>{l.value={},k(!0)},k=(S=!1)=>{const T=Object.keys(l.value).reduce((b,A)=>(l.value[A]&&(b[A]=`${l.value[A]}`),b),{});S&&(i.value=!1),r("update:modelValue",new URLSearchParams(T).toString())},E=S=>!!a.config.schema?.[S]?.filterFunction,_=(S,T)=>{const b=a.config.schema?.[S];return b?.filterFunction===void 0?!0:b.filterFunction(T)},F=(S,T)=>{l.value[S]=T?T.custom?String(T.label):String(T.value):""};return(S,T)=>{const b=e.resolveComponent("KInput"),A=e.resolveComponent("KButton"),I=e.resolveComponent("KSelect");return t.config.isExactMatch?(e.openBlock(),e.createBlock(b,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":t.modelValue,placeholder:t.config.placeholder,"onUpdate:modelValue":p},{before:e.withCtx(()=>[e.createVNode(e.unref(M.FilterIcon),{decorative:""})]),after:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(M.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:v},null,512),[[e.vShow,t.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",yr,[e.createVNode(A,{appearance:"tertiary","data-testid":"filter-button",onClick:s},{default:e.withCtx(()=>[e.createVNode(e.unref(M.FilterIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(o)("filter.filterButtonText"))+" "+e.toDisplayString(f.value.length>0?`(${f.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:s},null,512),[[e.vShow,i.value]]),e.withDirectives(e.createElementVNode("div",gr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,B=>(e.openBlock(),e.createElementBlock("div",{key:B.value,class:"kong-ui-entity-filter-menu-item","data-testid":B.value},[e.createElementVNode("span",{class:e.normalizeClass(["menu-item-title",{expanded:c.value.has(B.value)}]),role:"button",tabindex:"0",onClick:K=>y(B.value),onKeydown:e.withKeys(K=>y(B.value),["enter"])},[e.createTextVNode(e.toDisplayString(B.label)+" ",1),e.withDirectives(e.createElementVNode("span",hr,null,512),[[e.vShow,f.value.includes(B.value)]]),e.createVNode(e.unref(M.ChevronDownIcon),{class:e.normalizeClass(["menu-item-expand-icon",{expanded:c.value.has(B.value)}]),color:`var(--kui-color-text-neutral-weak, ${e.unref(tn)})`},null,8,["class","color"])],42,kr),e.withDirectives(e.createElementVNode("div",Cr,[e.createElementVNode("label",{class:"menu-item-label",for:$(B.value)},e.toDisplayString(e.unref(o)("filter.fieldLabel")),9,br),t.config.schema?.[B.value]?.type==="select"?(e.openBlock(),e.createBlock(I,{key:0,id:$(B.value),"enable-filtering":E(B.value),"enable-item-creation":t.config.schema?.[B.value]?.enableItemCreation,"filter-function":K=>_(B.value,K),items:m(B.value),"model-value":l.value[B.value],placeholder:e.unref(o)("filter.selectPlaceholder"),onChange:K=>F(B.value,K)},null,8,["id","enable-filtering","enable-item-creation","filter-function","items","model-value","placeholder","onChange"])):(e.openBlock(),e.createBlock(b,{key:1,id:$(B.value),modelValue:l.value[B.value],"onUpdate:modelValue":K=>l.value[B.value]=K,autocomplete:"off",placeholder:e.unref(o)("filter.inputPlaceholder"),type:h(B.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[e.vShow,c.value.has(B.value)]]),e.withDirectives(e.createElementVNode("div",Sr,[e.createVNode(A,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:T[0]||(T[0]=K=>k(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("filter.applyButtonText")),1)]),_:1}),e.createVNode(A,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:K=>N(B.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("filter.clearButtonText")),1)]),_:1},8,["onClick"])],512),[[e.vShow,c.value.has(B.value)]])],8,vr))),128)),e.createElementVNode("div",Tr,[e.createVNode(A,{appearance:"tertiary",size:"small",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("filter.clearAllButtonText")),1)]),_:1})])],512),[[e.vShow,i.value]])]))}}}),Er=u._export_sfc(Br,[["__scopeId","data-v-10015be6"]]),Nr=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(t,{emit:n}){const{i18n:{t:o},i18nT:a}=u.composables.useI18n(),r=t,i=n,l=e.ref(!1),c=e.computed(()=>r.action==="enable"?o("toggleModal.enable.title",{entityType:r.entityType}):o("toggleModal.disable.title",{entityType:r.entityType})),f=e.computed(()=>r.action==="enable"?o("toggleModal.enable.confirmText"):o("toggleModal.disable.confirmText")),d=()=>i("cancel"),s=async()=>{if(r.onConfirm){l.value=!0;try{await r.onConfirm(),i("proceed")}catch(y){console.error(y)}finally{l.value=!1}}};return(y,p)=>{const v=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(v,{"action-button-disabled":l.value,"action-button-text":f.value,"data-testid":`${t.entityType}-${t.entityId}-toggle-prompt`,title:c.value,visible:t.visible,onCancel:d,onProceed:s},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:`toggleModal.${r.action}.message`,scope:"global"},{entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.entityType),1)]),entityName:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(t.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),$r=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(t){const n=t,o=e.ref(void 0),a=e.computed(()=>o.value===!0||o.value!==void 0&&n.forceShow===!0);return e.watch(()=>n.authFunction,async()=>{o.value=await n.authFunction()},{immediate:!0}),(r,i)=>a.value?e.renderSlot(r.$slots,"default",{isAllowed:o.value},void 0,void 0,0):e.createCommentVNode("",!0)}}),q=[];for(let t=0;t<256;++t)q.push((t+256).toString(16).slice(1));function Ir(t,n=0){return(q[t[n+0]]+q[t[n+1]]+q[t[n+2]]+q[t[n+3]]+"-"+q[t[n+4]]+q[t[n+5]]+"-"+q[t[n+6]]+q[t[n+7]]+"-"+q[t[n+8]]+q[t[n+9]]+"-"+q[t[n+10]]+q[t[n+11]]+q[t[n+12]]+q[t[n+13]]+q[t[n+14]]+q[t[n+15]]).toLowerCase()}const Ar=new Uint8Array(16);function _r(){return crypto.getRandomValues(Ar)}function wr(t,n,o){return crypto.randomUUID?crypto.randomUUID():xr(t)}function xr(t,n,o){t=t||{};const a=t.random??t.rng?.()??_r();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,Ir(a)}const Or=["aria-labelledby"],Vr={class:"form-section-wrapper"},Rr={key:1,class:"form-section-description"},Kr={key:2,class:"form-section-footer"},Fr={class:"form-section-content"},Dr=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(t){const n=e.useSlots(),o=wr();return(a,r)=>(e.openBlock(),e.createElementBlock("div",{"aria-labelledby":t.title?e.unref(o):void 0,class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":t.hasDivider}]),role:"group"},[e.createElementVNode("div",Vr,[t.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:t.stickyInfoHeader}])},[t.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.titleTag),{key:0,id:e.unref(o),class:"form-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1},8,["id"])):e.createCommentVNode("",!0),t.description||e.unref(n).description?(e.openBlock(),e.createElementBlock("div",Rr,[e.renderSlot(a.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(n).footer?(e.openBlock(),e.createElementBlock("div",Kr,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",Fr,[e.renderSlot(a.$slots,"default",{},void 0,!0)])])],10,Or))}}),Lr=u._export_sfc(Dr,[["__scopeId","data-v-ccd29028"]]),Pr={class:"header"},Mr={key:0,class:"step","data-testid":"form-block-step"},qr={class:"header-content"},Ur={class:"header-title","data-testid":"header-title"},zr={key:0,class:"header-description","data-testid":"header-description"},jr={key:1,class:"header-extra","data-testid":"header-extra"},Hr={class:"content","data-testid":"form-block-content"},Gr=e.defineComponent({__name:"EntityFormBlock",props:{step:{default:()=>{}},title:{default:""},description:{default:""}},setup(t){const n=e.useSlots();return(o,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-entity-form-block",{stepped:t.step!==void 0||n.step}])},[e.createElementVNode("header",Pr,[t.step!==void 0||n.step?(e.openBlock(),e.createElementBlock("div",Mr,[e.renderSlot(o.$slots,"step",{},()=>[e.createTextVNode(e.toDisplayString(t.step),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",qr,[e.createElementVNode("h2",Ur,[e.renderSlot(o.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)]),t.description||n.description?(e.openBlock(),e.createElementBlock("div",zr,[e.renderSlot(o.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0)]),n.extra?(e.openBlock(),e.createElementBlock("div",jr,[e.renderSlot(o.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Hr,[e.renderSlot(o.$slots,"default",{},void 0,!0)])],2))}}),Yr=u._export_sfc(Gr,[["__scopeId","data-v-7dd2f21d"]]),Wr={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},Jr={key:0,class:"deleted-entity"},Xr={key:1},Qr=["onClick"],Zr=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(t){const n=t,o=e.ref(),{isTruncated:a}=u.composables.useTruncationDetector(o),{i18n:{t:r}}=u.composables.useI18n(),i=r("global.actions.copyId"),l=e.ref(i),c=e.computed(()=>n.entityLinkData.deleted??!1),f=e.computed(()=>n.entityLinkData.id?.toString().includes(":")?n.entityLinkData.id.toString().split(":")[1]:n.entityLinkData.id),d=e.computed(()=>`${f.value?.toString().slice(0,5)} (deleted)`),s=async y=>{await y(f.value||"")&&(l.value=r("global.actions.copyToClipboard"),setTimeout(()=>{l.value=i},1800))};return(y,p)=>{const v=e.resolveComponent("KTooltip"),$=e.resolveComponent("KExternalLink"),m=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Wr,[c.value?(e.openBlock(),e.createElementBlock("div",Jr,e.toDisplayString(d.value),1)):f.value?f.value?(e.openBlock(),e.createBlock($,{key:2,class:"entity-link","hide-icon":!t.newWindow,href:t.externalLink,target:t.newWindow?"_blank":"_self"},{default:e.withCtx(()=>[e.createVNode(v,{text:e.unref(a)&&t.entityLinkData.label||""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:o,class:"entity-link-label"},e.toDisplayString(t.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Xr,e.toDisplayString(" – "))),f.value&&t.allowCopy?(e.openBlock(),e.createBlock(v,{key:l.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:l.value},{default:e.withCtx(()=>[e.createVNode(m,null,{default:e.withCtx(({copyToClipboard:h})=>[e.createElementVNode("span",{class:"entity-link-copy-id",onClick:e.withModifiers(N=>s(h),["stop"])},[e.createVNode(e.unref(M.CopyIcon),{class:"copy-icon",color:`var(--kui-color-text-primary, ${e.unref(nn)})`,"data-testid":"copy-id",size:`var(--kui-icon-size-30, ${e.unref(ft)})`},null,8,["color","size"])],8,Qr)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0)])}}}),ei=u._export_sfc(Zr,[["__scopeId","data-v-6668aea9"]]),ti={class:"kong-ui-public-entity-empty-state"},ni={class:"entity-empty-state-content"},oi={key:0,class:"empty-state-image"},ai={key:1,class:"entity-empty-state-title"},ri={key:2,class:"entity-empty-state-description"},ii={key:3,class:"entity-empty-state-pricing"},li={key:0,class:"entity-empty-state-message"},ci={key:1,class:"entity-empty-state-action"},si={key:2,class:"entity-empty-state-card-container"},di={key:0,class:"feature-icon"},ui={class:"card-header"},fi=["title"],pi={key:3,class:"entity-empty-state-bottom-container"},mi=e.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:t=>Te.includes(t)},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(t){const n=t,{i18n:{t:o}}=u.composables.useI18n(),a=e.ref(!1),r=e.computed(()=>a.value&&!!n.actionButtonText),i=e.computed(()=>Te.includes(n.appearance)?n.appearance:["primary",n.appearance]);return e.onBeforeMount(async()=>{a.value=await n.canCreate()}),e.onMounted(()=>e.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
73
- Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(l,c)=>{const f=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",ti,[e.createElementVNode("div",ni,[l.$slots.image?(e.openBlock(),e.createElementBlock("div",oi,[e.renderSlot(l.$slots,"image",{},void 0,!0)])):e.createCommentVNode("",!0),t.title||l.$slots.title?(e.openBlock(),e.createElementBlock("div",ai,[e.createElementVNode("h1",{class:e.normalizeClass(i.value)},[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)],2)])):e.createCommentVNode("",!0),t.description||l.$slots.default?(e.openBlock(),e.createElementBlock("div",ri,[e.renderSlot(l.$slots,"default",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),t.pricing||l.$slots.pricing?(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("emptyState.pricingTitle")),1),c[2]||(c[2]=e.createTextVNode()),e.renderSlot(l.$slots,"pricing",{},()=>[e.createTextVNode(e.toDisplayString(t.pricing),1)],!0)])])):e.createCommentVNode("",!0)]),l.$slots.message?(e.openBlock(),e.createElementBlock("div",li,[e.renderSlot(l.$slots,"message",{},void 0,!0)])):e.createCommentVNode("",!0),r.value||t.learnMore||l.$slots.actions?(e.openBlock(),e.createElementBlock("div",ci,[e.renderSlot(l.$slots,"actions",{},()=>[r.value?(e.openBlock(),e.createBlock(e.unref(te.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:t.appearance==="secondary"?"medium":"large",onClick:c[0]||(c[0]=d=>l.$emit("click:create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.AddIcon)),e.createTextVNode(" "+e.toDisplayString(t.actionButtonText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0),t.learnMore?(e.openBlock(),e.createBlock(e.unref(te.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:t.appearance==="secondary"?"medium":"large",onClick:c[1]||(c[1]=d=>l.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(o)("emptyState.learnMore")),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),t.features.length?(e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.features,(d,s)=>(e.openBlock(),e.createBlock(f,{key:`feature-${s}-card`,class:"entity-empty-state-card"},{title:e.withCtx(()=>[l.$slots[`feature-${s}-icon`]?(e.openBlock(),e.createElementBlock("div",di,[e.renderSlot(l.$slots,`feature-${s}-icon`,{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ui,e.toDisplayString(d.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{title:d.description},e.toDisplayString(d.description),9,fi)]),_:2},1024))),128))])):e.createCommentVNode("",!0),l.$slots.bottom?(e.openBlock(),e.createElementBlock("div",pi,[e.renderSlot(l.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),yi=u._export_sfc(mi,[["__scopeId","data-v-0b2e9081"]]),gi={key:0,class:"sensitive-input-error-message","data-testid":"sensitive-input-error-message"},vi={class:"sensitive-input-textarea-actions"},ki={key:2,class:"sensitive-input-hint","data-testid":"sensitive-input-hint"},hi={class:"sensitive-input-hint-text"},Ci="••••••••••••••",bi=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(t,{expose:n,emit:o}){e.useCssVars(T=>({v26360682:F.value}));const a=o,{i18n:{t:r}}=u.composables.useI18n(),i=e.ref(t.mode==="edit"?"masked":"editing"),l=e.ref(!1),c=e.ref(!1),f=e.computed(()=>i.value==="masked"),d=Ci,s=e.computed(()=>t.placeholder??r("sensitiveInput.placeholder")),y=e.computed(()=>t.labels?.rotateLabel??r("sensitiveInput.rotateKey")),p=e.computed(()=>t.labels?.generateLabel??r("sensitiveInput.generateKey")),v=e.computed(()=>t.labels?.hintLabel??r("sensitiveInput.oneTimeHint")),$=e.computed(()=>f.value||l.value?"text":"password");e.watch(()=>t.showOneTimeHint,T=>{T&&(l.value=!0)},{immediate:!0});const m=T=>{a("update:modelValue",T)},h=(T=!0)=>{i.value="editing",l.value=!1,T&&a("rotate")};n({enterEditing:()=>h(!1)});const N=()=>{l.value=!l.value},g=async()=>{if(!(!t.generator||c.value)){c.value=!0,a("generate");try{const T=await t.generator();a("update:modelValue",T),l.value=!0,a("generated",T)}finally{c.value=!1}}},k=e.useTemplateRef("rootElement");let E,_;const F=e.ref(`calc(${Je} + ${oe} + ${We})`),S=()=>{const T=k.value?.querySelector(".after-content-wrapper");T&&(F.value=`calc(${Je} + ${T.offsetWidth}px + ${We})`)};return e.onMounted(()=>{const T=k.value?.querySelector(".after-content-wrapper");E=new ResizeObserver(()=>{_=window.requestAnimationFrame(()=>S())}),T&&E.observe(T),S()}),e.onBeforeUnmount(()=>{E?.disconnect(),_!==void 0&&window.cancelAnimationFrame(_)}),(T,b)=>{const A=e.resolveComponent("KButton"),I=e.resolveComponent("KInput"),B=e.resolveComponent("KTextArea"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:k,class:"kong-ui-public-sensitive-input"},[t.multiline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(B,{autocomplete:"off","character-limit":!1,"data-testid":"sensitive-input",disabled:t.disabled||void 0,error:t.error,help:t.help,label:t.label,"label-attributes":t.labelAttributes,"model-value":f.value?e.unref(d):t.modelValue,placeholder:f.value?void 0:s.value,readonly:f.value||t.readonly||void 0,required:t.required||void 0,resizable:"","onUpdate:modelValue":m},e.createSlots({_:2},[T.$slots["label-tooltip"]?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(T.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1032,["disabled","error","help","label","label-attributes","model-value","placeholder","readonly","required"]),t.error&&t.errorMessage?(e.openBlock(),e.createElementBlock("p",gi,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0),e.createElementVNode("div",vi,[f.value?(e.openBlock(),e.createBlock(A,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:b[1]||(b[1]=H=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})):t.generator?(e.openBlock(),e.createBlock(A,{key:1,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:t.disabled||c.value,size:"small",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createBlock(I,{key:0,autocomplete:"off","data-testid":"sensitive-input",disabled:t.disabled,error:t.error,"error-message":t.errorMessage,help:t.help,label:t.label,"label-attributes":t.labelAttributes,"model-value":f.value?e.unref(d):t.modelValue,placeholder:f.value?void 0:s.value,readonly:f.value||t.readonly,required:t.required,type:$.value,"onUpdate:modelValue":m},e.createSlots({after:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(A,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:b[0]||(b[0]=H=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.generator?(e.openBlock(),e.createBlock(A,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:t.disabled||c.value,size:"small",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value?e.unref(M.VisibilityOffIcon):e.unref(M.VisibilityIcon)),{"aria-label":l.value?e.unref(r)("sensitiveInput.hideKey"):e.unref(r)("sensitiveInput.showKey"),class:"sensitive-input-toggle",color:"currentColor","data-testid":"sensitive-input-toggle",role:"button",size:`var(--kui-icon-size-40, ${e.unref(oe)})`,tabindex:"0",onClick:N,onKeydown:e.withKeys(e.withModifiers(N,["prevent"]),["enter","space"])},null,40,["aria-label","size","onKeydown"]))],64))]),_:2},[T.$slots["label-tooltip"]?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(T.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1032,["disabled","error","error-message","help","label","label-attributes","model-value","placeholder","readonly","required","type"])),t.showOneTimeHint?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(e.unref(M.InfoIcon),{class:"sensitive-input-hint-icon",color:`var(--kui-color-text-info, ${e.unref(Qt)})`,size:`var(--kui-icon-size-40, ${e.unref(oe)})`},null,8,["color","size"]),e.createElementVNode("span",hi,e.toDisplayString(v.value),1),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:H})=>[e.createVNode(A,{appearance:"none",class:"sensitive-input-action sensitive-input-copy","data-testid":"sensitive-input-copy",icon:!0,onClick:J=>H(t.modelValue)},{default:e.withCtx(()=>[e.createVNode(e.unref(M.CopyIcon),{color:"currentColor",size:`var(--kui-icon-size-40, ${e.unref(oe)})`},null,8,["size"]),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("sensitiveInput.copy")),1)]),_:1},8,["onClick"])]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(T.$slots,"alert",{},void 0,!0)],512)}}}),Si=u._export_sfc(bi,[["__scopeId","data-v-66fa7fb5"]]),Ti={key:1},Bi=e.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(t){const n=t,o=e.computed(()=>{if(Array.isArray(n.tags))return n.tags;if(typeof n.tags=="string")try{const a=JSON.parse(n.tags);return Array.isArray(a)?a:[]}catch{return[]}return[]});return(a,r)=>o.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(o.value,i=>(e.openBlock(),e.createBlock(e.unref(te.KBadge),{key:i,"max-width":t.tagMaxWidth,onClick:r[0]||(r[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(e.openBlock(),e.createElementBlock("span",Ti,"-"))}}),{useAxios:Ei,useDeleteUrlBuilder:Ni,useBaseEntityDeckOptions:$i,useBaseFormDeckOptions:Ii,useErrors:Ai,useExternalLinkCreator:_i,useFetchUrlBuilder:wi,useFetcher:xi,useFetcherCacheKey:Oi,useDebouncedFilter:Vi,useStringHelpers:Ri,useHelpers:Ki,useGatewayFeatureSupported:Fi,useTruncationDetector:Di,useValidators:Li,useSchema:Pi,useSchemaProvider:Mi,useTableState:qi}=u.composables;exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=u.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT;exports.CONFIG_CARD_FORMATS=u.CONFIG_CARD_FORMATS;exports.ConfigurationSchemaSection=u.ConfigurationSchemaSection;exports.ConfigurationSchemaType=u.ConfigurationSchemaType;exports.DECK_COMMAND_EDITOR_KEY=u.DECK_COMMAND_EDITOR_KEY;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=u.DECK_COMMAND_EDITOR_MISSING_WARNING;exports.EventGatewayTypesArray=u.EventGatewayTypesArray;exports.FetcherStatus=u.FetcherStatus;exports.IdentityTypesArray=u.IdentityTypesArray;exports.PLUGIN_FORM_LAYOUT_STATE=u.PLUGIN_FORM_LAYOUT_STATE;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=u.SHIKI_MAX_HIGHLIGHT_LENGTH;exports.SupportedEntityDeckArray=u.SupportedEntityDeckArray;exports.SupportedEntityType=u.SupportedEntityType;exports.SupportedEntityTypesArray=u.SupportedEntityTypesArray;exports.isSupportedDeckEntityType=u.isSupportedDeckEntityType;exports.Appearances=Te;exports.BASE_FORM_CONFIG_TABS=zt;exports.ConfigCardDisplay=At;exports.ConfigCardItem=Re;exports.DeckCodeBlock=He;exports.EntityBaseConfigCard=Xa;exports.EntityBaseForm=tr;exports.EntityBaseFormType=ut;exports.EntityBaseTable=sr;exports.EntityDeleteModal=mr;exports.EntityEmptyState=yi;exports.EntityFilter=Er;exports.EntityFormBlock=Yr;exports.EntityFormSection=Lr;exports.EntityLink=ei;exports.EntityToggleModal=Nr;exports.EntityTypes=dt;exports.GeneratePatModal=It;exports.InternalLinkItem=mt;exports.JsonCodeBlock=Ke;exports.OnboardingCard=gn;exports.PermissionsWrapper=$r;exports.SensitiveInput=Si;exports.TableTags=Bi;exports.TerraformCodeBlock=je;exports.YamlCodeBlock=ze;exports.highlightCodeBlock=Q;exports.useAxios=Ei;exports.useBaseEntityDeckOptions=$i;exports.useBaseFormDeckOptions=Ii;exports.useDebouncedFilter=Vi;exports.useDeleteUrlBuilder=Ni;exports.useErrors=Ai;exports.useExternalLinkCreator=_i;exports.useFetchUrlBuilder=wi;exports.useFetcher=xi;exports.useFetcherCacheKey=Oi;exports.useGatewayFeatureSupported=Fi;exports.useHelpers=Ki;exports.useSchema=Pi;exports.useSchemaProvider=Mi;exports.useStringHelpers=Ri;exports.useTableState=qi;exports.useTruncationDetector=Di;exports.useValidators=Li;
73
+ Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(l,c)=>{const f=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",ti,[e.createElementVNode("div",ni,[l.$slots.image?(e.openBlock(),e.createElementBlock("div",oi,[e.renderSlot(l.$slots,"image",{},void 0,!0)])):e.createCommentVNode("",!0),t.title||l.$slots.title?(e.openBlock(),e.createElementBlock("div",ai,[e.createElementVNode("h1",{class:e.normalizeClass(i.value)},[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)],!0)],2)])):e.createCommentVNode("",!0),t.description||l.$slots.default?(e.openBlock(),e.createElementBlock("div",ri,[e.renderSlot(l.$slots,"default",{},()=>[e.createElementVNode("p",null,e.toDisplayString(t.description),1)],!0)])):e.createCommentVNode("",!0),t.pricing||l.$slots.pricing?(e.openBlock(),e.createElementBlock("div",ii,[e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("emptyState.pricingTitle")),1),c[2]||(c[2]=e.createTextVNode()),e.renderSlot(l.$slots,"pricing",{},()=>[e.createTextVNode(e.toDisplayString(t.pricing),1)],!0)])])):e.createCommentVNode("",!0)]),l.$slots.message?(e.openBlock(),e.createElementBlock("div",li,[e.renderSlot(l.$slots,"message",{},void 0,!0)])):e.createCommentVNode("",!0),r.value||t.learnMore||l.$slots.actions?(e.openBlock(),e.createElementBlock("div",ci,[e.renderSlot(l.$slots,"actions",{},()=>[r.value?(e.openBlock(),e.createBlock(e.unref(te.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:t.appearance==="secondary"?"medium":"large",onClick:c[0]||(c[0]=d=>l.$emit("click:create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.AddIcon)),e.createTextVNode(" "+e.toDisplayString(t.actionButtonText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0),t.learnMore?(e.openBlock(),e.createBlock(e.unref(te.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:t.appearance==="secondary"?"medium":"large",onClick:c[1]||(c[1]=d=>l.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(M.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(o)("emptyState.learnMore")),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),t.features.length?(e.openBlock(),e.createElementBlock("div",si,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.features,(d,s)=>(e.openBlock(),e.createBlock(f,{key:`feature-${s}-card`,class:"entity-empty-state-card"},{title:e.withCtx(()=>[l.$slots[`feature-${s}-icon`]?(e.openBlock(),e.createElementBlock("div",di,[e.renderSlot(l.$slots,`feature-${s}-icon`,{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",ui,e.toDisplayString(d.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{title:d.description},e.toDisplayString(d.description),9,fi)]),_:2},1024))),128))])):e.createCommentVNode("",!0),l.$slots.bottom?(e.openBlock(),e.createElementBlock("div",pi,[e.renderSlot(l.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),yi=u._export_sfc(mi,[["__scopeId","data-v-0b2e9081"]]),gi={key:0,class:"sensitive-input-error-message","data-testid":"sensitive-input-error-message"},vi={class:"sensitive-input-textarea-actions"},ki={key:2,class:"sensitive-input-hint","data-testid":"sensitive-input-hint"},hi={class:"sensitive-input-hint-text"},Ci="••••••••••••••",bi=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(t,{expose:n,emit:o}){e.useCssVars(T=>({c19f5558:F.value}));const a=o,{i18n:{t:r}}=u.composables.useI18n(),i=e.ref(t.mode==="edit"?"masked":"editing"),l=e.ref(!1),c=e.ref(!1),f=e.computed(()=>i.value==="masked"),d=Ci,s=e.computed(()=>t.placeholder??r("sensitiveInput.placeholder")),y=e.computed(()=>t.labels?.rotateLabel??r("sensitiveInput.rotateKey")),p=e.computed(()=>t.labels?.generateLabel??r("sensitiveInput.generateKey")),v=e.computed(()=>t.labels?.hintLabel??r("sensitiveInput.oneTimeHint")),$=e.computed(()=>f.value||l.value?"text":"password");e.watch(()=>t.showOneTimeHint,T=>{T&&(l.value=!0)},{immediate:!0});const m=T=>{a("update:modelValue",T)},h=(T=!0)=>{i.value="editing",l.value=!1,T&&a("rotate")};n({enterEditing:()=>h(!1)});const N=()=>{l.value=!l.value},g=async()=>{if(!(!t.generator||c.value)){c.value=!0,a("generate");try{const T=await t.generator();a("update:modelValue",T),l.value=!0,a("generated",T)}finally{c.value=!1}}},k=e.useTemplateRef("rootElement");let E,_;const F=e.ref(`calc(${Je} + ${oe} + ${We})`),S=()=>{const T=k.value?.querySelector(".after-content-wrapper");T&&(F.value=`calc(${Je} + ${T.offsetWidth}px + ${We})`)};return e.onMounted(()=>{const T=k.value?.querySelector(".after-content-wrapper");E=new ResizeObserver(()=>{_=window.requestAnimationFrame(()=>S())}),T&&E.observe(T),S()}),e.onBeforeUnmount(()=>{E?.disconnect(),_!==void 0&&window.cancelAnimationFrame(_)}),(T,b)=>{const A=e.resolveComponent("KButton"),I=e.resolveComponent("KInput"),B=e.resolveComponent("KTextArea"),K=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:k,class:"kong-ui-public-sensitive-input"},[t.multiline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(B,{autocomplete:"new-password","character-limit":!1,"data-testid":"sensitive-input",disabled:t.disabled||void 0,error:t.error,help:t.help,label:t.label,"label-attributes":t.labelAttributes,"model-value":f.value?e.unref(d):t.modelValue,placeholder:f.value?void 0:s.value,readonly:f.value||t.readonly||void 0,required:t.required||void 0,resizable:"","onUpdate:modelValue":m},e.createSlots({_:2},[T.$slots["label-tooltip"]?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(T.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1032,["disabled","error","help","label","label-attributes","model-value","placeholder","readonly","required"]),t.error&&t.errorMessage?(e.openBlock(),e.createElementBlock("p",gi,e.toDisplayString(t.errorMessage),1)):e.createCommentVNode("",!0),e.createElementVNode("div",vi,[f.value?(e.openBlock(),e.createBlock(A,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:b[1]||(b[1]=H=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})):t.generator?(e.openBlock(),e.createBlock(A,{key:1,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:t.disabled||c.value,size:"small",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createBlock(I,{key:0,autocomplete:"new-password","data-testid":"sensitive-input",disabled:t.disabled,error:t.error,"error-message":t.errorMessage,help:t.help,label:t.label,"label-attributes":t.labelAttributes,"model-value":f.value?e.unref(d):t.modelValue,placeholder:f.value?void 0:s.value,readonly:f.value||t.readonly,required:t.required,type:$.value,"onUpdate:modelValue":m},e.createSlots({after:e.withCtx(()=>[f.value?(e.openBlock(),e.createBlock(A,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:b[0]||(b[0]=H=>h(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.generator?(e.openBlock(),e.createBlock(A,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:t.disabled||c.value,size:"small",onClick:g},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value?e.unref(M.VisibilityOffIcon):e.unref(M.VisibilityIcon)),{"aria-label":l.value?e.unref(r)("sensitiveInput.hideKey"):e.unref(r)("sensitiveInput.showKey"),class:"sensitive-input-toggle",color:"currentColor","data-testid":"sensitive-input-toggle",role:"button",size:`var(--kui-icon-size-40, ${e.unref(oe)})`,tabindex:"0",onClick:N,onKeydown:e.withKeys(e.withModifiers(N,["prevent"]),["enter","space"])},null,40,["aria-label","size","onKeydown"]))],64))]),_:2},[T.$slots["label-tooltip"]?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(T.$slots,"label-tooltip",{},void 0,!0)]),key:"0"}:void 0]),1032,["disabled","error","error-message","help","label","label-attributes","model-value","placeholder","readonly","required","type"])),t.showOneTimeHint?(e.openBlock(),e.createElementBlock("div",ki,[e.createVNode(e.unref(M.InfoIcon),{class:"sensitive-input-hint-icon",color:`var(--kui-color-text-info, ${e.unref(Qt)})`,size:`var(--kui-icon-size-40, ${e.unref(oe)})`},null,8,["color","size"]),e.createElementVNode("span",hi,e.toDisplayString(v.value),1),e.createVNode(K,null,{default:e.withCtx(({copyToClipboard:H})=>[e.createVNode(A,{appearance:"none",class:"sensitive-input-action sensitive-input-copy","data-testid":"sensitive-input-copy",icon:!0,onClick:J=>H(t.modelValue)},{default:e.withCtx(()=>[e.createVNode(e.unref(M.CopyIcon),{color:"currentColor",size:`var(--kui-icon-size-40, ${e.unref(oe)})`},null,8,["size"]),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("sensitiveInput.copy")),1)]),_:1},8,["onClick"])]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(T.$slots,"alert",{},void 0,!0)],512)}}}),Si=u._export_sfc(bi,[["__scopeId","data-v-6a275f9c"]]),Ti={key:1},Bi=e.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(t){const n=t,o=e.computed(()=>{if(Array.isArray(n.tags))return n.tags;if(typeof n.tags=="string")try{const a=JSON.parse(n.tags);return Array.isArray(a)?a:[]}catch{return[]}return[]});return(a,r)=>o.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(o.value,i=>(e.openBlock(),e.createBlock(e.unref(te.KBadge),{key:i,"max-width":t.tagMaxWidth,onClick:r[0]||(r[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(e.openBlock(),e.createElementBlock("span",Ti,"-"))}}),{useAxios:Ei,useDeleteUrlBuilder:Ni,useBaseEntityDeckOptions:$i,useBaseFormDeckOptions:Ii,useErrors:Ai,useExternalLinkCreator:_i,useFetchUrlBuilder:wi,useFetcher:xi,useFetcherCacheKey:Oi,useDebouncedFilter:Vi,useStringHelpers:Ri,useHelpers:Ki,useGatewayFeatureSupported:Fi,useTruncationDetector:Di,useValidators:Li,useSchema:Pi,useSchemaProvider:Mi,useTableState:qi}=u.composables;exports.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT=u.CONFIG_CARD_CODE_BLOCK_MAX_HEIGHT;exports.CONFIG_CARD_FORMATS=u.CONFIG_CARD_FORMATS;exports.ConfigurationSchemaSection=u.ConfigurationSchemaSection;exports.ConfigurationSchemaType=u.ConfigurationSchemaType;exports.DECK_COMMAND_EDITOR_KEY=u.DECK_COMMAND_EDITOR_KEY;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=u.DECK_COMMAND_EDITOR_MISSING_WARNING;exports.EventGatewayTypesArray=u.EventGatewayTypesArray;exports.FetcherStatus=u.FetcherStatus;exports.IdentityTypesArray=u.IdentityTypesArray;exports.PLUGIN_FORM_LAYOUT_STATE=u.PLUGIN_FORM_LAYOUT_STATE;exports.SHIKI_MAX_HIGHLIGHT_LENGTH=u.SHIKI_MAX_HIGHLIGHT_LENGTH;exports.SupportedEntityDeckArray=u.SupportedEntityDeckArray;exports.SupportedEntityType=u.SupportedEntityType;exports.SupportedEntityTypesArray=u.SupportedEntityTypesArray;exports.isSupportedDeckEntityType=u.isSupportedDeckEntityType;exports.Appearances=Te;exports.BASE_FORM_CONFIG_TABS=zt;exports.ConfigCardDisplay=At;exports.ConfigCardItem=Re;exports.DeckCodeBlock=He;exports.EntityBaseConfigCard=Xa;exports.EntityBaseForm=tr;exports.EntityBaseFormType=ut;exports.EntityBaseTable=sr;exports.EntityDeleteModal=mr;exports.EntityEmptyState=yi;exports.EntityFilter=Er;exports.EntityFormBlock=Yr;exports.EntityFormSection=Lr;exports.EntityLink=ei;exports.EntityToggleModal=Nr;exports.EntityTypes=dt;exports.GeneratePatModal=It;exports.InternalLinkItem=mt;exports.JsonCodeBlock=Ke;exports.OnboardingCard=gn;exports.PermissionsWrapper=$r;exports.SensitiveInput=Si;exports.TableTags=Bi;exports.TerraformCodeBlock=je;exports.YamlCodeBlock=ze;exports.highlightCodeBlock=Q;exports.useAxios=Ei;exports.useBaseEntityDeckOptions=$i;exports.useBaseFormDeckOptions=Ii;exports.useDebouncedFilter=Vi;exports.useDeleteUrlBuilder=Ni;exports.useErrors=Ai;exports.useExternalLinkCreator=_i;exports.useFetchUrlBuilder=wi;exports.useFetcher=xi;exports.useFetcherCacheKey=Oi;exports.useGatewayFeatureSupported=Fi;exports.useHelpers=Ki;exports.useSchema=Pi;exports.useSchemaProvider=Mi;exports.useStringHelpers=Ri;exports.useTableState=qi;exports.useTruncationDetector=Di;exports.useValidators=Li;