@kong-ui-public/entities-vaults 4.9.7 → 4.10.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.
@@ -1 +1 @@
1
- (function(G,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/entities-shared","@kong-ui-public/i18n"],e):(G=typeof globalThis<"u"?globalThis:G||self,e(G["kong-ui-public-entities-vaults"]={},G.Vue,G.VueRouter,G.KongIcons,G["kong-ui-public-entities-shared"],G["kong-ui-public-i18n"]))})(this,function(G,e,ye,Z,_,ke){"use strict";const Re={actions:{create:"New vault",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View details",loading:"Loading..."},delete:{title:"Delete a vault",title_for_secret:"Delete a secret",description:"This action cannot be reversed."},errors:{general:"Vaults could not be retrieved",delete:"The vault could not be deleted at this time.",copy:"Failed to copy to clipboard"},search:{placeholder_for_vaults:{konnect:"Filter by exact prefix or ID"},placeholder_for_secrets:{konnect:"Filter by exact key"}},vaults:{title:"Vaults",list:{toolbar_actions:{new_vault:"New vault"},table_headers:{prefix:"Prefix",prefix_ai_gateway:"Name",name:"Vault type",description:"Description",tags:"Tags",id:"ID"},empty_state:{title:"Configure a new vault",description:"Improve the security of your Kong Gateway deployment with centralized secrets."},empty_state_v2:{title:"Configure your first vault",group:"Vaults created in gateways within this group will automatically appear here.",description:"Vaults securely and centrally store sensitive information, such as credentials, tokens, and keys, to simplify secrets management.",create_cta:"New vault",learn_more:"Learn more"}}},secrets:{title:"Secrets",list:{toolbar_actions:{new_secret:"Store new secret"},table_headers:{key:"Secret key",updated_at:"Updated At"},empty_state:{title:"No secrets stored",description:"Improve the security of your Kong Gateway deployment with centralized secrets."}},form:{info:{title:"Secret",description:"Enter the secret key and secret value to be stored in Konnect vault"},fields:{key:{label:"Key",placeholder:"Enter key"},value:{label:"Value",placeholder:"Enter value here, can be simple values or multi-line"}},hint:"Once saved, the secret value will not be visible"}},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},labels:{vault_type:"Vault type",vault_type_ai_gateway:"Type",vault_name_ai_gateway:"Name"},form:{sections:{general:{title:"General information",description:"General information helps identify and manage this vault instance."},config:{title:"Vault configuration",description:"Select a type of vault and configure properties specific to each type of Vault."}},fields:{prefix:{label:"Prefix",placeholder:"Enter a unique prefix for this vault",help:"e.g. my-vault",tooltip:"The reference prefix. You need this prefix to access secrets stored in this vault. For example, {vault://<your-prefix>/<some-secret>}."},prefix_ai_gateway:{label:"Name",placeholder:"Enter a unique name for this vault",help:"e.g. my-vault",tooltip:"The reference name. You need this name to access secrets stored in this vault. For example, {vault://<your-name>/<some-secret>}."},description:{label:"Description",placeholder:"Enter some description for this vault"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}},config:{konnect:{label:"Konnect",description:"Access secrets stored directly in Konnect's unified platform to easily reference in Kong Gateway configuration."},env:{label:"Environment variables",description:"Access secrets stored via variables to be made available in Kong Gateway at runtime.",fields:{prefix:{label:"Environment variable prefix",placeholder:"Enter your environment variable vault prefix",tooltip:"Data plane will access all the environment variables starting with this prefix."}}},aws:{label:"AWS Secrets Manager",description:"Access secrets stored in AWS Secrets Manager for Kong Gateway configuration.",fields:{region:{label:"Region",placeholder:"Select an AWS region",tooltip:"The AWS region your vault is located in",locations:{"us-east-1":{location:"N. Virginia"},"us-east-2":{location:"Ohio"},"us-west-1":{location:"N. California"},"us-west-2":{location:"Oregon"},"af-south-1":{location:"Cape Town"},"ap-east-1":{location:"Hong Kong"},"ap-southeast-3":{location:"Jakarta"},"ap-south-1":{location:"Mumbai"},"ap-northeast-1":{location:"Tokyo"},"ap-northeast-2":{location:"Seoul"},"ap-northeast-3":{location:"Osaka"},"ap-southeast-1":{location:"Singapore"},"ap-southeast-2":{location:"Sydney"},"ca-central-1":{location:"Canada"},"eu-central-1":{location:"Frankfurt"},"eu-west-1":{location:"Ireland"},"eu-west-2":{location:"London"},"eu-west-3":{location:"Paris"},"eu-south-1":{location:"Milan"},"eu-north-1":{location:"Stockholm"},"me-south-1":{location:"Bahrain"},"sa-east-1":{location:"São Paulo"},"us-gov-east-1":{location:"US East"},"us-gov-west-1":{location:"US West"}}},endpoint_url:{label:"Endpoint URL",tooltip:'The AWS SecretsManager service endpoint url. If not specified, the value used by vault will be the official AWS SecretsManager service url which is `https://secretsmanager.<region>.amazonaws.com`. You can specify a complete URL(including the "http/https" scheme) to override the endpoint that vault will connect to.'},assume_role_arn:{label:"Assume role ARN",tooltip:"The target AWS IAM role ARN that will be assumed. Typically this is used for operating between multiple roles or cross-accounts. If you are not using assume role you should not specify this value."},role_session_name:{label:"Role session name",tooltip:"The role session name used for role assuming."},sts_endpoint_url:{label:"STS endpoint URL",tooltip:"The custom STS endpoint URL used for role assuming in AWS Vault. Note that this value will override the default STS endpoint URL(which should be `https: //sts.amazonaws.com`, or `https: //sts.<region>.amazonaws.com` if you have `AWS_STS_REGIONAL_ENDPOINTS` set to `regional`). If you are not using private VPC endpoint for STS service, you should not specify this value."}}},gcp:{label:"Google Secret Manager",description:"Access secrets stored in Google Secret Manager for Kong Gateway configuration.",fields:{project_id:{label:"Project ID",placeholder:"Enter your Google Cloud Project ID",tooltip:{text:"Visit your Google API Console and select {italic-text} in the projects list to see your project ID",italicText:"Manage all projects"}}}},hcv:{label:"HashiCorp Vault",description:"Access secrets stored in HashiCorp Vault for Kong Gateway configuration.",fields:{protocol:{label:"Protocol"},host:{label:"Host"},port:{label:"Port"},mount:{label:"Mount"},kv:{label:"KV"},namespace:{label:"Namespace"},ssl_verify:{label:"SSL verify"},auth_method:{label:"Authentication method"},token:{label:"Token"},kube_role:{label:"Kubernetes role"},kube_auth_path:{label:"Kubernetes auth path"},kube_api_token_file:{label:"Kubernetes API token file"},aws_auth_role:{label:"AWS auth role"},aws_auth_region:{label:"AWS auth region"},aws_access_key_id:{label:"AWS access key ID"},aws_secret_access_key:{label:"AWS secret access key"},aws_auth_nonce:{label:"AWS auth nonce"},aws_login_path:{label:"AWS login path"},azure_auth_role:{label:"Azure auth role"},azure_login_path:{label:"Azure login path"},gcp_auth_role:{label:"GCP auth role"},gcp_login_path:{label:"GCP login path"},gcp_service_account:{label:"GCP service account"},gcp_jwt_exp:{label:"GCP JWT exp"},aws_sts_endpoint_url:{label:"AWS STS endpoint URL"},aws_assume_role_arn:{label:"AWS assume role ARN"},aws_role_session_name:{label:"AWS role session name"},approle_auth_path:{label:"App role auth path"},approle_role_id:{label:"App role role ID"},approle_secret_id:{label:"App role secret ID"},approle_secret_id_file:{label:"App role secret ID file"},approle_response_wrapping:{label:"App role response wrapping"},cert_auth_cert:{label:"Cert"},cert_auth_cert_key:{label:"Cert key"},cert_auth_role_name:{label:"Role name"},oauth2_audiences:{label:"OAuth2 audiences",tooltip:"Comma-separated list of OAuth2 audiences."},oauth2_client_id:{label:"OAuth2 client ID"},oauth2_client_secret:{label:"OAuth2 client secret"},jwt_role:{label:"JWT role",tooltip:"The configured role name in HashiCorp Vault for JWT auth. When creating the role in HashiCorp Vault, make sure that the `role_type` is `jwt` and the `token_policies` have permissions to read the secrets."},oauth2_token_endpoint:{label:"OAuth2 token endpoint"}}},azure:{label:"Azure Vault",description:"Access secrets stored in Azure Key Vault for Kong Gateway configuration.",fields:{location:{label:"Location"},vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential prefix"},type:{label:"Type",placeholder:"Select a type"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},"azure-certs":{label:"Azure Key Vault (Certificates)",description:"Access certificates stored in Azure Key Vault for Kong Gateway TLS termination.",fields:{vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential prefix"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},conjur:{label:"CyberArk Secrets Manager (Conjur)",description:"Access secrets stored in CyberArk Secrets Manager (Conjur) for Kong Gateway configuration.",fields:{endpoint_url:{label:"Server",tooltip:"The CyberArk Secrets Manager (Conjur) backend url. Accepts http or https."},login:{label:"Workload identity",tooltip:"Identity of the workload or host authenticating to CyberArk Secrets Manager (Conjur). In this case Kong is the workload/host."},api_key:{label:"API key",tooltip:"The API key issued to the workload."},account:{label:"Account",tooltip:"The CyberArk Secrets Manager (Conjur) account for which the token will be issued. This is the identifier provided during CyberArk Secrets Manager (Conjur) configuration."}}},fs:{label:"File system",description:"Access secrets stored in the file system.",fields:{prefix:{label:"File path prefix",tooltip:"The prefix path for the file vault referenced files."}}},advancedFields:{title:"View advanced fields",ttl:"TTL",ttlTooltip:`Time-to-live (in seconds) of a secret from the vault when it's cached. The special value of 0 means "no rotation" and it's the default. When using non-zero values, it is recommended that they're at least 1 minute.`,negTtl:"Negative TTL",negTtlTooltip:"Time-to-live (in seconds) of a vault miss (no secret). Negatively cached secrets will remain valid until neg_ttl is reached, after which Kong will attempt to refresh the secret again. The default value for neg_ttl is 0, meaning no negative caching occurs.",resurrectTtl:"Resurrect TTL",resurrectTtlTooltip:"Time (in seconds) for how long secrets will remain in use after they are expired (config.ttl is over). This is useful when a vault becomes unreachable, or when a secret is deleted from the Vault and isn't replaced immediately. On both cases, the Gateway will keep trying to refresh the secret for resurrect_ttl seconds. After that, it will stop trying to refresh. We recommend assigning a sufficiently high value to this configuration option to ensure a seamless transition in case there are unexpected issues with the Vault. The default value for resurrect_ttl is 1e8 seconds, which is about 3 years."},commonFields:{base64_decode:{label:"Base64 decode",tooltip:"Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets."}}},unavailable:"This vault provider is available on Enterprise."},vault_secret_picker:{title:"Look up key in vault",vault:{label:"Vault",placeholder:"Select a vault"},secret_id:{label:"Secret ID",input_placeholder:"Enter a secret ID",select_placeholder:"Select or enter a complete secret ID"},optional_secret_key:{label:"Secret key",placeholder:"Enter the key or key path to access a nested secret value",help:"Optional. e.g. tokens, tokens/refresh_token"},fetch_error:{vaults:"Could not fetch available vaults",secrets:"Could not fetch available secrets",vaults_and_secrets:"Could not fetch available vaults and secrets"},no_results:"No results found",actions:{use_key:"Use key"},provider:{complete_action:"Look up {cta}",cta:"key in vault"}}};function Ie(){const o=ke.createI18n("en-us",Re);return{i18n:o,i18nT:ke.i18nTComponent(o)}}const se={useI18n:Ie},he="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Ce="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",be="/{workspace}",pe="/v1/ai-gateways/{aiGatewayId}",te={list:{konnect:{getAll:`${he}/vaults`,deleteConfigStore:`${Ce}/{id}?force=true`},kongManager:{getAll:`${be}/vaults`},aiGateway:{getAll:`${pe}/vaults`,deleteConfigStore:`${pe}/config-stores/{id}?force=true`}},form:{konnect:{create:`${he}/vaults`,createConfigStore:Ce,edit:`${he}/vaults/{id}`},kongManager:{create:`${be}/vaults`,edit:`${be}/vaults/{id}`},aiGateway:{create:`${pe}/vaults`,edit:`${pe}/vaults/{id}`,createConfigStore:`${pe}/config-stores`}}};var t=(o=>(o.AWS="aws",o.GCP="gcp",o.HCV="hcv",o.ENV="env",o.AZURE="azure",o.AZURE_CERTS="azure-certs",o.KONNECT="konnect",o.CONJUR="conjur",o.FS="fs",o))(t||{}),m=(o=>(o.TOKEN="token",o.K8S="kubernetes",o.APP_ROLE="approle",o.CERT="cert",o.JWT="jwt",o.AWS_IAM="aws_iam",o.AWS_EC2="aws_ec2",o.AZURE="azure",o.GCP_GCE="gcp_gce",o.GCP_IAM="gcp_iam",o))(m||{});const Ee={[m.TOKEN]:{token:"token"},[m.CERT]:{cert_auth_cert:"cert",cert_auth_cert_key:"key",cert_auth_role_name:"role_name"},[m.JWT]:{jwt_role:"role",oauth2_token_endpoint:"token_endpoint",oauth2_client_id:"client_id",oauth2_client_secret:"client_secret",oauth2_audiences:"audiences"},[m.APP_ROLE]:{approle_auth_path:"path",approle_response_wrapping:"response_wrapping",approle_role_id:"role_id",approle_secret_id:"secret_id",approle_secret_id_file:"secret_id_file"},[m.K8S]:{kube_role:"role",kube_auth_path:"path",kube_api_token_file:"api_token_file"},[m.GCP_IAM]:{gcp_auth_role:"role",gcp_service_account:"service_account",gcp_jwt_exp:"jwt_exp",gcp_login_path:"login_path"},[m.GCP_GCE]:{gcp_auth_role:"role",gcp_login_path:"login_path"},[m.AWS_IAM]:{aws_auth_role:"role",aws_auth_region:"region",aws_login_path:"login_path",aws_access_key_id:"access_key_id",aws_secret_access_key:"secret_access_key",aws_sts_endpoint_url:"sts_endpoint_url",aws_assume_role_arn:"assume_role_arn",aws_role_session_name:"role_session_name"},[m.AWS_EC2]:{aws_auth_role:"role",aws_auth_nonce:"nonce",aws_login_path:"login_path"},[m.AZURE]:{azure_auth_role:"role",azure_login_path:"login_path"}},ve=["protocol","host","port","mount","kv","namespace","ssl_verify","auth_method","base64_decode","ttl","neg_ttl","resurrect_ttl"],Ue=o=>Object.fromEntries(Object.entries(o).map(([y,s])=>[s,y])),Te=o=>o==null,Ve=o=>Object.fromEntries(Object.entries(o).filter(([,y])=>!Te(y))),He=o=>{const y=Ee[o.auth_method]??{},s={};for(const c of ve)c in o&&(s[c]=o[c]);for(const[c,f]of Object.entries(y))c in o&&(s[f]=o[c]);return Ve(s)},Be=o=>{const y=o.name;let s=o.config??{};if(y===t.HCV)s=He(s);else if(y===t.CONJUR){const c={...s};delete c.auth_method,s=Ve(c)}else s=Ve(s);return{type:y,name:o.prefix,description:o.description??"",config:s}},Me=o=>{const y=Ue(Ee[o.auth_method]??{}),s={};for(const[c,f]of Object.entries(o))s[y[c]??c]=f;return s},me=o=>{const y=o==null?void 0:o.type;let s=o!=null&&o.config?{...o.config}:{};return y===t.HCV?s=Me(s):y===t.CONJUR&&(s={...s,auth_method:"api_key"}),{id:o==null?void 0:o.id,created_at:o==null?void 0:o.created_at,updated_at:o==null?void 0:o.updated_at,name:y,prefix:o==null?void 0:o.name,description:(o==null?void 0:o.description)??"",config:s}},Pe={class:"kong-ui-entities-vaults-list"},$e={class:"button-row"},Ge={class:"table-content-overflow-wrapper"},Fe={class:"table-content-overflow-wrapper"},Ke=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.createRoute||!o.getViewRoute||!o.getEditRoute||o.app==="kongManager"&&!o.isExactMatch&&!o.filterSchema||o.apiType==="aiGateway"&&!o.aiGatewayId)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(o,{emit:y}){var P;const s=y,c=o,{i18n:{t:f}}=se.useI18n(),r=ye.useRouter(),H=e.computed(()=>c.config.apiType==="aiGateway"),I=e.computed(()=>H.value?"aiGateway":c.config.app),b=w=>w.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||""),{axiosInstance:x}=_.useAxios((P=c.config)==null?void 0:P.axiosRequestConfig),{hasRecords:N,handleStateChange:A}=_.useTableState(()=>W.value),g=e.computed(()=>N.value&&c.config.app==="konnect"),i=e.computed(()=>c.config.app!=="kongManager"||!!c.config.disableSorting),S={prefix:{label:f("vaults.list.table_headers.prefix"),searchable:!0,sortable:!0,hidable:!1},name:{label:f("vaults.list.table_headers.name"),searchable:!0,sortable:!0},description:{label:f("vaults.list.table_headers.description"),sortable:!1},tags:{label:f("vaults.list.table_headers.tags"),sortable:!1}},u=e.computed(()=>{if(H.value){const{description:w,name:E,prefix:T}=S;return{prefix:{...T,label:f("vaults.list.table_headers.prefix_ai_gateway")},name:E,description:w}}return S}),L=e.computed(()=>{var E,T;let w=`${c.config.apiBaseUrl}${te.list[I.value].getAll}`;return c.config.app==="konnect"&&(w=w.replace(/{controlPlaneId}/gi,((E=c.config)==null?void 0:E.controlPlaneId)||"")),b(w).replace(/\/{workspace}/gi,(T=c.config)!=null&&T.workspace?`/${c.config.workspace}`:"")}),W=e.ref(""),Q=e.computed(()=>{if(c.config.app==="konnect"||c.config.isExactMatch)return{isExactMatch:!0,placeholder:f("search.placeholder_for_vaults.konnect")};const{prefix:E,name:T}=S;return{isExactMatch:!1,fields:{name:T,prefix:E},schema:c.config.filterSchema}}),{fetcher:oe,fetcherState:v,fetcherCacheKey:a}=_.useFetcher(e.computed(()=>({...c.config,cacheIdentifier:c.cacheIdentifier})),L),Y=H.value?async w=>{const E=await oe(w);return{...E,data:(E.data??[]).map(me)}}:oe,V=()=>{W.value=""},j=()=>{a.value++},J=e.ref(null),le=async(w,E)=>{const T=w.id;if(!await E(T)){s("copy:error",{entity:w,field:"id",message:f("errors.copy")});return}s("copy:success",{entity:w,field:"id",message:f("copy.success",{val:T})})},ae=async(w,E)=>{const T=JSON.stringify(w);if(!await E(T)){s("copy:error",{entity:w,message:f("errors.copy")});return}s("copy:success",{entity:w,message:f("copy.success_brief")})},X=async w=>{var T;await((T=c.canRetrieve)==null?void 0:T.call(c,w))&&r.push(c.config.getViewRoute(w.id))},ie=w=>({label:f("actions.view"),to:c.config.getViewRoute(w)}),R=w=>({label:f("actions.edit"),to:c.config.getEditRoute(w)}),B=e.ref(void 0),z=e.ref(!1),q=e.ref(!1),O=e.ref(""),fe=_.useDeleteUrlBuilder(c.config,L.value),ce=w=>{B.value=w,z.value=!0},h=()=>{z.value=!1},C=async w=>{var l;const{apiBaseUrl:E,controlPlaneId:T}=c.config,d=b(`${E}${te.list[H.value?"aiGateway":"konnect"].deleteConfigStore}`).replace(/{controlPlaneId}/gi,T||"").replace(/\/{workspace}/gi,(l=c.config)!=null&&l.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,w);try{await x.delete(d)}catch{}},U=async()=>{var w,E,T,d;if((w=B.value)!=null&&w.id){q.value=!0;try{await x.delete(fe(B.value.id)),c.config.app==="konnect"&&((E=B.value.config)!=null&&E.config_store_id)&&C(B.value.config.config_store_id),q.value=!1,z.value=!1,a.value++,s("delete:success",B.value)}catch(l){O.value=((d=(T=l.response)==null?void 0:T.data)==null?void 0:d.message)||l.message||f("errors.delete"),s("error",l)}finally{q.value=!1}}},M=()=>{r.push(c.config.createRoute)};e.watch(v,w=>{var E,T,d;if(w.status===_.FetcherStatus.Error){J.value={title:f("errors.general")},(d=(T=(E=w.error)==null?void 0:E.response)==null?void 0:T.data)!=null&&d.message&&(J.value.message=w.error.response.data.message),s("error",w.error);return}J.value=null});const $=e.ref({ctaPath:c.config.createRoute,ctaText:void 0,message:`${f("vaults.list.empty_state.description")}${c.config.additionMessageForEmptyState?` ${c.config.additionMessageForEmptyState}`:""}`,title:f("vaults.title")}),F=e.ref(!1);return e.onBeforeMount(async()=>{F.value=await c.canCreate(),F.value&&($.value.title=f("vaults.list.empty_state.title"),$.value.ctaText=f("actions.create"))}),(w,E)=>{const T=e.resolveComponent("KButton"),d=e.resolveComponent("KEmptyState"),l=e.resolveComponent("KDropdownItem"),D=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Pe,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":i.value,"empty-state-options":$.value,"enable-entity-actions":"","error-message":J.value,fetcher:e.unref(Y),"fetcher-cache-key":e.unref(a),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:W.value,"table-headers":u.value,onClearSearchInput:V,"onClick:row":E[3]||(E[3]=k=>X(k)),onSort:j,onState:e.unref(A)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:W.value,"onUpdate:modelValue":E[0]||(E[0]=k=>W.value=k),config:Q.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",$e,[g.value?(e.openBlock(),e.createBlock(T,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:E[1]||(E[1]=k=>w.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-vault",size:o.useActionOutside?"medium":"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("vaults.list.toolbar_actions.new_vault")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),prefix:e.withCtx(({rowValue:k})=>[e.createElementVNode("div",Ge,[e.createElementVNode("b",null,e.toDisplayString(k??"-"),1)])]),name:e.withCtx(({rowValue:k})=>[e.createElementVNode("b",null,e.toDisplayString(k??"-"),1)]),description:e.withCtx(({rowValue:k})=>[e.createElementVNode("div",Fe,e.toDisplayString(k??"-"),1)]),tags:e.withCtx(({rowValue:k})=>[e.createVNode(e.unref(_.TableTags),{tags:k},null,8,["tags"])]),actions:e.withCtx(({row:k})=>[e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:p})=>[e.createVNode(l,{"data-testid":"action-entity-copy-id",onClick:K=>le(k,p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(D,null,{default:e.withCtx(({copyToClipboard:p})=>[e.createVNode(l,{"data-testid":"action-entity-copy-json",onClick:K=>ae(k,p)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canRetrieve(k)},{default:e.withCtx(()=>[e.createVNode(l,{"data-testid":"action-entity-view","has-divider":"",item:ie(k.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canEdit(k)},{default:e.withCtx(()=>[e.createVNode(l,{"data-testid":"action-entity-edit",item:R(k.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canDelete(k)},{default:e.withCtx(()=>[e.createVNode(l,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:p=>ce(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!W.value&&o.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var k;return[e.createVNode(d,{"data-testid":"vaults-entity-empty-state","icon-background":"",message:e.unref(f)("vaults.list.empty_state_v2.description"),title:e.unref(f)("vaults.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(Z.SecurityIcon),{decorative:""})]),action:e.withCtx(()=>[F.value?(e.openBlock(),e.createBlock(T,{key:0,"data-testid":"entity-create-button",onClick:M},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("vaults.list.empty_state_v2.create_cta")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(T,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:E[2]||(E[2]=p=>w.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("vaults.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(k=o.config)!=null&&k.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("vaults.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":q.value,description:e.unref(f)("delete.description"),"entity-name":B.value&&(B.value.prefix||B.value.id),"entity-type":e.unref(_.EntityTypes).Vault,error:O.value,title:e.unref(f)("delete.title"),visible:z.value,onCancel:h,onProceed:U},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),ne=(o,y)=>{const s=o.__vccOpts||o;for(const[c,f]of y)s[c]=f;return s},We=ne(Ke,[["__scopeId","data-v-374c7841"]]),Oe={class:"kong-ui-entities-vault-form"},je={class:"vault-form-provider-cards-container"},qe=["data-testid"],De={class:"provider-item-title-container"},ze={class:"provider-item-title"},Ze={class:"provider-item-description"},Le={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},Je={key:1,class:"vault-form-config-auth-method-container"},Qe={key:2,class:"vault-form-config-auth-method-container"},Ye={key:3,class:"vault-form-config-auth-method-container"},Xe={key:4,class:"vault-form-config-auth-method-container"},et={key:5,class:"vault-form-config-auth-method-container"},tt={key:6,class:"vault-form-config-auth-method-container"},at={key:7,class:"vault-form-config-auth-method-container"},ot={key:8,class:"vault-form-config-auth-method-container"},lt={key:9,class:"vault-form-config-auth-method-container"},rt={key:10,class:"vault-form-config-auth-method-container"},nt={key:8},it={class:"wrapper"},st={class:"item-50"},ct={class:"item-50"},dt={class:"wrapper"},ut={class:"item-100"},ft=ne(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||(o==null?void 0:o.app)==="konnect"&&(o==null?void 0:o.apiType)!=="aiGateway"&&!(o!=null&&o.controlPlaneId)||(o==null?void 0:o.app)==="kongManager"&&typeof(o==null?void 0:o.workspace)!="string"||(o==null?void 0:o.apiType)==="aiGateway"&&!(o!=null&&o.aiGatewayId)||!(o!=null&&o.cancelRoute))},vaultId:{type:String,required:!1,default:null}},emits:["update","error","loading"],setup(o,{emit:y}){var T;const s=o,c=y,{i18nT:f,i18n:{t:r}}=se.useI18n(),H=ye.useRouter(),{axiosInstance:I}=_.useAxios((T=s.config)==null?void 0:T.axiosRequestConfig),{getMessageFromError:b}=_.useErrors(),x=e.computed(()=>s.config.apiType==="aiGateway"),N=e.computed(()=>x.value?"aiGateway":s.config.app),A=d=>d.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||""),g=x.value?"https":"http",i=e.reactive({fields:{prefix:"",description:"",tags:""},isReadonly:!1,errorMessage:""}),S=e.reactive({prefix:"",description:"",tags:""}),u=e.ref(s.config.app==="konnect"?t.KONNECT:t.ENV),L=e.ref(null),W=e.ref(),Q=e.computed(()=>[t.AWS,t.GCP,t.HCV,t.AZURE,t.CONJUR,t.FS,t.AZURE_CERTS].includes(u.value)),oe=e.computed(()=>x.value?[{label:r("form.config.konnect.label"),value:t.KONNECT},{label:r("form.config.env.label"),value:t.ENV},{label:r("form.config.aws.label"),value:t.AWS},{label:r("form.config.gcp.label"),value:t.GCP},{label:r("form.config.hcv.label"),value:t.HCV},{label:r("form.config.azure.label"),value:t.AZURE},{label:r("form.config.conjur.label"),value:t.CONJUR}]:[...s.config.app==="konnect"?[{label:r("form.config.konnect.label"),value:t.KONNECT}]:[],{label:r("form.config.env.label"),value:t.ENV},{label:r("form.config.aws.label"),value:t.AWS,disabled:!R.value},{label:r("form.config.gcp.label"),value:t.GCP,disabled:!R.value},{label:r("form.config.hcv.label"),value:t.HCV,disabled:!R.value},...s.config.azureVaultProviderAvailable?[{label:r("form.config.azure.label"),value:t.AZURE,disabled:!R.value}]:[],...s.config.conjurVaultProviderAvailable?[{label:r("form.config.conjur.label"),value:t.CONJUR,disabled:!R.value}]:[],...s.config.fsVaultProviderAvailable?[{label:r("form.config.fs.label"),value:t.FS,disabled:!R.value}]:[],...s.config.azureCertsVaultProviderAvailable?[{label:r("form.config.azure-certs.label"),value:t.AZURE_CERTS,disabled:!R.value}]:[]]),v=s.config.base64FieldAvailable?{base64_decode:!1}:{},a=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...v},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...v},[t.GCP]:{project_id:"",...v},[t.HCV]:{protocol:g,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:m.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...v},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...v},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...v},[t.FS]:{prefix:"",...v}}),Y=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...v},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...v},[t.GCP]:{project_id:"",...v},[t.HCV]:{protocol:g,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:m.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...v},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...v},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...v},[t.FS]:{prefix:"",...v}}),V=[{label:`${r("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${r("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${r("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${r("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${r("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${r("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${r("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${r("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${r("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${r("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${r("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${r("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${r("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${r("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${r("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${r("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${r("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${r("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${r("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${r("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${r("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${r("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${r("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${r("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],j=[{label:"secrets",value:"secrets"}],J=[{label:"http",value:"http"},{label:"https",value:"https"}],le=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],ae=e.computed(()=>s.vaultId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),X=e.computed(()=>{var d;return A((d=te.form[N.value])==null?void 0:d.edit)}),ie=e.computed(()=>ae.value===_.EntityBaseFormType.Edit&&(s.config.app==="kongManager"||x.value)),R=e.computed(()=>s.config.app==="konnect"||_.useGatewayFeatureSupported({gatewayInfo:s.config.gatewayInfo,supportedRange:{enterprise:[]}})),B=()=>{var d;H.push(((d=s.config)==null?void 0:d.cancelRoute)||{name:"vault-list"})},z=d=>{c("loading",d)},q=d=>{c("error",d)},O=d=>{switch(d){case t.KONNECT:return Z.KongIcon;case t.ENV:return Z.CodeIcon;case t.AWS:return Z.AwsIcon;case t.GCP:return Z.GoogleCloudIcon;case t.HCV:return Z.HashicorpIcon;case t.AZURE:return Z.AzureIcon;case t.AZURE_CERTS:return Z.AzureIcon;case t.CONJUR:return Z.ConjourIcon;case t.FS:return Z.FolderIcon}},fe=d=>{switch(d){case t.KONNECT:return r("form.config.konnect.description");case t.ENV:return r("form.config.env.description");case t.AWS:return r("form.config.aws.description");case t.GCP:return r("form.config.gcp.description");case t.HCV:return r("form.config.hcv.description");case t.AZURE:return r("form.config.azure.description");case t.AZURE_CERTS:return r("form.config.azure-certs.description");case t.CONJUR:return r("form.config.conjur.description");case t.FS:return r("form.config.fs.description")}},ce=d=>{var p,K,re,de,n,_e;const l=x.value?me((d==null?void 0:d.item)??d):d;i.fields.prefix=((p=l==null?void 0:l.item)==null?void 0:p.prefix)||(l==null?void 0:l.prefix)||"",i.fields.description=((K=l==null?void 0:l.item)==null?void 0:K.description)||(l==null?void 0:l.description)||"";const D=((re=l==null?void 0:l.item)==null?void 0:re.tags)||(l==null?void 0:l.tags)||[];i.fields.tags=(D==null?void 0:D.join(", "))||"",Object.assign(S,i.fields);const k=((de=l==null?void 0:l.item)==null?void 0:de.config)||(l==null?void 0:l.config)||null;k&&(Object.keys(k).length||(l==null?void 0:l.name)===t.KONNECT)?(u.value=((n=l==null?void 0:l.item)==null?void 0:n.name)||(l==null?void 0:l.name)||"",L.value=u.value,W.value=((_e=l==null?void 0:l.config)==null?void 0:_e.config_store_id)||void 0,Object.assign(a[u.value],k),Object.assign(Y[u.value],k)):i.errorMessage="Error loading vault config"},h=d=>d===""||d==null,C=e.computed(()=>u.value===t.HCV?!Object.keys(a[t.HCV]).filter(d=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file","oauth2_audiences","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_login_path","gcp_login_path"].includes(d)||a[t.HCV].auth_method!==m.K8S&&(d==="kube_role"||d==="kube_api_token_file")||!s.config.hcvCspAuthMethodsAvailable&&["aws_auth_role","aws_auth_region","aws_auth_nonce","aws_access_key_id","aws_secret_access_key","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_auth_role","azure_login_path","gcp_auth_role","gcp_login_path","gcp_service_account","gcp_jwt_exp"].includes(d)||![m.AWS_IAM,m.AWS_EC2].includes(a[t.HCV].auth_method)&&d==="aws_auth_role"||a[t.HCV].auth_method!==m.AWS_IAM&&["aws_auth_region","aws_access_key_id","aws_secret_access_key"].includes(d)||a[t.HCV].auth_method===m.AWS_IAM&&["aws_access_key_id","aws_secret_access_key"].includes(d)||a[t.HCV].auth_method!==m.AWS_EC2&&d==="aws_auth_nonce"||a[t.HCV].auth_method!==m.AZURE&&d==="azure_auth_role"||![m.GCP_GCE,m.GCP_IAM].includes(a[t.HCV].auth_method)&&d==="gcp_auth_role"||a[t.HCV].auth_method!==m.GCP_IAM&&["gcp_service_account","gcp_jwt_exp"].includes(d)||a[t.HCV].auth_method!==m.TOKEN&&d==="token"||a[t.HCV].auth_method!==m.APP_ROLE&&(d==="approle_role_id"||d==="approle_response_wrapping")||a[t.HCV].auth_method===m.APP_ROLE&&d==="approle_response_wrapping"&&typeof a[u.value][d]=="boolean"||a[t.HCV].auth_method!==m.CERT&&["cert_auth_role_name","cert_auth_cert","cert_auth_cert_key"].includes(d)||a[t.HCV].auth_method!==m.JWT&&["oauth2_client_id","oauth2_client_secret","jwt_role","oauth2_token_endpoint"].includes(d)?!1:h(a[u.value][d])).length:u.value===t.AZURE?!Object.keys(a[t.AZURE]).filter(d=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:h(a[u.value][d])).length:u.value===t.AZURE_CERTS?!Object.keys(a[t.AZURE_CERTS]).filter(d=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:h(a[u.value][d])).length:u.value===t.AWS?!Object.keys(a[t.AWS]).filter(d=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(d)?!1:h(a[u.value][d])).length:!Object.keys(a[u.value]).filter(d=>["ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:h(a[u.value][d])).length),U=e.computed(()=>!!i.fields.prefix&&C.value),M=e.computed(()=>JSON.stringify(i.fields)!==JSON.stringify(S)||u.value!==L.value||JSON.stringify(a[u.value])!==JSON.stringify(Y[u.value])),$=e.computed(()=>{var l,D;let d=`${s.config.apiBaseUrl}${te.form[N.value][ae.value]}`;return s.config.app==="konnect"&&(d=d.replace(/{controlPlaneId}/gi,((l=s.config)==null?void 0:l.controlPlaneId)||"")),A(d).replace(/\/{workspace}/gi,(D=s.config)!=null&&D.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.vaultId??"")}),F=e.computed(()=>{var n,_e;const d=parseInt(String(a[t.HCV].gcp_jwt_exp),10),l={protocol:a[t.HCV].protocol,host:a[t.HCV].host,port:parseInt(a[t.HCV].port.toString()),mount:a[t.HCV].mount,kv:a[t.HCV].kv,namespace:a[t.HCV].namespace||null,...s.config.hcvSslVerifyAvailable&&{ssl_verify:a[t.HCV].ssl_verify??!0},auth_method:a[t.HCV].auth_method,...s.config.base64FieldAvailable&&{base64_decode:a[t.HCV].base64_decode},...a[t.HCV].auth_method===m.TOKEN&&{token:a[t.HCV].token},...a[t.HCV].auth_method===m.K8S&&{kube_role:a[t.HCV].kube_role,kube_auth_path:a[t.HCV].kube_auth_path||void 0,kube_api_token_file:a[t.HCV].kube_api_token_file,token:null},...a[t.HCV].auth_method===m.AWS_IAM&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_region:a[t.HCV].aws_auth_region||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0,aws_access_key_id:a[t.HCV].aws_access_key_id||void 0,aws_secret_access_key:a[t.HCV].aws_secret_access_key||void 0,aws_sts_endpoint_url:a[t.HCV].aws_sts_endpoint_url||void 0,aws_assume_role_arn:a[t.HCV].aws_assume_role_arn||void 0,aws_role_session_name:a[t.HCV].aws_role_session_name||void 0},...a[t.HCV].auth_method===m.AWS_EC2&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_nonce:a[t.HCV].aws_auth_nonce||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0},...a[t.HCV].auth_method===m.AZURE&&{azure_auth_role:a[t.HCV].azure_auth_role||void 0,azure_login_path:a[t.HCV].azure_login_path||void 0},...a[t.HCV].auth_method===m.GCP_GCE&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0},...a[t.HCV].auth_method===m.GCP_IAM&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0,gcp_service_account:a[t.HCV].gcp_service_account||void 0,gcp_jwt_exp:Number.isNaN(d)?void 0:d},...a[t.HCV].auth_method===m.APP_ROLE&&{approle_auth_path:a[t.HCV].approle_auth_path||void 0,approle_role_id:a[t.HCV].approle_role_id,approle_secret_id:a[t.HCV].approle_secret_id||void 0,approle_secret_id_file:a[t.HCV].approle_secret_id_file||void 0,approle_response_wrapping:a[t.HCV].approle_response_wrapping??!1},...a[t.HCV].auth_method===m.CERT&&{cert_auth_role_name:a[t.HCV].cert_auth_role_name,cert_auth_cert:a[t.HCV].cert_auth_cert,cert_auth_cert_key:a[t.HCV].cert_auth_cert_key},...a[t.HCV].auth_method===m.JWT&&{oauth2_audiences:a[t.HCV].oauth2_audiences||null,oauth2_client_id:a[t.HCV].oauth2_client_id,oauth2_client_secret:a[t.HCV].oauth2_client_secret,jwt_role:a[t.HCV].jwt_role,oauth2_token_endpoint:a[t.HCV].oauth2_token_endpoint}},D={...a[u.value],client_id:a[u.value].client_id||null,tenant_id:a[u.value].tenant_id||null},k={...a[u.value],client_id:a[u.value].client_id||null,tenant_id:a[u.value].tenant_id||null},p={...a[u.value],endpoint_url:a[u.value].endpoint_url||null,assume_role_arn:a[u.value].assume_role_arn||null,...s.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:a[u.value].sts_endpoint_url||null}:{}};let K=a[u.value];u.value===t.HCV?K=l:u.value===t.AZURE?K=D:u.value===t.AZURE_CERTS?K=k:u.value===t.AWS&&(K=p);let re={};if(![t.KONNECT,t.ENV].includes(u.value)){const ue=a[u.value],Ae=ue.ttl,Ne=ue.neg_ttl,Se=ue.resurrect_ttl;re={ttl:Ae?parseInt(Ae.toString(),10):null,neg_ttl:Ne?parseInt(Ne.toString(),10):null,resurrect_ttl:Se?parseInt(Se.toString(),10):null}}const de={prefix:i.fields.prefix,description:i.fields.description||null,tags:(_e=(n=i.fields.tags.split(","))==null?void 0:n.map(ue=>String(ue||"").trim()))==null?void 0:_e.filter(ue=>ue!==""),name:u.value,config:{...K,...re}};return x.value?Be(de):de}),P=e.computed(()=>({...F.value,config:{...F.value.config,config_store_id:W.value}})),w=async()=>{var d,l;try{i.isReadonly=!0;const D=A(`${s.config.apiBaseUrl}${te.form[x.value?"aiGateway":"konnect"].createConfigStore}`).replace(/{controlPlaneId}/gi,((d=s.config)==null?void 0:d.controlPlaneId)||"").replace(/\/{workspace}/gi,(l=s.config)!=null&&l.workspace?`/${s.config.workspace}`:""),k=await I.post(D);return k==null?void 0:k.data.id}catch(D){i.errorMessage=b(D),c("error",D)}finally{i.isReadonly=!1}},E=async()=>{var d;try{i.isReadonly=!0;let l;ae.value==="create"?u.value===t.KONNECT?(W.value=await w(),l=await I.post($.value,P.value)):l=await I.post($.value,F.value):ae.value==="edit"&&(u.value===t.KONNECT&&!W.value?(W.value=await w(),l=await I.put($.value,P.value)):l=((d=s.config)==null?void 0:d.app)==="konnect"?await I.put($.value,P.value):await I.patch($.value,F.value)),ce(l==null?void 0:l.data),c("update",l==null?void 0:l.data)}catch(l){i.errorMessage=b(l),c("error",l)}finally{i.isReadonly=!1}};return(d,l)=>{const D=e.resolveComponent("KTooltip"),k=e.resolveComponent("KSelect"),p=e.resolveComponent("KInput"),K=e.resolveComponent("KCheckbox"),re=e.resolveComponent("KTextArea"),de=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(e.unref(_.EntityBaseForm),{"can-submit":U.value&&M.value,config:o.config,"edit-id":o.vaultId,"entity-type":e.unref(_.SupportedEntityType).Vault,"error-message":i.errorMessage,"fetch-url":X.value,"form-fields":F.value,"is-readonly":i.isReadonly,onCancel:B,"onFetch:error":q,"onFetch:success":ce,onLoading:z,onSubmit:E},{default:e.withCtx(()=>[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(r)("form.sections.config.description"),title:e.unref(r)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",je,[e.createVNode(k,{modelValue:u.value,"onUpdate:modelValue":l[0]||(l[0]=n=>u.value=n),"data-testid":"provider-select",disabled:ie.value,"dropdown-max-height":"500",items:oe.value,readonly:i.isReadonly},{"selected-item-template":e.withCtx(({item:n})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(n.value)))),e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.label),1)]),"item-template":e.withCtx(({item:n})=>[e.createVNode(D,{placement:"top",text:n.disabled?e.unref(r)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${n.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(O(n.value)))),e.createElementVNode("div",De,[e.createElementVNode("span",ze,e.toDisplayString(n==null?void 0:n.label),1),e.createElementVNode("span",Ze,e.toDisplayString(fe(n.value)),1)])],8,qe)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items","readonly"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[u.value===e.unref(t).ENV?(e.openBlock(),e.createElementBlock("div",Le,[e.createVNode(p,{modelValue:a[e.unref(t).ENV].prefix,"onUpdate:modelValue":l[1]||(l[1]=n=>a[e.unref(t).ENV].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix",label:e.unref(r)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(r)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("form.config.env.fields.prefix.placeholder"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:0,modelValue:a[e.unref(t).ENV].base64_decode,"onUpdate:modelValue":l[2]||(l[2]=n=>a[e.unref(t).ENV].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(k,{modelValue:a[e.unref(t).AWS].region,"onUpdate:modelValue":l[3]||(l[3]=n=>a[e.unref(t).AWS].region=n),"data-testid":"vault-form-config-aws-region",items:V,label:e.unref(r)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(r)("form.config.aws.fields.region.placeholder"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AWS].endpoint_url,"onUpdate:modelValue":l[4]||(l[4]=n=>a[e.unref(t).AWS].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url",label:e.unref(r)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AWS].assume_role_arn,"onUpdate:modelValue":l[5]||(l[5]=n=>a[e.unref(t).AWS].assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn",label:e.unref(r)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AWS].role_session_name,"onUpdate:modelValue":l[6]||(l[6]=n=>a[e.unref(t).AWS].role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name",label:e.unref(r)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(p,{key:0,modelValue:a[e.unref(t).AWS].sts_endpoint_url,"onUpdate:modelValue":l[7]||(l[7]=n=>a[e.unref(t).AWS].sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url",label:e.unref(r)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:1,modelValue:a[e.unref(t).AWS].base64_decode,"onUpdate:modelValue":l[8]||(l[8]=n=>a[e.unref(t).AWS].base64_decode=n),"data-testid":"vault-form-config-aws-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:a[e.unref(t).GCP].project_id,"onUpdate:modelValue":l[9]||(l[9]=n=>a[e.unref(t).GCP].project_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id",label:e.unref(r)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(r)("form.config.gcp.fields.project_id.placeholder"),readonly:i.isReadonly,required:"",type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(f),{keypath:"form.config.gcp.fields.project_id.tooltip.text",scope:"global"},{"italic-text":e.withCtx(()=>[e.createElementVNode("em",null,e.toDisplayString(e.unref(r)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:0,modelValue:a[e.unref(t).GCP].base64_decode,"onUpdate:modelValue":l[10]||(l[10]=n=>a[e.unref(t).GCP].base64_decode=n),"data-testid":"vault-form-config-gcp-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(k,{modelValue:a[e.unref(t).HCV].protocol,"onUpdate:modelValue":l[11]||(l[11]=n=>a[e.unref(t).HCV].protocol=n),"data-testid":"vault-form-config-hcv-protocol",items:J,label:e.unref(r)("form.config.hcv.fields.protocol.label"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),o.config.hcvSslVerifyAvailable?(e.openBlock(),e.createBlock(K,{key:0,modelValue:a[e.unref(t).HCV].ssl_verify,"onUpdate:modelValue":l[12]||(l[12]=n=>a[e.unref(t).HCV].ssl_verify=n),"data-testid":"vault-form-config-hcv-ssl_verify",label:e.unref(r)("form.config.hcv.fields.ssl_verify.label"),readonly:i.isReadonly},null,8,["modelValue","label","readonly"])):e.createCommentVNode("",!0),e.createVNode(p,{modelValue:a[e.unref(t).HCV].host,"onUpdate:modelValue":l[13]||(l[13]=n=>a[e.unref(t).HCV].host=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host",label:e.unref(r)("form.config.hcv.fields.host.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].port,"onUpdate:modelValue":l[14]||(l[14]=n=>a[e.unref(t).HCV].port=n),autocomplete:"off","data-testid":"vault-form-config-hcv-port",label:e.unref(r)("form.config.hcv.fields.port.label"),min:"0",readonly:i.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].mount,"onUpdate:modelValue":l[15]||(l[15]=n=>a[e.unref(t).HCV].mount=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount",label:e.unref(r)("form.config.hcv.fields.mount.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(k,{modelValue:a[e.unref(t).HCV].kv,"onUpdate:modelValue":l[16]||(l[16]=n=>a[e.unref(t).HCV].kv=n),"data-testid":"vault-form-config-hcv-kv",items:le,label:e.unref(r)("form.config.hcv.fields.kv.label"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].namespace,"onUpdate:modelValue":l[17]||(l[17]=n=>a[e.unref(t).HCV].namespace=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace",label:e.unref(r)("form.config.hcv.fields.namespace.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(k,{modelValue:a[e.unref(t).HCV].auth_method,"onUpdate:modelValue":l[18]||(l[18]=n=>a[e.unref(t).HCV].auth_method=n),"data-testid":"vault-form-config-hcv-auth_method",items:[{label:e.unref(m).TOKEN,value:e.unref(m).TOKEN},{label:e.unref(m).K8S,value:e.unref(m).K8S},...o.config.hcvAppRoleMethodAvailable?[{label:e.unref(m).APP_ROLE,value:e.unref(m).APP_ROLE}]:[],...o.config.hcvCertMethodAvailable?[{label:e.unref(m).CERT,value:e.unref(m).CERT}]:[],...o.config.hcvJwtMethodAvailable?[{label:e.unref(m).JWT,value:e.unref(m).JWT}]:[],...o.config.hcvCspAuthMethodsAvailable?[{label:e.unref(m).AWS_IAM,value:e.unref(m).AWS_IAM},{label:e.unref(m).AWS_EC2,value:e.unref(m).AWS_EC2},{label:e.unref(m).AZURE,value:e.unref(m).AZURE},{label:e.unref(m).GCP_GCE,value:e.unref(m).GCP_GCE},{label:e.unref(m).GCP_IAM,value:e.unref(m).GCP_IAM}]:[]],label:e.unref(r)("form.config.hcv.fields.auth_method.label"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),a[e.unref(t).HCV].auth_method===e.unref(m).TOKEN?(e.openBlock(),e.createElementBlock("div",Je,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":l[19]||(l[19]=n=>a[e.unref(t).HCV].token=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token",label:e.unref(r)("form.config.hcv.fields.token.label"),readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(m).K8S?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].kube_role,"onUpdate:modelValue":l[20]||(l[20]=n=>a[e.unref(t).HCV].kube_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role",label:e.unref(r)("form.config.hcv.fields.kube_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].kube_auth_path,"onUpdate:modelValue":l[21]||(l[21]=n=>a[e.unref(t).HCV].kube_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path",label:e.unref(r)("form.config.hcv.fields.kube_auth_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].kube_api_token_file,"onUpdate:modelValue":l[22]||(l[22]=n=>a[e.unref(t).HCV].kube_api_token_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file",label:e.unref(r)("form.config.hcv.fields.kube_api_token_file.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(m).AWS_IAM?(e.openBlock(),e.createElementBlock("div",Ye,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":l[23]||(l[23]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(r)("form.config.hcv.fields.aws_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_auth_region,"onUpdate:modelValue":l[24]||(l[24]=n=>a[e.unref(t).HCV].aws_auth_region=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_region",label:e.unref(r)("form.config.hcv.fields.aws_auth_region.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":l[25]||(l[25]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(r)("form.config.hcv.fields.aws_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_access_key_id,"onUpdate:modelValue":l[26]||(l[26]=n=>a[e.unref(t).HCV].aws_access_key_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_access_key_id",label:e.unref(r)("form.config.hcv.fields.aws_access_key_id.label"),readonly:i.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":l[27]||(l[27]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(r)("form.config.hcv.fields.aws_secret_access_key.label"),readonly:i.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_sts_endpoint_url,"onUpdate:modelValue":l[28]||(l[28]=n=>a[e.unref(t).HCV].aws_sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_sts_endpoint_url",label:e.unref(r)("form.config.hcv.fields.aws_sts_endpoint_url.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_assume_role_arn,"onUpdate:modelValue":l[29]||(l[29]=n=>a[e.unref(t).HCV].aws_assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_assume_role_arn",label:e.unref(r)("form.config.hcv.fields.aws_assume_role_arn.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_role_session_name,"onUpdate:modelValue":l[30]||(l[30]=n=>a[e.unref(t).HCV].aws_role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_role_session_name",label:e.unref(r)("form.config.hcv.fields.aws_role_session_name.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(m).AWS_EC2?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":l[31]||(l[31]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(r)("form.config.hcv.fields.aws_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_auth_nonce,"onUpdate:modelValue":l[32]||(l[32]=n=>a[e.unref(t).HCV].aws_auth_nonce=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_nonce",label:e.unref(r)("form.config.hcv.fields.aws_auth_nonce.label"),readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":l[33]||(l[33]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(r)("form.config.hcv.fields.aws_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(m).AZURE?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].azure_auth_role,"onUpdate:modelValue":l[34]||(l[34]=n=>a[e.unref(t).HCV].azure_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_auth_role",label:e.unref(r)("form.config.hcv.fields.azure_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].azure_login_path,"onUpdate:modelValue":l[35]||(l[35]=n=>a[e.unref(t).HCV].azure_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_login_path",label:e.unref(r)("form.config.hcv.fields.azure_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(m).GCP_GCE?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":l[36]||(l[36]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(r)("form.config.hcv.fields.gcp_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":l[37]||(l[37]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(r)("form.config.hcv.fields.gcp_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(m).GCP_IAM?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":l[38]||(l[38]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(r)("form.config.hcv.fields.gcp_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":l[39]||(l[39]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(r)("form.config.hcv.fields.gcp_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].gcp_service_account,"onUpdate:modelValue":l[40]||(l[40]=n=>a[e.unref(t).HCV].gcp_service_account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_service_account",label:e.unref(r)("form.config.hcv.fields.gcp_service_account.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].gcp_jwt_exp,"onUpdate:modelValue":l[41]||(l[41]=n=>a[e.unref(t).HCV].gcp_jwt_exp=n),autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_jwt_exp",label:e.unref(r)("form.config.hcv.fields.gcp_jwt_exp.label"),readonly:i.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(m).APP_ROLE?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].approle_auth_path,"onUpdate:modelValue":l[42]||(l[42]=n=>a[e.unref(t).HCV].approle_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path",label:e.unref(r)("form.config.hcv.fields.approle_auth_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].approle_role_id,"onUpdate:modelValue":l[43]||(l[43]=n=>a[e.unref(t).HCV].approle_role_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id",label:e.unref(r)("form.config.hcv.fields.approle_role_id.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].approle_secret_id,"onUpdate:modelValue":l[44]||(l[44]=n=>a[e.unref(t).HCV].approle_secret_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id",label:e.unref(r)("form.config.hcv.fields.approle_secret_id.label"),readonly:i.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].approle_secret_id_file,"onUpdate:modelValue":l[45]||(l[45]=n=>a[e.unref(t).HCV].approle_secret_id_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file",label:e.unref(r)("form.config.hcv.fields.approle_secret_id_file.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(K,{modelValue:a[e.unref(t).HCV].approle_response_wrapping,"onUpdate:modelValue":l[46]||(l[46]=n=>a[e.unref(t).HCV].approle_response_wrapping=n),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(r)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):a[e.unref(t).HCV].auth_method===e.unref(m).CERT?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].cert_auth_role_name,"onUpdate:modelValue":l[47]||(l[47]=n=>a[e.unref(t).HCV].cert_auth_role_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_role_name",label:e.unref(r)("form.config.hcv.fields.cert_auth_role_name.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(re,{modelValue:a[e.unref(t).HCV].cert_auth_cert,"onUpdate:modelValue":l[48]||(l[48]=n=>a[e.unref(t).HCV].cert_auth_cert=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert",label:e.unref(r)("form.config.hcv.fields.cert_auth_cert.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(re,{modelValue:a[e.unref(t).HCV].cert_auth_cert_key,"onUpdate:modelValue":l[49]||(l[49]=n=>a[e.unref(t).HCV].cert_auth_cert_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert_key",label:e.unref(r)("form.config.hcv.fields.cert_auth_cert_key.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(m).JWT?(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(p,{modelValue:a[e.unref(t).HCV].oauth2_client_id,"onUpdate:modelValue":l[50]||(l[50]=n=>a[e.unref(t).HCV].oauth2_client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_id",label:e.unref(r)("form.config.hcv.fields.oauth2_client_id.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":l[51]||(l[51]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(r)("form.config.hcv.fields.oauth2_client_secret.label"),readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].jwt_role,"onUpdate:modelValue":l[52]||(l[52]=n=>a[e.unref(t).HCV].jwt_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-jwt_role",label:e.unref(r)("form.config.hcv.fields.jwt_role.label"),"label-attributes":{info:e.unref(r)("form.config.hcv.fields.jwt_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].oauth2_token_endpoint,"onUpdate:modelValue":l[53]||(l[53]=n=>a[e.unref(t).HCV].oauth2_token_endpoint=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_token_endpoint",label:e.unref(r)("form.config.hcv.fields.oauth2_token_endpoint.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).HCV].oauth2_audiences,"onUpdate:modelValue":l[54]||(l[54]=n=>a[e.unref(t).HCV].oauth2_audiences=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_audiences",label:e.unref(r)("form.config.hcv.fields.oauth2_audiences.label"),"label-attributes":{info:e.unref(r)("form.config.hcv.fields.oauth2_audiences.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:11,modelValue:a[e.unref(t).HCV].base64_decode,"onUpdate:modelValue":l[55]||(l[55]=n=>a[e.unref(t).HCV].base64_decode=n),"data-testid":"vault-form-config-hcv-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:a[e.unref(t).AZURE].location,"onUpdate:modelValue":l[56]||(l[56]=n=>a[e.unref(t).AZURE].location=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location",label:e.unref(r)("form.config.azure.fields.location.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE].vault_uri,"onUpdate:modelValue":l[57]||(l[57]=n=>a[e.unref(t).AZURE].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri",label:e.unref(r)("form.config.azure.fields.vault_uri.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE].credentials_prefix,"onUpdate:modelValue":l[58]||(l[58]=n=>a[e.unref(t).AZURE].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix",label:e.unref(r)("form.config.azure.fields.credential_prefix.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(k,{modelValue:a[e.unref(t).AZURE].type,"onUpdate:modelValue":l[59]||(l[59]=n=>a[e.unref(t).AZURE].type=n),"data-testid":"vault-form-config-azure-type",items:j,label:e.unref(r)("form.config.azure.fields.type.label"),placeholder:e.unref(r)("form.config.azure.fields.type.placeholder"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE].client_id,"onUpdate:modelValue":l[60]||(l[60]=n=>a[e.unref(t).AZURE].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id",label:e.unref(r)("form.config.azure.fields.client_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE].tenant_id,"onUpdate:modelValue":l[61]||(l[61]=n=>a[e.unref(t).AZURE].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id",label:e.unref(r)("form.config.azure.fields.tenant_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:0,modelValue:a[e.unref(t).AZURE].base64_decode,"onUpdate:modelValue":l[62]||(l[62]=n=>a[e.unref(t).AZURE].base64_decode=n),"data-testid":"vault-form-config-azure-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).AZURE_CERTS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE_CERTS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:a[e.unref(t).AZURE_CERTS].vault_uri,"onUpdate:modelValue":l[63]||(l[63]=n=>a[e.unref(t).AZURE_CERTS].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-vault-uri",label:e.unref(r)("form.config.azure-certs.fields.vault_uri.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE_CERTS].credentials_prefix,"onUpdate:modelValue":l[64]||(l[64]=n=>a[e.unref(t).AZURE_CERTS].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-credentials-prefix",label:e.unref(r)("form.config.azure-certs.fields.credential_prefix.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE_CERTS].client_id,"onUpdate:modelValue":l[65]||(l[65]=n=>a[e.unref(t).AZURE_CERTS].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-client-id",label:e.unref(r)("form.config.azure-certs.fields.client_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).AZURE_CERTS].tenant_id,"onUpdate:modelValue":l[66]||(l[66]=n=>a[e.unref(t).AZURE_CERTS].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-tenant-id",label:e.unref(r)("form.config.azure-certs.fields.tenant_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):e.createCommentVNode("",!0),u.value===e.unref(t).CONJUR?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).CONJUR}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:a[e.unref(t).CONJUR].endpoint_url,"onUpdate:modelValue":l[67]||(l[67]=n=>a[e.unref(t).CONJUR].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-endpoint_url",label:e.unref(r)("form.config.conjur.fields.endpoint_url.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).CONJUR].login,"onUpdate:modelValue":l[68]||(l[68]=n=>a[e.unref(t).CONJUR].login=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-login",label:e.unref(r)("form.config.conjur.fields.login.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.login.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).CONJUR].account,"onUpdate:modelValue":l[69]||(l[69]=n=>a[e.unref(t).CONJUR].account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-account",label:e.unref(r)("form.config.conjur.fields.account.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.account.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(p,{modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":l[70]||(l[70]=n=>a[e.unref(t).CONJUR].api_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-api_key",label:e.unref(r)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:0,modelValue:a[e.unref(t).CONJUR].base64_decode,"onUpdate:modelValue":l[71]||(l[71]=n=>a[e.unref(t).CONJUR].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),u.value===e.unref(t).FS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).FS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(p,{modelValue:a[e.unref(t).FS].prefix,"onUpdate:modelValue":l[72]||(l[72]=n=>a[e.unref(t).FS].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-fs-prefix",label:e.unref(r)("form.config.fs.fields.prefix.label"),"label-attributes":{info:e.unref(r)("form.config.fs.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(K,{key:0,modelValue:a[e.unref(t).FS].base64_decode,"onUpdate:modelValue":l[73]||(l[73]=n=>a[e.unref(t).FS].base64_decode=n),"data-testid":"vault-form-config-fs-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),o.config.ttl?(e.openBlock(),e.createElementBlock("div",nt,[Q.value?(e.openBlock(),e.createBlock(de,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(r)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",it,[e.createElementVNode("div",st,[e.createVNode(p,{modelValue:a[u.value].ttl,"onUpdate:modelValue":l[74]||(l[74]=n=>a[u.value].ttl=n),"data-testid":"vault-ttl-input",label:e.unref(r)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(r)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",ct,[e.createVNode(p,{modelValue:a[u.value].neg_ttl,"onUpdate:modelValue":l[75]||(l[75]=n=>a[u.value].neg_ttl=n),"data-testid":"vault-neg-ttl-input",label:e.unref(r)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(r)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",dt,[e.createElementVNode("div",ut,[e.createVNode(p,{modelValue:a[u.value].resurrect_ttl,"onUpdate:modelValue":l[76]||(l[76]=n=>a[u.value].resurrect_ttl=n),"data-testid":"vault-resurrect-ttl-input",label:e.unref(r)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(r)("form.config.advancedFields.resurrectTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])])]),_:1},8,["trigger-label"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["description","title"]),e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(r)("form.sections.general.description"),title:e.unref(r)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(p,{modelValue:i.fields.prefix,"onUpdate:modelValue":l[77]||(l[77]=n=>i.fields.prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(r)(x.value?"form.fields.prefix_ai_gateway.help":"form.fields.prefix.help"),label:e.unref(r)(x.value?"form.fields.prefix_ai_gateway.label":"form.fields.prefix.label"),"label-attributes":{info:e.unref(r)(x.value?"form.fields.prefix_ai_gateway.tooltip":"form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)(x.value?"form.fields.prefix_ai_gateway.placeholder":"form.fields.prefix.placeholder"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(re,{modelValue:i.fields.description,"onUpdate:modelValue":l[78]||(l[78]=n=>i.fields.description=n),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(r)("form.fields.description.label"),placeholder:e.unref(r)("form.fields.description.placeholder"),readonly:i.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),x.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(p,{key:0,modelValue:i.fields.tags,"onUpdate:modelValue":l[79]||(l[79]=n=>i.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(r)("form.fields.tags.help"),label:e.unref(r)("form.fields.tags.label"),placeholder:e.unref(r)("form.fields.tags.placeholder"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"]))]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])])}}}),[["__scopeId","data-v-f7a2ece1"]]),pt={class:"kong-ui-vault-entity-config-card"},xe="************",mt=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&o.apiType!=="aiGateway"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||o.apiType==="aiGateway"&&!o.aiGatewayId||!o.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(o){const y=o,s=["token","approle_secret_id","api_key","aws_access_key_id","aws_secret_access_key","aws_auth_nonce","cert_auth_cert_key","oauth2_client_secret"],c=e.computed(()=>y.config.apiType==="aiGateway"),f=e.computed(()=>{var i,S,u;const g=c.value?(i=te.form.aiGateway)==null?void 0:i.edit:(u=te.form[(S=y.config)==null?void 0:S.app])==null?void 0:u.edit;return g==null?void 0:g.replace(/{aiGatewayId}/gi,y.config.aiGatewayId||"")}),r=g=>c.value?me(g):g,{i18n:{t:H}}=se.useI18n(),{convertKeyToTitle:I}=_.useStringHelpers(),{getPropValue:b}=_.useHelpers(),x=e.computed(()=>({id:{},name:{label:H(c.value?"labels.vault_type_ai_gateway":"labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:_.ConfigurationSchemaSection.Basic,label:c.value?H("labels.vault_name_ai_gateway"):void 0},description:{order:6,section:_.ConfigurationSchemaSection.Basic},...c.value?{}:{tags:{order:7}},config:{order:8,type:_.ConfigurationSchemaType.Json}})),N=g=>{const i={...g.config};s.forEach(u=>{u in i&&(i[u]=xe)});const S={...g,config:i};if(c.value){const u={...S,type:S.name,name:S.prefix};return delete u.prefix,u}return S},A=g=>{var i,S;return((S=(i=x.value)==null?void 0:i[g])==null?void 0:S.label)||I(g)};return(g,i)=>(e.openBlock(),e.createElementBlock("div",pt,[e.createVNode(e.unref(_.EntityBaseConfigCard),{"code-block-record-formatter":N,config:o.config,"config-card-doc":o.configCardDoc,"config-schema":x.value,"entity-type":e.unref(_.SupportedEntityType).Vault,"fetch-url":f.value,"hide-title":o.hideTitle,"record-resolver":r,"onFetch:error":i[0]||(i[0]=S=>g.$emit("fetch:error",S)),"onFetch:success":i[1]||(i[1]=S=>g.$emit("fetch:success",S)),onLoading:i[2]||(i[2]=S=>g.$emit("loading",S))},{config:e.withCtx(({rowValue:S})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(S).sort(),u=>(e.openBlock(),e.createBlock(e.unref(_.ConfigCardItem),{key:u,item:{key:u,value:s.includes(u)?xe:e.unref(b)(u,S),label:A(u)}},null,8,["item"]))),128))]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),_t="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",we="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",ge="/v1/ai-gateways/{aiGatewayId}",ee={getVault:{konnect:`${_t}/vaults/{id}`,aiGateway:`${ge}/vaults/{id}`},list:{konnect:`${we}/{id}/secrets`,aiGateway:`${ge}/config-stores/{id}/secrets`},form:{konnect:{create:`${we}/{id}/secrets`,edit:`${we}/{id}/secrets/{secretId}`},aiGateway:{create:`${ge}/config-stores/{id}/secrets`,edit:`${ge}/config-stores/{id}/secrets/{secretId}`}}},gt={class:"table-content-overflow-wrapper"},yt=ne(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},configStoreId:{type:String,required:!0},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","delete:success"],setup(o,{emit:y}){var ie;const s=y,c=o,{i18n:{t:f,formatUnixTimeStamp:r}}=se.useI18n(),{axiosInstance:H}=_.useAxios((ie=c.config)==null?void 0:ie.axiosRequestConfig),b={key:{label:f("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:f("secrets.list.table_headers.updated_at"),sortable:!1}},x=R=>({"data-testid":R.key}),N=e.computed(()=>c.config.apiType==="aiGateway"?ee.list.aiGateway:ee.list[c.config.app]),A=e.computed(()=>{var R,B;return`${c.config.apiBaseUrl}${N.value}`.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((R=c.config)==null?void 0:R.controlPlaneId)||"").replace(/\/{workspace}/gi,(B=c.config)!=null&&B.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,c.configStoreId||"")}),g=e.ref(""),i={isExactMatch:!0,placeholder:f("search.placeholder_for_secrets.konnect")},{fetcher:S,fetcherState:u,fetcherCacheKey:L}=_.useFetcher(e.computed(()=>({...c.config,cacheIdentifier:c.cacheIdentifier})),A),W=()=>{g.value=""},Q=e.ref(null),oe=R=>({label:f("actions.edit"),to:c.config.getEditRoute(R)}),v=e.ref(void 0),a=e.ref(!1),Y=e.ref(!1),V=e.ref(""),j=_.useDeleteUrlBuilder(c.config,A.value),J=R=>{v.value=R,a.value=!0},le=()=>{a.value=!1},ae=async()=>{var R,B,z;if((R=v.value)!=null&&R.key){Y.value=!0;try{await H.delete(j(v.value.key)),Y.value=!1,a.value=!1,L.value++,s("delete:success",v.value)}catch(q){V.value=((z=(B=q.response)==null?void 0:B.data)==null?void 0:z.message)||q.message||f("errors.delete"),s("error",q)}finally{Y.value=!1}}};e.watch(u,R=>{var B,z,q;if(R.status===_.FetcherStatus.Error){Q.value={title:f("errors.general")},(q=(z=(B=R.error)==null?void 0:B.response)==null?void 0:z.data)!=null&&q.message&&(Q.value.message=R.error.response.data.message),s("error",R.error);return}Q.value=null});const X=e.ref({ctaPath:c.config.createRoute,ctaText:void 0,message:`${f("secrets.list.empty_state.description")}${c.config.additionMessageForEmptyState?` ${c.config.additionMessageForEmptyState}`:""}`,title:f("secrets.title")});return e.onBeforeMount(async()=>{await c.canCreate()&&(X.value.title=f("secrets.list.empty_state.title"),X.value.ctaText=f("secrets.list.toolbar_actions.new_secret"))}),(R,B)=>{const z=e.resolveComponent("KButton"),q=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":"","empty-state-options":X.value,"enable-entity-actions":"","error-message":Q.value,fetcher:e.unref(S),"fetcher-cache-key":e.unref(L),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:g.value,"row-attributes":x,"table-headers":e.unref(b),onClearSearchInput:W},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:g.value,"onUpdate:modelValue":B[0]||(B[0]=O=>g.value=O),config:i},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(z,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(f)("secrets.list.toolbar_actions.new_secret")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),key:e.withCtx(({rowValue:O})=>[e.createElementVNode("div",gt,[e.createElementVNode("b",null,e.toDisplayString(O??"-"),1)])]),updated_at:e.withCtx(({rowValue:O})=>[e.createElementVNode("span",null,e.toDisplayString(O?e.unref(r)(new Date(O).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:O})=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canEdit(O)},{default:e.withCtx(()=>[e.createVNode(q,{"data-testid":"action-entity-edit",item:oe(O.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canDelete(O)},{default:e.withCtx(()=>[e.createVNode(q,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:fe=>J(O)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(f)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":Y.value,description:e.unref(f)("delete.description"),"entity-name":v.value&&v.value.key,"entity-type":e.unref(_.EntityTypes).Secret,error:V.value,title:e.unref(f)("delete.title_for_secret"),visible:a.value,onCancel:le,onProceed:ae},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-115ca40d"]]),ht={class:"kong-ui-entities-secrets-list"},bt=ne(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},vaultId:{type:String,required:!0},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","delete:success"],setup(o,{emit:y}){var N;const s=y,c=o,f=A=>{s("error",A)},r=A=>{s("delete:success",A)},{axiosInstance:H}=_.useAxios((N=c.config)==null?void 0:N.axiosRequestConfig),I=e.ref(""),b=e.computed(()=>c.config.apiType==="aiGateway"?ee.getVault.aiGateway:ee.getVault[c.config.app]),x=e.computed(()=>{var A,g;return`${c.config.apiBaseUrl}${b.value}`.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((A=c.config)==null?void 0:A.controlPlaneId)||"").replace(/\/{workspace}/gi,(g=c.config)!=null&&g.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,c.vaultId)});return e.onBeforeMount(async()=>{var A;try{const{data:g}=await H.get(x.value);I.value=(A=g==null?void 0:g.config)==null?void 0:A.config_store_id}catch(g){s("error",g)}}),(A,g)=>(e.openBlock(),e.createElementBlock("div",ht,[I.value?(e.openBlock(),e.createBlock(yt,e.mergeProps({key:0},c,{"config-store-id":I.value,"onDelete:success":r,onError:f}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e9c157a0"]]),Vt=ne(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||o.apiType!=="aiGateway"&&!o.controlPlaneId||!o.cancelRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:y}){var Y;const s=o,c=y,{i18n:{t:f}}=se.useI18n(),r=ye.useRouter(),{axiosInstance:H}=_.useAxios((Y=s.config)==null?void 0:Y.axiosRequestConfig),{getMessageFromError:I}=_.useErrors(),b=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),x=e.reactive({key:"",value:""}),N=e.computed(()=>s.config.apiType==="aiGateway"?ee.form.aiGateway:ee.form[s.config.app]),A=e.computed(()=>{var V;return(V=N.value)==null?void 0:V.edit.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{id}/gi,s.configStoreId).replace(/{secretId}/gi,s.secretId)}),g=()=>{var V;r.push(((V=s.config)==null?void 0:V.cancelRoute)||{name:"secret-list"})},i=V=>{c("loading",V)},S=V=>{c("error",V)},u=V=>{var j,J;b.fields.key=((j=V==null?void 0:V.item)==null?void 0:j.key)||(V==null?void 0:V.key)||"",b.fields.value=((J=V==null?void 0:V.item)==null?void 0:J.value)||(V==null?void 0:V.value)||"",Object.assign(x,b.fields)},L=e.computed(()=>s.secretId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),W=e.computed(()=>{var V,j;return`${s.config.apiBaseUrl}${N.value[L.value]}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((V=s.config)==null?void 0:V.controlPlaneId)||"").replace(/\/{workspace}/gi,(j=s.config)!=null&&j.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.configStoreId).replace(/{secretId}/gi,s.secretId)}),Q=e.computed(()=>!!b.fields.key&&!!b.fields.value),oe=e.computed(()=>JSON.stringify(b.fields)!==JSON.stringify(x)),v=e.computed(()=>({key:b.fields.key,value:b.fields.value})),a=async()=>{try{b.readonly=!0;let V;L.value==="create"?V=await H.post(W.value,v.value):L.value==="edit"&&(V=await H.put(W.value,v.value)),u(V==null?void 0:V.data),c("update",V==null?void 0:V.data)}catch(V){b.errorMessage=I(V),c("error",V)}finally{b.readonly=!1}};return(V,j)=>{const J=e.resolveComponent("KInput"),le=e.resolveComponent("KTextArea"),ae=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(_.EntityBaseForm),{"can-submit":Q.value&&oe.value,config:o.config,"edit-id":o.secretId,"entity-type":e.unref(_.SupportedEntityType).Other,"error-message":b.errorMessage,"fetch-url":A.value,"form-fields":v.value,"is-readonly":b.readonly,onCancel:g,"onFetch:error":S,"onFetch:success":u,onLoading:i,onSubmit:a},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(f)("secrets.form.info.description"),"has-divider":"",title:e.unref(f)("secrets.form.info.title")},{default:e.withCtx(()=>[e.createVNode(J,{modelValue:b.fields.key,"onUpdate:modelValue":j[0]||(j[0]=X=>b.fields.key=X),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:L.value===e.unref(_.EntityBaseFormType).Edit,label:e.unref(f)("secrets.form.fields.key.label"),placeholder:e.unref(f)("secrets.form.fields.key.placeholder"),readonly:b.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(le,{modelValue:b.fields.value,"onUpdate:modelValue":j[1]||(j[1]=X=>b.fields.value=X),modelModifiers:{trim:!0},autocomplete:"off","character-limit":!1,"data-testid":"secret-form-value",label:e.unref(f)("secrets.form.fields.value.label"),placeholder:e.unref(f)("secrets.form.fields.value.placeholder"),readonly:b.readonly,required:"",resizable:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(ae,{appearance:"warning",message:e.unref(f)("secrets.form.hint")},null,8,["message"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])}}}),[["__scopeId","data-v-31bf6bef"]]),wt={class:"kong-ui-entities-secret-form"},kt=ne(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||o.apiType!=="aiGateway"&&!o.controlPlaneId||!o.cancelRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:y}){var A;const s=o,c=y,f=g=>{c("update",g)},r=g=>{c("error",g)},H=g=>{c("loading",g)},{axiosInstance:I}=_.useAxios((A=s.config)==null?void 0:A.axiosRequestConfig),b=e.ref(""),x=e.computed(()=>s.config.apiType==="aiGateway"?ee.getVault.aiGateway:ee.getVault[s.config.app]),N=e.computed(()=>{var g,i;return`${s.config.apiBaseUrl}${x.value}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((g=s.config)==null?void 0:g.controlPlaneId)||"").replace(/\/{workspace}/gi,(i=s.config)!=null&&i.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.vaultId)});return e.onBeforeMount(async()=>{var g;try{const{data:i}=await I.get(N.value);b.value=(g=i==null?void 0:i.config)==null?void 0:g.config_store_id}catch(i){c("error",i)}}),(g,i)=>(e.openBlock(),e.createElementBlock("div",wt,[b.value?(e.openBlock(),e.createBlock(Vt,e.mergeProps({key:0},s,{"config-store-id":b.value,onError:r,onLoading:H,onUpdate:f}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-1651a0c6"]]),Ct={class:"vault-secret-picker-provider"},Et=ne(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(o,{emit:y}){const s=o,c=y,{i18n:{t:f},i18nT:r}=se.useI18n();return(H,I)=>(e.openBlock(),e.createElementBlock("div",Ct,[e.createVNode(e.unref(r),{keypath:"vault_secret_picker.provider.complete_action",scope:"global"},{cta:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass({"vault-secret-picker-provider-action":!0,disabled:s.disabled}),onClick:I[0]||(I[0]=()=>!s.disabled&&c("open",s.value,s.update))},e.toDisplayString(e.unref(f)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-d135d1d0"]]),xt=o=>{let y=o.trim();if(!y.startsWith("{")||!y.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(y=y.substring(1,y.length-1).trim(),!y.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const s=new URL(`http://${y.substring(8)}`);if(!s)throw new Error("Invalid secret reference: must have a vault prefix");const c=s.host,[,f,...r]=s.pathname.split("/");if(!c)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:c,secretId:f||void 0,optionalSecretKey:r==null?void 0:r.join("/")}},At=o=>{if(!o.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let y=`vault://${o.vaultPrefix}`;return o.secretId&&(y=`${y}/${o.secretId}`),o.optionalSecretKey&&(y=`${y}/${o.optionalSecretKey}`),`{${y}}`},Nt={key:1,class:"inputs-wrapper"},St={"data-testid":"no-search-results"},Rt={class:"k-select-selected-item-label"},It={class:"vault-secret-picker-vault-dropdown-item"},vt={class:"select-item-label"},Ut={class:"select-item-description"},Tt={class:"select-item-description"},Ht={"data-testid":"no-search-results"},Bt=ne(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&o.apiType!=="aiGateway"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||o.apiType==="aiGateway"&&!o.aiGatewayId)},setup:{type:null,required:!1,default:!1},title:{type:String,required:!1,default:void 0},proceedButtonText:{type:String,required:!1,default:void 0},additionalDisabled:{type:Boolean,required:!1,default:!1},allowedProviders:{type:Array,required:!1,default:void 0},showSecretKey:{type:Boolean,required:!1,default:!0}},emits:["proceed","cancel"],setup(o,{emit:y}){var ce;const{i18n:{t:s}}=se.useI18n(),c=o,f=y,{axiosInstance:r}=_.useAxios({validateStatus:h=>h===404||h>=200&&h<300,...(ce=c.config)==null?void 0:ce.axiosRequestConfig}),H=e.ref(!1),I=e.ref(""),b=e.ref(""),x=e.ref(""),N=e.ref(),A=e.computed(()=>c.config.apiType==="aiGateway"),g=h=>h.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||""),i=e.computed(()=>A.value?g(te.list.aiGateway.getAll):te.list[c.config.app].getAll),S=e.computed(()=>{var h,C,U,M;return A.value?g(ee.list.aiGateway).replace(/{id}/gi,((C=(h=N.value)==null?void 0:h.config)==null?void 0:C.config_store_id)??""):c.config.app==="konnect"?ee.list[c.config.app].replace(/{id}/gi,((M=(U=N.value)==null?void 0:U.config)==null?void 0:M.config_store_id)??""):"<not_applicable>"}),u=e.computed(()=>{if(Q&&V)return s("vault_secret_picker.fetch_error.vaults_and_secrets");if(Q)return s("vault_secret_picker.fetch_error.vaults");if(V)return s("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:L,loading:W,error:Q,loadItems:oe,results:v}=_.useDebouncedFilter(c.config,i,void 0,{fetchedItemsKey:"data",searchKeys:A.value?["name"]:["prefix"]}),{debouncedQueryChange:a,loading:Y,error:V,loadItems:j,results:J}=_.useDebouncedFilter(c.config,S,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),le=h=>{var C;return(C=c.allowedProviders)!=null&&C.length?c.allowedProviders.includes(h):h!==t.AZURE_CERTS},ae=e.computed(()=>A.value?(v.value??[]).map(h=>me(h)):v.value??[]),X=e.computed(()=>{let h=!1;const C=(ae.value??[]).filter(U=>le(U.name)).map(U=>(U.prefix===I.value&&(h=!0),{label:U.prefix,value:U.prefix,vault:U}));return!h&&N.value&&C.push({label:N.value.prefix,value:N.value.prefix,vault:N.value}),C}),ie=e.computed(()=>{var U;let h=!1;const C=((U=J.value)==null?void 0:U.map(M=>(M.key===b.value&&(h=!0),{label:M.key,value:M.key})))??[];return!h&&b.value&&C.push({label:b.value,value:b.value}),C}),R=e.computed(()=>{var h;return((h=N==null?void 0:N.value)==null?void 0:h.name)==="konnect"}),B=e.computed(()=>!!N.value&&!!b.value&&!c.additionalDisabled),z=h=>h.label?`${h.label} - (${h.vault.name} - ${h.vault.id})`:h.value,q=h=>{var M,$;const C=A.value?te.form.aiGateway.edit:te.form[c.config.app].edit;let U=`${c.config.apiBaseUrl}${C}`;return c.config.app==="konnect"&&(U=U.replace(/{controlPlaneId}/gi,((M=c.config)==null?void 0:M.controlPlaneId)||"")),g(U).replace(/\/{workspace}/gi,($=c.config)!=null&&$.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,h)},O=(h,C)=>{var M,$;if(c.config.app!=="konnect")return"<not_applicable>";const U=A.value?ee.form.aiGateway.edit:ee.form[c.config.app].edit;return g(`${c.config.apiBaseUrl}${U}`).replace(/{controlPlaneId}/gi,((M=c.config)==null?void 0:M.controlPlaneId)||"").replace(/\/{workspace}/gi,($=c.config)!=null&&$.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,C).replace(/{secretId}/gi,h)},fe=()=>{f("proceed",At({vaultPrefix:I.value,secretId:b.value||void 0,optionalSecretKey:x.value||void 0}))};return e.watch(()=>c.setup,async h=>{if(h!==!1){if(H.value=!0,I.value="",N.value=void 0,b.value="",x.value="",typeof h=="string"&&h.trim().length>0)try{let C,U="",M="",$="";const F=xt(h),{data:P}=await r.get(q(F.vaultPrefix)),w=P&&A.value?me(P):P;if(w!=null&&w.name)if(C=w,U=F.vaultPrefix,C.name==="konnect"){if(F.secretId){const{data:E}=await r.get(O(F.secretId,w.config.config_store_id));E.key===F.secretId&&(M=F.secretId,$=F.optionalSecretKey??"")}}else M=F.secretId??"",$=F.optionalSecretKey??"";await e.nextTick(()=>{I.value=U,N.value=C,b.value=M,x.value=$})}catch(C){console.debug(C)}H.value=!1,await oe()}},{immediate:!0}),e.watch(I,async(h,C)=>{var U;H.value||h===C||(N.value=(U=X.value.find(M=>M.value===h))==null?void 0:U.vault,b.value="",x.value="")}),e.watch(S,async()=>{R.value&&await j()},{immediate:!0}),(h,C)=>{const U=e.resolveComponent("KEmptyState"),M=e.resolveComponent("KSelect"),$=e.resolveComponent("KInput"),F=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(F,{"action-button-disabled":!B.value,"action-button-text":o.proceedButtonText||e.unref(s)("vault_secret_picker.actions.use_key"),class:"vault-secret-picker","data-testid":"vault-secret-picker-modal",title:o.title||e.unref(s)("vault_secret_picker.title"),visible:c.setup!==!1,onCancel:C[4]||(C[4]=()=>f("cancel")),onProceed:fe},{default:e.withCtx(()=>[e.unref(Q)||e.unref(V)?(e.openBlock(),e.createBlock(U,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:u.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",Nt,[e.renderSlot(h.$slots,"form-prefix",{},void 0,!0),e.createVNode(M,{modelValue:I.value,"onUpdate:modelValue":C[0]||(C[0]=P=>I.value=P),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:H.value,"enable-filtering":"","filter-function":()=>!0,items:X.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(s)("vault_secret_picker.vault.label"),loading:e.unref(W),placeholder:e.unref(s)("vault_secret_picker.vault.placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(L)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(s)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",St,e.toDisplayString(e.unref(s)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:P})=>[e.createElementVNode("span",Rt,e.toDisplayString(z(P)),1)]),"item-template":e.withCtx(({item:P})=>[e.createElementVNode("div",It,[e.createElementVNode("span",vt,e.toDisplayString(P.label),1),e.createElementVNode("span",Ut,e.toDisplayString(P.vault.name),1),e.createElementVNode("span",Tt,e.toDisplayString(P.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),R.value?(e.openBlock(),e.createBlock(M,{key:0,modelValue:b.value,"onUpdate:modelValue":C[1]||(C[1]=P=>b.value=P),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:H.value||!N.value,"enable-filtering":"","filter-function":()=>!0,items:ie.value,"kpop-attributes":{"data-testid":"vault-secret-picker-secret-id-popover"},label:e.unref(s)("vault_secret_picker.secret_id.label"),loading:e.unref(Y),placeholder:e.unref(s)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(a)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(s)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",Ht,e.toDisplayString(e.unref(s)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock($,{key:1,modelValue:b.value,"onUpdate:modelValue":C[2]||(C[2]=P=>b.value=P),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:H.value||!N.value,label:e.unref(s)("vault_secret_picker.secret_id.label"),placeholder:e.unref(s)("vault_secret_picker.secret_id.input_placeholder"),required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder"])),o.showSecretKey?(e.openBlock(),e.createBlock($,{key:2,modelValue:x.value,"onUpdate:modelValue":C[3]||(C[3]=P=>x.value=P),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:H.value||!N.value,help:e.unref(s)("vault_secret_picker.optional_secret_key.help"),label:e.unref(s)("vault_secret_picker.optional_secret_key.label"),placeholder:e.unref(s)("vault_secret_picker.optional_secret_key.placeholder"),type:"text"},null,8,["modelValue","disabled","help","label","placeholder"])):e.createCommentVNode("",!0)]))]),_:3},8,["action-button-disabled","action-button-text","title","visible"])}}}),[["__scopeId","data-v-2ab21bd2"]]);G.SecretForm=kt,G.SecretList=bt,G.VaultAuthMethods=m,G.VaultConfigCard=mt,G.VaultForm=ft,G.VaultList=We,G.VaultProviders=t,G.VaultSecretPicker=Bt,G.VaultSecretPickerProvider=Et,G.secretsEndpoints=ee,G.vaultsEndpoints=te,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});
1
+ (function(G,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/i18n")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","@kong/icons","@kong-ui-public/entities-shared","@kong-ui-public/i18n"],e):(G=typeof globalThis<"u"?globalThis:G||self,e(G["kong-ui-public-entities-vaults"]={},G.Vue,G.VueRouter,G.KongIcons,G["kong-ui-public-entities-shared"],G["kong-ui-public-i18n"]))})(this,function(G,e,he,L,_,xe){"use strict";const ve={actions:{create:"New vault",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",view:"View details",loading:"Loading..."},delete:{title:"Delete a vault",title_for_secret:"Delete a secret",description:"This action cannot be reversed."},errors:{general:"Vaults could not be retrieved",delete:"The vault could not be deleted at this time.",copy:"Failed to copy to clipboard"},search:{placeholder_for_vaults:{konnect:"Filter by exact prefix or ID"},placeholder_for_secrets:{konnect:"Filter by exact key"}},vaults:{title:"Vaults",list:{toolbar_actions:{new_vault:"New vault"},table_headers:{prefix:"Prefix",prefix_ai_gateway:"Name",name:"Vault type",description:"Description",tags:"Tags",id:"ID"},empty_state:{title:"Configure a new vault",description:"Improve the security of your Kong Gateway deployment with centralized secrets."},empty_state_v2:{title:"Configure your first vault",group:"Vaults created in gateways within this group will automatically appear here.",description:"Vaults securely and centrally store sensitive information, such as credentials, tokens, and keys, to simplify secrets management.",create_cta:"New vault",learn_more:"Learn more"}}},secrets:{title:"Secrets",list:{toolbar_actions:{new_secret:"Store new secret"},table_headers:{key:"Secret key",updated_at:"Updated At"},empty_state:{title:"No secrets stored",description:"Improve the security of your Kong Gateway deployment with centralized secrets."}},form:{info:{title:"Secret",description:"Enter the secret key and secret value to be stored in Konnect vault"},fields:{key:{label:"Key",placeholder:"Enter key"},value:{label:"Value",placeholder:"Enter value here, can be simple values or multi-line"}},hint:"Once saved, the secret value will not be visible"}},copy:{success:"Copied {val} to clipboard",success_brief:"Successfully copied to clipboard"},labels:{vault_type:"Vault type",vault_type_ai_gateway:"Type",vault_name_ai_gateway:"Name"},form:{sections:{general:{title:"General information",description:"General information helps identify and manage this vault instance."},config:{title:"Vault configuration",description:"Select a type of vault and configure properties specific to each type of Vault."}},fields:{prefix:{label:"Prefix",placeholder:"Enter a unique prefix for this vault",help:"e.g. my-vault",tooltip:"The reference prefix. You need this prefix to access secrets stored in this vault. For example, {vault://<your-prefix>/<some-secret>}."},prefix_ai_gateway:{label:"Name",placeholder:"Enter a unique name for this vault",help:"e.g. my-vault",tooltip:"The reference name. You need this name to access secrets stored in this vault. For example, {vault://<your-name>/<some-secret>}."},description:{label:"Description",placeholder:"Enter some description for this vault"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3"}},config:{konnect:{label:"Konnect",description:"Access secrets stored directly in Konnect's unified platform to easily reference in Kong Gateway configuration."},env:{label:"Environment variables",description:"Access secrets stored via variables to be made available in Kong Gateway at runtime.",fields:{prefix:{label:"Environment variable prefix",placeholder:"Enter your environment variable vault prefix",tooltip:"Data plane will access all the environment variables starting with this prefix."}}},aws:{label:"AWS Secrets Manager",description:"Access secrets stored in AWS Secrets Manager for Kong Gateway configuration.",fields:{region:{label:"Region",placeholder:"Select an AWS region",tooltip:"The AWS region your vault is located in",locations:{"us-east-1":{location:"N. Virginia"},"us-east-2":{location:"Ohio"},"us-west-1":{location:"N. California"},"us-west-2":{location:"Oregon"},"af-south-1":{location:"Cape Town"},"ap-east-1":{location:"Hong Kong"},"ap-southeast-3":{location:"Jakarta"},"ap-south-1":{location:"Mumbai"},"ap-northeast-1":{location:"Tokyo"},"ap-northeast-2":{location:"Seoul"},"ap-northeast-3":{location:"Osaka"},"ap-southeast-1":{location:"Singapore"},"ap-southeast-2":{location:"Sydney"},"ca-central-1":{location:"Canada"},"eu-central-1":{location:"Frankfurt"},"eu-west-1":{location:"Ireland"},"eu-west-2":{location:"London"},"eu-west-3":{location:"Paris"},"eu-south-1":{location:"Milan"},"eu-north-1":{location:"Stockholm"},"me-south-1":{location:"Bahrain"},"sa-east-1":{location:"São Paulo"},"us-gov-east-1":{location:"US East"},"us-gov-west-1":{location:"US West"}}},endpoint_url:{label:"Endpoint URL",tooltip:'The AWS SecretsManager service endpoint url. If not specified, the value used by vault will be the official AWS SecretsManager service url which is `https://secretsmanager.<region>.amazonaws.com`. You can specify a complete URL(including the "http/https" scheme) to override the endpoint that vault will connect to.'},assume_role_arn:{label:"Assume role ARN",tooltip:"The target AWS IAM role ARN that will be assumed. Typically this is used for operating between multiple roles or cross-accounts. If you are not using assume role you should not specify this value."},role_session_name:{label:"Role session name",tooltip:"The role session name used for role assuming."},sts_endpoint_url:{label:"STS endpoint URL",tooltip:"The custom STS endpoint URL used for role assuming in AWS Vault. Note that this value will override the default STS endpoint URL(which should be `https: //sts.amazonaws.com`, or `https: //sts.<region>.amazonaws.com` if you have `AWS_STS_REGIONAL_ENDPOINTS` set to `regional`). If you are not using private VPC endpoint for STS service, you should not specify this value."}}},gcp:{label:"Google Secret Manager",description:"Access secrets stored in Google Secret Manager for Kong Gateway configuration.",fields:{project_id:{label:"Project ID",placeholder:"Enter your Google Cloud Project ID",tooltip:{text:"Visit your Google API Console and select {italic-text} in the projects list to see your project ID",italicText:"Manage all projects"}}}},hcv:{label:"HashiCorp Vault",description:"Access secrets stored in HashiCorp Vault for Kong Gateway configuration.",fields:{protocol:{label:"Protocol"},host:{label:"Host"},port:{label:"Port"},mount:{label:"Mount"},kv:{label:"KV"},namespace:{label:"Namespace"},ssl_verify:{label:"SSL verify"},auth_method:{label:"Authentication method"},token:{label:"Token"},kube_role:{label:"Kubernetes role"},kube_auth_path:{label:"Kubernetes auth path"},kube_api_token_file:{label:"Kubernetes API token file"},aws_auth_role:{label:"AWS auth role"},aws_auth_region:{label:"AWS auth region"},aws_access_key_id:{label:"AWS access key ID"},aws_secret_access_key:{label:"AWS secret access key"},aws_auth_nonce:{label:"AWS auth nonce"},aws_login_path:{label:"AWS login path"},azure_auth_role:{label:"Azure auth role"},azure_login_path:{label:"Azure login path"},gcp_auth_role:{label:"GCP auth role"},gcp_login_path:{label:"GCP login path"},gcp_service_account:{label:"GCP service account"},gcp_jwt_exp:{label:"GCP JWT exp"},aws_sts_endpoint_url:{label:"AWS STS endpoint URL"},aws_assume_role_arn:{label:"AWS assume role ARN"},aws_role_session_name:{label:"AWS role session name"},approle_auth_path:{label:"App role auth path"},approle_role_id:{label:"App role role ID"},approle_secret_id:{label:"App role secret ID"},approle_secret_id_file:{label:"App role secret ID file"},approle_response_wrapping:{label:"App role response wrapping"},cert_auth_cert:{label:"Cert"},cert_auth_cert_key:{label:"Cert key"},cert_auth_role_name:{label:"Role name"},oauth2_audiences:{label:"OAuth2 audiences",tooltip:"Comma-separated list of OAuth2 audiences."},oauth2_client_id:{label:"OAuth2 client ID"},oauth2_client_secret:{label:"OAuth2 client secret"},jwt_role:{label:"JWT role",tooltip:"The configured role name in HashiCorp Vault for JWT auth. When creating the role in HashiCorp Vault, make sure that the `role_type` is `jwt` and the `token_policies` have permissions to read the secrets."},oauth2_token_endpoint:{label:"OAuth2 token endpoint"}}},azure:{label:"Azure Vault",description:"Access secrets stored in Azure Key Vault for Kong Gateway configuration.",fields:{location:{label:"Location"},vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential prefix"},type:{label:"Type",placeholder:"Select a type"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},"azure-certs":{label:"Azure Key Vault (Certificates)",description:"Access certificates stored in Azure Key Vault for Kong Gateway TLS termination.",fields:{vault_uri:{label:"Vault URI"},credential_prefix:{label:"Credential prefix"},client_id:{label:"Client ID"},tenant_id:{label:"Tenant ID"}}},conjur:{label:"CyberArk Secrets Manager (Conjur)",description:"Access secrets stored in CyberArk Secrets Manager (Conjur) for Kong Gateway configuration.",fields:{endpoint_url:{label:"Server",tooltip:"The CyberArk Secrets Manager (Conjur) backend url. Accepts http or https."},login:{label:"Workload identity",tooltip:"Identity of the workload or host authenticating to CyberArk Secrets Manager (Conjur). In this case Kong is the workload/host."},api_key:{label:"API key",tooltip:"The API key issued to the workload."},account:{label:"Account",tooltip:"The CyberArk Secrets Manager (Conjur) account for which the token will be issued. This is the identifier provided during CyberArk Secrets Manager (Conjur) configuration."}}},fs:{label:"File system",description:"Access secrets stored in the file system.",fields:{prefix:{label:"File path prefix",tooltip:"The prefix path for the file vault referenced files."}}},advancedFields:{title:"View advanced fields",ttl:"TTL",ttlTooltip:`Time-to-live (in seconds) of a secret from the vault when it's cached. The special value of 0 means "no rotation" and it's the default. When using non-zero values, it is recommended that they're at least 1 minute.`,negTtl:"Negative TTL",negTtlTooltip:"Time-to-live (in seconds) of a vault miss (no secret). Negatively cached secrets will remain valid until neg_ttl is reached, after which Kong will attempt to refresh the secret again. The default value for neg_ttl is 0, meaning no negative caching occurs.",resurrectTtl:"Resurrect TTL",resurrectTtlTooltip:"Time (in seconds) for how long secrets will remain in use after they are expired (config.ttl is over). This is useful when a vault becomes unreachable, or when a secret is deleted from the Vault and isn't replaced immediately. On both cases, the Gateway will keep trying to refresh the secret for resurrect_ttl seconds. After that, it will stop trying to refresh. We recommend assigning a sufficiently high value to this configuration option to ensure a seamless transition in case there are unexpected issues with the Vault. The default value for resurrect_ttl is 1e8 seconds, which is about 3 years."},commonFields:{base64_decode:{label:"Base64 decode",tooltip:"Decode all secrets in this vault as base64, useful for binary data. If some of the secrets are not base64 encoded, an error will occur when using them. It's recommended to create a separate vault for base64 secrets."}}},unavailable:"This vault provider is available on Enterprise."},vault_secret_picker:{title:"Look up key in vault",vault:{label:"Vault",placeholder:"Select a vault"},secret_id:{label:"Secret ID",input_placeholder:"Enter a secret ID",select_placeholder:"Select or enter a complete secret ID"},optional_secret_key:{label:"Secret key",placeholder:"Enter the key or key path to access a nested secret value",help:"Optional. e.g. tokens, tokens/refresh_token"},fetch_error:{vaults:"Could not fetch available vaults",secrets:"Could not fetch available secrets",vaults_and_secrets:"Could not fetch available vaults and secrets"},no_results:"No results found",actions:{use_key:"Use key"},provider:{complete_action:"Look up {cta}",cta:"key in vault"}}};function Ue(){const o=xe.createI18n("en-us",ve);return{i18n:o,i18nT:xe.i18nTComponent(o)}}const de={useI18n:Ue},Ve="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Ae="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",ke="/{workspace}",_e="/v1/ai-gateways/{aiGatewayId}",oe={list:{konnect:{getAll:`${Ve}/vaults`,deleteConfigStore:`${Ae}/{id}?force=true`},kongManager:{getAll:`${ke}/vaults`},aiGateway:{getAll:`${_e}/vaults`,deleteConfigStore:`${_e}/config-stores/{id}?force=true`}},form:{konnect:{create:`${Ve}/vaults`,createConfigStore:Ae,edit:`${Ve}/vaults/{id}`},kongManager:{create:`${ke}/vaults`,edit:`${ke}/vaults/{id}`},aiGateway:{create:`${_e}/vaults`,edit:`${_e}/vaults/{id}`,createConfigStore:`${_e}/config-stores`}}};var t=(o=>(o.AWS="aws",o.GCP="gcp",o.HCV="hcv",o.ENV="env",o.AZURE="azure",o.AZURE_CERTS="azure-certs",o.KONNECT="konnect",o.CONJUR="conjur",o.FS="fs",o))(t||{}),p=(o=>(o.TOKEN="token",o.K8S="kubernetes",o.APP_ROLE="approle",o.CERT="cert",o.JWT="jwt",o.AWS_IAM="aws_iam",o.AWS_EC2="aws_ec2",o.AZURE="azure",o.GCP_GCE="gcp_gce",o.GCP_IAM="gcp_iam",o))(p||{});const Ne={[p.TOKEN]:{token:"token"},[p.CERT]:{cert_auth_cert:"cert",cert_auth_cert_key:"key",cert_auth_role_name:"role_name"},[p.JWT]:{jwt_role:"role",oauth2_token_endpoint:"token_endpoint",oauth2_client_id:"client_id",oauth2_client_secret:"client_secret",oauth2_audiences:"audiences"},[p.APP_ROLE]:{approle_auth_path:"path",approle_response_wrapping:"response_wrapping",approle_role_id:"role_id",approle_secret_id:"secret_id",approle_secret_id_file:"secret_id_file"},[p.K8S]:{kube_role:"role",kube_auth_path:"path",kube_api_token_file:"api_token_file"},[p.GCP_IAM]:{gcp_auth_role:"role",gcp_service_account:"service_account",gcp_jwt_exp:"jwt_exp",gcp_login_path:"login_path"},[p.GCP_GCE]:{gcp_auth_role:"role",gcp_login_path:"login_path"},[p.AWS_IAM]:{aws_auth_role:"role",aws_auth_region:"region",aws_login_path:"login_path",aws_access_key_id:"access_key_id",aws_secret_access_key:"secret_access_key",aws_sts_endpoint_url:"sts_endpoint_url",aws_assume_role_arn:"assume_role_arn",aws_role_session_name:"role_session_name"},[p.AWS_EC2]:{aws_auth_role:"role",aws_auth_nonce:"nonce",aws_login_path:"login_path"},[p.AZURE]:{azure_auth_role:"role",azure_login_path:"login_path"}},Te=["protocol","host","port","mount","kv","namespace","ssl_verify","auth_method","base64_decode","ttl","neg_ttl","resurrect_ttl"],He=o=>Object.fromEntries(Object.entries(o).map(([y,s])=>[s,y])),Be=o=>o==null,we=o=>Object.fromEntries(Object.entries(o).filter(([,y])=>!Be(y))),Me=o=>{const y=Ne[o.auth_method]??{},s={};for(const c of Te)c in o&&(s[c]=o[c]);for(const[c,u]of Object.entries(y))c in o&&(s[u]=o[c]);return we(s)},Pe=o=>{const y=o.name;let s=o.config??{};if(y===t.HCV)s=Me(s);else if(y===t.CONJUR){const c={...s};delete c.auth_method,s=we(c)}else s=we(s);return{type:y,name:o.prefix,description:o.description??"",config:s}},$e=o=>{const y=He(Ne[o.auth_method]??{}),s={};for(const[c,u]of Object.entries(o))s[y[c]??c]=u;return s},ge=o=>{const y=o==null?void 0:o.type;let s=o!=null&&o.config?{...o.config}:{};return y===t.HCV?s=$e(s):y===t.CONJUR&&(s={...s,auth_method:"api_key"}),{id:o==null?void 0:o.id,created_at:o==null?void 0:o.created_at,updated_at:o==null?void 0:o.updated_at,name:y,prefix:o==null?void 0:o.name,description:(o==null?void 0:o.description)??"",config:s}},Ge={class:"kong-ui-entities-vaults-list"},Fe={class:"button-row"},Ke={class:"table-content-overflow-wrapper"},Oe={class:"table-content-overflow-wrapper"},We=e.defineComponent({__name:"VaultList",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||!o.createRoute||!o.getViewRoute||!o.getEditRoute||o.app==="kongManager"&&!o.isExactMatch&&!o.filterSchema||o.apiType==="aiGateway"&&!o.aiGatewayId)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},useActionOutside:{type:Boolean,default:!1}},emits:["error","click:learn-more","copy:success","copy:error","delete:success"],setup(o,{emit:y}){var B;const s=y,c=o,{i18n:{t:u}}=de.useI18n(),r=he.useRouter(),H=e.computed(()=>c.config.apiType==="aiGateway"),I=e.computed(()=>H.value?"aiGateway":c.config.app),h=b=>b.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||""),{axiosInstance:E}=_.useAxios((B=c.config)==null?void 0:B.axiosRequestConfig),{hasRecords:N,handleStateChange:A}=_.useTableState(()=>O.value),g=e.computed(()=>N.value&&c.config.app==="konnect"),i=e.computed(()=>c.config.app!=="kongManager"||!!c.config.disableSorting),S={prefix:{label:u("vaults.list.table_headers.prefix"),searchable:!0,sortable:!0,hidable:!1},name:{label:u("vaults.list.table_headers.name"),searchable:!0,sortable:!0},description:{label:u("vaults.list.table_headers.description"),sortable:!1},tags:{label:u("vaults.list.table_headers.tags"),sortable:!1}},f=e.computed(()=>{if(H.value){const{description:b,name:x,prefix:T}=S;return{prefix:{...T,label:u("vaults.list.table_headers.prefix_ai_gateway")},name:x,description:b}}return S}),J=e.computed(()=>{var x,T;let b=`${c.config.apiBaseUrl}${oe.list[I.value].getAll}`;return c.config.app==="konnect"&&(b=b.replace(/{controlPlaneId}/gi,((x=c.config)==null?void 0:x.controlPlaneId)||"")),h(b).replace(/\/{workspace}/gi,(T=c.config)!=null&&T.workspace?`/${c.config.workspace}`:"")}),O=e.ref(""),X=e.computed(()=>{if(c.config.app==="konnect"||c.config.isExactMatch)return{isExactMatch:!0,placeholder:u("search.placeholder_for_vaults.konnect")};const{prefix:x,name:T}=S;return{isExactMatch:!1,fields:{name:T,prefix:x},schema:c.config.filterSchema}}),{fetcher:re,fetcherState:v,fetcherCacheKey:a}=_.useFetcher(e.computed(()=>({...c.config,cacheIdentifier:c.cacheIdentifier})),J),ee=H.value?async b=>{const x=await re(b);return{...x,data:(x.data??[]).map(ge)}}:re,V=()=>{O.value=""},W=()=>{a.value++},Q=e.ref(null),ne=async(b,x)=>{const T=b.id;if(!await x(T)){s("copy:error",{entity:b,field:"id",message:u("errors.copy")});return}s("copy:success",{entity:b,field:"id",message:u("copy.success",{val:T})})},Y=async(b,x)=>{const T=JSON.stringify(b);if(!await x(T)){s("copy:error",{entity:b,message:u("errors.copy")});return}s("copy:success",{entity:b,message:u("copy.success_brief")})},K=async b=>{var T;await((T=c.canRetrieve)==null?void 0:T.call(c,b))&&r.push(c.config.getViewRoute(b.id))},ce=b=>({label:u("actions.view"),to:c.config.getViewRoute(b)}),M=b=>({label:u("actions.edit"),to:c.config.getEditRoute(b)}),R=e.ref(void 0),Z=e.ref(!1),q=e.ref(!1),j=e.ref(""),fe=_.useDeleteUrlBuilder(c.config,J.value),pe=b=>{R.value=b,Z.value=!0},k=()=>{Z.value=!1},w=async b=>{var d;const{apiBaseUrl:x,controlPlaneId:T}=c.config,ae=h(`${x}${oe.list[H.value?"aiGateway":"konnect"].deleteConfigStore}`).replace(/{controlPlaneId}/gi,T||"").replace(/\/{workspace}/gi,(d=c.config)!=null&&d.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,b);try{await E.delete(ae)}catch{}},U=async()=>{var b,x,T,ae;if((b=R.value)!=null&&b.id){q.value=!0;try{await E.delete(fe(R.value.id)),c.config.app==="konnect"&&((x=R.value.config)!=null&&x.config_store_id)&&w(R.value.config.config_store_id),q.value=!1,Z.value=!1,a.value++,s("delete:success",R.value)}catch(d){j.value=((ae=(T=d.response)==null?void 0:T.data)==null?void 0:ae.message)||d.message||u("errors.delete"),s("error",d)}finally{q.value=!1}}},P=()=>{r.push(c.config.createRoute)};e.watch(v,b=>{var x,T,ae;if(b.status===_.FetcherStatus.Error){Q.value={title:u("errors.general")},(ae=(T=(x=b.error)==null?void 0:x.response)==null?void 0:T.data)!=null&&ae.message&&(Q.value.message=b.error.response.data.message),s("error",b.error);return}Q.value=null});const D=e.ref({ctaPath:c.config.createRoute,ctaText:void 0,message:`${u("vaults.list.empty_state.description")}${c.config.additionMessageForEmptyState?` ${c.config.additionMessageForEmptyState}`:""}`,title:u("vaults.title")}),F=e.ref(!1);return e.onBeforeMount(async()=>{F.value=await c.canCreate(),F.value&&(D.value.title=u("vaults.list.empty_state.title"),D.value.ctaText=u("actions.create"))}),(b,x)=>{const T=e.resolveComponent("KButton"),ae=e.resolveComponent("KEmptyState"),d=e.resolveComponent("KDropdownItem"),l=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ge,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":i.value,"empty-state-options":D.value,"enable-entity-actions":"","error-message":Q.value,fetcher:e.unref(ee),"fetcher-cache-key":e.unref(a),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-vaults-list",query:O.value,"table-headers":f.value,onClearSearchInput:V,"onClick:row":x[3]||(x[3]=C=>K(C)),onSort:W,onState:e.unref(A)},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:O.value,"onUpdate:modelValue":x[0]||(x[0]=C=>O.value=C),config:X.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[(e.openBlock(),e.createBlock(e.Teleport,{disabled:!o.useActionOutside,to:"#kong-ui-app-page-header-action-button"},[e.createElementVNode("div",Fe,[g.value?(e.openBlock(),e.createBlock(T,{key:0,appearance:"secondary",class:"open-learning-hub","data-testid":"vault-learn-more-button",icon:"",onClick:x[1]||(x[1]=C=>b.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(L.BookIcon),{decorative:""})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(T,{appearance:"primary","data-testid":"toolbar-add-vault",size:o.useActionOutside?"medium":"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(L.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("vaults.list.toolbar_actions.new_vault")),1)]),_:1},8,["size","to"])]),_:1},8,["auth-function"])])],8,["disabled"]))]),prefix:e.withCtx(({rowValue:C})=>[e.createElementVNode("div",Ke,[e.createElementVNode("b",null,e.toDisplayString(C??"-"),1)])]),name:e.withCtx(({rowValue:C})=>[e.createElementVNode("b",null,e.toDisplayString(C??"-"),1)]),description:e.withCtx(({rowValue:C})=>[e.createElementVNode("div",Oe,e.toDisplayString(C??"-"),1)]),tags:e.withCtx(({rowValue:C})=>[e.createVNode(e.unref(_.TableTags),{tags:C},null,8,["tags"])]),actions:e.withCtx(({row:C})=>[e.createVNode(l,null,{default:e.withCtx(({copyToClipboard:$})=>[e.createVNode(d,{"data-testid":"action-entity-copy-id",onClick:m=>ne(C,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_id")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(l,null,{default:e.withCtx(({copyToClipboard:$})=>[e.createVNode(d,{"data-testid":"action-entity-copy-json",onClick:m=>Y(C,$)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.copy_json")),1)]),_:1},8,["onClick"])]),_:2},1024),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canRetrieve(C)},{default:e.withCtx(()=>[e.createVNode(d,{"data-testid":"action-entity-view","has-divider":"",item:ce(C.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canEdit(C)},{default:e.withCtx(()=>[e.createVNode(d,{"data-testid":"action-entity-edit",item:M(C.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canDelete(C)},{default:e.withCtx(()=>[e.createVNode(d,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:$=>pe(C)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[!O.value&&o.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>{var C;return[e.createVNode(ae,{"data-testid":"vaults-entity-empty-state","icon-background":"",message:e.unref(u)("vaults.list.empty_state_v2.description"),title:e.unref(u)("vaults.list.empty_state_v2.title")},e.createSlots({icon:e.withCtx(()=>[e.createVNode(e.unref(L.SecurityIcon),{decorative:""})]),action:e.withCtx(()=>[F.value?(e.openBlock(),e.createBlock(T,{key:0,"data-testid":"entity-create-button",onClick:P},{default:e.withCtx(()=>[e.createVNode(e.unref(L.AddIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("vaults.list.empty_state_v2.create_cta")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(T,{appearance:"secondary","data-testid":"entity-learn-more-button",onClick:x[2]||(x[2]=$=>b.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(L.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("vaults.list.empty_state_v2.learn_more")),1)]),_:1})]),_:2},[(C=o.config)!=null&&C.isControlPlaneGroup?{name:"default",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("vaults.list.empty_state_v2.group")),1)]),key:"0"}:void 0]),1032,["message","title"])]}),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers","onState"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":q.value,description:e.unref(u)("delete.description"),"entity-name":R.value&&(R.value.prefix||R.value.id),"entity-type":e.unref(_.EntityTypes).Vault,error:j.value,title:e.unref(u)("delete.title"),visible:Z.value,onCancel:k,onProceed:U},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])])}}}),se=(o,y)=>{const s=o.__vccOpts||o;for(const[c,u]of y)s[c]=u;return s},qe=se(We,[["__scopeId","data-v-374c7841"]]),je={class:"kong-ui-entities-vault-form"},De={class:"vault-form-provider-cards-container"},ze=["data-testid"],Ze={class:"provider-item-title-container"},Le={class:"provider-item-title"},Je={class:"provider-item-description"},Qe={key:"kong-vault-config-fields",class:"vault-form-config-fields-container"},Ye={key:1,class:"vault-form-config-auth-method-container"},Xe={key:2,class:"vault-form-config-auth-method-container"},et={key:3,class:"vault-form-config-auth-method-container"},tt={key:4,class:"vault-form-config-auth-method-container"},at={key:5,class:"vault-form-config-auth-method-container"},ot={key:6,class:"vault-form-config-auth-method-container"},lt={key:7,class:"vault-form-config-auth-method-container"},rt={key:8,class:"vault-form-config-auth-method-container"},nt={key:9,class:"vault-form-config-auth-method-container"},it={key:10,class:"vault-form-config-auth-method-container"},st={key:8},ct={class:"wrapper"},dt={class:"item-50"},ft={class:"item-50"},ut={class:"wrapper"},pt={class:"item-100"},mt=se(e.defineComponent({__name:"VaultForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||(o==null?void 0:o.app)==="konnect"&&(o==null?void 0:o.apiType)!=="aiGateway"&&!(o!=null&&o.controlPlaneId)||(o==null?void 0:o.app)==="kongManager"&&typeof(o==null?void 0:o.workspace)!="string"||(o==null?void 0:o.apiType)==="aiGateway"&&!(o!=null&&o.aiGatewayId)||!(o!=null&&o.cancelRoute))},vaultId:{type:String,required:!1,default:null}},emits:["update","error","loading"],setup(o,{emit:y}){var ae;const s=o,c=y,{i18nT:u,i18n:{t:r}}=de.useI18n(),H=he.useRouter(),{axiosInstance:I}=_.useAxios((ae=s.config)==null?void 0:ae.axiosRequestConfig),{getMessageFromError:h}=_.useErrors(),E=e.computed(()=>s.config.apiType==="aiGateway"),N=e.computed(()=>E.value?"aiGateway":s.config.app),A=d=>d.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||""),g=E.value?"https":"http",i=e.reactive({fields:{prefix:"",description:"",tags:""},isReadonly:!1,errorMessage:""}),S=e.reactive({prefix:"",description:"",tags:""}),f=e.ref(s.config.app==="konnect"?t.KONNECT:t.ENV),J=e.ref(null),O=e.ref(),X=e.computed(()=>[t.AWS,t.GCP,t.HCV,t.AZURE,t.CONJUR,t.FS,t.AZURE_CERTS].includes(f.value)),re=e.computed(()=>E.value?[{label:r("form.config.konnect.label"),value:t.KONNECT},{label:r("form.config.env.label"),value:t.ENV},{label:r("form.config.aws.label"),value:t.AWS},{label:r("form.config.gcp.label"),value:t.GCP},{label:r("form.config.hcv.label"),value:t.HCV},{label:r("form.config.azure.label"),value:t.AZURE},{label:r("form.config.conjur.label"),value:t.CONJUR}]:[...s.config.app==="konnect"?[{label:r("form.config.konnect.label"),value:t.KONNECT}]:[],{label:r("form.config.env.label"),value:t.ENV},{label:r("form.config.aws.label"),value:t.AWS,disabled:!R.value},{label:r("form.config.gcp.label"),value:t.GCP,disabled:!R.value},{label:r("form.config.hcv.label"),value:t.HCV,disabled:!R.value},...s.config.azureVaultProviderAvailable?[{label:r("form.config.azure.label"),value:t.AZURE,disabled:!R.value}]:[],...s.config.conjurVaultProviderAvailable?[{label:r("form.config.conjur.label"),value:t.CONJUR,disabled:!R.value}]:[],...s.config.fsVaultProviderAvailable?[{label:r("form.config.fs.label"),value:t.FS,disabled:!R.value}]:[],...s.config.azureCertsVaultProviderAvailable?[{label:r("form.config.azure-certs.label"),value:t.AZURE_CERTS,disabled:!R.value}]:[]]),v=s.config.base64FieldAvailable?{base64_decode:!1}:{},a=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...v},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...v},[t.GCP]:{project_id:"",...v},[t.HCV]:{protocol:g,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:p.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...v},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...v},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...v},[t.FS]:{prefix:"",...v}}),ee=e.reactive({[t.KONNECT]:{},[t.ENV]:{prefix:"",...v},[t.AWS]:{region:"",endpoint_url:"",assume_role_arn:"",role_session_name:"KongVault",...v},[t.GCP]:{project_id:"",...v},[t.HCV]:{protocol:g,host:"127.0.0.1",port:8200,mount:"secret",kv:"v1",namespace:"",ssl_verify:!0,auth_method:p.TOKEN,token:"",kube_role:"",kube_auth_path:"",kube_api_token_file:"",aws_auth_role:"",aws_auth_region:"",aws_auth_nonce:"",aws_login_path:"",aws_access_key_id:"",aws_secret_access_key:"",aws_sts_endpoint_url:"",aws_assume_role_arn:"",aws_role_session_name:"",azure_auth_role:"",azure_login_path:"",gcp_auth_role:"",gcp_login_path:"",gcp_service_account:"",gcp_jwt_exp:void 0,approle_auth_path:"",approle_role_id:"",approle_secret_id:"",approle_secret_id_file:"",approle_response_wrapping:!1,cert_auth_cert:"",cert_auth_cert_key:"",cert_auth_role_name:"",oauth2_client_id:"",oauth2_client_secret:"",jwt_role:"",oauth2_token_endpoint:"",oauth2_audiences:"",...v},[t.AZURE]:{location:"",vault_uri:"",type:"secrets",credentials_prefix:"AZURE",client_id:"",tenant_id:"",...v},[t.AZURE_CERTS]:{vault_uri:"",credentials_prefix:"AZURE",client_id:"",tenant_id:"",ttl:3600},[t.CONJUR]:{endpoint_url:"",auth_method:"api_key",...v},[t.FS]:{prefix:"",...v}}),V=[{label:`${r("form.config.aws.fields.region.locations.us-east-1.location")} (us-east-1)`,value:"us-east-1"},{label:`${r("form.config.aws.fields.region.locations.us-east-2.location")} (us-east-2)`,value:"us-east-2"},{label:`${r("form.config.aws.fields.region.locations.us-west-1.location")} (us-west-1)`,value:"us-west-1"},{label:`${r("form.config.aws.fields.region.locations.us-west-2.location")} (us-west-2)`,value:"us-west-2"},{label:`${r("form.config.aws.fields.region.locations.af-south-1.location")} (af-south-1)`,value:"af-south-1"},{label:`${r("form.config.aws.fields.region.locations.ap-east-1.location")} (ap-east-1)`,value:"ap-east-1"},{label:`${r("form.config.aws.fields.region.locations.ap-southeast-3.location")} (ap-southeast-3)`,value:"ap-southeast-3"},{label:`${r("form.config.aws.fields.region.locations.ap-south-1.location")} (ap-south-1)`,value:"ap-south-1"},{label:`${r("form.config.aws.fields.region.locations.ap-northeast-1.location")} (ap-northeast-1)`,value:"ap-northeast-1"},{label:`${r("form.config.aws.fields.region.locations.ap-northeast-2.location")} (ap-northeast-2)`,value:"ap-northeast-2"},{label:`${r("form.config.aws.fields.region.locations.ap-northeast-3.location")} (ap-northeast-3)`,value:"ap-northeast-3"},{label:`${r("form.config.aws.fields.region.locations.ap-southeast-1.location")} (ap-southeast-1)`,value:"ap-southeast-1"},{label:`${r("form.config.aws.fields.region.locations.ap-southeast-2.location")} (ap-southeast-2)`,value:"ap-southeast-2"},{label:`${r("form.config.aws.fields.region.locations.ca-central-1.location")} (ca-central-1)`,value:"ca-central-1"},{label:`${r("form.config.aws.fields.region.locations.eu-central-1.location")} (eu-central-1)`,value:"eu-central-1"},{label:`${r("form.config.aws.fields.region.locations.eu-west-1.location")} (eu-west-1)`,value:"eu-west-1"},{label:`${r("form.config.aws.fields.region.locations.eu-west-2.location")} (eu-west-2)`,value:"eu-west-2"},{label:`${r("form.config.aws.fields.region.locations.eu-west-3.location")} (eu-west-3)`,value:"eu-west-3"},{label:`${r("form.config.aws.fields.region.locations.eu-south-1.location")} (eu-south-1)`,value:"eu-south-1"},{label:`${r("form.config.aws.fields.region.locations.eu-north-1.location")} (eu-north-1)`,value:"eu-north-1"},{label:`${r("form.config.aws.fields.region.locations.me-south-1.location")} (me-south-1)`,value:"me-south-1"},{label:`${r("form.config.aws.fields.region.locations.sa-east-1.location")} (sa-east-1)`,value:"sa-east-1"},{label:`${r("form.config.aws.fields.region.locations.us-gov-east-1.location")} (us-gov-east-1)`,value:"us-gov-east-1"},{label:`${r("form.config.aws.fields.region.locations.us-gov-west-1.location")} (us-gov-west-1)`,value:"us-gov-west-1"}],W=[{label:"secrets",value:"secrets"}],Q=[{label:"http",value:"http"},{label:"https",value:"https"}],ne=[{label:"v1",value:"v1"},{label:"v2",value:"v2"}],Y=e.computed(()=>s.vaultId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),K=e.computed(()=>Y.value===_.EntityBaseFormType.Edit?"edit":"create"),ce=e.computed(()=>{var d;return A((d=oe.form[N.value])==null?void 0:d.edit)}),M=e.computed(()=>Y.value===_.EntityBaseFormType.Edit&&(s.config.app==="kongManager"||E.value)),R=e.computed(()=>s.config.app==="konnect"||_.useGatewayFeatureSupported({gatewayInfo:s.config.gatewayInfo,supportedRange:{enterprise:[]}})),Z=()=>{var d;H.push(((d=s.config)==null?void 0:d.cancelRoute)||{name:"vault-list"})},q=d=>{c("loading",d)},j=d=>{c("error",d)},fe=d=>{switch(d){case t.KONNECT:return L.KongIcon;case t.ENV:return L.CodeIcon;case t.AWS:return L.AwsIcon;case t.GCP:return L.GoogleCloudIcon;case t.HCV:return L.HashicorpIcon;case t.AZURE:return L.AzureIcon;case t.AZURE_CERTS:return L.AzureIcon;case t.CONJUR:return L.ConjourIcon;case t.FS:return L.FolderIcon}},pe=d=>{switch(d){case t.KONNECT:return r("form.config.konnect.description");case t.ENV:return r("form.config.env.description");case t.AWS:return r("form.config.aws.description");case t.GCP:return r("form.config.gcp.description");case t.HCV:return r("form.config.hcv.description");case t.AZURE:return r("form.config.azure.description");case t.AZURE_CERTS:return r("form.config.azure-certs.description");case t.CONJUR:return r("form.config.conjur.description");case t.FS:return r("form.config.fs.description")}},k=d=>{var m,z,ie,ue,n,ye;const l=E.value?ge((d==null?void 0:d.item)??d):d;i.fields.prefix=((m=l==null?void 0:l.item)==null?void 0:m.prefix)||(l==null?void 0:l.prefix)||"",i.fields.description=((z=l==null?void 0:l.item)==null?void 0:z.description)||(l==null?void 0:l.description)||"";const C=((ie=l==null?void 0:l.item)==null?void 0:ie.tags)||(l==null?void 0:l.tags)||[];i.fields.tags=(C==null?void 0:C.join(", "))||"",Object.assign(S,i.fields);const $=((ue=l==null?void 0:l.item)==null?void 0:ue.config)||(l==null?void 0:l.config)||null;$&&(Object.keys($).length||(l==null?void 0:l.name)===t.KONNECT)?(f.value=((n=l==null?void 0:l.item)==null?void 0:n.name)||(l==null?void 0:l.name)||"",J.value=f.value,O.value=((ye=l==null?void 0:l.config)==null?void 0:ye.config_store_id)||void 0,Object.assign(a[f.value],$),Object.assign(ee[f.value],$)):i.errorMessage="Error loading vault config"},w=d=>d===""||d==null,U=e.computed(()=>f.value===t.HCV?!Object.keys(a[t.HCV]).filter(d=>["namespace","ttl","neg_ttl","resurrect_ttl","kube_auth_path","approle_auth_path","approle_secret_id","approle_secret_id_file","oauth2_audiences","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_login_path","gcp_login_path"].includes(d)||a[t.HCV].auth_method!==p.K8S&&(d==="kube_role"||d==="kube_api_token_file")||!s.config.hcvCspAuthMethodsAvailable&&["aws_auth_role","aws_auth_region","aws_auth_nonce","aws_access_key_id","aws_secret_access_key","aws_login_path","aws_sts_endpoint_url","aws_assume_role_arn","aws_role_session_name","azure_auth_role","azure_login_path","gcp_auth_role","gcp_login_path","gcp_service_account","gcp_jwt_exp"].includes(d)||![p.AWS_IAM,p.AWS_EC2].includes(a[t.HCV].auth_method)&&d==="aws_auth_role"||a[t.HCV].auth_method!==p.AWS_IAM&&["aws_auth_region","aws_access_key_id","aws_secret_access_key"].includes(d)||a[t.HCV].auth_method===p.AWS_IAM&&["aws_access_key_id","aws_secret_access_key"].includes(d)||a[t.HCV].auth_method!==p.AWS_EC2&&d==="aws_auth_nonce"||a[t.HCV].auth_method!==p.AZURE&&d==="azure_auth_role"||![p.GCP_GCE,p.GCP_IAM].includes(a[t.HCV].auth_method)&&d==="gcp_auth_role"||a[t.HCV].auth_method!==p.GCP_IAM&&["gcp_service_account","gcp_jwt_exp"].includes(d)||a[t.HCV].auth_method!==p.TOKEN&&d==="token"||E.value&&Y.value===_.EntityBaseFormType.Edit&&["token","oauth2_client_secret","cert_auth_cert_key"].includes(d)||a[t.HCV].auth_method!==p.APP_ROLE&&(d==="approle_role_id"||d==="approle_response_wrapping")||a[t.HCV].auth_method===p.APP_ROLE&&d==="approle_response_wrapping"&&typeof a[f.value][d]=="boolean"||a[t.HCV].auth_method!==p.CERT&&["cert_auth_role_name","cert_auth_cert","cert_auth_cert_key"].includes(d)||a[t.HCV].auth_method!==p.JWT&&["oauth2_client_id","oauth2_client_secret","jwt_role","oauth2_token_endpoint"].includes(d)?!1:w(a[f.value][d])).length:f.value===t.AZURE?!Object.keys(a[t.AZURE]).filter(d=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:w(a[f.value][d])).length:f.value===t.AZURE_CERTS?!Object.keys(a[t.AZURE_CERTS]).filter(d=>["client_id","tenant_id","ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:w(a[f.value][d])).length:f.value===t.AWS?!Object.keys(a[t.AWS]).filter(d=>["endpoint_url","assume_role_arn","ttl","neg_ttl","resurrect_ttl","sts_endpoint_url"].includes(d)?!1:w(a[f.value][d])).length:!Object.keys(a[f.value]).filter(d=>["ttl","neg_ttl","resurrect_ttl"].includes(d)?!1:w(a[f.value][d])).length),P=e.computed(()=>!!i.fields.prefix&&U.value),D=e.computed(()=>JSON.stringify(i.fields)!==JSON.stringify(S)||f.value!==J.value||JSON.stringify(a[f.value])!==JSON.stringify(ee[f.value])),F=e.computed(()=>{var l,C;let d=`${s.config.apiBaseUrl}${oe.form[N.value][Y.value]}`;return s.config.app==="konnect"&&(d=d.replace(/{controlPlaneId}/gi,((l=s.config)==null?void 0:l.controlPlaneId)||"")),A(d).replace(/\/{workspace}/gi,(C=s.config)!=null&&C.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.vaultId??"")}),B=e.computed(()=>{var ye,Re;const d=parseInt(String(a[t.HCV].gcp_jwt_exp),10),l={protocol:a[t.HCV].protocol,host:a[t.HCV].host,port:parseInt(a[t.HCV].port.toString()),mount:a[t.HCV].mount,kv:a[t.HCV].kv,namespace:a[t.HCV].namespace||null,...s.config.hcvSslVerifyAvailable&&{ssl_verify:a[t.HCV].ssl_verify??!0},auth_method:a[t.HCV].auth_method,...s.config.base64FieldAvailable&&{base64_decode:a[t.HCV].base64_decode},...a[t.HCV].auth_method===p.TOKEN&&{token:a[t.HCV].token},...a[t.HCV].auth_method===p.K8S&&{kube_role:a[t.HCV].kube_role,kube_auth_path:a[t.HCV].kube_auth_path||void 0,kube_api_token_file:a[t.HCV].kube_api_token_file,token:null},...a[t.HCV].auth_method===p.AWS_IAM&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_region:a[t.HCV].aws_auth_region||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0,aws_access_key_id:a[t.HCV].aws_access_key_id||void 0,aws_secret_access_key:a[t.HCV].aws_secret_access_key||void 0,aws_sts_endpoint_url:a[t.HCV].aws_sts_endpoint_url||void 0,aws_assume_role_arn:a[t.HCV].aws_assume_role_arn||void 0,aws_role_session_name:a[t.HCV].aws_role_session_name||void 0},...a[t.HCV].auth_method===p.AWS_EC2&&{aws_auth_role:a[t.HCV].aws_auth_role||void 0,aws_auth_nonce:a[t.HCV].aws_auth_nonce||void 0,aws_login_path:a[t.HCV].aws_login_path||void 0},...a[t.HCV].auth_method===p.AZURE&&{azure_auth_role:a[t.HCV].azure_auth_role||void 0,azure_login_path:a[t.HCV].azure_login_path||void 0},...a[t.HCV].auth_method===p.GCP_GCE&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0},...a[t.HCV].auth_method===p.GCP_IAM&&{gcp_auth_role:a[t.HCV].gcp_auth_role||void 0,gcp_login_path:a[t.HCV].gcp_login_path||void 0,gcp_service_account:a[t.HCV].gcp_service_account||void 0,gcp_jwt_exp:Number.isNaN(d)?void 0:d},...a[t.HCV].auth_method===p.APP_ROLE&&{approle_auth_path:a[t.HCV].approle_auth_path||void 0,approle_role_id:a[t.HCV].approle_role_id,approle_secret_id:a[t.HCV].approle_secret_id||void 0,approle_secret_id_file:a[t.HCV].approle_secret_id_file||void 0,approle_response_wrapping:a[t.HCV].approle_response_wrapping??!1},...a[t.HCV].auth_method===p.CERT&&{cert_auth_role_name:a[t.HCV].cert_auth_role_name,cert_auth_cert:a[t.HCV].cert_auth_cert,cert_auth_cert_key:a[t.HCV].cert_auth_cert_key},...a[t.HCV].auth_method===p.JWT&&{oauth2_audiences:a[t.HCV].oauth2_audiences||null,oauth2_client_id:a[t.HCV].oauth2_client_id,oauth2_client_secret:a[t.HCV].oauth2_client_secret,jwt_role:a[t.HCV].jwt_role,oauth2_token_endpoint:a[t.HCV].oauth2_token_endpoint}},C={...a[f.value],client_id:a[f.value].client_id||null,tenant_id:a[f.value].tenant_id||null},$={...a[f.value],client_id:a[f.value].client_id||null,tenant_id:a[f.value].tenant_id||null},m={...a[f.value],endpoint_url:a[f.value].endpoint_url||null,assume_role_arn:a[f.value].assume_role_arn||null,...s.config.awsStsEndpointUrlAvailable?{sts_endpoint_url:a[f.value].sts_endpoint_url||null}:{}};let z=a[f.value];f.value===t.HCV?z=l:f.value===t.AZURE?z=C:f.value===t.AZURE_CERTS?z=$:f.value===t.AWS&&(z=m);let ie={};if(![t.KONNECT,t.ENV].includes(f.value)){const le=a[f.value],Ee=le.ttl,me=le.neg_ttl,Ie=le.resurrect_ttl;ie={ttl:Ee?parseInt(Ee.toString(),10):null,neg_ttl:me?parseInt(me.toString(),10):null,resurrect_ttl:Ie?parseInt(Ie.toString(),10):null}}const ue={prefix:i.fields.prefix,description:i.fields.description||null,tags:(Re=(ye=i.fields.tags.split(","))==null?void 0:ye.map(le=>String(le||"").trim()))==null?void 0:Re.filter(le=>le!==""),name:f.value,config:{...z,...ie}};if(!E.value)return ue;const n=Pe(ue);if(Y.value===_.EntityBaseFormType.Edit){const le={...n.config};return["token","client_secret","secret_access_key","api_key","key"].forEach(me=>{me in le&&w(le[me])&&delete le[me]}),{...n,config:le}}return n}),b=e.computed(()=>({...B.value,config:{...B.value.config,config_store_id:O.value}})),x=async()=>{var d,l;try{i.isReadonly=!0;const C=A(`${s.config.apiBaseUrl}${oe.form[E.value?"aiGateway":"konnect"].createConfigStore}`).replace(/{controlPlaneId}/gi,((d=s.config)==null?void 0:d.controlPlaneId)||"").replace(/\/{workspace}/gi,(l=s.config)!=null&&l.workspace?`/${s.config.workspace}`:""),$=await I.post(C);return $==null?void 0:$.data.id}catch(C){i.errorMessage=h(C),c("error",C)}finally{i.isReadonly=!1}},T=async()=>{var d;try{i.isReadonly=!0;let l;Y.value==="create"?f.value===t.KONNECT?(O.value=await x(),l=await I.post(F.value,b.value)):l=await I.post(F.value,B.value):Y.value==="edit"&&(f.value===t.KONNECT&&!O.value?(O.value=await x(),l=await I.put(F.value,b.value)):l=((d=s.config)==null?void 0:d.app)==="konnect"?await I.put(F.value,b.value):await I.patch(F.value,B.value)),k(l==null?void 0:l.data),c("update",l==null?void 0:l.data)}catch(l){i.errorMessage=h(l),c("error",l)}finally{i.isReadonly=!1}};return(d,l)=>{const C=e.resolveComponent("KTooltip"),$=e.resolveComponent("KSelect"),m=e.resolveComponent("KInput"),z=e.resolveComponent("KCheckbox"),ie=e.resolveComponent("KTextArea"),ue=e.resolveComponent("KCollapse");return e.openBlock(),e.createElementBlock("div",je,[e.createVNode(e.unref(_.EntityBaseForm),{"can-submit":P.value&&D.value,config:o.config,"edit-id":o.vaultId,"entity-type":e.unref(_.SupportedEntityType).Vault,"error-message":i.errorMessage,"fetch-url":ce.value,"form-fields":B.value,"is-readonly":i.isReadonly,"tabs-to-hide":o.config.apiType==="aiGateway"?["terraform","deck"]:[],onCancel:Z,"onFetch:error":j,"onFetch:success":k,onLoading:q,onSubmit:T},{default:e.withCtx(()=>[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(r)("form.sections.config.description"),title:e.unref(r)("form.sections.config.title")},{default:e.withCtx(()=>[e.createElementVNode("div",De,[e.createVNode($,{modelValue:f.value,"onUpdate:modelValue":l[0]||(l[0]=n=>f.value=n),"data-testid":"provider-select",disabled:M.value,"dropdown-max-height":"500",items:re.value,readonly:i.isReadonly},{"selected-item-template":e.withCtx(({item:n})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(fe(n.value)))),e.createElementVNode("span",null,e.toDisplayString(n==null?void 0:n.label),1)]),"item-template":e.withCtx(({item:n})=>[e.createVNode(C,{placement:"top",text:n.disabled?e.unref(r)("form.unavailable"):""},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"provider-item","data-testid":`vault-form-provider-${n.value}`},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(fe(n.value)))),e.createElementVNode("div",Ze,[e.createElementVNode("span",Le,e.toDisplayString(n==null?void 0:n.label),1),e.createElementVNode("span",Je,e.toDisplayString(pe(n.value)),1)])],8,ze)]),_:2},1032,["text"])]),_:1},8,["modelValue","disabled","items","readonly"])]),e.createVNode(e.TransitionGroup,{name:"appear"},{default:e.withCtx(()=>[f.value===e.unref(t).ENV?(e.openBlock(),e.createElementBlock("div",Qe,[e.createVNode(m,{modelValue:a[e.unref(t).ENV].prefix,"onUpdate:modelValue":l[1]||(l[1]=n=>a[e.unref(t).ENV].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-kong-prefix",label:e.unref(r)("form.config.env.fields.prefix.label"),"label-attributes":{info:e.unref(r)("form.config.env.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)("form.config.env.fields.prefix.placeholder"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:0,modelValue:a[e.unref(t).ENV].base64_decode,"onUpdate:modelValue":l[2]||(l[2]=n=>a[e.unref(t).ENV].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AWS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AWS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode($,{modelValue:a[e.unref(t).AWS].region,"onUpdate:modelValue":l[3]||(l[3]=n=>a[e.unref(t).AWS].region=n),"data-testid":"vault-form-config-aws-region",items:V,label:e.unref(r)("form.config.aws.fields.region.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.region.tooltip")},placeholder:e.unref(r)("form.config.aws.fields.region.placeholder"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","label-attributes","placeholder","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].endpoint_url,"onUpdate:modelValue":l[4]||(l[4]=n=>a[e.unref(t).AWS].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-endpoint_url",label:e.unref(r)("form.config.aws.fields.endpoint_url.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].assume_role_arn,"onUpdate:modelValue":l[5]||(l[5]=n=>a[e.unref(t).AWS].assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-assume_role_arn",label:e.unref(r)("form.config.aws.fields.assume_role_arn.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.assume_role_arn.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AWS].role_session_name,"onUpdate:modelValue":l[6]||(l[6]=n=>a[e.unref(t).AWS].role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-role_session_name",label:e.unref(r)("form.config.aws.fields.role_session_name.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.role_session_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.awsStsEndpointUrlAvailable?(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).AWS].sts_endpoint_url,"onUpdate:modelValue":l[7]||(l[7]=n=>a[e.unref(t).AWS].sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-aws-sts_endpoint_url",label:e.unref(r)("form.config.aws.fields.sts_endpoint_url.label"),"label-attributes":{info:e.unref(r)("form.config.aws.fields.sts_endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:1,modelValue:a[e.unref(t).AWS].base64_decode,"onUpdate:modelValue":l[8]||(l[8]=n=>a[e.unref(t).AWS].base64_decode=n),"data-testid":"vault-form-config-aws-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).GCP?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).GCP}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).GCP].project_id,"onUpdate:modelValue":l[9]||(l[9]=n=>a[e.unref(t).GCP].project_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-gcp-project-id",label:e.unref(r)("form.config.gcp.fields.project_id.label"),placeholder:e.unref(r)("form.config.gcp.fields.project_id.placeholder"),readonly:i.isReadonly,required:"",type:"text"},{"label-tooltip":e.withCtx(()=>[e.createVNode(e.unref(u),{keypath:"form.config.gcp.fields.project_id.tooltip.text",scope:"global"},{"italic-text":e.withCtx(()=>[e.createElementVNode("em",null,e.toDisplayString(e.unref(r)("form.config.gcp.fields.project_id.tooltip.italicText")),1)]),_:1})]),_:1},8,["modelValue","label","placeholder","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:0,modelValue:a[e.unref(t).GCP].base64_decode,"onUpdate:modelValue":l[10]||(l[10]=n=>a[e.unref(t).GCP].base64_decode=n),"data-testid":"vault-form-config-gcp-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).HCV?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).HCV}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode($,{modelValue:a[e.unref(t).HCV].protocol,"onUpdate:modelValue":l[11]||(l[11]=n=>a[e.unref(t).HCV].protocol=n),"data-testid":"vault-form-config-hcv-protocol",items:Q,label:e.unref(r)("form.config.hcv.fields.protocol.label"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),o.config.hcvSslVerifyAvailable?(e.openBlock(),e.createBlock(z,{key:0,modelValue:a[e.unref(t).HCV].ssl_verify,"onUpdate:modelValue":l[12]||(l[12]=n=>a[e.unref(t).HCV].ssl_verify=n),"data-testid":"vault-form-config-hcv-ssl_verify",label:e.unref(r)("form.config.hcv.fields.ssl_verify.label"),readonly:i.isReadonly},null,8,["modelValue","label","readonly"])):e.createCommentVNode("",!0),e.createVNode(m,{modelValue:a[e.unref(t).HCV].host,"onUpdate:modelValue":l[13]||(l[13]=n=>a[e.unref(t).HCV].host=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-host",label:e.unref(r)("form.config.hcv.fields.host.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].port,"onUpdate:modelValue":l[14]||(l[14]=n=>a[e.unref(t).HCV].port=n),autocomplete:"off","data-testid":"vault-form-config-hcv-port",label:e.unref(r)("form.config.hcv.fields.port.label"),min:"0",readonly:i.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].mount,"onUpdate:modelValue":l[15]||(l[15]=n=>a[e.unref(t).HCV].mount=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-mount",label:e.unref(r)("form.config.hcv.fields.mount.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode($,{modelValue:a[e.unref(t).HCV].kv,"onUpdate:modelValue":l[16]||(l[16]=n=>a[e.unref(t).HCV].kv=n),"data-testid":"vault-form-config-hcv-kv",items:ne,label:e.unref(r)("form.config.hcv.fields.kv.label"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].namespace,"onUpdate:modelValue":l[17]||(l[17]=n=>a[e.unref(t).HCV].namespace=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-namespace",label:e.unref(r)("form.config.hcv.fields.namespace.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode($,{modelValue:a[e.unref(t).HCV].auth_method,"onUpdate:modelValue":l[18]||(l[18]=n=>a[e.unref(t).HCV].auth_method=n),"data-testid":"vault-form-config-hcv-auth_method",items:[{label:e.unref(p).TOKEN,value:e.unref(p).TOKEN},{label:e.unref(p).K8S,value:e.unref(p).K8S},...o.config.hcvAppRoleMethodAvailable?[{label:e.unref(p).APP_ROLE,value:e.unref(p).APP_ROLE}]:[],...o.config.hcvCertMethodAvailable?[{label:e.unref(p).CERT,value:e.unref(p).CERT}]:[],...o.config.hcvJwtMethodAvailable?[{label:e.unref(p).JWT,value:e.unref(p).JWT}]:[],...o.config.hcvCspAuthMethodsAvailable?[{label:e.unref(p).AWS_IAM,value:e.unref(p).AWS_IAM},{label:e.unref(p).AWS_EC2,value:e.unref(p).AWS_EC2},{label:e.unref(p).AZURE,value:e.unref(p).AZURE},{label:e.unref(p).GCP_GCE,value:e.unref(p).GCP_GCE},{label:e.unref(p).GCP_IAM,value:e.unref(p).GCP_IAM}]:[]],label:e.unref(r)("form.config.hcv.fields.auth_method.label"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","items","label","readonly"]),a[e.unref(t).HCV].auth_method===e.unref(p).TOKEN?(e.openBlock(),e.createElementBlock("div",Ye,[E.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":l[20]||(l[20]=n=>a[e.unref(t).HCV].token=n),"data-testid":"vault-form-config-hcv-token",label:e.unref(r)("form.config.hcv.fields.token.label"),mode:K.value,readonly:i.isReadonly,required:K.value==="create"},null,8,["modelValue","label","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].token,"onUpdate:modelValue":l[19]||(l[19]=n=>a[e.unref(t).HCV].token=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-token",label:e.unref(r)("form.config.hcv.fields.token.label"),readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]))])):a[e.unref(t).HCV].auth_method===e.unref(p).K8S?(e.openBlock(),e.createElementBlock("div",Xe,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_role,"onUpdate:modelValue":l[21]||(l[21]=n=>a[e.unref(t).HCV].kube_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_role",label:e.unref(r)("form.config.hcv.fields.kube_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_auth_path,"onUpdate:modelValue":l[22]||(l[22]=n=>a[e.unref(t).HCV].kube_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_auth_path",label:e.unref(r)("form.config.hcv.fields.kube_auth_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].kube_api_token_file,"onUpdate:modelValue":l[23]||(l[23]=n=>a[e.unref(t).HCV].kube_api_token_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-kube_api_token_file",label:e.unref(r)("form.config.hcv.fields.kube_api_token_file.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AWS_IAM?(e.openBlock(),e.createElementBlock("div",et,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":l[24]||(l[24]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(r)("form.config.hcv.fields.aws_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_region,"onUpdate:modelValue":l[25]||(l[25]=n=>a[e.unref(t).HCV].aws_auth_region=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_region",label:e.unref(r)("form.config.hcv.fields.aws_auth_region.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":l[26]||(l[26]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(r)("form.config.hcv.fields.aws_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_access_key_id,"onUpdate:modelValue":l[27]||(l[27]=n=>a[e.unref(t).HCV].aws_access_key_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_access_key_id",label:e.unref(r)("form.config.hcv.fields.aws_access_key_id.label"),readonly:i.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),E.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":l[29]||(l[29]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),"data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(r)("form.config.hcv.fields.aws_secret_access_key.label"),mode:K.value,readonly:i.isReadonly},null,8,["modelValue","label","mode","readonly"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].aws_secret_access_key,"onUpdate:modelValue":l[28]||(l[28]=n=>a[e.unref(t).HCV].aws_secret_access_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_secret_access_key",label:e.unref(r)("form.config.hcv.fields.aws_secret_access_key.label"),readonly:i.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_sts_endpoint_url,"onUpdate:modelValue":l[30]||(l[30]=n=>a[e.unref(t).HCV].aws_sts_endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_sts_endpoint_url",label:e.unref(r)("form.config.hcv.fields.aws_sts_endpoint_url.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_assume_role_arn,"onUpdate:modelValue":l[31]||(l[31]=n=>a[e.unref(t).HCV].aws_assume_role_arn=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_assume_role_arn",label:e.unref(r)("form.config.hcv.fields.aws_assume_role_arn.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_role_session_name,"onUpdate:modelValue":l[32]||(l[32]=n=>a[e.unref(t).HCV].aws_role_session_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_role_session_name",label:e.unref(r)("form.config.hcv.fields.aws_role_session_name.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AWS_EC2?(e.openBlock(),e.createElementBlock("div",tt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_role,"onUpdate:modelValue":l[33]||(l[33]=n=>a[e.unref(t).HCV].aws_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_role",label:e.unref(r)("form.config.hcv.fields.aws_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_auth_nonce,"onUpdate:modelValue":l[34]||(l[34]=n=>a[e.unref(t).HCV].aws_auth_nonce=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_auth_nonce",label:e.unref(r)("form.config.hcv.fields.aws_auth_nonce.label"),readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].aws_login_path,"onUpdate:modelValue":l[35]||(l[35]=n=>a[e.unref(t).HCV].aws_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-aws_login_path",label:e.unref(r)("form.config.hcv.fields.aws_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).AZURE?(e.openBlock(),e.createElementBlock("div",at,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].azure_auth_role,"onUpdate:modelValue":l[36]||(l[36]=n=>a[e.unref(t).HCV].azure_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_auth_role",label:e.unref(r)("form.config.hcv.fields.azure_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].azure_login_path,"onUpdate:modelValue":l[37]||(l[37]=n=>a[e.unref(t).HCV].azure_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-azure_login_path",label:e.unref(r)("form.config.hcv.fields.azure_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).GCP_GCE?(e.openBlock(),e.createElementBlock("div",ot,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":l[38]||(l[38]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(r)("form.config.hcv.fields.gcp_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":l[39]||(l[39]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(r)("form.config.hcv.fields.gcp_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):o.config.hcvCspAuthMethodsAvailable&&a[e.unref(t).HCV].auth_method===e.unref(p).GCP_IAM?(e.openBlock(),e.createElementBlock("div",lt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_auth_role,"onUpdate:modelValue":l[40]||(l[40]=n=>a[e.unref(t).HCV].gcp_auth_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_auth_role",label:e.unref(r)("form.config.hcv.fields.gcp_auth_role.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_login_path,"onUpdate:modelValue":l[41]||(l[41]=n=>a[e.unref(t).HCV].gcp_login_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_login_path",label:e.unref(r)("form.config.hcv.fields.gcp_login_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_service_account,"onUpdate:modelValue":l[42]||(l[42]=n=>a[e.unref(t).HCV].gcp_service_account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_service_account",label:e.unref(r)("form.config.hcv.fields.gcp_service_account.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].gcp_jwt_exp,"onUpdate:modelValue":l[43]||(l[43]=n=>a[e.unref(t).HCV].gcp_jwt_exp=n),autocomplete:"off","data-testid":"vault-form-config-hcv-gcp_jwt_exp",label:e.unref(r)("form.config.hcv.fields.gcp_jwt_exp.label"),readonly:i.isReadonly,required:"",type:"number"},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(p).APP_ROLE?(e.openBlock(),e.createElementBlock("div",rt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_auth_path,"onUpdate:modelValue":l[44]||(l[44]=n=>a[e.unref(t).HCV].approle_auth_path=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_auth_path",label:e.unref(r)("form.config.hcv.fields.approle_auth_path.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_role_id,"onUpdate:modelValue":l[45]||(l[45]=n=>a[e.unref(t).HCV].approle_role_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_role_id",label:e.unref(r)("form.config.hcv.fields.approle_role_id.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_secret_id,"onUpdate:modelValue":l[46]||(l[46]=n=>a[e.unref(t).HCV].approle_secret_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id",label:e.unref(r)("form.config.hcv.fields.approle_secret_id.label"),readonly:i.isReadonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].approle_secret_id_file,"onUpdate:modelValue":l[47]||(l[47]=n=>a[e.unref(t).HCV].approle_secret_id_file=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-approle_secret_id_file",label:e.unref(r)("form.config.hcv.fields.approle_secret_id_file.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(z,{modelValue:a[e.unref(t).HCV].approle_response_wrapping,"onUpdate:modelValue":l[48]||(l[48]=n=>a[e.unref(t).HCV].approle_response_wrapping=n),"data-testid":"vault-form-config-hcv-approle_response_wrapping",label:e.unref(r)("form.config.hcv.fields.approle_response_wrapping.label")},null,8,["modelValue","label"])])):a[e.unref(t).HCV].auth_method===e.unref(p).CERT?(e.openBlock(),e.createElementBlock("div",nt,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].cert_auth_role_name,"onUpdate:modelValue":l[49]||(l[49]=n=>a[e.unref(t).HCV].cert_auth_role_name=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_role_name",label:e.unref(r)("form.config.hcv.fields.cert_auth_role_name.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(ie,{modelValue:a[e.unref(t).HCV].cert_auth_cert,"onUpdate:modelValue":l[50]||(l[50]=n=>a[e.unref(t).HCV].cert_auth_cert=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert",label:e.unref(r)("form.config.hcv.fields.cert_auth_cert.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(ie,{modelValue:a[e.unref(t).HCV].cert_auth_cert_key,"onUpdate:modelValue":l[51]||(l[51]=n=>a[e.unref(t).HCV].cert_auth_cert_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-cert_auth_cert_key",label:e.unref(r)("form.config.hcv.fields.cert_auth_cert_key.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"])])):a[e.unref(t).HCV].auth_method===e.unref(p).JWT?(e.openBlock(),e.createElementBlock("div",it,[e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_client_id,"onUpdate:modelValue":l[52]||(l[52]=n=>a[e.unref(t).HCV].oauth2_client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_id",label:e.unref(r)("form.config.hcv.fields.oauth2_client_id.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),E.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":l[54]||(l[54]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),"data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(r)("form.config.hcv.fields.oauth2_client_secret.label"),mode:K.value,readonly:i.isReadonly,required:K.value==="create"},null,8,["modelValue","label","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).HCV].oauth2_client_secret,"onUpdate:modelValue":l[53]||(l[53]=n=>a[e.unref(t).HCV].oauth2_client_secret=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_client_secret",label:e.unref(r)("form.config.hcv.fields.oauth2_client_secret.label"),readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","readonly"])),e.createVNode(m,{modelValue:a[e.unref(t).HCV].jwt_role,"onUpdate:modelValue":l[55]||(l[55]=n=>a[e.unref(t).HCV].jwt_role=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-jwt_role",label:e.unref(r)("form.config.hcv.fields.jwt_role.label"),"label-attributes":{info:e.unref(r)("form.config.hcv.fields.jwt_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_token_endpoint,"onUpdate:modelValue":l[56]||(l[56]=n=>a[e.unref(t).HCV].oauth2_token_endpoint=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_token_endpoint",label:e.unref(r)("form.config.hcv.fields.oauth2_token_endpoint.label"),readonly:i.isReadonly,required:""},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).HCV].oauth2_audiences,"onUpdate:modelValue":l[57]||(l[57]=n=>a[e.unref(t).HCV].oauth2_audiences=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-hcv-oauth2_audiences",label:e.unref(r)("form.config.hcv.fields.oauth2_audiences.label"),"label-attributes":{info:e.unref(r)("form.config.hcv.fields.oauth2_audiences.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])])):e.createCommentVNode("",!0),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:11,modelValue:a[e.unref(t).HCV].base64_decode,"onUpdate:modelValue":l[58]||(l[58]=n=>a[e.unref(t).HCV].base64_decode=n),"data-testid":"vault-form-config-hcv-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AZURE?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).AZURE].location,"onUpdate:modelValue":l[59]||(l[59]=n=>a[e.unref(t).AZURE].location=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-location",label:e.unref(r)("form.config.azure.fields.location.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].vault_uri,"onUpdate:modelValue":l[60]||(l[60]=n=>a[e.unref(t).AZURE].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-uri",label:e.unref(r)("form.config.azure.fields.vault_uri.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].credentials_prefix,"onUpdate:modelValue":l[61]||(l[61]=n=>a[e.unref(t).AZURE].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-prefix",label:e.unref(r)("form.config.azure.fields.credential_prefix.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode($,{modelValue:a[e.unref(t).AZURE].type,"onUpdate:modelValue":l[62]||(l[62]=n=>a[e.unref(t).AZURE].type=n),"data-testid":"vault-form-config-azure-type",items:W,label:e.unref(r)("form.config.azure.fields.type.label"),placeholder:e.unref(r)("form.config.azure.fields.type.placeholder"),readonly:i.isReadonly,required:"",width:"100%"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].client_id,"onUpdate:modelValue":l[63]||(l[63]=n=>a[e.unref(t).AZURE].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-client-id",label:e.unref(r)("form.config.azure.fields.client_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE].tenant_id,"onUpdate:modelValue":l[64]||(l[64]=n=>a[e.unref(t).AZURE].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-tenant-id",label:e.unref(r)("form.config.azure.fields.tenant_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:0,modelValue:a[e.unref(t).AZURE].base64_decode,"onUpdate:modelValue":l[65]||(l[65]=n=>a[e.unref(t).AZURE].base64_decode=n),"data-testid":"vault-form-config-azure-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).AZURE_CERTS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).AZURE_CERTS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].vault_uri,"onUpdate:modelValue":l[66]||(l[66]=n=>a[e.unref(t).AZURE_CERTS].vault_uri=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-vault-uri",label:e.unref(r)("form.config.azure-certs.fields.vault_uri.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].credentials_prefix,"onUpdate:modelValue":l[67]||(l[67]=n=>a[e.unref(t).AZURE_CERTS].credentials_prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-credentials-prefix",label:e.unref(r)("form.config.azure-certs.fields.credential_prefix.label"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].client_id,"onUpdate:modelValue":l[68]||(l[68]=n=>a[e.unref(t).AZURE_CERTS].client_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-client-id",label:e.unref(r)("form.config.azure-certs.fields.client_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).AZURE_CERTS].tenant_id,"onUpdate:modelValue":l[69]||(l[69]=n=>a[e.unref(t).AZURE_CERTS].tenant_id=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-azure-certs-tenant-id",label:e.unref(r)("form.config.azure-certs.fields.tenant_id.label"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","label","readonly"])])):e.createCommentVNode("",!0),f.value===e.unref(t).CONJUR?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).CONJUR}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].endpoint_url,"onUpdate:modelValue":l[70]||(l[70]=n=>a[e.unref(t).CONJUR].endpoint_url=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-endpoint_url",label:e.unref(r)("form.config.conjur.fields.endpoint_url.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.endpoint_url.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].login,"onUpdate:modelValue":l[71]||(l[71]=n=>a[e.unref(t).CONJUR].login=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-login",label:e.unref(r)("form.config.conjur.fields.login.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.login.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(m,{modelValue:a[e.unref(t).CONJUR].account,"onUpdate:modelValue":l[72]||(l[72]=n=>a[e.unref(t).CONJUR].account=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-account",label:e.unref(r)("form.config.conjur.fields.account.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.account.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),E.value?(e.openBlock(),e.createBlock(e.unref(_.SensitiveInput),{key:1,modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":l[74]||(l[74]=n=>a[e.unref(t).CONJUR].api_key=n),"data-testid":"vault-form-config-conjur-api_key",label:e.unref(r)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},mode:K.value,readonly:i.isReadonly,required:K.value==="create"},null,8,["modelValue","label","label-attributes","mode","readonly","required"])):(e.openBlock(),e.createBlock(m,{key:0,modelValue:a[e.unref(t).CONJUR].api_key,"onUpdate:modelValue":l[73]||(l[73]=n=>a[e.unref(t).CONJUR].api_key=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-conjur-api_key",label:e.unref(r)("form.config.conjur.fields.api_key.label"),"label-attributes":{info:e.unref(r)("form.config.conjur.fields.api_key.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"","show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"])),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:2,modelValue:a[e.unref(t).CONJUR].base64_decode,"onUpdate:modelValue":l[75]||(l[75]=n=>a[e.unref(t).CONJUR].base64_decode=n),"data-testid":"vault-form-config-env-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value===e.unref(t).FS?(e.openBlock(),e.createElementBlock("div",{key:`${e.unref(t).FS}-vault-config-fields`,class:"vault-form-config-fields-container"},[e.createVNode(m,{modelValue:a[e.unref(t).FS].prefix,"onUpdate:modelValue":l[76]||(l[76]=n=>a[e.unref(t).FS].prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-config-fs-prefix",label:e.unref(r)("form.config.fs.fields.prefix.label"),"label-attributes":{info:e.unref(r)("form.config.fs.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","label","label-attributes","readonly"]),o.config.base64FieldAvailable?(e.openBlock(),e.createBlock(z,{key:0,modelValue:a[e.unref(t).FS].base64_decode,"onUpdate:modelValue":l[77]||(l[77]=n=>a[e.unref(t).FS].base64_decode=n),"data-testid":"vault-form-config-fs-base64_decode",label:e.unref(r)("form.config.commonFields.base64_decode.label"),"label-attributes":{info:e.unref(r)("form.config.commonFields.base64_decode.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:i.isReadonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),o.config.ttl?(e.openBlock(),e.createElementBlock("div",st,[X.value?(e.openBlock(),e.createBlock(ue,{key:0,class:"advanced-fields-collapse","data-testid":"advanced-fields-collapse","trigger-alignment":"leading","trigger-label":e.unref(r)("form.config.advancedFields.title")},{default:e.withCtx(()=>[e.createElementVNode("div",ct,[e.createElementVNode("div",dt,[e.createVNode(m,{modelValue:a[f.value].ttl,"onUpdate:modelValue":l[78]||(l[78]=n=>a[f.value].ttl=n),"data-testid":"vault-ttl-input",label:e.unref(r)("form.config.advancedFields.ttl"),"label-attributes":{info:e.unref(r)("form.config.advancedFields.ttlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])]),e.createElementVNode("div",ft,[e.createVNode(m,{modelValue:a[f.value].neg_ttl,"onUpdate:modelValue":l[79]||(l[79]=n=>a[f.value].neg_ttl=n),"data-testid":"vault-neg-ttl-input",label:e.unref(r)("form.config.advancedFields.negTtl"),"label-attributes":{info:e.unref(r)("form.config.advancedFields.negTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])]),e.createElementVNode("div",ut,[e.createElementVNode("div",pt,[e.createVNode(m,{modelValue:a[f.value].resurrect_ttl,"onUpdate:modelValue":l[80]||(l[80]=n=>a[f.value].resurrect_ttl=n),"data-testid":"vault-resurrect-ttl-input",label:e.unref(r)("form.config.advancedFields.resurrectTtl"),"label-attributes":{info:e.unref(r)("form.config.advancedFields.resurrectTtlTooltip"),tooltipAttributes:{maxWidth:"400"}},type:"number"},null,8,["modelValue","label","label-attributes"])])])]),_:1},8,["trigger-label"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]),_:1},8,["description","title"]),e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(r)("form.sections.general.description"),title:e.unref(r)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:i.fields.prefix,"onUpdate:modelValue":l[81]||(l[81]=n=>i.fields.prefix=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-prefix",help:e.unref(r)(E.value?"form.fields.prefix_ai_gateway.help":"form.fields.prefix.help"),label:e.unref(r)(E.value?"form.fields.prefix_ai_gateway.label":"form.fields.prefix.label"),"label-attributes":{info:e.unref(r)(E.value?"form.fields.prefix_ai_gateway.tooltip":"form.fields.prefix.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(r)(E.value?"form.fields.prefix_ai_gateway.placeholder":"form.fields.prefix.placeholder"),readonly:i.isReadonly,required:"",type:"text"},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"]),e.createVNode(ie,{modelValue:i.fields.description,"onUpdate:modelValue":l[82]||(l[82]=n=>i.fields.description=n),modelModifiers:{trim:!0},"character-limit":1e3,class:"vault-form-textarea","data-testid":"vault-form-description",label:e.unref(r)("form.fields.description.label"),placeholder:e.unref(r)("form.fields.description.placeholder"),readonly:i.isReadonly},null,8,["modelValue","label","placeholder","readonly"]),E.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0,modelValue:i.fields.tags,"onUpdate:modelValue":l[83]||(l[83]=n=>i.fields.tags=n),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-form-tags",help:e.unref(r)("form.fields.tags.help"),label:e.unref(r)("form.fields.tags.label"),placeholder:e.unref(r)("form.fields.tags.placeholder"),readonly:i.isReadonly,type:"text"},null,8,["modelValue","help","label","placeholder","readonly"]))]),_:1},8,["description","title"])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","tabs-to-hide"])])}}}),[["__scopeId","data-v-f76638fa"]]),_t={class:"kong-ui-vault-entity-config-card"},Se="************",gt=e.defineComponent({__name:"VaultConfigCard",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&o.apiType!=="aiGateway"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||o.apiType==="aiGateway"&&!o.aiGatewayId||!o.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!1}},emits:["loading","fetch:error","fetch:success"],setup(o){const y=o,s=["token","approle_secret_id","api_key","aws_access_key_id","aws_secret_access_key","aws_auth_nonce","cert_auth_cert_key","oauth2_client_secret"],c=e.computed(()=>y.config.apiType==="aiGateway"),u=e.computed(()=>{var i,S,f;const g=c.value?(i=oe.form.aiGateway)==null?void 0:i.edit:(f=oe.form[(S=y.config)==null?void 0:S.app])==null?void 0:f.edit;return g==null?void 0:g.replace(/{aiGatewayId}/gi,y.config.aiGatewayId||"")}),r=g=>c.value?ge(g):g,{i18n:{t:H}}=de.useI18n(),{convertKeyToTitle:I}=_.useStringHelpers(),{getPropValue:h}=_.useHelpers(),E=e.computed(()=>({id:{},name:{label:H(c.value?"labels.vault_type_ai_gateway":"labels.vault_type")},updated_at:{},created_at:{},prefix:{order:5,section:_.ConfigurationSchemaSection.Basic,label:c.value?H("labels.vault_name_ai_gateway"):void 0},description:{order:6,section:_.ConfigurationSchemaSection.Basic},...c.value?{}:{tags:{order:7}},config:{order:8,type:_.ConfigurationSchemaType.Json}})),N=g=>{const i={...g.config};s.forEach(f=>{f in i&&(i[f]=Se)});const S={...g,config:i};if(c.value){const f={...S,type:S.name,name:S.prefix};return delete f.prefix,f}return S},A=g=>{var i,S;return((S=(i=E.value)==null?void 0:i[g])==null?void 0:S.label)||I(g)};return(g,i)=>(e.openBlock(),e.createElementBlock("div",_t,[e.createVNode(e.unref(_.EntityBaseConfigCard),{"code-block-record-formatter":N,config:o.config,"config-card-doc":o.configCardDoc,"config-schema":E.value,"entity-type":e.unref(_.SupportedEntityType).Vault,"fetch-url":u.value,"formats-to-hide":o.config.apiType==="aiGateway"?["terraform","deck"]:[],"hide-title":o.hideTitle,"record-resolver":r,"onFetch:error":i[0]||(i[0]=S=>g.$emit("fetch:error",S)),"onFetch:success":i[1]||(i[1]=S=>g.$emit("fetch:success",S)),onLoading:i[2]||(i[2]=S=>g.$emit("loading",S))},{config:e.withCtx(({rowValue:S})=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(S).sort(),f=>(e.openBlock(),e.createBlock(e.unref(_.ConfigCardItem),{key:f,item:{key:f,value:s.includes(f)?Se:e.unref(h)(f,S),label:A(f)}},null,8,["item"]))),128))]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","formats-to-hide","hide-title"])]))}}),yt="/v2/control-planes/{controlPlaneId}/core-entities/{workspace}",Ce="/v2/control-planes/{controlPlaneId}/{workspace}/config-stores",be="/v1/ai-gateways/{aiGatewayId}",te={getVault:{konnect:`${yt}/vaults/{id}`,aiGateway:`${be}/vaults/{id}`},list:{konnect:`${Ce}/{id}/secrets`,aiGateway:`${be}/config-stores/{id}/secrets`},form:{konnect:{create:`${Ce}/{id}/secrets`,edit:`${Ce}/{id}/secrets/{secretId}`},aiGateway:{create:`${be}/config-stores/{id}/secrets`,edit:`${be}/config-stores/{id}/secrets/{secretId}`}}},bt={class:"table-content-overflow-wrapper"},ht=se(e.defineComponent({inheritAttrs:!1,__name:"SecretListInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},configStoreId:{type:String,required:!0},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","delete:success"],setup(o,{emit:y}){var ce;const s=y,c=o,{i18n:{t:u,formatUnixTimeStamp:r}}=de.useI18n(),{axiosInstance:H}=_.useAxios((ce=c.config)==null?void 0:ce.axiosRequestConfig),h={key:{label:u("secrets.list.table_headers.key"),sortable:!1,hidable:!1},updated_at:{label:u("secrets.list.table_headers.updated_at"),sortable:!1}},E=M=>({"data-testid":M.key}),N=e.computed(()=>c.config.apiType==="aiGateway"?te.list.aiGateway:te.list[c.config.app]),A=e.computed(()=>{var M,R;return`${c.config.apiBaseUrl}${N.value}`.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((M=c.config)==null?void 0:M.controlPlaneId)||"").replace(/\/{workspace}/gi,(R=c.config)!=null&&R.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,c.configStoreId||"")}),g=e.ref(""),i={isExactMatch:!0,placeholder:u("search.placeholder_for_secrets.konnect")},{fetcher:S,fetcherState:f,fetcherCacheKey:J}=_.useFetcher(e.computed(()=>({...c.config,cacheIdentifier:c.cacheIdentifier})),A),O=()=>{g.value=""},X=e.ref(null),re=M=>({label:u("actions.edit"),to:c.config.getEditRoute(M)}),v=e.ref(void 0),a=e.ref(!1),ee=e.ref(!1),V=e.ref(""),W=_.useDeleteUrlBuilder(c.config,A.value),Q=M=>{v.value=M,a.value=!0},ne=()=>{a.value=!1},Y=async()=>{var M,R,Z;if((M=v.value)!=null&&M.key){ee.value=!0;try{await H.delete(W(v.value.key)),ee.value=!1,a.value=!1,J.value++,s("delete:success",v.value)}catch(q){V.value=((Z=(R=q.response)==null?void 0:R.data)==null?void 0:Z.message)||q.message||u("errors.delete"),s("error",q)}finally{ee.value=!1}}};e.watch(f,M=>{var R,Z,q;if(M.status===_.FetcherStatus.Error){X.value={title:u("errors.general")},(q=(Z=(R=M.error)==null?void 0:R.response)==null?void 0:Z.data)!=null&&q.message&&(X.value.message=M.error.response.data.message),s("error",M.error);return}X.value=null});const K=e.ref({ctaPath:c.config.createRoute,ctaText:void 0,message:`${u("secrets.list.empty_state.description")}${c.config.additionMessageForEmptyState?` ${c.config.additionMessageForEmptyState}`:""}`,title:u("secrets.title")});return e.onBeforeMount(async()=>{await c.canCreate()&&(K.value.title=u("secrets.list.empty_state.title"),K.value.ctaText=u("secrets.list.toolbar_actions.new_secret"))}),(M,R)=>{const Z=e.resolveComponent("KButton"),q=e.resolveComponent("KDropdownItem");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(_.EntityBaseTable),{"cache-identifier":o.cacheIdentifier,"disable-sorting":"","empty-state-options":K.value,"enable-entity-actions":"","error-message":X.value,fetcher:e.unref(S),"fetcher-cache-key":e.unref(J),"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-secrets-list",query:g.value,"row-attributes":E,"table-headers":e.unref(h),onClearSearchInput:O},{"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(_.EntityFilter),{modelValue:g.value,"onUpdate:modelValue":R[0]||(R[0]=j=>g.value=j),config:i},null,8,["modelValue"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canCreate()},{default:e.withCtx(()=>[e.createVNode(Z,{appearance:"primary","data-testid":"toolbar-add-secret",size:"large",to:o.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(L.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("secrets.list.toolbar_actions.new_secret")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),key:e.withCtx(({rowValue:j})=>[e.createElementVNode("div",bt,[e.createElementVNode("b",null,e.toDisplayString(j??"-"),1)])]),updated_at:e.withCtx(({rowValue:j})=>[e.createElementVNode("span",null,e.toDisplayString(j?e.unref(r)(new Date(j).getTime()/1e3):"-"),1)]),actions:e.withCtx(({row:j})=>[e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canEdit(j)},{default:e.withCtx(()=>[e.createVNode(q,{"data-testid":"action-entity-edit",item:re(j.key)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(_.PermissionsWrapper),{"auth-function":()=>o.canDelete(j)},{default:e.withCtx(()=>[e.createVNode(q,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:fe=>Q(j)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("actions.delete")),1)]),_:1},8,["onClick"])]),_:2},1032,["auth-function"])]),_:1},8,["cache-identifier","empty-state-options","error-message","fetcher","fetcher-cache-key","query","table-headers"]),e.createVNode(e.unref(_.EntityDeleteModal),{"action-pending":ee.value,description:e.unref(u)("delete.description"),"entity-name":v.value&&v.value.key,"entity-type":e.unref(_.EntityTypes).Secret,error:V.value,title:e.unref(u)("delete.title_for_secret"),visible:a.value,onCancel:ne,onProceed:Y},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"])],64)}}}),[["__scopeId","data-v-115ca40d"]]),Vt={class:"kong-ui-entities-secrets-list"},kt=se(e.defineComponent({__name:"SecretList",props:{config:{type:Object,required:!0,validator:o=>!(!o||(o==null?void 0:o.app)!=="konnect"||!o.createRoute||!o.getEditRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},vaultId:{type:String,required:!0},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0}},emits:["error","delete:success"],setup(o,{emit:y}){var N;const s=y,c=o,u=A=>{s("error",A)},r=A=>{s("delete:success",A)},{axiosInstance:H}=_.useAxios((N=c.config)==null?void 0:N.axiosRequestConfig),I=e.ref(""),h=e.computed(()=>c.config.apiType==="aiGateway"?te.getVault.aiGateway:te.getVault[c.config.app]),E=e.computed(()=>{var A,g;return`${c.config.apiBaseUrl}${h.value}`.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((A=c.config)==null?void 0:A.controlPlaneId)||"").replace(/\/{workspace}/gi,(g=c.config)!=null&&g.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,c.vaultId)});return e.onBeforeMount(async()=>{var A;try{const{data:g}=await H.get(E.value);I.value=(A=g==null?void 0:g.config)==null?void 0:A.config_store_id}catch(g){s("error",g)}}),(A,g)=>(e.openBlock(),e.createElementBlock("div",Vt,[I.value?(e.openBlock(),e.createBlock(ht,e.mergeProps({key:0},c,{"config-store-id":I.value,"onDelete:success":r,onError:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-e9c157a0"]]),wt=se(e.defineComponent({inheritAttrs:!1,__name:"SecretFormInner",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||o.apiType!=="aiGateway"&&!o.controlPlaneId||!o.cancelRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},configStoreId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:y}){var ee;const s=o,c=y,{i18n:{t:u}}=de.useI18n(),r=he.useRouter(),{axiosInstance:H}=_.useAxios((ee=s.config)==null?void 0:ee.axiosRequestConfig),{getMessageFromError:I}=_.useErrors(),h=e.reactive({fields:{key:"",value:""},readonly:!1,errorMessage:""}),E=e.reactive({key:"",value:""}),N=e.computed(()=>s.config.apiType==="aiGateway"?te.form.aiGateway:te.form[s.config.app]),A=e.computed(()=>{var V;return(V=N.value)==null?void 0:V.edit.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{id}/gi,s.configStoreId).replace(/{secretId}/gi,s.secretId)}),g=()=>{var V;r.push(((V=s.config)==null?void 0:V.cancelRoute)||{name:"secret-list"})},i=V=>{c("loading",V)},S=V=>{c("error",V)},f=V=>{var W,Q;h.fields.key=((W=V==null?void 0:V.item)==null?void 0:W.key)||(V==null?void 0:V.key)||"",h.fields.value=((Q=V==null?void 0:V.item)==null?void 0:Q.value)||(V==null?void 0:V.value)||"",Object.assign(E,h.fields)},J=e.computed(()=>s.secretId?_.EntityBaseFormType.Edit:_.EntityBaseFormType.Create),O=e.computed(()=>{var V,W;return`${s.config.apiBaseUrl}${N.value[J.value]}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((V=s.config)==null?void 0:V.controlPlaneId)||"").replace(/\/{workspace}/gi,(W=s.config)!=null&&W.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.configStoreId).replace(/{secretId}/gi,s.secretId)}),X=e.computed(()=>!!h.fields.key&&!!h.fields.value),re=e.computed(()=>JSON.stringify(h.fields)!==JSON.stringify(E)),v=e.computed(()=>({key:h.fields.key,value:h.fields.value})),a=async()=>{try{h.readonly=!0;let V;J.value==="create"?V=await H.post(O.value,v.value):J.value==="edit"&&(V=await H.put(O.value,v.value)),f(V==null?void 0:V.data),c("update",V==null?void 0:V.data)}catch(V){h.errorMessage=I(V),c("error",V)}finally{h.readonly=!1}};return(V,W)=>{const Q=e.resolveComponent("KInput"),ne=e.resolveComponent("KTextArea"),Y=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(e.unref(_.EntityBaseForm),{"can-submit":X.value&&re.value,config:o.config,"edit-id":o.secretId,"entity-type":e.unref(_.SupportedEntityType).Other,"error-message":h.errorMessage,"fetch-url":A.value,"form-fields":v.value,"is-readonly":h.readonly,onCancel:g,"onFetch:error":S,"onFetch:success":f,onLoading:i,onSubmit:a},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(e.unref(_.EntityFormSection),{description:e.unref(u)("secrets.form.info.description"),"has-divider":"",title:e.unref(u)("secrets.form.info.title")},{default:e.withCtx(()=>[e.createVNode(Q,{modelValue:h.fields.key,"onUpdate:modelValue":W[0]||(W[0]=K=>h.fields.key=K),modelModifiers:{trim:!0},autocomplete:"off",class:"key-field","data-testid":"secret-form-key",disabled:J.value===e.unref(_.EntityBaseFormType).Edit,label:e.unref(u)("secrets.form.fields.key.label"),placeholder:e.unref(u)("secrets.form.fields.key.placeholder"),readonly:h.readonly,required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(ne,{modelValue:h.fields.value,"onUpdate:modelValue":W[1]||(W[1]=K=>h.fields.value=K),modelModifiers:{trim:!0},autocomplete:"off","character-limit":!1,"data-testid":"secret-form-value",label:e.unref(u)("secrets.form.fields.value.label"),placeholder:e.unref(u)("secrets.form.fields.value.placeholder"),readonly:h.readonly,required:"",resizable:"",type:"text"},null,8,["modelValue","label","placeholder","readonly"]),e.createVNode(Y,{appearance:"warning",message:e.unref(u)("secrets.form.hint")},null,8,["message"])]),_:1},8,["description","title"])])]),_:1},8,["can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly"])}}}),[["__scopeId","data-v-31bf6bef"]]),Ct={class:"kong-ui-entities-secret-form"},Et=se(e.defineComponent({__name:"SecretForm",props:{config:{type:Object,required:!0,validator:o=>!(!o||o.app!=="konnect"||o.apiType!=="aiGateway"&&!o.controlPlaneId||!o.cancelRoute||o.apiType==="aiGateway"&&!o.aiGatewayId)},vaultId:{type:String,required:!0},secretId:{type:String,required:!1,default:""}},emits:["update","error","loading"],setup(o,{emit:y}){var A;const s=o,c=y,u=g=>{c("update",g)},r=g=>{c("error",g)},H=g=>{c("loading",g)},{axiosInstance:I}=_.useAxios((A=s.config)==null?void 0:A.axiosRequestConfig),h=e.ref(""),E=e.computed(()=>s.config.apiType==="aiGateway"?te.getVault.aiGateway:te.getVault[s.config.app]),N=e.computed(()=>{var g,i;return`${s.config.apiBaseUrl}${E.value}`.replace(/{aiGatewayId}/gi,s.config.aiGatewayId||"").replace(/{controlPlaneId}/gi,((g=s.config)==null?void 0:g.controlPlaneId)||"").replace(/\/{workspace}/gi,(i=s.config)!=null&&i.workspace?`/${s.config.workspace}`:"").replace(/{id}/gi,s.vaultId)});return e.onBeforeMount(async()=>{var g;try{const{data:i}=await I.get(N.value);h.value=(g=i==null?void 0:i.config)==null?void 0:g.config_store_id}catch(i){c("error",i)}}),(g,i)=>(e.openBlock(),e.createElementBlock("div",Ct,[h.value?(e.openBlock(),e.createBlock(wt,e.mergeProps({key:0},s,{"config-store-id":h.value,onError:r,onLoading:H,onUpdate:u}),null,16,["config-store-id"])):e.createCommentVNode("",!0)]))}}),[["__scopeId","data-v-1651a0c6"]]),xt={class:"vault-secret-picker-provider"},At=se(e.defineComponent({__name:"VaultSecretPickerProvider",props:{value:{},disabled:{type:Boolean},update:{type:Function}},emits:["open"],setup(o,{emit:y}){const s=o,c=y,{i18n:{t:u},i18nT:r}=de.useI18n();return(H,I)=>(e.openBlock(),e.createElementBlock("div",xt,[e.createVNode(e.unref(r),{keypath:"vault_secret_picker.provider.complete_action",scope:"global"},{cta:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass({"vault-secret-picker-provider-action":!0,disabled:s.disabled}),onClick:I[0]||(I[0]=()=>!s.disabled&&c("open",s.value,s.update))},e.toDisplayString(e.unref(u)("vault_secret_picker.provider.cta")),3)]),_:1})]))}}),[["__scopeId","data-v-d135d1d0"]]),Nt=o=>{let y=o.trim();if(!y.startsWith("{")||!y.endsWith("}"))throw new Error("Invalid secret reference: must be enclosed in curly braces");if(y=y.substring(1,y.length-1).trim(),!y.startsWith("vault://"))throw new Error("Invalid secret reference: must start with vault://");const s=new URL(`http://${y.substring(8)}`);if(!s)throw new Error("Invalid secret reference: must have a vault prefix");const c=s.host,[,u,...r]=s.pathname.split("/");if(!c)throw new Error("Invalid secret reference: must have a vault prefix");return{vaultPrefix:c,secretId:u||void 0,optionalSecretKey:r==null?void 0:r.join("/")}},St=o=>{if(!o.vaultPrefix)throw new Error("Invalid secret reference: must have a vault prefix");let y=`vault://${o.vaultPrefix}`;return o.secretId&&(y=`${y}/${o.secretId}`),o.optionalSecretKey&&(y=`${y}/${o.optionalSecretKey}`),`{${y}}`},Rt={key:1,class:"inputs-wrapper"},It={"data-testid":"no-search-results"},vt={class:"k-select-selected-item-label"},Ut={class:"vault-secret-picker-vault-dropdown-item"},Tt={class:"select-item-label"},Ht={class:"select-item-description"},Bt={class:"select-item-description"},Mt={"data-testid":"no-search-results"},Pt=se(e.defineComponent({__name:"VaultSecretPicker",props:{config:{type:Object,required:!0,validator:o=>!(!o||!["konnect","kongManager"].includes(o==null?void 0:o.app)||o.app==="konnect"&&o.apiType!=="aiGateway"&&!o.controlPlaneId||o.app==="kongManager"&&typeof o.workspace!="string"||o.apiType==="aiGateway"&&!o.aiGatewayId)},setup:{type:null,required:!1,default:!1},title:{type:String,required:!1,default:void 0},proceedButtonText:{type:String,required:!1,default:void 0},additionalDisabled:{type:Boolean,required:!1,default:!1},allowedProviders:{type:Array,required:!1,default:void 0},showSecretKey:{type:Boolean,required:!1,default:!0}},emits:["proceed","cancel"],setup(o,{emit:y}){var pe;const{i18n:{t:s}}=de.useI18n(),c=o,u=y,{axiosInstance:r}=_.useAxios({validateStatus:k=>k===404||k>=200&&k<300,...(pe=c.config)==null?void 0:pe.axiosRequestConfig}),H=e.ref(!1),I=e.ref(""),h=e.ref(""),E=e.ref(""),N=e.ref(),A=e.computed(()=>c.config.apiType==="aiGateway"),g=k=>k.replace(/{aiGatewayId}/gi,c.config.aiGatewayId||""),i=e.computed(()=>A.value?g(oe.list.aiGateway.getAll):oe.list[c.config.app].getAll),S=e.computed(()=>{var k,w,U,P;return A.value?g(te.list.aiGateway).replace(/{id}/gi,((w=(k=N.value)==null?void 0:k.config)==null?void 0:w.config_store_id)??""):c.config.app==="konnect"?te.list[c.config.app].replace(/{id}/gi,((P=(U=N.value)==null?void 0:U.config)==null?void 0:P.config_store_id)??""):"<not_applicable>"}),f=e.computed(()=>{if(X&&V)return s("vault_secret_picker.fetch_error.vaults_and_secrets");if(X)return s("vault_secret_picker.fetch_error.vaults");if(V)return s("vault_secret_picker.fetch_error.secrets")}),{debouncedQueryChange:J,loading:O,error:X,loadItems:re,results:v}=_.useDebouncedFilter(c.config,i,void 0,{fetchedItemsKey:"data",searchKeys:A.value?["name"]:["prefix"]}),{debouncedQueryChange:a,loading:ee,error:V,loadItems:W,results:Q}=_.useDebouncedFilter(c.config,S,void 0,{fetchedItemsKey:"data",searchKeys:["key"],exactMatchKey:"key"}),ne=k=>{var w;return(w=c.allowedProviders)!=null&&w.length?c.allowedProviders.includes(k):k!==t.AZURE_CERTS},Y=e.computed(()=>A.value?(v.value??[]).map(k=>ge(k)):v.value??[]),K=e.computed(()=>{let k=!1;const w=(Y.value??[]).filter(U=>ne(U.name)).map(U=>(U.prefix===I.value&&(k=!0),{label:U.prefix,value:U.prefix,vault:U}));return!k&&N.value&&w.push({label:N.value.prefix,value:N.value.prefix,vault:N.value}),w}),ce=e.computed(()=>{var U;let k=!1;const w=((U=Q.value)==null?void 0:U.map(P=>(P.key===h.value&&(k=!0),{label:P.key,value:P.key})))??[];return!k&&h.value&&w.push({label:h.value,value:h.value}),w}),M=e.computed(()=>{var k;return((k=N==null?void 0:N.value)==null?void 0:k.name)==="konnect"}),R=e.computed(()=>!!N.value&&!!h.value&&!c.additionalDisabled),Z=k=>k.label?`${k.label} - (${k.vault.name} - ${k.vault.id})`:k.value,q=k=>{var P,D;const w=A.value?oe.form.aiGateway.edit:oe.form[c.config.app].edit;let U=`${c.config.apiBaseUrl}${w}`;return c.config.app==="konnect"&&(U=U.replace(/{controlPlaneId}/gi,((P=c.config)==null?void 0:P.controlPlaneId)||"")),g(U).replace(/\/{workspace}/gi,(D=c.config)!=null&&D.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,k)},j=(k,w)=>{var P,D;if(c.config.app!=="konnect")return"<not_applicable>";const U=A.value?te.form.aiGateway.edit:te.form[c.config.app].edit;return g(`${c.config.apiBaseUrl}${U}`).replace(/{controlPlaneId}/gi,((P=c.config)==null?void 0:P.controlPlaneId)||"").replace(/\/{workspace}/gi,(D=c.config)!=null&&D.workspace?`/${c.config.workspace}`:"").replace(/{id}/gi,w).replace(/{secretId}/gi,k)},fe=()=>{u("proceed",St({vaultPrefix:I.value,secretId:h.value||void 0,optionalSecretKey:E.value||void 0}))};return e.watch(()=>c.setup,async k=>{if(k!==!1){if(H.value=!0,I.value="",N.value=void 0,h.value="",E.value="",typeof k=="string"&&k.trim().length>0)try{let w,U="",P="",D="";const F=Nt(k),{data:B}=await r.get(q(F.vaultPrefix)),b=B&&A.value?ge(B):B;if(b!=null&&b.name)if(w=b,U=F.vaultPrefix,w.name==="konnect"){if(F.secretId){const{data:x}=await r.get(j(F.secretId,b.config.config_store_id));x.key===F.secretId&&(P=F.secretId,D=F.optionalSecretKey??"")}}else P=F.secretId??"",D=F.optionalSecretKey??"";await e.nextTick(()=>{I.value=U,N.value=w,h.value=P,E.value=D})}catch(w){console.debug(w)}H.value=!1,await re()}},{immediate:!0}),e.watch(I,async(k,w)=>{var U;H.value||k===w||(N.value=(U=K.value.find(P=>P.value===k))==null?void 0:U.vault,h.value="",E.value="")}),e.watch(S,async()=>{M.value&&await W()},{immediate:!0}),(k,w)=>{const U=e.resolveComponent("KEmptyState"),P=e.resolveComponent("KSelect"),D=e.resolveComponent("KInput"),F=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(F,{"action-button-disabled":!R.value,"action-button-text":o.proceedButtonText||e.unref(s)("vault_secret_picker.actions.use_key"),class:"vault-secret-picker","data-testid":"vault-secret-picker-modal",title:o.title||e.unref(s)("vault_secret_picker.title"),visible:c.setup!==!1,onCancel:w[4]||(w[4]=()=>u("cancel")),onProceed:fe},{default:e.withCtx(()=>[e.unref(X)||e.unref(V)?(e.openBlock(),e.createBlock(U,{key:0,"data-testid":"vault-secret-picker-fetch-error","icon-variant":"error",message:f.value},null,8,["message"])):(e.openBlock(),e.createElementBlock("div",Rt,[e.renderSlot(k.$slots,"form-prefix",{},void 0,!0),e.createVNode(P,{modelValue:I.value,"onUpdate:modelValue":w[0]||(w[0]=B=>I.value=B),clearable:"","data-testid":"vault-secret-picker-vault-select",disabled:H.value,"enable-filtering":"","filter-function":()=>!0,items:K.value,"kpop-attributes":{"data-testid":"vault-secret-picker-vault-popover"},label:e.unref(s)("vault_secret_picker.vault.label"),loading:e.unref(O),placeholder:e.unref(s)("vault_secret_picker.vault.placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(J)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(s)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",It,e.toDisplayString(e.unref(s)("vault_secret_picker.no_results")),1)]),"selected-item-template":e.withCtx(({item:B})=>[e.createElementVNode("span",vt,e.toDisplayString(Z(B)),1)]),"item-template":e.withCtx(({item:B})=>[e.createElementVNode("div",Ut,[e.createElementVNode("span",Tt,e.toDisplayString(B.label),1),e.createElementVNode("span",Ht,e.toDisplayString(B.vault.name),1),e.createElementVNode("span",Bt,e.toDisplayString(B.vault.id),1)])]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"]),M.value?(e.openBlock(),e.createBlock(P,{key:0,modelValue:h.value,"onUpdate:modelValue":w[1]||(w[1]=B=>h.value=B),clearable:"","data-testid":"vault-secret-picker-secret-id-select",disabled:H.value||!N.value,"enable-filtering":"","filter-function":()=>!0,items:ce.value,"kpop-attributes":{"data-testid":"vault-secret-picker-secret-id-popover"},label:e.unref(s)("vault_secret_picker.secret_id.label"),loading:e.unref(ee),placeholder:e.unref(s)("vault_secret_picker.secret_id.select_placeholder"),required:"","reuse-item-template":"",width:"100%",onQueryChange:e.unref(a)},{loading:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(s)("actions.loading")),1)]),empty:e.withCtx(()=>[e.createElementVNode("div",Mt,e.toDisplayString(e.unref(s)("vault_secret_picker.no_results")),1)]),_:1},8,["modelValue","disabled","items","label","loading","placeholder","onQueryChange"])):(e.openBlock(),e.createBlock(D,{key:1,modelValue:h.value,"onUpdate:modelValue":w[2]||(w[2]=B=>h.value=B),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-id-input",disabled:H.value||!N.value,label:e.unref(s)("vault_secret_picker.secret_id.label"),placeholder:e.unref(s)("vault_secret_picker.secret_id.input_placeholder"),required:"",type:"text"},null,8,["modelValue","disabled","label","placeholder"])),o.showSecretKey?(e.openBlock(),e.createBlock(D,{key:2,modelValue:E.value,"onUpdate:modelValue":w[3]||(w[3]=B=>E.value=B),modelModifiers:{trim:!0},autocomplete:"off","data-testid":"vault-secret-picker-secret-key-input",disabled:H.value||!N.value,help:e.unref(s)("vault_secret_picker.optional_secret_key.help"),label:e.unref(s)("vault_secret_picker.optional_secret_key.label"),placeholder:e.unref(s)("vault_secret_picker.optional_secret_key.placeholder"),type:"text"},null,8,["modelValue","disabled","help","label","placeholder"])):e.createCommentVNode("",!0)]))]),_:3},8,["action-button-disabled","action-button-text","title","visible"])}}}),[["__scopeId","data-v-2ab21bd2"]]);G.SecretForm=Et,G.SecretList=kt,G.VaultAuthMethods=p,G.VaultConfigCard=gt,G.VaultForm=mt,G.VaultList=qe,G.VaultProviders=t,G.VaultSecretPicker=Pt,G.VaultSecretPickerProvider=At,G.secretsEndpoints=te,G.vaultsEndpoints=oe,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})});