@kong-ui-public/entities-shared 3.53.8 → 3.53.9-pr.3544.63deab802.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,70 +1,70 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./_plugin-vue_export-helper-CPHEKtsJ.cjs"),xe=require("@kong/kongponents"),$t=require("@shikijs/core"),It=require("@shikijs/engine-javascript"),Ot=require("@shikijs/langs/json"),Vt=require("@shikijs/langs/yaml"),Dt=require("@shikijs/langs/terraform"),Kt=require("@shikijs/langs/shellscript"),Rt=require("@shikijs/langs/powershell"),Lt=require("@shikijs/themes/catppuccin-mocha"),Ft=require("@shikijs/themes/catppuccin-latte"),de=require("@kong/icons"),Mt=require("vue-router");var it=(n=>(n.GatewayService="service",n.Route="route",n.Consumer="consumer",n.ConsumerGroup="consumer group",n.Plugin="plugin",n.Upstream="upstream",n.Certificate="certificate",n.CACertificate="ca certificate",n.SNI="SNI",n.Key="key",n.KeySet="key set",n.Vault="vault",n.Application="application",n.Developer="developer",n.acls="ACL Credential",n["basic-auth"]="Basic Auth Credential",n["key-auth"]="Key Auth Credential",n["key-auth-enc"]="Key Auth Encrypted Credential",n.oauth2="OAuth 2.0 Credential",n["hmac-auth"]="HMAC Credential",n.jwt="JWT Credential",n.Target="target",n.Policy="policy",n.Secret="secret",n.RedisConfiguration="redis configuration",n))(it||{}),lt=(n=>(n.Edit="edit",n.Create="create",n))(lt||{});const Pt=["json","yaml","terraform","deck"],Ye=["primary","secondary"],qt={key:0,class:"config-card-fieldset-title"},jt=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(n){const i=n,{i18n:{t:r}}=C.composables.useI18n(),{convertKeyToTitle:a}=C.composables.useStringHelpers(),u=e.computed(()=>i.item.key??"json-array-item"),g=e.computed(()=>i.item.value??i.item),l=e.computed(()=>{const m=JSON.parse(JSON.stringify(g.value));return i.isArrayItem&&delete m.name,m}),d=e.computed(()=>{var m;return i.isArrayItem?(m=g.value)!=null&&m.name?a(g.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:i.index}):""});return(m,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(n.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[n.isArrayItem?(e.openBlock(),e.createElementBlock("legend",qt,[e.createElementVNode("b",null,e.toDisplayString(d.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.value),(h,c)=>(e.openBlock(),e.createBlock(Ge,{key:`${u.value}-property-${c}`,item:{key:h,label:e.unref(a)(h),value:l.value[h]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),at=C._export_sfc(jt,[["__scopeId","data-v-5baf64ca"]]),Ut=e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(n){const{i18n:{t:i}}=C.composables.useI18n();return(r,a)=>{const u=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(u,{appearance:"tertiary",class:"navigation-button",onClick:a[0]||(a[0]=g=>r.$emit("navigation-click",n.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.item.value||e.unref(i)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),ct=C._export_sfc(Ut,[["__scopeId","data-v-2feb8c2e"]]),zt=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(n){const{i18n:{t:i}}=C.composables.useI18n();return(r,a)=>{const u=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(u,{appearance:n.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.status?e.unref(i)("baseConfigCard.statusBadge.enabledLabel"):e.unref(i)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Ht="#e0e4ea",Yt="#0044f4",Gt="#afb7c5",Wt="#0044f4",Jt="1px",Qt="16px",Ne="20px",tt="8px",nt="12px";let ze=null;function Xt(){return ze||(ze=$t.createHighlighterCoreSync({langs:[Ot,Vt,Dt,Kt,Rt],themes:[Lt,Ft],engine:It.createJavaScriptRegexEngine(),langAlias:{bash:"shellscript",sh:"shellscript",shell:"shellscript",zsh:"shellscript"}})),ze}function Zt(n,i){return Xt().codeToHtml(n,i)}function Se({codeElement:n,code:i,language:r,theme:a}){n.innerHTML=Zt(i,{lang:r,theme:a==="dark"?"catppuccin-mocha":"catppuccin-latte",structure:"inline"})}const en={class:"config-card-details-row"},tn=["data-testid"],nn=["data-testid"],on=["data-testid"],rn=["data-testid"],ln={key:1},an=["data-testid"],cn=["data-testid"],sn=["data-testid"],un=["data-testid"],dn={name:"ConfigCardItem",components:{JsonCardItem:at,StatusBadge:zt,InternalLinkItem:ct}},pn=e.defineComponent({...dn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(n,{emit:i}){e.useCssVars(U=>({v59b22fe4:s.value?"none":`solid var(--kui-border-width-10, ${e.unref(Jt)}) var(--kui-color-border, ${e.unref(Ht)})`,v5ca198ae:c.value&&f.value?"block":"flex",v670c3372:c.value&&f.value?"100%":r.slim?"50%":"25%",v670e794d:c.value&&f.value?"100%":r.slim?"50%":"75%"}));const r=n,a=i,u=e.useId(),g=e.useSlots(),{i18n:{t:l,formatIsoDate:d,formatUnixTimeStamp:m}}=C.composables.useI18n(),f=e.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),h=e.computed(()=>!!(r.item.tooltip||g["label-tooltip"])),c=e.computed(()=>r.item.type===C.ConfigurationSchemaType.Json||r.item.type===C.ConfigurationSchemaType.JsonArray),s=e.computed(()=>r.item.type===C.ConfigurationSchemaType.JsonArray),k=C.composables.useSubSchema(r.item.key),R=e.computed(()=>{var U;return r.item.type?r.item.type:(U=k==null?void 0:k.value)!=null&&U.encrypted?C.ConfigurationSchemaType.Redacted:void 0}),w=e.computed(()=>{switch(R.value){case C.ConfigurationSchemaType.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case C.ConfigurationSchemaType.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case C.ConfigurationSchemaType.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case C.ConfigurationSchemaType.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case C.ConfigurationSchemaType.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:isNaN(Number(r.item.value))?d(r.item.value):m(r.item.value)};case C.ConfigurationSchemaType.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case C.ConfigurationSchemaType.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case C.ConfigurationSchemaType.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:r.item.value}};case C.ConfigurationSchemaType.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case C.ConfigurationSchemaType.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:U=>{a("navigation-click",U)}}};case C.ConfigurationSchemaType.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case C.ConfigurationSchemaType.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case C.ConfigurationSchemaType.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return r.item.value!=null&&typeof r.item.value=="object"?{tag:"KCodeBlock",attrs:{"data-testid":`${r.item.key}-json-code`,id:`json-code-${u}`,language:"json",code:JSON.stringify(r.item.value,null," "),maxHeight:"480px",showLineNumbers:!1,onCodeBlockRender:Se}}:{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),I=e.ref(),L=e.ref(),{isTruncated:N}=C.composables.useTruncationDetector(I),{isTruncated:x}=C.composables.useTruncationDetector(L);return(U,z)=>{const X=e.resolveComponent("KTooltip"),M=e.resolveComponent("KLabel"),D=e.resolveComponent("KBadge"),E=e.resolveComponent("KCopy");return e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${n.item.key}-label`},[e.renderSlot(U.$slots,"label",{item:n.item},()=>[e.createVNode(M,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createVNode(X,{text:e.unref(N)?n.item.label:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelContent",ref:I,class:"label-content"},e.toDisplayString(n.item.label),513)]),_:1},8,["text"])]),_:2},[h.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${n.item.key}-label-tooltip`},[e.renderSlot(U.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(n.item.tooltip),1)],!0)],8,nn)]),key:"0"}:void 0]),1024)],!0)],8,tn),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${n.item.key}-property-value`},[e.renderSlot(U.$slots,n.item.key,{rowValue:n.item.value},()=>[f.value?(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w.value.tag),e.normalizeProps(e.guardReactiveProps(w.value.attrs)),{default:e.withCtx(()=>[w.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${n.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(F,ee)=>(e.openBlock(),e.createBlock(D,{key:`${n.item.key}-badge-tag-${ee}`,class:"config-badge","data-testid":`${n.item.key}-badge-tag-${ee}`,tooltip:F,"truncation-tooltip":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,an)):w.value.additionalComponent==="KCopy"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${n.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(F,ee)=>(e.openBlock(),e.createBlock(E,e.mergeProps({ref_for:!0},w.value.childAttrs,{key:`${n.item.key}-copy-uuid-${ee}`,"data-testid":`${n.item.key}-copy-uuid-${ee}`,text:F}),null,16,["data-testid","text"]))),128))],8,cn)):w.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${n.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(F,ee)=>(e.openBlock(),e.createBlock(D,{key:`${n.item.key}-badge-method-${ee}`,appearance:Object.values(e.unref(xe.BadgeMethodAppearances)).includes(F.toLowerCase())?F.toLowerCase():"custom",class:"config-badge","data-testid":`${n.item.key}-badge-method-${ee}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(F),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,sn)):w.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(F,ee)=>(e.openBlock(),e.createBlock(at,{key:`json-array-item-${ee}`,index:Number(ee),"is-array-item":"",item:F},null,8,["index","item"]))),128))],8,un)):(e.openBlock(),e.createBlock(X,{key:4,text:e.unref(x)?n.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:L,class:e.normalizeClass(["attrs-data-text",{truncated:n.truncated}])},e.toDisplayString(w.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${n.item.key}-no-value`}," – ",8,rn))],!0)],8,on)])}}}),Ge=C._export_sfc(pn,[["__scopeId","data-v-b63235ac"]]),fn={class:"json-config config-card-code-block"},mn={key:0,class:"json-endpoint"},We=e.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},requestMethod:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null}},setup(n){e.useCssVars(u=>({c7479fcc:`${a.value}ch`}));const i=n,r=e.computed(()=>i.entityRecord),a=e.computed(()=>{var l;if(!i.fetcherUrl)return 0;const u=(l=i.fetcherUrl)==null?void 0:l.split("/");return u.length<2?0:41+(i.requestMethod==="post"?u[u.length-1]:u[u.length-2]).length});return(u,g)=>{const l=e.resolveComponent("KBadge"),d=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock("div",fn,[n.fetcherUrl?(e.openBlock(),e.createElementBlock("div",mn,[e.createVNode(l,{appearance:n.requestMethod},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),e.createVNode(d,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"plaintext","single-line":"",theme:"dark"},null,8,["code"])])):e.createCommentVNode("",!0),n.entityRecord?(e.openBlock(),e.createBlock(d,{key:1,id:"json-codeblock",class:e.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.value,null,2),"copy-code":JSON.stringify(n.unredactedRecord||r.value,null,2),"data-dd-privacy":"mask",language:"json",theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","copy-code","onCodeBlockRender"])):e.createCommentVNode("",!0)])}}});/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */var yn=Object.create,st=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,hn=Object.getOwnPropertyNames,vn=Object.getPrototypeOf,kn=Object.prototype.hasOwnProperty,le=(n,i)=>()=>(i||(n((i={exports:{}}).exports,i),n=null),i.exports),Cn=(n,i,r,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(var u=hn(i),g=0,l=u.length,d;g<l;g++)d=u[g],!kn.call(n,d)&&d!==r&&st(n,d,{get:(m=>i[m]).bind(null,d),enumerable:!(a=gn(i,d))||a.enumerable});return n},bn=(n,i,r)=>(r=n!=null?yn(vn(n)):{},Cn(st(r,"default",{value:n,enumerable:!0}),n)),_e=le((n,i)=>{function r(m){return typeof m>"u"||m===null}function a(m){return typeof m=="object"&&m!==null}function u(m){return Array.isArray(m)?m:r(m)?[]:[m]}function g(m,f){if(f){const h=Object.keys(f);for(let c=0,s=h.length;c<s;c+=1){const k=h[c];m[k]=f[k]}}return m}function l(m,f){let h="";for(let c=0;c<f;c+=1)h+=m;return h}function d(m){return m===0&&Number.NEGATIVE_INFINITY===1/m}i.exports.isNothing=r,i.exports.isObject=a,i.exports.toArray=u,i.exports.repeat=l,i.exports.isNegativeZero=d,i.exports.extend=g}),$e=le((n,i)=>{function r(u,g){let l="";const d=u.reason||"(unknown reason)";return u.mark?(u.mark.name&&(l+='in "'+u.mark.name+'" '),l+="("+(u.mark.line+1)+":"+(u.mark.column+1)+")",!g&&u.mark.snippet&&(l+=`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),C=require("./_plugin-vue_export-helper-CPHEKtsJ.cjs"),Te=require("@kong/kongponents"),$t=require("@shikijs/core"),It=require("@shikijs/engine-javascript"),Ot=require("@shikijs/langs/json"),Vt=require("@shikijs/langs/yaml"),Dt=require("@shikijs/langs/terraform"),Kt=require("@shikijs/langs/shellscript"),Rt=require("@shikijs/langs/powershell"),Lt=require("@shikijs/themes/catppuccin-mocha"),Ft=require("@shikijs/themes/catppuccin-latte"),de=require("@kong/icons"),Mt=require("vue-router");var it=(n=>(n.GatewayService="service",n.Route="route",n.Consumer="consumer",n.ConsumerGroup="consumer group",n.Plugin="plugin",n.Upstream="upstream",n.Certificate="certificate",n.CACertificate="ca certificate",n.SNI="SNI",n.Key="key",n.KeySet="key set",n.Vault="vault",n.Application="application",n.Developer="developer",n.acls="ACL Credential",n["basic-auth"]="Basic Auth Credential",n["key-auth"]="Key Auth Credential",n["key-auth-enc"]="Key Auth Encrypted Credential",n.oauth2="OAuth 2.0 Credential",n["hmac-auth"]="HMAC Credential",n.jwt="JWT Credential",n.Target="target",n.Policy="policy",n.Secret="secret",n.RedisConfiguration="redis configuration",n))(it||{}),lt=(n=>(n.Edit="edit",n.Create="create",n))(lt||{});const Pt=["json","yaml","terraform","deck"],Ye=["primary","secondary"],qt={key:0,class:"config-card-fieldset-title"},jt=e.defineComponent({__name:"JsonCardItem",props:{item:{type:Object,required:!0},index:{type:Number,default:-1},isArrayItem:{type:Boolean,default:!1}},setup(n){const i=n,{i18n:{t:r}}=C.composables.useI18n(),{convertKeyToTitle:a}=C.composables.useStringHelpers(),d=e.computed(()=>i.item.key??"json-array-item"),g=e.computed(()=>i.item.value??i.item),l=e.computed(()=>{const p=JSON.parse(JSON.stringify(g.value));return i.isArrayItem&&delete p.name,p}),u=e.computed(()=>{var p;return i.isArrayItem?(p=g.value)!=null&&p.name?a(g.value.name,"_"):r("baseConfigCard.general.entryTitle",{index:i.index}):""});return(p,f)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.isArrayItem?"fieldset":"div"),{class:e.normalizeClass(n.isArrayItem?"config-card-fieldset":"config-card-json-item")},{default:e.withCtx(()=>[n.isArrayItem?(e.openBlock(),e.createElementBlock("legend",qt,[e.createElementVNode("b",null,e.toDisplayString(u.value),1)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.keys(l.value),(h,c)=>(e.openBlock(),e.createBlock(Ge,{key:`${d.value}-property-${c}`,item:{key:h,label:e.unref(a)(h),value:l.value[h]}},null,8,["item"]))),128))]),_:1},8,["class"]))}}),at=C._export_sfc(jt,[["__scopeId","data-v-5baf64ca"]]),Ut=e.defineComponent({__name:"InternalLinkItem",props:{item:{type:Object,required:!0}},emits:["navigation-click"],setup(n){const{i18n:{t:i}}=C.composables.useI18n();return(r,a)=>{const d=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(d,{appearance:"tertiary",class:"navigation-button",onClick:a[0]||(a[0]=g=>r.$emit("navigation-click",n.item))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.item.value||e.unref(i)("baseConfigCard.commonFields.link")),1)]),_:1})])}}}),ct=C._export_sfc(Ut,[["__scopeId","data-v-2feb8c2e"]]),zt=e.defineComponent({__name:"StatusBadge",props:{status:{type:Boolean,default:!1}},setup(n){const{i18n:{t:i}}=C.composables.useI18n();return(r,a)=>{const d=e.resolveComponent("KBadge");return e.openBlock(),e.createBlock(d,{appearance:n.status?"success":"neutral"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.status?e.unref(i)("baseConfigCard.statusBadge.enabledLabel"):e.unref(i)("baseConfigCard.statusBadge.disabledLabel")),1)]),_:1},8,["appearance"])}}}),Ht="#e0e4ea",Yt="#0044f4",Gt="#afb7c5",Wt="#0044f4",Jt="1px",Qt="16px",Ne="20px",tt="8px",nt="12px";let ze=null;function Xt(){return ze||(ze=$t.createHighlighterCoreSync({langs:[Ot,Vt,Dt,Kt,Rt],themes:[Lt,Ft],engine:It.createJavaScriptRegexEngine(),langAlias:{bash:"shellscript",sh:"shellscript",shell:"shellscript",zsh:"shellscript"}})),ze}function Zt(n,i){return Xt().codeToHtml(n,i)}function Se({codeElement:n,code:i,language:r,theme:a}){n.innerHTML=Zt(i,{lang:r,theme:a==="dark"?"catppuccin-mocha":"catppuccin-latte",structure:"inline"})}const en={class:"config-card-details-row"},tn=["data-testid"],nn=["data-testid"],on=["data-testid"],rn=["data-testid"],ln={key:1},an=["data-testid"],cn=["data-testid"],sn=["data-testid"],un=["data-testid"],dn={name:"ConfigCardItem",components:{JsonCardItem:at,StatusBadge:zt,InternalLinkItem:ct}},pn=e.defineComponent({...dn,props:{item:{type:Object,required:!0},slim:{type:Boolean,required:!1,default:!1},truncated:{type:Boolean,required:!1,default:!1}},emits:["navigation-click"],setup(n,{emit:i}){e.useCssVars(U=>({v59b22fe4:s.value?"none":`solid var(--kui-border-width-10, ${e.unref(Jt)}) var(--kui-color-border, ${e.unref(Ht)})`,v5ca198ae:c.value&&f.value?"block":"flex",v670c3372:c.value&&f.value?"100%":r.slim?"50%":"25%",v670e794d:c.value&&f.value?"100%":r.slim?"50%":"75%"}));const r=n,a=i,d=e.useId(),g=e.useSlots(),{i18n:{t:l,formatIsoDate:u,formatUnixTimeStamp:p}}=C.composables.useI18n(),f=e.computed(()=>r.item.value!==void 0&&r.item.value!==null&&r.item.value!==""),h=e.computed(()=>!!(r.item.tooltip||g["label-tooltip"])),c=e.computed(()=>r.item.type===C.ConfigurationSchemaType.Json||r.item.type===C.ConfigurationSchemaType.JsonArray),s=e.computed(()=>r.item.type===C.ConfigurationSchemaType.JsonArray),k=C.composables.useSubSchema(r.item.key),R=e.computed(()=>{var U;return r.item.type?r.item.type:(U=k==null?void 0:k.value)!=null&&U.encrypted?C.ConfigurationSchemaType.Redacted:void 0}),T=e.computed(()=>{switch(R.value){case C.ConfigurationSchemaType.ID:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid`,"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case C.ConfigurationSchemaType.IdArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{"copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case C.ConfigurationSchemaType.Redacted:return{tag:"KCopy",attrs:{"data-testid":`${r.item.key}-copy-uuid-redacted`,format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label}),text:r.item.value}};case C.ConfigurationSchemaType.RedactedArray:return{tag:"div",additionalComponent:"KCopy",childAttrs:{format:"redacted","copy-tooltip":l("baseConfigCard.copy.tooltip",{label:r.item.label})}};case C.ConfigurationSchemaType.Date:return{tag:"div",attrs:{"data-testid":`${r.item.key}-date`},text:isNaN(Number(r.item.value))?u(r.item.value):p(r.item.value)};case C.ConfigurationSchemaType.BadgeStatus:return{tag:"StatusBadge",attrs:{"data-testid":`${r.item.key}-badge-status`,status:r.item.value}};case C.ConfigurationSchemaType.BadgeTag:return{tag:"div",additionalComponent:"KBadge"};case C.ConfigurationSchemaType.CopyBadge:return{tag:"div",additionalComponent:"KCopy",childAttrs:{badge:!0,truncate:!0,truncationLimit:"auto",text:r.item.value}};case C.ConfigurationSchemaType.BadgeMethod:return{tag:"div",additionalComponent:"KMethodBadge"};case C.ConfigurationSchemaType.LinkInternal:return{tag:"InternalLinkItem",attrs:{"data-testid":`${r.item.key}-internal-link`,item:r.item,onNavigationClick:U=>{a("navigation-click",U)}}};case C.ConfigurationSchemaType.LinkExternal:return{tag:"KExternalLink",attrs:{"data-testid":`${r.item.key}-external-link`,href:r.item.value},text:r.item.value};case C.ConfigurationSchemaType.Json:return{tag:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-content`,item:r.item}};case C.ConfigurationSchemaType.JsonArray:return{tag:"div",additionalComponent:"JsonCardItem",attrs:{"data-testid":`${r.item.key}-json-array-content`,item:r.item}};default:return r.item.value!=null&&typeof r.item.value=="object"?{tag:"KCodeBlock",attrs:{"data-testid":`${r.item.key}-json-code`,id:`json-code-${d}`,language:"json",code:JSON.stringify(r.item.value,null," "),maxHeight:"480px",showLineNumbers:!1,onCodeBlockRender:Se}}:{tag:"div",attrs:{"data-testid":`${r.item.key}-plain-text`},text:r.item.value}}}),I=e.ref(),F=e.ref(),{isTruncated:N}=C.composables.useTruncationDetector(I),{isTruncated:w}=C.composables.useTruncationDetector(F);return(U,z)=>{const Z=e.resolveComponent("KTooltip"),M=e.resolveComponent("KLabel"),D=e.resolveComponent("KBadge"),A=e.resolveComponent("KCopy");return e.openBlock(),e.createElementBlock("div",en,[e.createElementVNode("div",{class:"config-card-details-label","data-testid":`${n.item.key}-label`},[e.renderSlot(U.$slots,"label",{item:n.item},()=>[e.createVNode(M,{"tooltip-attributes":{maxWidth:"500px"}},e.createSlots({default:e.withCtx(()=>[e.createVNode(Z,{text:e.unref(N)?n.item.label:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelContent",ref:I,class:"label-content"},e.toDisplayString(n.item.label),513)]),_:1},8,["text"])]),_:2},[h.value?{name:"tooltip",fn:e.withCtx(()=>[e.createElementVNode("div",{"data-testid":`${n.item.key}-label-tooltip`},[e.renderSlot(U.$slots,"label-tooltip",{},()=>[e.createTextVNode(e.toDisplayString(n.item.tooltip),1)],!0)],8,nn)]),key:"0"}:void 0]),1024)],!0)],8,tn),e.createElementVNode("div",{class:"config-card-details-value","data-testid":`${n.item.key}-property-value`},[e.renderSlot(U.$slots,n.item.key,{rowValue:n.item.value},()=>[f.value?(e.openBlock(),e.createElementBlock("div",ln,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(T.value.tag),e.normalizeProps(e.guardReactiveProps(T.value.attrs)),{default:e.withCtx(()=>[T.value.additionalComponent==="KBadge"?(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${n.item.key}-badge-tags`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(L,ee)=>(e.openBlock(),e.createBlock(D,{key:`${n.item.key}-badge-tag-${ee}`,class:"config-badge","data-testid":`${n.item.key}-badge-tag-${ee}`,tooltip:L,"truncation-tooltip":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1032,["data-testid","tooltip"]))),128))],8,an)):T.value.additionalComponent==="KCopy"?(e.openBlock(),e.createElementBlock("div",{key:1,class:"copy-uuid-array","data-testid":`${n.item.key}-copy-uuid-array`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(L,ee)=>(e.openBlock(),e.createBlock(A,e.mergeProps({ref_for:!0},T.value.childAttrs,{key:`${n.item.key}-copy-uuid-${ee}`,"data-testid":`${n.item.key}-copy-uuid-${ee}`,text:L}),null,16,["data-testid","text"]))),128))],8,cn)):T.value.additionalComponent==="KMethodBadge"?(e.openBlock(),e.createElementBlock("div",{key:2,class:"method-badge-array","data-testid":`${n.item.key}-badge-methods`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(L,ee)=>(e.openBlock(),e.createBlock(D,{key:`${n.item.key}-badge-method-${ee}`,appearance:Object.values(e.unref(Te.BadgeMethodAppearances)).includes(L.toLowerCase())?L.toLowerCase():"custom",class:"config-badge","data-testid":`${n.item.key}-badge-method-${ee}`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(L),1)]),_:2},1032,["appearance","data-testid"]))),128))],8,sn)):T.value.additionalComponent==="JsonCardItem"?(e.openBlock(),e.createElementBlock("div",{key:3,"data-testid":`${r.item.key}-json-array-content`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.item.value,(L,ee)=>(e.openBlock(),e.createBlock(at,{key:`json-array-item-${ee}`,index:Number(ee),"is-array-item":"",item:L},null,8,["index","item"]))),128))],8,un)):(e.openBlock(),e.createBlock(Z,{key:4,text:e.unref(w)?n.item.value:""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:F,class:e.normalizeClass(["attrs-data-text",{truncated:n.truncated}])},e.toDisplayString(T.value.text),3)]),_:1},8,["text"]))]),_:1},16))])):(e.openBlock(),e.createElementBlock("div",{key:0,"data-testid":`${n.item.key}-no-value`}," – ",8,rn))],!0)],8,on)])}}}),Ge=C._export_sfc(pn,[["__scopeId","data-v-b63235ac"]]),fn={class:"json-config config-card-code-block"},mn={key:0,class:"json-endpoint"},We=e.defineComponent({__name:"JsonCodeBlock",props:{config:{type:Object,required:!1,default:()=>({})},fetcherUrl:{type:String,required:!1,default:""},requestMethod:{type:String,required:!1,default:""},entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null}},setup(n){e.useCssVars(d=>({c7479fcc:`${a.value}ch`}));const i=n,r=e.computed(()=>i.entityRecord),a=e.computed(()=>{var l;if(!i.fetcherUrl)return 0;const d=(l=i.fetcherUrl)==null?void 0:l.split("/");return d.length<2?0:41+(i.requestMethod==="post"?d[d.length-1]:d[d.length-2]).length});return(d,g)=>{const l=e.resolveComponent("KBadge"),u=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock("div",fn,[n.fetcherUrl?(e.openBlock(),e.createElementBlock("div",mn,[e.createVNode(l,{appearance:n.requestMethod},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.requestMethod),1)]),_:1},8,["appearance"]),e.createVNode(u,{id:"json-endpoint-codeblock",code:n.fetcherUrl,language:"plaintext","single-line":"",theme:"dark"},null,8,["code"])])):e.createCommentVNode("",!0),n.entityRecord?(e.openBlock(),e.createBlock(u,{key:1,id:"json-codeblock",class:e.normalizeClass({"json-content":n.fetcherUrl}),code:JSON.stringify(r.value,null,2),"copy-code":JSON.stringify(n.unredactedRecord||r.value,null,2),"data-dd-privacy":"mask",language:"json",theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","copy-code","onCodeBlockRender"])):e.createCommentVNode("",!0)])}}});/*! js-yaml 4.2.0 https://github.com/nodeca/js-yaml @license MIT */var yn=Object.create,st=Object.defineProperty,gn=Object.getOwnPropertyDescriptor,hn=Object.getOwnPropertyNames,vn=Object.getPrototypeOf,kn=Object.prototype.hasOwnProperty,le=(n,i)=>()=>(i||(n((i={exports:{}}).exports,i),n=null),i.exports),Cn=(n,i,r,a)=>{if(i&&typeof i=="object"||typeof i=="function")for(var d=hn(i),g=0,l=d.length,u;g<l;g++)u=d[g],!kn.call(n,u)&&u!==r&&st(n,u,{get:(p=>i[p]).bind(null,u),enumerable:!(a=gn(i,u))||a.enumerable});return n},bn=(n,i,r)=>(r=n!=null?yn(vn(n)):{},Cn(st(r,"default",{value:n,enumerable:!0}),n)),_e=le((n,i)=>{function r(p){return typeof p>"u"||p===null}function a(p){return typeof p=="object"&&p!==null}function d(p){return Array.isArray(p)?p:r(p)?[]:[p]}function g(p,f){if(f){const h=Object.keys(f);for(let c=0,s=h.length;c<s;c+=1){const k=h[c];p[k]=f[k]}}return p}function l(p,f){let h="";for(let c=0;c<f;c+=1)h+=p;return h}function u(p){return p===0&&Number.NEGATIVE_INFINITY===1/p}i.exports.isNothing=r,i.exports.isObject=a,i.exports.toArray=d,i.exports.repeat=l,i.exports.isNegativeZero=u,i.exports.extend=g}),$e=le((n,i)=>{function r(d,g){let l="";const u=d.reason||"(unknown reason)";return d.mark?(d.mark.name&&(l+='in "'+d.mark.name+'" '),l+="("+(d.mark.line+1)+":"+(d.mark.column+1)+")",!g&&d.mark.snippet&&(l+=`
2
2
 
3
- `+u.mark.snippet),d+" "+l):d}function a(u,g){Error.call(this),this.name="YAMLException",this.reason=u,this.mark=g,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a.prototype.toString=function(g){return this.name+": "+r(this,g)},i.exports=a}),Sn=le((n,i)=>{var r=_e();function a(l,d,m,f,h){let c="",s="";const k=Math.floor(h/2)-1;return f-d>k&&(c=" ... ",d=f-k+c.length),m-f>k&&(s=" ...",m=f+k-s.length),{str:c+l.slice(d,m).replace(/\t/g,"→")+s,pos:f-d+c.length}}function u(l,d){return r.repeat(" ",d-l.length)+l}function g(l,d){if(d=Object.create(d||null),!l.buffer)return null;d.maxLength||(d.maxLength=79),typeof d.indent!="number"&&(d.indent=1),typeof d.linesBefore!="number"&&(d.linesBefore=3),typeof d.linesAfter!="number"&&(d.linesAfter=2);const m=/\r?\n|\r|\0/g,f=[0],h=[];let c,s=-1;for(;c=m.exec(l.buffer);)h.push(c.index),f.push(c.index+c[0].length),l.position<=c.index&&s<0&&(s=f.length-2);s<0&&(s=f.length-1);let k="";const R=Math.min(l.line+d.linesAfter,h.length).toString().length,w=d.maxLength-(d.indent+R+3);for(let L=1;L<=d.linesBefore&&!(s-L<0);L++){const N=a(l.buffer,f[s-L],h[s-L],l.position-(f[s]-f[s-L]),w);k=r.repeat(" ",d.indent)+u((l.line-L+1).toString(),R)+" | "+N.str+`
4
- `+k}const I=a(l.buffer,f[s],h[s],l.position,w);k+=r.repeat(" ",d.indent)+u((l.line+1).toString(),R)+" | "+I.str+`
5
- `,k+=r.repeat("-",d.indent+R+3+I.pos)+`^
6
- `;for(let L=1;L<=d.linesAfter&&!(s+L>=h.length);L++){const N=a(l.buffer,f[s+L],h[s+L],l.position-(f[s]-f[s+L]),w);k+=r.repeat(" ",d.indent)+u((l.line+L+1).toString(),R)+" | "+N.str+`
7
- `}return k.replace(/\n$/,"")}i.exports=g}),fe=le((n,i)=>{var r=$e(),a=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],u=["scalar","sequence","mapping"];function g(d){const m={};return d!==null&&Object.keys(d).forEach(function(f){d[f].forEach(function(h){m[String(h)]=f})}),m}function l(d,m){if(m=m||{},Object.keys(m).forEach(function(f){if(a.indexOf(f)===-1)throw new r('Unknown option "'+f+'" is met in definition of "'+d+'" YAML type.')}),this.options=m,this.tag=d,this.kind=m.kind||null,this.resolve=m.resolve||function(){return!0},this.construct=m.construct||function(f){return f},this.instanceOf=m.instanceOf||null,this.predicate=m.predicate||null,this.represent=m.represent||null,this.representName=m.representName||null,this.defaultStyle=m.defaultStyle||null,this.multi=m.multi||!1,this.styleAliases=g(m.styleAliases||null),u.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+d+'" YAML type.')}i.exports=l}),ut=le((n,i)=>{var r=$e(),a=fe();function u(d,m){const f=[];return d[m].forEach(function(h){let c=f.length;f.forEach(function(s,k){s.tag===h.tag&&s.kind===h.kind&&s.multi===h.multi&&(c=k)}),f[c]=h}),f}function g(){const d={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function m(f){f.multi?(d.multi[f.kind].push(f),d.multi.fallback.push(f)):d[f.kind][f.tag]=d.fallback[f.tag]=f}for(let f=0,h=arguments.length;f<h;f+=1)arguments[f].forEach(m);return d}function l(d){return this.extend(d)}l.prototype.extend=function(m){let f=[],h=[];if(m instanceof a)h.push(m);else if(Array.isArray(m))h=h.concat(m);else if(m&&(Array.isArray(m.implicit)||Array.isArray(m.explicit)))m.implicit&&(f=f.concat(m.implicit)),m.explicit&&(h=h.concat(m.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");f.forEach(function(s){if(!(s instanceof a))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(s){if(!(s instanceof a))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(l.prototype);return c.implicit=(this.implicit||[]).concat(f),c.explicit=(this.explicit||[]).concat(h),c.compiledImplicit=u(c,"implicit"),c.compiledExplicit=u(c,"explicit"),c.compiledTypeMap=g(c.compiledImplicit,c.compiledExplicit),c},i.exports=l}),dt=le((n,i)=>{i.exports=new(fe())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})}),pt=le((n,i)=>{i.exports=new(fe())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})}),ft=le((n,i)=>{i.exports=new(fe())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})}),mt=le((n,i)=>{i.exports=new(ut())({explicit:[dt(),pt(),ft()]})}),yt=le((n,i)=>{var r=fe();function a(l){if(l===null)return!0;const d=l.length;return d===1&&l==="~"||d===4&&(l==="null"||l==="Null"||l==="NULL")}function u(){return null}function g(l){return l===null}i.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:a,construct:u,predicate:g,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})}),gt=le((n,i)=>{var r=fe();function a(l){if(l===null)return!1;const d=l.length;return d===4&&(l==="true"||l==="True"||l==="TRUE")||d===5&&(l==="false"||l==="False"||l==="FALSE")}function u(l){return l==="true"||l==="True"||l==="TRUE"}function g(l){return Object.prototype.toString.call(l)==="[object Boolean]"}i.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:a,construct:u,predicate:g,represent:{lowercase:function(l){return l?"true":"false"},uppercase:function(l){return l?"TRUE":"FALSE"},camelcase:function(l){return l?"True":"False"}},defaultStyle:"lowercase"})}),ht=le((n,i)=>{var r=_e(),a=fe();function u(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function g(c){return c>=48&&c<=55}function l(c){return c>=48&&c<=57}function d(c){if(c===null)return!1;const s=c.length;let k=0,R=!1;if(!s)return!1;let w=c[k];if((w==="-"||w==="+")&&(w=c[++k]),w==="0"){if(k+1===s)return!0;if(w=c[++k],w==="b"){for(k++;k<s;k++){if(w=c[k],w!=="0"&&w!=="1")return!1;R=!0}return R&&Number.isFinite(m(c))}if(w==="x"){for(k++;k<s;k++){if(!u(c.charCodeAt(k)))return!1;R=!0}return R&&Number.isFinite(m(c))}if(w==="o"){for(k++;k<s;k++){if(!g(c.charCodeAt(k)))return!1;R=!0}return R&&Number.isFinite(m(c))}}for(;k<s;k++){if(!l(c.charCodeAt(k)))return!1;R=!0}return R?Number.isFinite(m(c)):!1}function m(c){let s=c,k=1,R=s[0];if((R==="-"||R==="+")&&(R==="-"&&(k=-1),s=s.slice(1),R=s[0]),s==="0")return 0;if(R==="0"){if(s[1]==="b")return k*parseInt(s.slice(2),2);if(s[1]==="x")return k*parseInt(s.slice(2),16);if(s[1]==="o")return k*parseInt(s.slice(2),8)}return k*parseInt(s,10)}function f(c){return m(c)}function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!r.isNegativeZero(c)}i.exports=new a("tag:yaml.org,2002:int",{kind:"scalar",resolve:d,construct:f,predicate:h,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}),vt=le((n,i)=>{var r=_e(),a=fe(),u=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),g=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function l(c){return c===null||!u.test(c)?!1:Number.isFinite(parseFloat(c,10))?!0:g.test(c)}function d(c){let s=c.toLowerCase();const k=s[0]==="-"?-1:1;return"+-".indexOf(s[0])>=0&&(s=s.slice(1)),s===".inf"?k===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:s===".nan"?NaN:k*parseFloat(s,10)}var m=/^[-+]?[0-9]+e/;function f(c,s){if(isNaN(c))switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(c))return"-0.0";const k=c.toString(10);return m.test(k)?k.replace("e",".e"):k}function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||r.isNegativeZero(c))}i.exports=new a("tag:yaml.org,2002:float",{kind:"scalar",resolve:l,construct:d,predicate:h,represent:f,defaultStyle:"lowercase"})}),kt=le((n,i)=>{i.exports=mt().extend({implicit:[yt(),gt(),ht(),vt()]})}),Ct=le((n,i)=>{i.exports=kt()}),bt=le((n,i)=>{var r=fe(),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),u=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function g(m){return m===null?!1:a.exec(m)!==null||u.exec(m)!==null}function l(m){let f=0,h=null,c=a.exec(m);if(c===null&&(c=u.exec(m)),c===null)throw new Error("Date resolve error");const s=+c[1],k=+c[2]-1,R=+c[3];if(!c[4])return new Date(Date.UTC(s,k,R));const w=+c[4],I=+c[5],L=+c[6];if(c[7]){for(f=c[7].slice(0,3);f.length<3;)f+="0";f=+f}if(c[9]){const x=+c[10],U=+(c[11]||0);h=(x*60+U)*6e4,c[9]==="-"&&(h=-h)}const N=new Date(Date.UTC(s,k,R,w,I,L,f));return h&&N.setTime(N.getTime()-h),N}function d(m){return m.toISOString()}i.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:g,construct:l,instanceOf:Date,represent:d})}),St=le((n,i)=>{var r=fe();function a(u){return u==="<<"||u===null}i.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:a})}),Bt=le((n,i)=>{var r=fe(),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
- \r`;function u(m){if(m===null)return!1;let f=0;const h=m.length,c=a;for(let s=0;s<h;s++){const k=c.indexOf(m.charAt(s));if(!(k>64)){if(k<0)return!1;f+=6}}return f%8===0}function g(m){const f=m.replace(/[\r\n=]/g,""),h=f.length,c=a;let s=0;const k=[];for(let w=0;w<h;w++)w%4===0&&w&&(k.push(s>>16&255),k.push(s>>8&255),k.push(s&255)),s=s<<6|c.indexOf(f.charAt(w));const R=h%4*6;return R===0?(k.push(s>>16&255),k.push(s>>8&255),k.push(s&255)):R===18?(k.push(s>>10&255),k.push(s>>2&255)):R===12&&k.push(s>>4&255),new Uint8Array(k)}function l(m){let f="",h=0;const c=m.length,s=a;for(let R=0;R<c;R++)R%3===0&&R&&(f+=s[h>>18&63],f+=s[h>>12&63],f+=s[h>>6&63],f+=s[h&63]),h=(h<<8)+m[R];const k=c%3;return k===0?(f+=s[h>>18&63],f+=s[h>>12&63],f+=s[h>>6&63],f+=s[h&63]):k===2?(f+=s[h>>10&63],f+=s[h>>4&63],f+=s[h<<2&63],f+=s[64]):k===1&&(f+=s[h>>2&63],f+=s[h<<4&63],f+=s[64],f+=s[64]),f}function d(m){return Object.prototype.toString.call(m)==="[object Uint8Array]"}i.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:u,construct:g,predicate:d,represent:l})}),Tt=le((n,i)=>{var r=fe(),a=Object.prototype.hasOwnProperty,u=Object.prototype.toString;function g(d){if(d===null)return!0;const m=[],f=d;for(let h=0,c=f.length;h<c;h+=1){const s=f[h];let k=!1;if(u.call(s)!=="[object Object]")return!1;let R;for(R in s)if(a.call(s,R))if(!k)k=!0;else return!1;if(!k)return!1;if(m.indexOf(R)===-1)m.push(R);else return!1}return!0}function l(d){return d!==null?d:[]}i.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:g,construct:l})}),xt=le((n,i)=>{var r=fe(),a=Object.prototype.toString;function u(l){if(l===null)return!0;const d=l,m=new Array(d.length);for(let f=0,h=d.length;f<h;f+=1){const c=d[f];if(a.call(c)!=="[object Object]")return!1;const s=Object.keys(c);if(s.length!==1)return!1;m[f]=[s[0],c[s[0]]]}return!0}function g(l){if(l===null)return[];const d=l,m=new Array(d.length);for(let f=0,h=d.length;f<h;f+=1){const c=d[f],s=Object.keys(c);m[f]=[s[0],c[s[0]]]}return m}i.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:u,construct:g})}),wt=le((n,i)=>{var r=fe(),a=Object.prototype.hasOwnProperty;function u(l){if(l===null)return!0;const d=l;for(const m in d)if(a.call(d,m)&&d[m]!==null)return!1;return!0}function g(l){return l!==null?l:{}}i.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:u,construct:g})}),Je=le((n,i)=>{i.exports=Ct().extend({implicit:[bt(),St()],explicit:[Bt(),Tt(),xt(),wt()]})}),Bn=le((n,i)=>{var r=_e(),a=$e(),u=Sn(),g=Je(),l=Object.prototype.hasOwnProperty,d=1,m=2,f=3,h=4,c=1,s=2,k=3,R=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,w=/[\x85\u2028\u2029]/,I=/[,\[\]{}]/,L=/^(?:!|!!|![0-9A-Za-z-]+!)$/,N=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function x(t){return Object.prototype.toString.call(t)}function U(t){return t===10||t===13}function z(t){return t===9||t===32}function X(t){return t===9||t===32||t===10||t===13}function M(t){return t===44||t===91||t===93||t===123||t===125}function D(t){if(t>=48&&t<=57)return t-48;const p=t|32;return p>=97&&p<=102?p-97+10:-1}function E(t){return t===120?2:t===117?4:t===85?8:0}function F(t){return t>=48&&t<=57?t-48:-1}function ee(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
9
- `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function te(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function W(t,p,b){p==="__proto__"?Object.defineProperty(t,p,{configurable:!0,enumerable:!0,writable:!0,value:b}):t[p]=b}var Z=new Array(256),V=new Array(256);for(let t=0;t<256;t++)Z[t]=ee(t)?1:0,V[t]=ee(t);function P(t,p){this.input=t,this.filename=p.filename||null,this.schema=p.schema||g,this.onWarning=p.onWarning||null,this.legacy=p.legacy||!1,this.json=p.json||!1,this.listener=p.listener||null,this.maxDepth=typeof p.maxDepth=="number"?p.maxDepth:100,this.maxMergeSeqLength=typeof p.maxMergeSeqLength=="number"?p.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function J(t,p){const b={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return b.snippet=u(b),new a(p,b)}function K(t,p){throw J(t,p)}function ce(t,p){t.onWarning&&t.onWarning.call(null,J(t,p))}function Q(t,p,b){const T=t.anchorMapTransactions;if(T.length!==0){const v=T[T.length-1];l.call(v,p)||(v[p]={existed:l.call(t.anchorMap,p),value:t.anchorMap[p]})}t.anchorMap[p]=b}function H(t){t.anchorMapTransactions.push(Object.create(null))}function ie(t){const p=t.anchorMapTransactions.pop(),b=t.anchorMapTransactions;if(b.length===0)return;const T=b[b.length-1],v=Object.keys(p);for(let O=0,o=v.length;O<o;O+=1){const y=v[O];l.call(T,y)||(T[y]=p[y])}}function re(t){const p=t.anchorMapTransactions.pop(),b=Object.keys(p);for(let T=b.length-1;T>=0;T-=1){const v=p[b[T]];v.existed?t.anchorMap[b[T]]=v.value:delete t.anchorMap[b[T]]}}function oe(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function ye(t,p){t.position=p.position,t.line=p.line,t.lineStart=p.lineStart,t.lineIndent=p.lineIndent,t.firstTabInLine=p.firstTabInLine,t.tag=p.tag,t.anchor=p.anchor,t.kind=p.kind,t.result=p.result}var be={YAML:function(p,b,T){p.version!==null&&K(p,"duplication of %YAML directive"),T.length!==1&&K(p,"YAML directive accepts exactly one argument");const v=/^([0-9]+)\.([0-9]+)$/.exec(T[0]);v===null&&K(p,"ill-formed argument of the YAML directive");const O=parseInt(v[1],10),o=parseInt(v[2],10);O!==1&&K(p,"unacceptable YAML version of the document"),p.version=T[0],p.checkLineBreaks=o<2,o!==1&&o!==2&&ce(p,"unsupported YAML version of the document")},TAG:function(p,b,T){let v;T.length!==2&&K(p,"TAG directive accepts exactly two arguments");const O=T[0];v=T[1],L.test(O)||K(p,"ill-formed tag handle (first argument) of the TAG directive"),l.call(p.tagMap,O)&&K(p,'there is a previously declared suffix for "'+O+'" tag handle'),N.test(v)||K(p,"ill-formed tag prefix (second argument) of the TAG directive");try{v=decodeURIComponent(v)}catch{K(p,"tag prefix is malformed: "+v)}p.tagMap[O]=v}};function me(t,p,b,T){if(p<b){const v=t.input.slice(p,b);if(T)for(let O=0,o=v.length;O<o;O+=1){const y=v.charCodeAt(O);y===9||y>=32&&y<=1114111||K(t,"expected valid JSON character")}else R.test(v)&&K(t,"the stream contains non-printable characters");t.result+=v}}function Ce(t,p,b,T){r.isObject(b)||K(t,"cannot merge mappings; the provided source object is unacceptable");const v=Object.keys(b);for(let O=0,o=v.length;O<o;O+=1){const y=v[O];l.call(p,y)||(W(p,y,b[y]),T[y]=!0)}}function ge(t,p,b,T,v,O,o,y,$){if(Array.isArray(v)){v=Array.prototype.slice.call(v);for(let S=0,B=v.length;S<B;S+=1)Array.isArray(v[S])&&K(t,"nested arrays are not supported inside keys"),typeof v=="object"&&x(v[S])==="[object Object]"&&(v[S]="[object Object]")}if(typeof v=="object"&&x(v)==="[object Object]"&&(v="[object Object]"),v=String(v),p===null&&(p={}),T==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>t.maxMergeSeqLength&&K(t,"merge sequence length exceeded maxMergeSeqLength ("+t.maxMergeSeqLength+")");const S=new Set;for(let B=0,_=O.length;B<_;B+=1){const A=O[B];S.has(A)||(S.add(A),Ce(t,p,A,b))}}else Ce(t,p,O,b);else!t.json&&!l.call(b,v)&&l.call(p,v)&&(t.line=o||t.line,t.lineStart=y||t.lineStart,t.position=$||t.position,K(t,"duplicated mapping key")),W(p,v,O),delete b[v];return p}function Be(t){const p=t.input.charCodeAt(t.position);p===10?t.position++:p===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):K(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function se(t,p,b){let T=0,v=t.input.charCodeAt(t.position);for(;v!==0;){for(;z(v);)v===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),v=t.input.charCodeAt(++t.position);if(p&&v===35)do v=t.input.charCodeAt(++t.position);while(v!==10&&v!==13&&v!==0);if(U(v))for(Be(t),v=t.input.charCodeAt(t.position),T++,t.lineIndent=0;v===32;)t.lineIndent++,v=t.input.charCodeAt(++t.position);else break}return b!==-1&&T!==0&&t.lineIndent<b&&ce(t,"deficient indentation"),T}function Te(t){let p=t.position,b=t.input.charCodeAt(p);return!!((b===45||b===46)&&b===t.input.charCodeAt(p+1)&&b===t.input.charCodeAt(p+2)&&(p+=3,b=t.input.charCodeAt(p),b===0||X(b)))}function he(t,p){p===1?t.result+=" ":p>1&&(t.result+=r.repeat(`
10
- `,p-1))}function Ie(t,p,b){let T,v,O,o,y,$;const S=t.kind,B=t.result;let _=t.input.charCodeAt(t.position);if(X(_)||M(_)||_===35||_===38||_===42||_===33||_===124||_===62||_===39||_===34||_===37||_===64||_===96)return!1;if(_===63||_===45){const A=t.input.charCodeAt(t.position+1);if(X(A)||b&&M(A))return!1}for(t.kind="scalar",t.result="",T=v=t.position,O=!1;_!==0;){if(_===58){const A=t.input.charCodeAt(t.position+1);if(X(A)||b&&M(A))break}else if(_===35){if(X(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&Te(t)||b&&M(_))break;if(U(_))if(o=t.line,y=t.lineStart,$=t.lineIndent,se(t,!1,-1),t.lineIndent>=p){O=!0,_=t.input.charCodeAt(t.position);continue}else{t.position=v,t.line=o,t.lineStart=y,t.lineIndent=$;break}}O&&(me(t,T,v,!1),he(t,t.line-o),T=v=t.position,O=!1),z(_)||(v=t.position+1),_=t.input.charCodeAt(++t.position)}return me(t,T,v,!1),t.result?!0:(t.kind=S,t.result=B,!1)}function Oe(t,p){let b,T,v=t.input.charCodeAt(t.position);if(v!==39)return!1;for(t.kind="scalar",t.result="",t.position++,b=T=t.position;(v=t.input.charCodeAt(t.position))!==0;)if(v===39)if(me(t,b,t.position,!0),v=t.input.charCodeAt(++t.position),v===39)b=t.position,t.position++,T=t.position;else return!0;else U(v)?(me(t,b,T,!0),he(t,se(t,!1,p)),b=T=t.position):t.position===t.lineStart&&Te(t)?K(t,"unexpected end of the document within a single quoted scalar"):(t.position++,z(v)||(T=t.position));K(t,"unexpected end of the stream within a single quoted scalar")}function we(t,p){let b,T,v,O=t.input.charCodeAt(t.position);if(O!==34)return!1;for(t.kind="scalar",t.result="",t.position++,b=T=t.position;(O=t.input.charCodeAt(t.position))!==0;){if(O===34)return me(t,b,t.position,!0),t.position++,!0;if(O===92){if(me(t,b,t.position,!0),O=t.input.charCodeAt(++t.position),U(O))se(t,!1,p);else if(O<256&&Z[O])t.result+=V[O],t.position++;else if((v=E(O))>0){let o=v,y=0;for(;o>0;o--)O=t.input.charCodeAt(++t.position),(v=D(O))>=0?y=(y<<4)+v:K(t,"expected hexadecimal character");t.result+=te(y),t.position++}else K(t,"unknown escape sequence");b=T=t.position}else U(O)?(me(t,b,T,!0),he(t,se(t,!1,p)),b=T=t.position):t.position===t.lineStart&&Te(t)?K(t,"unexpected end of the document within a double quoted scalar"):(t.position++,z(O)||(T=t.position))}K(t,"unexpected end of the stream within a double quoted scalar")}function Ve(t,p){let b=!0,T,v,O;const o=t.tag;let y;const $=t.anchor;let S,B,_,A;const j=Object.create(null);let q,Y,G,ne=t.input.charCodeAt(t.position);if(ne===91)S=93,A=!1,y=[];else if(ne===123)S=125,A=!0,y={};else return!1;for(t.anchor!==null&&Q(t,t.anchor,y),ne=t.input.charCodeAt(++t.position);ne!==0;){if(se(t,!0,p),ne=t.input.charCodeAt(t.position),ne===S)return t.position++,t.tag=o,t.anchor=$,t.kind=A?"mapping":"sequence",t.result=y,!0;b?ne===44&&K(t,"expected the node content, but found ','"):K(t,"missed comma between flow collection entries"),Y=q=G=null,B=_=!1,ne===63&&X(t.input.charCodeAt(t.position+1))&&(B=_=!0,t.position++,se(t,!0,p)),T=t.line,v=t.lineStart,O=t.position,ke(t,p,d,!1,!0),Y=t.tag,q=t.result,se(t,!0,p),ne=t.input.charCodeAt(t.position),(_||t.line===T)&&ne===58&&(B=!0,ne=t.input.charCodeAt(++t.position),se(t,!0,p),ke(t,p,d,!1,!0),G=t.result),A?ge(t,y,j,Y,q,G,T,v,O):B?y.push(ge(t,null,j,Y,q,G,T,v,O)):y.push(q),se(t,!0,p),ne=t.input.charCodeAt(t.position),ne===44?(b=!0,ne=t.input.charCodeAt(++t.position)):b=!1}K(t,"unexpected end of the stream within a flow collection")}function De(t,p){let b,T=c,v=!1,O=!1,o=p,y=0,$=!1,S,B=t.input.charCodeAt(t.position);if(B===124)b=!1;else if(B===62)b=!0;else return!1;for(t.kind="scalar",t.result="";B!==0;)if(B=t.input.charCodeAt(++t.position),B===43||B===45)c===T?T=B===43?k:s:K(t,"repeat of a chomping mode identifier");else if((S=F(B))>=0)S===0?K(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?K(t,"repeat of an indentation width identifier"):(o=p+S-1,O=!0);else break;if(z(B)){do B=t.input.charCodeAt(++t.position);while(z(B));if(B===35)do B=t.input.charCodeAt(++t.position);while(!U(B)&&B!==0)}for(;B!==0;){for(Be(t),t.lineIndent=0,B=t.input.charCodeAt(t.position);(!O||t.lineIndent<o)&&B===32;)t.lineIndent++,B=t.input.charCodeAt(++t.position);if(!O&&t.lineIndent>o&&(o=t.lineIndent),U(B)){y++;continue}if(!O&&o===0&&K(t,"missing indentation for block scalar"),t.lineIndent<o){T===k?t.result+=r.repeat(`
11
- `,v?1+y:y):T===c&&v&&(t.result+=`
3
+ `+d.mark.snippet),u+" "+l):u}function a(d,g){Error.call(this),this.name="YAMLException",this.reason=d,this.mark=g,this.message=r(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}a.prototype=Object.create(Error.prototype),a.prototype.constructor=a,a.prototype.toString=function(g){return this.name+": "+r(this,g)},i.exports=a}),Sn=le((n,i)=>{var r=_e();function a(l,u,p,f,h){let c="",s="";const k=Math.floor(h/2)-1;return f-u>k&&(c=" ... ",u=f-k+c.length),p-f>k&&(s=" ...",p=f+k-s.length),{str:c+l.slice(u,p).replace(/\t/g,"→")+s,pos:f-u+c.length}}function d(l,u){return r.repeat(" ",u-l.length)+l}function g(l,u){if(u=Object.create(u||null),!l.buffer)return null;u.maxLength||(u.maxLength=79),typeof u.indent!="number"&&(u.indent=1),typeof u.linesBefore!="number"&&(u.linesBefore=3),typeof u.linesAfter!="number"&&(u.linesAfter=2);const p=/\r?\n|\r|\0/g,f=[0],h=[];let c,s=-1;for(;c=p.exec(l.buffer);)h.push(c.index),f.push(c.index+c[0].length),l.position<=c.index&&s<0&&(s=f.length-2);s<0&&(s=f.length-1);let k="";const R=Math.min(l.line+u.linesAfter,h.length).toString().length,T=u.maxLength-(u.indent+R+3);for(let F=1;F<=u.linesBefore&&!(s-F<0);F++){const N=a(l.buffer,f[s-F],h[s-F],l.position-(f[s]-f[s-F]),T);k=r.repeat(" ",u.indent)+d((l.line-F+1).toString(),R)+" | "+N.str+`
4
+ `+k}const I=a(l.buffer,f[s],h[s],l.position,T);k+=r.repeat(" ",u.indent)+d((l.line+1).toString(),R)+" | "+I.str+`
5
+ `,k+=r.repeat("-",u.indent+R+3+I.pos)+`^
6
+ `;for(let F=1;F<=u.linesAfter&&!(s+F>=h.length);F++){const N=a(l.buffer,f[s+F],h[s+F],l.position-(f[s]-f[s+F]),T);k+=r.repeat(" ",u.indent)+d((l.line+F+1).toString(),R)+" | "+N.str+`
7
+ `}return k.replace(/\n$/,"")}i.exports=g}),fe=le((n,i)=>{var r=$e(),a=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],d=["scalar","sequence","mapping"];function g(u){const p={};return u!==null&&Object.keys(u).forEach(function(f){u[f].forEach(function(h){p[String(h)]=f})}),p}function l(u,p){if(p=p||{},Object.keys(p).forEach(function(f){if(a.indexOf(f)===-1)throw new r('Unknown option "'+f+'" is met in definition of "'+u+'" YAML type.')}),this.options=p,this.tag=u,this.kind=p.kind||null,this.resolve=p.resolve||function(){return!0},this.construct=p.construct||function(f){return f},this.instanceOf=p.instanceOf||null,this.predicate=p.predicate||null,this.represent=p.represent||null,this.representName=p.representName||null,this.defaultStyle=p.defaultStyle||null,this.multi=p.multi||!1,this.styleAliases=g(p.styleAliases||null),d.indexOf(this.kind)===-1)throw new r('Unknown kind "'+this.kind+'" is specified for "'+u+'" YAML type.')}i.exports=l}),ut=le((n,i)=>{var r=$e(),a=fe();function d(u,p){const f=[];return u[p].forEach(function(h){let c=f.length;f.forEach(function(s,k){s.tag===h.tag&&s.kind===h.kind&&s.multi===h.multi&&(c=k)}),f[c]=h}),f}function g(){const u={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function p(f){f.multi?(u.multi[f.kind].push(f),u.multi.fallback.push(f)):u[f.kind][f.tag]=u.fallback[f.tag]=f}for(let f=0,h=arguments.length;f<h;f+=1)arguments[f].forEach(p);return u}function l(u){return this.extend(u)}l.prototype.extend=function(p){let f=[],h=[];if(p instanceof a)h.push(p);else if(Array.isArray(p))h=h.concat(p);else if(p&&(Array.isArray(p.implicit)||Array.isArray(p.explicit)))p.implicit&&(f=f.concat(p.implicit)),p.explicit&&(h=h.concat(p.explicit));else throw new r("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");f.forEach(function(s){if(!(s instanceof a))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new r("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new r("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),h.forEach(function(s){if(!(s instanceof a))throw new r("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(l.prototype);return c.implicit=(this.implicit||[]).concat(f),c.explicit=(this.explicit||[]).concat(h),c.compiledImplicit=d(c,"implicit"),c.compiledExplicit=d(c,"explicit"),c.compiledTypeMap=g(c.compiledImplicit,c.compiledExplicit),c},i.exports=l}),dt=le((n,i)=>{i.exports=new(fe())("tag:yaml.org,2002:str",{kind:"scalar",construct:function(r){return r!==null?r:""}})}),pt=le((n,i)=>{i.exports=new(fe())("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(r){return r!==null?r:[]}})}),ft=le((n,i)=>{i.exports=new(fe())("tag:yaml.org,2002:map",{kind:"mapping",construct:function(r){return r!==null?r:{}}})}),mt=le((n,i)=>{i.exports=new(ut())({explicit:[dt(),pt(),ft()]})}),yt=le((n,i)=>{var r=fe();function a(l){if(l===null)return!0;const u=l.length;return u===1&&l==="~"||u===4&&(l==="null"||l==="Null"||l==="NULL")}function d(){return null}function g(l){return l===null}i.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:a,construct:d,predicate:g,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"})}),gt=le((n,i)=>{var r=fe();function a(l){if(l===null)return!1;const u=l.length;return u===4&&(l==="true"||l==="True"||l==="TRUE")||u===5&&(l==="false"||l==="False"||l==="FALSE")}function d(l){return l==="true"||l==="True"||l==="TRUE"}function g(l){return Object.prototype.toString.call(l)==="[object Boolean]"}i.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:a,construct:d,predicate:g,represent:{lowercase:function(l){return l?"true":"false"},uppercase:function(l){return l?"TRUE":"FALSE"},camelcase:function(l){return l?"True":"False"}},defaultStyle:"lowercase"})}),ht=le((n,i)=>{var r=_e(),a=fe();function d(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}function g(c){return c>=48&&c<=55}function l(c){return c>=48&&c<=57}function u(c){if(c===null)return!1;const s=c.length;let k=0,R=!1;if(!s)return!1;let T=c[k];if((T==="-"||T==="+")&&(T=c[++k]),T==="0"){if(k+1===s)return!0;if(T=c[++k],T==="b"){for(k++;k<s;k++){if(T=c[k],T!=="0"&&T!=="1")return!1;R=!0}return R&&Number.isFinite(p(c))}if(T==="x"){for(k++;k<s;k++){if(!d(c.charCodeAt(k)))return!1;R=!0}return R&&Number.isFinite(p(c))}if(T==="o"){for(k++;k<s;k++){if(!g(c.charCodeAt(k)))return!1;R=!0}return R&&Number.isFinite(p(c))}}for(;k<s;k++){if(!l(c.charCodeAt(k)))return!1;R=!0}return R?Number.isFinite(p(c)):!1}function p(c){let s=c,k=1,R=s[0];if((R==="-"||R==="+")&&(R==="-"&&(k=-1),s=s.slice(1),R=s[0]),s==="0")return 0;if(R==="0"){if(s[1]==="b")return k*parseInt(s.slice(2),2);if(s[1]==="x")return k*parseInt(s.slice(2),16);if(s[1]==="o")return k*parseInt(s.slice(2),8)}return k*parseInt(s,10)}function f(c){return p(c)}function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!r.isNegativeZero(c)}i.exports=new a("tag:yaml.org,2002:int",{kind:"scalar",resolve:u,construct:f,predicate:h,represent:{binary:function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},octal:function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},decimal:function(c){return c.toString(10)},hexadecimal:function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}),vt=le((n,i)=>{var r=_e(),a=fe(),d=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),g=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function l(c){return c===null||!d.test(c)?!1:Number.isFinite(parseFloat(c,10))?!0:g.test(c)}function u(c){let s=c.toLowerCase();const k=s[0]==="-"?-1:1;return"+-".indexOf(s[0])>=0&&(s=s.slice(1)),s===".inf"?k===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:s===".nan"?NaN:k*parseFloat(s,10)}var p=/^[-+]?[0-9]+e/;function f(c,s){if(isNaN(c))switch(s){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(s){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(s){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(c))return"-0.0";const k=c.toString(10);return p.test(k)?k.replace("e",".e"):k}function h(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||r.isNegativeZero(c))}i.exports=new a("tag:yaml.org,2002:float",{kind:"scalar",resolve:l,construct:u,predicate:h,represent:f,defaultStyle:"lowercase"})}),kt=le((n,i)=>{i.exports=mt().extend({implicit:[yt(),gt(),ht(),vt()]})}),Ct=le((n,i)=>{i.exports=kt()}),bt=le((n,i)=>{var r=fe(),a=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),d=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function g(p){return p===null?!1:a.exec(p)!==null||d.exec(p)!==null}function l(p){let f=0,h=null,c=a.exec(p);if(c===null&&(c=d.exec(p)),c===null)throw new Error("Date resolve error");const s=+c[1],k=+c[2]-1,R=+c[3];if(!c[4])return new Date(Date.UTC(s,k,R));const T=+c[4],I=+c[5],F=+c[6];if(c[7]){for(f=c[7].slice(0,3);f.length<3;)f+="0";f=+f}if(c[9]){const w=+c[10],U=+(c[11]||0);h=(w*60+U)*6e4,c[9]==="-"&&(h=-h)}const N=new Date(Date.UTC(s,k,R,T,I,F,f));return h&&N.setTime(N.getTime()-h),N}function u(p){return p.toISOString()}i.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:g,construct:l,instanceOf:Date,represent:u})}),St=le((n,i)=>{var r=fe();function a(d){return d==="<<"||d===null}i.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:a})}),Bt=le((n,i)=>{var r=fe(),a=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
+ \r`;function d(p){if(p===null)return!1;let f=0;const h=p.length,c=a;for(let s=0;s<h;s++){const k=c.indexOf(p.charAt(s));if(!(k>64)){if(k<0)return!1;f+=6}}return f%8===0}function g(p){const f=p.replace(/[\r\n=]/g,""),h=f.length,c=a;let s=0;const k=[];for(let T=0;T<h;T++)T%4===0&&T&&(k.push(s>>16&255),k.push(s>>8&255),k.push(s&255)),s=s<<6|c.indexOf(f.charAt(T));const R=h%4*6;return R===0?(k.push(s>>16&255),k.push(s>>8&255),k.push(s&255)):R===18?(k.push(s>>10&255),k.push(s>>2&255)):R===12&&k.push(s>>4&255),new Uint8Array(k)}function l(p){let f="",h=0;const c=p.length,s=a;for(let R=0;R<c;R++)R%3===0&&R&&(f+=s[h>>18&63],f+=s[h>>12&63],f+=s[h>>6&63],f+=s[h&63]),h=(h<<8)+p[R];const k=c%3;return k===0?(f+=s[h>>18&63],f+=s[h>>12&63],f+=s[h>>6&63],f+=s[h&63]):k===2?(f+=s[h>>10&63],f+=s[h>>4&63],f+=s[h<<2&63],f+=s[64]):k===1&&(f+=s[h>>2&63],f+=s[h<<4&63],f+=s[64],f+=s[64]),f}function u(p){return Object.prototype.toString.call(p)==="[object Uint8Array]"}i.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:d,construct:g,predicate:u,represent:l})}),xt=le((n,i)=>{var r=fe(),a=Object.prototype.hasOwnProperty,d=Object.prototype.toString;function g(u){if(u===null)return!0;const p=[],f=u;for(let h=0,c=f.length;h<c;h+=1){const s=f[h];let k=!1;if(d.call(s)!=="[object Object]")return!1;let R;for(R in s)if(a.call(s,R))if(!k)k=!0;else return!1;if(!k)return!1;if(p.indexOf(R)===-1)p.push(R);else return!1}return!0}function l(u){return u!==null?u:[]}i.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:g,construct:l})}),Tt=le((n,i)=>{var r=fe(),a=Object.prototype.toString;function d(l){if(l===null)return!0;const u=l,p=new Array(u.length);for(let f=0,h=u.length;f<h;f+=1){const c=u[f];if(a.call(c)!=="[object Object]")return!1;const s=Object.keys(c);if(s.length!==1)return!1;p[f]=[s[0],c[s[0]]]}return!0}function g(l){if(l===null)return[];const u=l,p=new Array(u.length);for(let f=0,h=u.length;f<h;f+=1){const c=u[f],s=Object.keys(c);p[f]=[s[0],c[s[0]]]}return p}i.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:d,construct:g})}),wt=le((n,i)=>{var r=fe(),a=Object.prototype.hasOwnProperty;function d(l){if(l===null)return!0;const u=l;for(const p in u)if(a.call(u,p)&&u[p]!==null)return!1;return!0}function g(l){return l!==null?l:{}}i.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:d,construct:g})}),Je=le((n,i)=>{i.exports=Ct().extend({implicit:[bt(),St()],explicit:[Bt(),xt(),Tt(),wt()]})}),Bn=le((n,i)=>{var r=_e(),a=$e(),d=Sn(),g=Je(),l=Object.prototype.hasOwnProperty,u=1,p=2,f=3,h=4,c=1,s=2,k=3,R=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,T=/[\x85\u2028\u2029]/,I=/[,\[\]{}]/,F=/^(?:!|!!|![0-9A-Za-z-]+!)$/,N=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function w(t){return Object.prototype.toString.call(t)}function U(t){return t===10||t===13}function z(t){return t===9||t===32}function Z(t){return t===9||t===32||t===10||t===13}function M(t){return t===44||t===91||t===93||t===123||t===125}function D(t){if(t>=48&&t<=57)return t-48;const m=t|32;return m>=97&&m<=102?m-97+10:-1}function A(t){return t===120?2:t===117?4:t===85?8:0}function L(t){return t>=48&&t<=57?t-48:-1}function ee(t){switch(t){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
9
+ `;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"…";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function te(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function Q(t,m,b){m==="__proto__"?Object.defineProperty(t,m,{configurable:!0,enumerable:!0,writable:!0,value:b}):t[m]=b}var X=new Array(256),V=new Array(256);for(let t=0;t<256;t++)X[t]=ee(t)?1:0,V[t]=ee(t);function P(t,m){this.input=t,this.filename=m.filename||null,this.schema=m.schema||g,this.onWarning=m.onWarning||null,this.legacy=m.legacy||!1,this.json=m.json||!1,this.listener=m.listener||null,this.maxDepth=typeof m.maxDepth=="number"?m.maxDepth:100,this.maxMergeSeqLength=typeof m.maxMergeSeqLength=="number"?m.maxMergeSeqLength:20,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function W(t,m){const b={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return b.snippet=d(b),new a(m,b)}function K(t,m){throw W(t,m)}function ce(t,m){t.onWarning&&t.onWarning.call(null,W(t,m))}function J(t,m,b){const x=t.anchorMapTransactions;if(x.length!==0){const v=x[x.length-1];l.call(v,m)||(v[m]={existed:l.call(t.anchorMap,m),value:t.anchorMap[m]})}t.anchorMap[m]=b}function H(t){t.anchorMapTransactions.push(Object.create(null))}function ie(t){const m=t.anchorMapTransactions.pop(),b=t.anchorMapTransactions;if(b.length===0)return;const x=b[b.length-1],v=Object.keys(m);for(let O=0,o=v.length;O<o;O+=1){const y=v[O];l.call(x,y)||(x[y]=m[y])}}function re(t){const m=t.anchorMapTransactions.pop(),b=Object.keys(m);for(let x=b.length-1;x>=0;x-=1){const v=m[b[x]];v.existed?t.anchorMap[b[x]]=v.value:delete t.anchorMap[b[x]]}}function oe(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function ye(t,m){t.position=m.position,t.line=m.line,t.lineStart=m.lineStart,t.lineIndent=m.lineIndent,t.firstTabInLine=m.firstTabInLine,t.tag=m.tag,t.anchor=m.anchor,t.kind=m.kind,t.result=m.result}var be={YAML:function(m,b,x){m.version!==null&&K(m,"duplication of %YAML directive"),x.length!==1&&K(m,"YAML directive accepts exactly one argument");const v=/^([0-9]+)\.([0-9]+)$/.exec(x[0]);v===null&&K(m,"ill-formed argument of the YAML directive");const O=parseInt(v[1],10),o=parseInt(v[2],10);O!==1&&K(m,"unacceptable YAML version of the document"),m.version=x[0],m.checkLineBreaks=o<2,o!==1&&o!==2&&ce(m,"unsupported YAML version of the document")},TAG:function(m,b,x){let v;x.length!==2&&K(m,"TAG directive accepts exactly two arguments");const O=x[0];v=x[1],F.test(O)||K(m,"ill-formed tag handle (first argument) of the TAG directive"),l.call(m.tagMap,O)&&K(m,'there is a previously declared suffix for "'+O+'" tag handle'),N.test(v)||K(m,"ill-formed tag prefix (second argument) of the TAG directive");try{v=decodeURIComponent(v)}catch{K(m,"tag prefix is malformed: "+v)}m.tagMap[O]=v}};function me(t,m,b,x){if(m<b){const v=t.input.slice(m,b);if(x)for(let O=0,o=v.length;O<o;O+=1){const y=v.charCodeAt(O);y===9||y>=32&&y<=1114111||K(t,"expected valid JSON character")}else R.test(v)&&K(t,"the stream contains non-printable characters");t.result+=v}}function Ce(t,m,b,x){r.isObject(b)||K(t,"cannot merge mappings; the provided source object is unacceptable");const v=Object.keys(b);for(let O=0,o=v.length;O<o;O+=1){const y=v[O];l.call(m,y)||(Q(m,y,b[y]),x[y]=!0)}}function ge(t,m,b,x,v,O,o,y,$){if(Array.isArray(v)){v=Array.prototype.slice.call(v);for(let S=0,B=v.length;S<B;S+=1)Array.isArray(v[S])&&K(t,"nested arrays are not supported inside keys"),typeof v=="object"&&w(v[S])==="[object Object]"&&(v[S]="[object Object]")}if(typeof v=="object"&&w(v)==="[object Object]"&&(v="[object Object]"),v=String(v),m===null&&(m={}),x==="tag:yaml.org,2002:merge")if(Array.isArray(O)){O.length>t.maxMergeSeqLength&&K(t,"merge sequence length exceeded maxMergeSeqLength ("+t.maxMergeSeqLength+")");const S=new Set;for(let B=0,_=O.length;B<_;B+=1){const E=O[B];S.has(E)||(S.add(E),Ce(t,m,E,b))}}else Ce(t,m,O,b);else!t.json&&!l.call(b,v)&&l.call(m,v)&&(t.line=o||t.line,t.lineStart=y||t.lineStart,t.position=$||t.position,K(t,"duplicated mapping key")),Q(m,v,O),delete b[v];return m}function Be(t){const m=t.input.charCodeAt(t.position);m===10?t.position++:m===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):K(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function se(t,m,b){let x=0,v=t.input.charCodeAt(t.position);for(;v!==0;){for(;z(v);)v===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),v=t.input.charCodeAt(++t.position);if(m&&v===35)do v=t.input.charCodeAt(++t.position);while(v!==10&&v!==13&&v!==0);if(U(v))for(Be(t),v=t.input.charCodeAt(t.position),x++,t.lineIndent=0;v===32;)t.lineIndent++,v=t.input.charCodeAt(++t.position);else break}return b!==-1&&x!==0&&t.lineIndent<b&&ce(t,"deficient indentation"),x}function xe(t){let m=t.position,b=t.input.charCodeAt(m);return!!((b===45||b===46)&&b===t.input.charCodeAt(m+1)&&b===t.input.charCodeAt(m+2)&&(m+=3,b=t.input.charCodeAt(m),b===0||Z(b)))}function he(t,m){m===1?t.result+=" ":m>1&&(t.result+=r.repeat(`
10
+ `,m-1))}function Ie(t,m,b){let x,v,O,o,y,$;const S=t.kind,B=t.result;let _=t.input.charCodeAt(t.position);if(Z(_)||M(_)||_===35||_===38||_===42||_===33||_===124||_===62||_===39||_===34||_===37||_===64||_===96)return!1;if(_===63||_===45){const E=t.input.charCodeAt(t.position+1);if(Z(E)||b&&M(E))return!1}for(t.kind="scalar",t.result="",x=v=t.position,O=!1;_!==0;){if(_===58){const E=t.input.charCodeAt(t.position+1);if(Z(E)||b&&M(E))break}else if(_===35){if(Z(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&xe(t)||b&&M(_))break;if(U(_))if(o=t.line,y=t.lineStart,$=t.lineIndent,se(t,!1,-1),t.lineIndent>=m){O=!0,_=t.input.charCodeAt(t.position);continue}else{t.position=v,t.line=o,t.lineStart=y,t.lineIndent=$;break}}O&&(me(t,x,v,!1),he(t,t.line-o),x=v=t.position,O=!1),z(_)||(v=t.position+1),_=t.input.charCodeAt(++t.position)}return me(t,x,v,!1),t.result?!0:(t.kind=S,t.result=B,!1)}function Oe(t,m){let b,x,v=t.input.charCodeAt(t.position);if(v!==39)return!1;for(t.kind="scalar",t.result="",t.position++,b=x=t.position;(v=t.input.charCodeAt(t.position))!==0;)if(v===39)if(me(t,b,t.position,!0),v=t.input.charCodeAt(++t.position),v===39)b=t.position,t.position++,x=t.position;else return!0;else U(v)?(me(t,b,x,!0),he(t,se(t,!1,m)),b=x=t.position):t.position===t.lineStart&&xe(t)?K(t,"unexpected end of the document within a single quoted scalar"):(t.position++,z(v)||(x=t.position));K(t,"unexpected end of the stream within a single quoted scalar")}function we(t,m){let b,x,v,O=t.input.charCodeAt(t.position);if(O!==34)return!1;for(t.kind="scalar",t.result="",t.position++,b=x=t.position;(O=t.input.charCodeAt(t.position))!==0;){if(O===34)return me(t,b,t.position,!0),t.position++,!0;if(O===92){if(me(t,b,t.position,!0),O=t.input.charCodeAt(++t.position),U(O))se(t,!1,m);else if(O<256&&X[O])t.result+=V[O],t.position++;else if((v=A(O))>0){let o=v,y=0;for(;o>0;o--)O=t.input.charCodeAt(++t.position),(v=D(O))>=0?y=(y<<4)+v:K(t,"expected hexadecimal character");t.result+=te(y),t.position++}else K(t,"unknown escape sequence");b=x=t.position}else U(O)?(me(t,b,x,!0),he(t,se(t,!1,m)),b=x=t.position):t.position===t.lineStart&&xe(t)?K(t,"unexpected end of the document within a double quoted scalar"):(t.position++,z(O)||(x=t.position))}K(t,"unexpected end of the stream within a double quoted scalar")}function Ve(t,m){let b=!0,x,v,O;const o=t.tag;let y;const $=t.anchor;let S,B,_,E;const j=Object.create(null);let q,Y,G,ne=t.input.charCodeAt(t.position);if(ne===91)S=93,E=!1,y=[];else if(ne===123)S=125,E=!0,y={};else return!1;for(t.anchor!==null&&J(t,t.anchor,y),ne=t.input.charCodeAt(++t.position);ne!==0;){if(se(t,!0,m),ne=t.input.charCodeAt(t.position),ne===S)return t.position++,t.tag=o,t.anchor=$,t.kind=E?"mapping":"sequence",t.result=y,!0;b?ne===44&&K(t,"expected the node content, but found ','"):K(t,"missed comma between flow collection entries"),Y=q=G=null,B=_=!1,ne===63&&Z(t.input.charCodeAt(t.position+1))&&(B=_=!0,t.position++,se(t,!0,m)),x=t.line,v=t.lineStart,O=t.position,ke(t,m,u,!1,!0),Y=t.tag,q=t.result,se(t,!0,m),ne=t.input.charCodeAt(t.position),(_||t.line===x)&&ne===58&&(B=!0,ne=t.input.charCodeAt(++t.position),se(t,!0,m),ke(t,m,u,!1,!0),G=t.result),E?ge(t,y,j,Y,q,G,x,v,O):B?y.push(ge(t,null,j,Y,q,G,x,v,O)):y.push(q),se(t,!0,m),ne=t.input.charCodeAt(t.position),ne===44?(b=!0,ne=t.input.charCodeAt(++t.position)):b=!1}K(t,"unexpected end of the stream within a flow collection")}function De(t,m){let b,x=c,v=!1,O=!1,o=m,y=0,$=!1,S,B=t.input.charCodeAt(t.position);if(B===124)b=!1;else if(B===62)b=!0;else return!1;for(t.kind="scalar",t.result="";B!==0;)if(B=t.input.charCodeAt(++t.position),B===43||B===45)c===x?x=B===43?k:s:K(t,"repeat of a chomping mode identifier");else if((S=L(B))>=0)S===0?K(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):O?K(t,"repeat of an indentation width identifier"):(o=m+S-1,O=!0);else break;if(z(B)){do B=t.input.charCodeAt(++t.position);while(z(B));if(B===35)do B=t.input.charCodeAt(++t.position);while(!U(B)&&B!==0)}for(;B!==0;){for(Be(t),t.lineIndent=0,B=t.input.charCodeAt(t.position);(!O||t.lineIndent<o)&&B===32;)t.lineIndent++,B=t.input.charCodeAt(++t.position);if(!O&&t.lineIndent>o&&(o=t.lineIndent),U(B)){y++;continue}if(!O&&o===0&&K(t,"missing indentation for block scalar"),t.lineIndent<o){x===k?t.result+=r.repeat(`
11
+ `,v?1+y:y):x===c&&v&&(t.result+=`
12
12
  `);break}b?z(B)?($=!0,t.result+=r.repeat(`
13
13
  `,v?1+y:y)):$?($=!1,t.result+=r.repeat(`
14
14
  `,y+1)):y===0?v&&(t.result+=" "):t.result+=r.repeat(`
15
15
  `,y):t.result+=r.repeat(`
16
- `,v?1+y:y),v=!0,O=!0,y=0;const _=t.position;for(;!U(B)&&B!==0;)B=t.input.charCodeAt(++t.position);me(t,_,t.position,!1)}return!0}function ve(t,p){const b=t.tag,T=t.anchor,v=[];let O=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&Q(t,t.anchor,v);let o=t.input.charCodeAt(t.position);for(;o!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,K(t,"tab characters must not be used in indentation")),!(o!==45||!X(t.input.charCodeAt(t.position+1))));){if(O=!0,t.position++,se(t,!0,-1)&&t.lineIndent<=p){v.push(null),o=t.input.charCodeAt(t.position);continue}const y=t.line;if(ke(t,p,f,!1,!0),v.push(t.result),se(t,!0,-1),o=t.input.charCodeAt(t.position),(t.line===y||t.lineIndent>p)&&o!==0)K(t,"bad indentation of a sequence entry");else if(t.lineIndent<p)break}return O?(t.tag=b,t.anchor=T,t.kind="sequence",t.result=v,!0):!1}function Ke(t,p,b){let T,v,O,o;const y=t.tag,$=t.anchor,S={},B=Object.create(null);let _=null,A=null,j=null,q=!1,Y=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&Q(t,t.anchor,S);let G=t.input.charCodeAt(t.position);for(;G!==0;){!q&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,K(t,"tab characters must not be used in indentation"));const ne=t.input.charCodeAt(t.position+1),ae=t.line;if((G===63||G===58)&&X(ne))G===63?(q&&(ge(t,S,B,_,A,null,v,O,o),_=A=j=null),Y=!0,q=!0,T=!0):q?(q=!1,T=!0):K(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,G=ne;else{if(v=t.line,O=t.lineStart,o=t.position,!ke(t,b,m,!1,!0))break;if(t.line===ae){for(G=t.input.charCodeAt(t.position);z(G);)G=t.input.charCodeAt(++t.position);if(G===58)G=t.input.charCodeAt(++t.position),X(G)||K(t,"a whitespace character is expected after the key-value separator within a block mapping"),q&&(ge(t,S,B,_,A,null,v,O,o),_=A=j=null),Y=!0,q=!1,T=!1,_=t.tag,A=t.result;else if(Y)K(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=y,t.anchor=$,!0}else if(Y)K(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=y,t.anchor=$,!0}if((t.line===ae||t.lineIndent>p)&&(q&&(v=t.line,O=t.lineStart,o=t.position),ke(t,p,h,!0,T)&&(q?A=t.result:j=t.result),q||(ge(t,S,B,_,A,j,v,O,o),_=A=j=null),se(t,!0,-1),G=t.input.charCodeAt(t.position)),(t.line===ae||t.lineIndent>p)&&G!==0)K(t,"bad indentation of a mapping entry");else if(t.lineIndent<p)break}return q&&ge(t,S,B,_,A,null,v,O,o),Y&&(t.tag=y,t.anchor=$,t.kind="mapping",t.result=S),Y}function Pe(t){let p=!1,b=!1,T,v,O=t.input.charCodeAt(t.position);if(O!==33)return!1;t.tag!==null&&K(t,"duplication of a tag property"),O=t.input.charCodeAt(++t.position),O===60?(p=!0,O=t.input.charCodeAt(++t.position)):O===33?(b=!0,T="!!",O=t.input.charCodeAt(++t.position)):T="!";let o=t.position;if(p){do O=t.input.charCodeAt(++t.position);while(O!==0&&O!==62);t.position<t.length?(v=t.input.slice(o,t.position),O=t.input.charCodeAt(++t.position)):K(t,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!X(O);)O===33&&(b?K(t,"tag suffix cannot contain exclamation marks"):(T=t.input.slice(o-1,t.position+1),L.test(T)||K(t,"named tag handle cannot contain such characters"),b=!0,o=t.position+1)),O=t.input.charCodeAt(++t.position);v=t.input.slice(o,t.position),I.test(v)&&K(t,"tag suffix cannot contain flow indicator characters")}v&&!N.test(v)&&K(t,"tag name cannot contain such characters: "+v);try{v=decodeURIComponent(v)}catch{K(t,"tag name is malformed: "+v)}return p?t.tag=v:l.call(t.tagMap,T)?t.tag=t.tagMap[T]+v:T==="!"?t.tag="!"+v:T==="!!"?t.tag="tag:yaml.org,2002:"+v:K(t,'undeclared tag handle "'+T+'"'),!0}function Re(t){let p=t.input.charCodeAt(t.position);if(p!==38)return!1;t.anchor!==null&&K(t,"duplication of an anchor property"),p=t.input.charCodeAt(++t.position);const b=t.position;for(;p!==0&&!X(p)&&!M(p);)p=t.input.charCodeAt(++t.position);return t.position===b&&K(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(b,t.position),!0}function Le(t){let p=t.input.charCodeAt(t.position);if(p!==42)return!1;p=t.input.charCodeAt(++t.position);const b=t.position;for(;p!==0&&!X(p)&&!M(p);)p=t.input.charCodeAt(++t.position);t.position===b&&K(t,"name of an alias node must contain at least one character");const T=t.input.slice(b,t.position);return l.call(t.anchorMap,T)||K(t,'unidentified alias "'+T+'"'),t.result=t.anchorMap[T],se(t,!0,-1),!0}function qe(t,p,b,T){const v=oe(t);return H(t),ye(t,p),t.tag=null,t.anchor=null,t.kind=null,t.result=null,Ke(t,b,T)&&t.kind==="mapping"?(ie(t),!0):(re(t),ye(t,v),!1)}function ke(t,p,b,T,v){let O,o,y=1,$=!1,S=!1,B=null,_,A,j;t.depth>=t.maxDepth&&K(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const q=O=o=h===b||f===b;if(T&&se(t,!0,-1)&&($=!0,t.lineIndent>p?y=1:t.lineIndent===p?y=0:t.lineIndent<p&&(y=-1)),y===1)for(;;){const Y=t.input.charCodeAt(t.position),G=oe(t);if($&&(Y===33&&t.tag!==null||Y===38&&t.anchor!==null)||!Pe(t)&&!Re(t))break;B===null&&(B=G),se(t,!0,-1)?($=!0,o=q,t.lineIndent>p?y=1:t.lineIndent===p?y=0:t.lineIndent<p&&(y=-1)):o=!1}if(o&&(o=$||v),y===1||h===b)if(d===b||m===b?A=p:A=p+1,j=t.position-t.lineStart,y===1)if(o&&(ve(t,j)||Ke(t,j,A))||Ve(t,A))S=!0;else{const Y=t.input.charCodeAt(t.position);B!==null&&q&&!o&&Y!==124&&Y!==62&&qe(t,B,B.position-B.lineStart,A)||O&&De(t,A)||Oe(t,A)||we(t,A)?S=!0:Le(t)?(S=!0,(t.tag!==null||t.anchor!==null)&&K(t,"alias node should not have any properties")):Ie(t,A,d===b)&&(S=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&Q(t,t.anchor,t.result)}else y===0&&(S=o&&ve(t,j));if(t.tag===null)t.anchor!==null&&Q(t,t.anchor,t.result);else if(t.tag==="?"){t.result!==null&&t.kind!=="scalar"&&K(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let Y=0,G=t.implicitTypes.length;Y<G;Y+=1)if(_=t.implicitTypes[Y],_.resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&Q(t,t.anchor,t.result);break}}else if(t.tag!=="!"){if(l.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else{_=null;const Y=t.typeMap.multi[t.kind||"fallback"];for(let G=0,ne=Y.length;G<ne;G+=1)if(t.tag.slice(0,Y[G].tag.length)===Y[G].tag){_=Y[G];break}}_||K(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&K(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&Q(t,t.anchor,t.result)):K(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.depth-=1,t.tag!==null||t.anchor!==null||S}function je(t){const p=t.position;let b=!1,T;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(T=t.input.charCodeAt(t.position))!==0&&(se(t,!0,-1),T=t.input.charCodeAt(t.position),!(t.lineIndent>0||T!==37));){b=!0,T=t.input.charCodeAt(++t.position);let v=t.position;for(;T!==0&&!X(T);)T=t.input.charCodeAt(++t.position);const O=t.input.slice(v,t.position),o=[];for(O.length<1&&K(t,"directive name must not be less than one character in length");T!==0;){for(;z(T);)T=t.input.charCodeAt(++t.position);if(T===35){do T=t.input.charCodeAt(++t.position);while(T!==0&&!U(T));break}if(U(T))break;for(v=t.position;T!==0&&!X(T);)T=t.input.charCodeAt(++t.position);o.push(t.input.slice(v,t.position))}T!==0&&Be(t),l.call(be,O)?be[O](t,O,o):ce(t,'unknown document directive "'+O+'"')}if(se(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,se(t,!0,-1)):b&&K(t,"directives end mark is expected"),ke(t,t.lineIndent-1,h,!1,!0),se(t,!0,-1),t.checkLineBreaks&&w.test(t.input.slice(p,t.position))&&ce(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&Te(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,se(t,!0,-1));return}t.position<t.length-1&&K(t,"end of the stream or a document separator is expected")}function Fe(t,p){t=String(t),p=p||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
17
- `),t.charCodeAt(0)===65279&&(t=t.slice(1)));const b=new P(t,p),T=t.indexOf("\0");for(T!==-1&&(b.position=T,K(b,"null byte is not allowed in input")),b.input+="\0";b.input.charCodeAt(b.position)===32;)b.lineIndent+=1,b.position+=1;for(;b.position<b.length-1;)je(b);return b.documents}function Me(t,p,b){p!==null&&typeof p=="object"&&typeof b>"u"&&(b=p,p=null);const T=Fe(t,b);if(typeof p!="function")return T;for(let v=0,O=T.length;v<O;v+=1)p(T[v])}function Ue(t,p){const b=Fe(t,p);if(b.length!==0){if(b.length===1)return b[0];throw new a("expected a single document in the stream, but found more")}}i.exports.loadAll=Me,i.exports.load=Ue}),Tn=le((n,i)=>{var r=_e(),a=$e(),u=Je(),g=Object.prototype.toString,l=Object.prototype.hasOwnProperty,d=65279,m=9,f=10,h=13,c=32,s=33,k=34,R=35,w=37,I=38,L=39,N=42,x=44,U=45,z=58,X=61,M=62,D=63,E=64,F=91,ee=93,te=96,W=123,Z=124,V=125,P={};P[0]="\\0",P[7]="\\a",P[8]="\\b",P[9]="\\t",P[10]="\\n",P[11]="\\v",P[12]="\\f",P[13]="\\r",P[27]="\\e",P[34]='\\"',P[92]="\\\\",P[133]="\\N",P[160]="\\_",P[8232]="\\L",P[8233]="\\P";var J=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],K=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ce(o,y){if(y===null)return{};const $={},S=Object.keys(y);for(let B=0,_=S.length;B<_;B+=1){let A=S[B],j=String(y[A]);A.slice(0,2)==="!!"&&(A="tag:yaml.org,2002:"+A.slice(2));const q=o.compiledTypeMap.fallback[A];q&&l.call(q.styleAliases,j)&&(j=q.styleAliases[j]),$[A]=j}return $}function Q(o){let y,$;const S=o.toString(16).toUpperCase();if(o<=255)y="x",$=2;else if(o<=65535)y="u",$=4;else if(o<=4294967295)y="U",$=8;else throw new a("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+y+r.repeat("0",$-S.length)+S}var H=1,ie=2;function re(o){this.schema=o.schema||u,this.indent=Math.max(1,o.indent||2),this.noArrayIndent=o.noArrayIndent||!1,this.skipInvalid=o.skipInvalid||!1,this.flowLevel=r.isNothing(o.flowLevel)?-1:o.flowLevel,this.styleMap=ce(this.schema,o.styles||null),this.sortKeys=o.sortKeys||!1,this.lineWidth=o.lineWidth||80,this.noRefs=o.noRefs||!1,this.noCompatMode=o.noCompatMode||!1,this.condenseFlow=o.condenseFlow||!1,this.quotingType=o.quotingType==='"'?ie:H,this.forceQuotes=o.forceQuotes||!1,this.replacer=typeof o.replacer=="function"?o.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function oe(o,y){const $=r.repeat(" ",y);let S=0,B="";const _=o.length;for(;S<_;){let A;const j=o.indexOf(`
18
- `,S);j===-1?(A=o.slice(S),S=_):(A=o.slice(S,j+1),S=j+1),A.length&&A!==`
19
- `&&(B+=$),B+=A}return B}function ye(o,y){return`
20
- `+r.repeat(" ",o.indent*y)}function be(o,y){for(let $=0,S=o.implicitTypes.length;$<S;$+=1)if(o.implicitTypes[$].resolve(y))return!0;return!1}function me(o){return o===c||o===m}function Ce(o){return o>=32&&o<=126||o>=161&&o<=55295&&o!==8232&&o!==8233||o>=57344&&o<=65533&&o!==d||o>=65536&&o<=1114111}function ge(o){return Ce(o)&&o!==d&&o!==h&&o!==f}function Be(o,y,$){const S=ge(o),B=S&&!me(o);return($?S:S&&o!==x&&o!==F&&o!==ee&&o!==W&&o!==V)&&o!==R&&!(y===z&&!B)||ge(y)&&!me(y)&&o===R||y===z&&B}function se(o){return Ce(o)&&o!==d&&!me(o)&&o!==U&&o!==D&&o!==z&&o!==x&&o!==F&&o!==ee&&o!==W&&o!==V&&o!==R&&o!==I&&o!==N&&o!==s&&o!==Z&&o!==X&&o!==M&&o!==L&&o!==k&&o!==w&&o!==E&&o!==te}function Te(o){return!me(o)&&o!==z}function he(o,y){const $=o.charCodeAt(y);let S;return $>=55296&&$<=56319&&y+1<o.length&&(S=o.charCodeAt(y+1),S>=56320&&S<=57343)?($-55296)*1024+S-56320+65536:$}function Ie(o){return/^\n* /.test(o)}var Oe=1,we=2,Ve=3,De=4,ve=5;function Ke(o,y,$,S,B,_,A,j){let q,Y=0,G=null,ne=!1,ae=!1;const et=S!==-1;let Ae=-1,Ee=se(he(o,0))&&Te(he(o,o.length-1));if(y||A)for(q=0;q<o.length;Y>=65536?q+=2:q++){if(Y=he(o,q),!Ce(Y))return ve;Ee=Ee&&Be(Y,G,j),G=Y}else{for(q=0;q<o.length;Y>=65536?q+=2:q++){if(Y=he(o,q),Y===f)ne=!0,et&&(ae=ae||q-Ae-1>S&&o[Ae+1]!==" ",Ae=q);else if(!Ce(Y))return ve;Ee=Ee&&Be(Y,G,j),G=Y}ae=ae||et&&q-Ae-1>S&&o[Ae+1]!==" "}return!ne&&!ae?Ee&&!A&&!B(o)?Oe:_===ie?ve:we:$>9&&Ie(o)?ve:A?_===ie?ve:we:ae?De:Ve}function Pe(o,y,$,S,B){o.dump=function(){if(y.length===0)return o.quotingType===ie?'""':"''";if(!o.noCompatMode&&(J.indexOf(y)!==-1||K.test(y)))return o.quotingType===ie?'"'+y+'"':"'"+y+"'";const _=o.indent*Math.max(1,$),A=o.lineWidth===-1?-1:Math.max(Math.min(o.lineWidth,40),o.lineWidth-_),j=S||o.flowLevel>-1&&$>=o.flowLevel;function q(Y){return be(o,Y)}switch(Ke(y,j,o.indent,A,q,o.quotingType,o.forceQuotes&&!S,B)){case Oe:return y;case we:return"'"+y.replace(/'/g,"''")+"'";case Ve:return"|"+Re(y,o.indent)+Le(oe(y,_));case De:return">"+Re(y,o.indent)+Le(oe(qe(y,A),_));case ve:return'"'+je(y)+'"';default:throw new a("impossible error: invalid scalar style")}}()}function Re(o,y){const $=Ie(o)?String(y):"",S=o[o.length-1]===`
16
+ `,v?1+y:y),v=!0,O=!0,y=0;const _=t.position;for(;!U(B)&&B!==0;)B=t.input.charCodeAt(++t.position);me(t,_,t.position,!1)}return!0}function ve(t,m){const b=t.tag,x=t.anchor,v=[];let O=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&J(t,t.anchor,v);let o=t.input.charCodeAt(t.position);for(;o!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,K(t,"tab characters must not be used in indentation")),!(o!==45||!Z(t.input.charCodeAt(t.position+1))));){if(O=!0,t.position++,se(t,!0,-1)&&t.lineIndent<=m){v.push(null),o=t.input.charCodeAt(t.position);continue}const y=t.line;if(ke(t,m,f,!1,!0),v.push(t.result),se(t,!0,-1),o=t.input.charCodeAt(t.position),(t.line===y||t.lineIndent>m)&&o!==0)K(t,"bad indentation of a sequence entry");else if(t.lineIndent<m)break}return O?(t.tag=b,t.anchor=x,t.kind="sequence",t.result=v,!0):!1}function Ke(t,m,b){let x,v,O,o;const y=t.tag,$=t.anchor,S={},B=Object.create(null);let _=null,E=null,j=null,q=!1,Y=!1;if(t.firstTabInLine!==-1)return!1;t.anchor!==null&&J(t,t.anchor,S);let G=t.input.charCodeAt(t.position);for(;G!==0;){!q&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,K(t,"tab characters must not be used in indentation"));const ne=t.input.charCodeAt(t.position+1),ae=t.line;if((G===63||G===58)&&Z(ne))G===63?(q&&(ge(t,S,B,_,E,null,v,O,o),_=E=j=null),Y=!0,q=!0,x=!0):q?(q=!1,x=!0):K(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,G=ne;else{if(v=t.line,O=t.lineStart,o=t.position,!ke(t,b,p,!1,!0))break;if(t.line===ae){for(G=t.input.charCodeAt(t.position);z(G);)G=t.input.charCodeAt(++t.position);if(G===58)G=t.input.charCodeAt(++t.position),Z(G)||K(t,"a whitespace character is expected after the key-value separator within a block mapping"),q&&(ge(t,S,B,_,E,null,v,O,o),_=E=j=null),Y=!0,q=!1,x=!1,_=t.tag,E=t.result;else if(Y)K(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=y,t.anchor=$,!0}else if(Y)K(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=y,t.anchor=$,!0}if((t.line===ae||t.lineIndent>m)&&(q&&(v=t.line,O=t.lineStart,o=t.position),ke(t,m,h,!0,x)&&(q?E=t.result:j=t.result),q||(ge(t,S,B,_,E,j,v,O,o),_=E=j=null),se(t,!0,-1),G=t.input.charCodeAt(t.position)),(t.line===ae||t.lineIndent>m)&&G!==0)K(t,"bad indentation of a mapping entry");else if(t.lineIndent<m)break}return q&&ge(t,S,B,_,E,null,v,O,o),Y&&(t.tag=y,t.anchor=$,t.kind="mapping",t.result=S),Y}function Pe(t){let m=!1,b=!1,x,v,O=t.input.charCodeAt(t.position);if(O!==33)return!1;t.tag!==null&&K(t,"duplication of a tag property"),O=t.input.charCodeAt(++t.position),O===60?(m=!0,O=t.input.charCodeAt(++t.position)):O===33?(b=!0,x="!!",O=t.input.charCodeAt(++t.position)):x="!";let o=t.position;if(m){do O=t.input.charCodeAt(++t.position);while(O!==0&&O!==62);t.position<t.length?(v=t.input.slice(o,t.position),O=t.input.charCodeAt(++t.position)):K(t,"unexpected end of the stream within a verbatim tag")}else{for(;O!==0&&!Z(O);)O===33&&(b?K(t,"tag suffix cannot contain exclamation marks"):(x=t.input.slice(o-1,t.position+1),F.test(x)||K(t,"named tag handle cannot contain such characters"),b=!0,o=t.position+1)),O=t.input.charCodeAt(++t.position);v=t.input.slice(o,t.position),I.test(v)&&K(t,"tag suffix cannot contain flow indicator characters")}v&&!N.test(v)&&K(t,"tag name cannot contain such characters: "+v);try{v=decodeURIComponent(v)}catch{K(t,"tag name is malformed: "+v)}return m?t.tag=v:l.call(t.tagMap,x)?t.tag=t.tagMap[x]+v:x==="!"?t.tag="!"+v:x==="!!"?t.tag="tag:yaml.org,2002:"+v:K(t,'undeclared tag handle "'+x+'"'),!0}function Re(t){let m=t.input.charCodeAt(t.position);if(m!==38)return!1;t.anchor!==null&&K(t,"duplication of an anchor property"),m=t.input.charCodeAt(++t.position);const b=t.position;for(;m!==0&&!Z(m)&&!M(m);)m=t.input.charCodeAt(++t.position);return t.position===b&&K(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(b,t.position),!0}function Le(t){let m=t.input.charCodeAt(t.position);if(m!==42)return!1;m=t.input.charCodeAt(++t.position);const b=t.position;for(;m!==0&&!Z(m)&&!M(m);)m=t.input.charCodeAt(++t.position);t.position===b&&K(t,"name of an alias node must contain at least one character");const x=t.input.slice(b,t.position);return l.call(t.anchorMap,x)||K(t,'unidentified alias "'+x+'"'),t.result=t.anchorMap[x],se(t,!0,-1),!0}function qe(t,m,b,x){const v=oe(t);return H(t),ye(t,m),t.tag=null,t.anchor=null,t.kind=null,t.result=null,Ke(t,b,x)&&t.kind==="mapping"?(ie(t),!0):(re(t),ye(t,v),!1)}function ke(t,m,b,x,v){let O,o,y=1,$=!1,S=!1,B=null,_,E,j;t.depth>=t.maxDepth&&K(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const q=O=o=h===b||f===b;if(x&&se(t,!0,-1)&&($=!0,t.lineIndent>m?y=1:t.lineIndent===m?y=0:t.lineIndent<m&&(y=-1)),y===1)for(;;){const Y=t.input.charCodeAt(t.position),G=oe(t);if($&&(Y===33&&t.tag!==null||Y===38&&t.anchor!==null)||!Pe(t)&&!Re(t))break;B===null&&(B=G),se(t,!0,-1)?($=!0,o=q,t.lineIndent>m?y=1:t.lineIndent===m?y=0:t.lineIndent<m&&(y=-1)):o=!1}if(o&&(o=$||v),y===1||h===b)if(u===b||p===b?E=m:E=m+1,j=t.position-t.lineStart,y===1)if(o&&(ve(t,j)||Ke(t,j,E))||Ve(t,E))S=!0;else{const Y=t.input.charCodeAt(t.position);B!==null&&q&&!o&&Y!==124&&Y!==62&&qe(t,B,B.position-B.lineStart,E)||O&&De(t,E)||Oe(t,E)||we(t,E)?S=!0:Le(t)?(S=!0,(t.tag!==null||t.anchor!==null)&&K(t,"alias node should not have any properties")):Ie(t,E,u===b)&&(S=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&J(t,t.anchor,t.result)}else y===0&&(S=o&&ve(t,j));if(t.tag===null)t.anchor!==null&&J(t,t.anchor,t.result);else if(t.tag==="?"){t.result!==null&&t.kind!=="scalar"&&K(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let Y=0,G=t.implicitTypes.length;Y<G;Y+=1)if(_=t.implicitTypes[Y],_.resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&J(t,t.anchor,t.result);break}}else if(t.tag!=="!"){if(l.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else{_=null;const Y=t.typeMap.multi[t.kind||"fallback"];for(let G=0,ne=Y.length;G<ne;G+=1)if(t.tag.slice(0,Y[G].tag.length)===Y[G].tag){_=Y[G];break}}_||K(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&K(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&J(t,t.anchor,t.result)):K(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.depth-=1,t.tag!==null||t.anchor!==null||S}function je(t){const m=t.position;let b=!1,x;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(x=t.input.charCodeAt(t.position))!==0&&(se(t,!0,-1),x=t.input.charCodeAt(t.position),!(t.lineIndent>0||x!==37));){b=!0,x=t.input.charCodeAt(++t.position);let v=t.position;for(;x!==0&&!Z(x);)x=t.input.charCodeAt(++t.position);const O=t.input.slice(v,t.position),o=[];for(O.length<1&&K(t,"directive name must not be less than one character in length");x!==0;){for(;z(x);)x=t.input.charCodeAt(++t.position);if(x===35){do x=t.input.charCodeAt(++t.position);while(x!==0&&!U(x));break}if(U(x))break;for(v=t.position;x!==0&&!Z(x);)x=t.input.charCodeAt(++t.position);o.push(t.input.slice(v,t.position))}x!==0&&Be(t),l.call(be,O)?be[O](t,O,o):ce(t,'unknown document directive "'+O+'"')}if(se(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,se(t,!0,-1)):b&&K(t,"directives end mark is expected"),ke(t,t.lineIndent-1,h,!1,!0),se(t,!0,-1),t.checkLineBreaks&&T.test(t.input.slice(m,t.position))&&ce(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&xe(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,se(t,!0,-1));return}t.position<t.length-1&&K(t,"end of the stream or a document separator is expected")}function Fe(t,m){t=String(t),m=m||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
17
+ `),t.charCodeAt(0)===65279&&(t=t.slice(1)));const b=new P(t,m),x=t.indexOf("\0");for(x!==-1&&(b.position=x,K(b,"null byte is not allowed in input")),b.input+="\0";b.input.charCodeAt(b.position)===32;)b.lineIndent+=1,b.position+=1;for(;b.position<b.length-1;)je(b);return b.documents}function Me(t,m,b){m!==null&&typeof m=="object"&&typeof b>"u"&&(b=m,m=null);const x=Fe(t,b);if(typeof m!="function")return x;for(let v=0,O=x.length;v<O;v+=1)m(x[v])}function Ue(t,m){const b=Fe(t,m);if(b.length!==0){if(b.length===1)return b[0];throw new a("expected a single document in the stream, but found more")}}i.exports.loadAll=Me,i.exports.load=Ue}),xn=le((n,i)=>{var r=_e(),a=$e(),d=Je(),g=Object.prototype.toString,l=Object.prototype.hasOwnProperty,u=65279,p=9,f=10,h=13,c=32,s=33,k=34,R=35,T=37,I=38,F=39,N=42,w=44,U=45,z=58,Z=61,M=62,D=63,A=64,L=91,ee=93,te=96,Q=123,X=124,V=125,P={};P[0]="\\0",P[7]="\\a",P[8]="\\b",P[9]="\\t",P[10]="\\n",P[11]="\\v",P[12]="\\f",P[13]="\\r",P[27]="\\e",P[34]='\\"',P[92]="\\\\",P[133]="\\N",P[160]="\\_",P[8232]="\\L",P[8233]="\\P";var W=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],K=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function ce(o,y){if(y===null)return{};const $={},S=Object.keys(y);for(let B=0,_=S.length;B<_;B+=1){let E=S[B],j=String(y[E]);E.slice(0,2)==="!!"&&(E="tag:yaml.org,2002:"+E.slice(2));const q=o.compiledTypeMap.fallback[E];q&&l.call(q.styleAliases,j)&&(j=q.styleAliases[j]),$[E]=j}return $}function J(o){let y,$;const S=o.toString(16).toUpperCase();if(o<=255)y="x",$=2;else if(o<=65535)y="u",$=4;else if(o<=4294967295)y="U",$=8;else throw new a("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+y+r.repeat("0",$-S.length)+S}var H=1,ie=2;function re(o){this.schema=o.schema||d,this.indent=Math.max(1,o.indent||2),this.noArrayIndent=o.noArrayIndent||!1,this.skipInvalid=o.skipInvalid||!1,this.flowLevel=r.isNothing(o.flowLevel)?-1:o.flowLevel,this.styleMap=ce(this.schema,o.styles||null),this.sortKeys=o.sortKeys||!1,this.lineWidth=o.lineWidth||80,this.noRefs=o.noRefs||!1,this.noCompatMode=o.noCompatMode||!1,this.condenseFlow=o.condenseFlow||!1,this.quotingType=o.quotingType==='"'?ie:H,this.forceQuotes=o.forceQuotes||!1,this.replacer=typeof o.replacer=="function"?o.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function oe(o,y){const $=r.repeat(" ",y);let S=0,B="";const _=o.length;for(;S<_;){let E;const j=o.indexOf(`
18
+ `,S);j===-1?(E=o.slice(S),S=_):(E=o.slice(S,j+1),S=j+1),E.length&&E!==`
19
+ `&&(B+=$),B+=E}return B}function ye(o,y){return`
20
+ `+r.repeat(" ",o.indent*y)}function be(o,y){for(let $=0,S=o.implicitTypes.length;$<S;$+=1)if(o.implicitTypes[$].resolve(y))return!0;return!1}function me(o){return o===c||o===p}function Ce(o){return o>=32&&o<=126||o>=161&&o<=55295&&o!==8232&&o!==8233||o>=57344&&o<=65533&&o!==u||o>=65536&&o<=1114111}function ge(o){return Ce(o)&&o!==u&&o!==h&&o!==f}function Be(o,y,$){const S=ge(o),B=S&&!me(o);return($?S:S&&o!==w&&o!==L&&o!==ee&&o!==Q&&o!==V)&&o!==R&&!(y===z&&!B)||ge(y)&&!me(y)&&o===R||y===z&&B}function se(o){return Ce(o)&&o!==u&&!me(o)&&o!==U&&o!==D&&o!==z&&o!==w&&o!==L&&o!==ee&&o!==Q&&o!==V&&o!==R&&o!==I&&o!==N&&o!==s&&o!==X&&o!==Z&&o!==M&&o!==F&&o!==k&&o!==T&&o!==A&&o!==te}function xe(o){return!me(o)&&o!==z}function he(o,y){const $=o.charCodeAt(y);let S;return $>=55296&&$<=56319&&y+1<o.length&&(S=o.charCodeAt(y+1),S>=56320&&S<=57343)?($-55296)*1024+S-56320+65536:$}function Ie(o){return/^\n* /.test(o)}var Oe=1,we=2,Ve=3,De=4,ve=5;function Ke(o,y,$,S,B,_,E,j){let q,Y=0,G=null,ne=!1,ae=!1;const et=S!==-1;let Ae=-1,Ee=se(he(o,0))&&xe(he(o,o.length-1));if(y||E)for(q=0;q<o.length;Y>=65536?q+=2:q++){if(Y=he(o,q),!Ce(Y))return ve;Ee=Ee&&Be(Y,G,j),G=Y}else{for(q=0;q<o.length;Y>=65536?q+=2:q++){if(Y=he(o,q),Y===f)ne=!0,et&&(ae=ae||q-Ae-1>S&&o[Ae+1]!==" ",Ae=q);else if(!Ce(Y))return ve;Ee=Ee&&Be(Y,G,j),G=Y}ae=ae||et&&q-Ae-1>S&&o[Ae+1]!==" "}return!ne&&!ae?Ee&&!E&&!B(o)?Oe:_===ie?ve:we:$>9&&Ie(o)?ve:E?_===ie?ve:we:ae?De:Ve}function Pe(o,y,$,S,B){o.dump=function(){if(y.length===0)return o.quotingType===ie?'""':"''";if(!o.noCompatMode&&(W.indexOf(y)!==-1||K.test(y)))return o.quotingType===ie?'"'+y+'"':"'"+y+"'";const _=o.indent*Math.max(1,$),E=o.lineWidth===-1?-1:Math.max(Math.min(o.lineWidth,40),o.lineWidth-_),j=S||o.flowLevel>-1&&$>=o.flowLevel;function q(Y){return be(o,Y)}switch(Ke(y,j,o.indent,E,q,o.quotingType,o.forceQuotes&&!S,B)){case Oe:return y;case we:return"'"+y.replace(/'/g,"''")+"'";case Ve:return"|"+Re(y,o.indent)+Le(oe(y,_));case De:return">"+Re(y,o.indent)+Le(oe(qe(y,E),_));case ve:return'"'+je(y)+'"';default:throw new a("impossible error: invalid scalar style")}}()}function Re(o,y){const $=Ie(o)?String(y):"",S=o[o.length-1]===`
21
21
  `;return $+(S&&(o[o.length-2]===`
22
22
  `||o===`
23
23
  `)?"+":S?"":"-")+`
24
24
  `}function Le(o){return o[o.length-1]===`
25
25
  `?o.slice(0,-1):o}function qe(o,y){const $=/(\n+)([^\n]*)/g;let S=function(){let j=o.indexOf(`
26
26
  `);return j=j!==-1?j:o.length,$.lastIndex=j,ke(o.slice(0,j),y)}(),B=o[0]===`
27
- `||o[0]===" ",_,A;for(;A=$.exec(o);){const j=A[1],q=A[2];_=q[0]===" ",S+=j+(!B&&!_&&q!==""?`
28
- `:"")+ke(q,y),B=_}return S}function ke(o,y){if(o===""||o[0]===" ")return o;const $=/ [^ ]/g;let S,B=0,_,A=0,j=0,q="";for(;S=$.exec(o);)j=S.index,j-B>y&&(_=A>B?A:j,q+=`
29
- `+o.slice(B,_),B=_+1),A=j;return q+=`
30
- `,o.length-B>y&&A>B?q+=o.slice(B,A)+`
31
- `+o.slice(A+1):q+=o.slice(B),q.slice(1)}function je(o){let y="",$=0;for(let S=0;S<o.length;$>=65536?S+=2:S++){$=he(o,S);const B=P[$];!B&&Ce($)?(y+=o[S],$>=65536&&(y+=o[S+1])):y+=B||Q($)}return y}function Fe(o,y,$){let S="";const B=o.tag;for(let _=0,A=$.length;_<A;_+=1){let j=$[_];o.replacer&&(j=o.replacer.call($,String(_),j)),(b(o,y,j,!1,!1)||typeof j>"u"&&b(o,y,null,!1,!1))&&(S!==""&&(S+=","+(o.condenseFlow?"":" ")),S+=o.dump)}o.tag=B,o.dump="["+S+"]"}function Me(o,y,$,S){let B="";const _=o.tag;for(let A=0,j=$.length;A<j;A+=1){let q=$[A];o.replacer&&(q=o.replacer.call($,String(A),q)),(b(o,y+1,q,!0,!0,!1,!0)||typeof q>"u"&&b(o,y+1,null,!0,!0,!1,!0))&&((!S||B!=="")&&(B+=ye(o,y)),o.dump&&f===o.dump.charCodeAt(0)?B+="-":B+="- ",B+=o.dump)}o.tag=_,o.dump=B||"[]"}function Ue(o,y,$){let S="";const B=o.tag,_=Object.keys($);for(let A=0,j=_.length;A<j;A+=1){let q="";S!==""&&(q+=", "),o.condenseFlow&&(q+='"');const Y=_[A];let G=$[Y];o.replacer&&(G=o.replacer.call($,Y,G)),b(o,y,Y,!1,!1)&&(o.dump.length>1024&&(q+="? "),q+=o.dump+(o.condenseFlow?'"':"")+":"+(o.condenseFlow?"":" "),b(o,y,G,!1,!1)&&(q+=o.dump,S+=q))}o.tag=B,o.dump="{"+S+"}"}function t(o,y,$,S){let B="";const _=o.tag,A=Object.keys($);if(o.sortKeys===!0)A.sort();else if(typeof o.sortKeys=="function")A.sort(o.sortKeys);else if(o.sortKeys)throw new a("sortKeys must be a boolean or a function");for(let j=0,q=A.length;j<q;j+=1){let Y="";(!S||B!=="")&&(Y+=ye(o,y));const G=A[j];let ne=$[G];if(o.replacer&&(ne=o.replacer.call($,G,ne)),!b(o,y+1,G,!0,!0,!0))continue;const ae=o.tag!==null&&o.tag!=="?"||o.dump&&o.dump.length>1024;ae&&(o.dump&&f===o.dump.charCodeAt(0)?Y+="?":Y+="? "),Y+=o.dump,ae&&(Y+=ye(o,y)),b(o,y+1,ne,!0,ae)&&(o.dump&&f===o.dump.charCodeAt(0)?Y+=":":Y+=": ",Y+=o.dump,B+=Y)}o.tag=_,o.dump=B||"{}"}function p(o,y,$){const S=$?o.explicitTypes:o.implicitTypes;for(let B=0,_=S.length;B<_;B+=1){const A=S[B];if((A.instanceOf||A.predicate)&&(!A.instanceOf||typeof y=="object"&&y instanceof A.instanceOf)&&(!A.predicate||A.predicate(y))){if($?A.multi&&A.representName?o.tag=A.representName(y):o.tag=A.tag:o.tag="?",A.represent){const j=o.styleMap[A.tag]||A.defaultStyle;let q;if(g.call(A.represent)==="[object Function]")q=A.represent(y,j);else if(l.call(A.represent,j))q=A.represent[j](y,j);else throw new a("!<"+A.tag+'> tag resolver accepts not "'+j+'" style');o.dump=q}return!0}}return!1}function b(o,y,$,S,B,_,A){o.tag=null,o.dump=$,p(o,$,!1)||p(o,$,!0);const j=g.call(o.dump),q=S;S&&(S=o.flowLevel<0||o.flowLevel>y);const Y=j==="[object Object]"||j==="[object Array]";let G,ne;if(Y&&(G=o.duplicates.indexOf($),ne=G!==-1),(o.tag!==null&&o.tag!=="?"||ne||o.indent!==2&&y>0)&&(B=!1),ne&&o.usedDuplicates[G])o.dump="*ref_"+G;else{if(Y&&ne&&!o.usedDuplicates[G]&&(o.usedDuplicates[G]=!0),j==="[object Object]")S&&Object.keys(o.dump).length!==0?(t(o,y,o.dump,B),ne&&(o.dump="&ref_"+G+o.dump)):(Ue(o,y,o.dump),ne&&(o.dump="&ref_"+G+" "+o.dump));else if(j==="[object Array]")S&&o.dump.length!==0?(o.noArrayIndent&&!A&&y>0?Me(o,y-1,o.dump,B):Me(o,y,o.dump,B),ne&&(o.dump="&ref_"+G+o.dump)):(Fe(o,y,o.dump),ne&&(o.dump="&ref_"+G+" "+o.dump));else if(j==="[object String]")o.tag!=="?"&&Pe(o,o.dump,y,_,q);else{if(j==="[object Undefined]")return!1;if(o.skipInvalid)return!1;throw new a("unacceptable kind of an object to dump "+j)}if(o.tag!==null&&o.tag!=="?"){let ae=encodeURI(o.tag[0]==="!"?o.tag.slice(1):o.tag).replace(/!/g,"%21");o.tag[0]==="!"?ae="!"+ae:ae.slice(0,18)==="tag:yaml.org,2002:"?ae="!!"+ae.slice(18):ae="!<"+ae+">",o.dump=ae+" "+o.dump}}return!0}function T(o,y){const $=[],S=[];v(o,$,S);const B=S.length;for(let _=0;_<B;_+=1)y.duplicates.push($[S[_]]);y.usedDuplicates=new Array(B)}function v(o,y,$){if(o!==null&&typeof o=="object"){const S=y.indexOf(o);if(S!==-1)$.indexOf(S)===-1&&$.push(S);else if(y.push(o),Array.isArray(o))for(let B=0,_=o.length;B<_;B+=1)v(o[B],y,$);else{const B=Object.keys(o);for(let _=0,A=B.length;_<A;_+=1)v(o[B[_]],y,$)}}}function O(o,y){y=y||{};const $=new re(y);$.noRefs||T(o,$);let S=o;return $.replacer&&(S=$.replacer.call({"":S},"",S)),b($,0,S,!0,!0)?$.dump+`
32
- `:""}i.exports.dump=O}),At=bn(le((n,i)=>{var r=Bn(),a=Tn();function u(g,l){return function(){throw new Error("Function yaml."+g+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}i.exports.Type=fe(),i.exports.Schema=ut(),i.exports.FAILSAFE_SCHEMA=mt(),i.exports.JSON_SCHEMA=kt(),i.exports.CORE_SCHEMA=Ct(),i.exports.DEFAULT_SCHEMA=Je(),i.exports.load=r.load,i.exports.loadAll=r.loadAll,i.exports.dump=a.dump,i.exports.YAMLException=$e(),i.exports.types={binary:Bt(),float:vt(),map:ft(),null:yt(),pairs:xt(),set:wt(),timestamp:bt(),bool:gt(),int:ht(),merge:St(),omap:Tt(),seq:pt(),str:dt()},i.exports.safeLoad=u("safeLoad","load"),i.exports.safeLoadAll=u("safeLoadAll","loadAll"),i.exports.safeDump=u("safeDump","dump")})()),{Type:Or,Schema:Vr,FAILSAFE_SCHEMA:Dr,JSON_SCHEMA:Kr,CORE_SCHEMA:Rr,DEFAULT_SCHEMA:Lr,load:Fr,loadAll:Mr,dump:Pr,YAMLException:qr,types:jr,safeLoad:Ur,safeLoadAll:zr,safeDump:Hr}=At.default,Et=At.default;const xn=e.defineComponent({__name:"DeckCallout",emits:["click-cta","dismiss"],setup(n){const{i18n:{t:i},i18nT:r}=C.composables.useI18n();return(a,u)=>{const g=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(g,{class:"deck-callout",dismissible:"",onDismiss:u[1]||(u[1]=l=>a.$emit("dismiss"))},{default:e.withCtx(()=>[e.createVNode(e.unref(r),{keypath:"deckCallout.body"},{cta:e.withCtx(()=>[e.createElementVNode("button",{class:"cta",type:"button",onClick:u[0]||(u[0]=l=>a.$emit("click-cta"))},e.toDisplayString(e.unref(i)("deckCallout.cta")),1)]),_:1})]),_:1})}}}),wn=C._export_sfc(xn,[["__scopeId","data-v-0bf1334c"]]),Qe=e.defineComponent({inheritAttrs:!1,__name:"YamlCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},deckCalloutPreferenceKey:{type:String,required:!1,default:""}},emits:["deck-callout:click-cta","deck-callout:dismiss"],setup(n,{emit:i}){const r=n,a=i,u=e.ref("visible"),g=f=>{const h=Object.fromEntries(Object.entries(f).filter(([,c])=>c!==null&&c!==""&&(Array.isArray(c)?c.length!==0:!0)));return Object.keys(h).length===0&&h.constructor===Object?"":Et.dump(h).trim()},l=e.computed(()=>g(r.entityRecord)),d=e.computed(()=>g(r.unredactedRecord||r.entityRecord));e.watch(()=>r.deckCalloutPreferenceKey,f=>{if(f){const h=localStorage.getItem(f);u.value=h==="dismissed"?"dismissed":"visible"}},{immediate:!0}),e.watch(u,f=>{const h=r.deckCalloutPreferenceKey;h&&localStorage.setItem(h,f)});function m(){u.value="dismissed",a("deck-callout:dismiss")}return(f,h)=>{const c=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.deckCalloutPreferenceKey&&u.value==="visible"?(e.openBlock(),e.createBlock(wn,{key:0,onClickCta:h[0]||(h[0]=s=>f.$emit("deck-callout:click-cta")),onDismiss:h[1]||(h[1]=s=>m())})):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({class:"yaml-config config-card-code-block"},f.$attrs),[r.entityRecord?(e.openBlock(),e.createBlock(c,{key:0,id:"yaml-codeblock",code:l.value,"copy-code":d.value,"data-dd-privacy":"mask",language:"yaml",theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["code","copy-code","onCodeBlockRender"])):e.createCommentVNode("",!0)],16)],64)}}}),An={class:"terraform-config config-card-code-block"},ue=" ",ot="TF_MULTILINE_EOT",He="cloud_gateway_addon",Xe=e.defineComponent({__name:"TerraformCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},credentialType:{type:String,default:""},subEntityType:{type:String,default:""}},setup(n){const i=n,r=e.computed(()=>{const w=i.entityRecord;if(!w||typeof w!="object")return!1;const I=w.config;return!I||typeof I!="object"?!1:typeof I.managed_cache<"u"||typeof I.capacity_config<"u"}),a=e.computed(()=>typeof i.entityType=="string"&&i.entityType.length>0?i.entityType:r.value?He:C.SupportedEntityType.Partial),u=e.computed(()=>C.EventGatewayTypesArray.includes(a.value)),g=e.computed(()=>C.IdentityTypesArray.includes(a.value)),l=(w,I)=>{if(w.includes(`
33
- `)){const N=I+ue,x=w.split(`
27
+ `||o[0]===" ",_,E;for(;E=$.exec(o);){const j=E[1],q=E[2];_=q[0]===" ",S+=j+(!B&&!_&&q!==""?`
28
+ `:"")+ke(q,y),B=_}return S}function ke(o,y){if(o===""||o[0]===" ")return o;const $=/ [^ ]/g;let S,B=0,_,E=0,j=0,q="";for(;S=$.exec(o);)j=S.index,j-B>y&&(_=E>B?E:j,q+=`
29
+ `+o.slice(B,_),B=_+1),E=j;return q+=`
30
+ `,o.length-B>y&&E>B?q+=o.slice(B,E)+`
31
+ `+o.slice(E+1):q+=o.slice(B),q.slice(1)}function je(o){let y="",$=0;for(let S=0;S<o.length;$>=65536?S+=2:S++){$=he(o,S);const B=P[$];!B&&Ce($)?(y+=o[S],$>=65536&&(y+=o[S+1])):y+=B||J($)}return y}function Fe(o,y,$){let S="";const B=o.tag;for(let _=0,E=$.length;_<E;_+=1){let j=$[_];o.replacer&&(j=o.replacer.call($,String(_),j)),(b(o,y,j,!1,!1)||typeof j>"u"&&b(o,y,null,!1,!1))&&(S!==""&&(S+=","+(o.condenseFlow?"":" ")),S+=o.dump)}o.tag=B,o.dump="["+S+"]"}function Me(o,y,$,S){let B="";const _=o.tag;for(let E=0,j=$.length;E<j;E+=1){let q=$[E];o.replacer&&(q=o.replacer.call($,String(E),q)),(b(o,y+1,q,!0,!0,!1,!0)||typeof q>"u"&&b(o,y+1,null,!0,!0,!1,!0))&&((!S||B!=="")&&(B+=ye(o,y)),o.dump&&f===o.dump.charCodeAt(0)?B+="-":B+="- ",B+=o.dump)}o.tag=_,o.dump=B||"[]"}function Ue(o,y,$){let S="";const B=o.tag,_=Object.keys($);for(let E=0,j=_.length;E<j;E+=1){let q="";S!==""&&(q+=", "),o.condenseFlow&&(q+='"');const Y=_[E];let G=$[Y];o.replacer&&(G=o.replacer.call($,Y,G)),b(o,y,Y,!1,!1)&&(o.dump.length>1024&&(q+="? "),q+=o.dump+(o.condenseFlow?'"':"")+":"+(o.condenseFlow?"":" "),b(o,y,G,!1,!1)&&(q+=o.dump,S+=q))}o.tag=B,o.dump="{"+S+"}"}function t(o,y,$,S){let B="";const _=o.tag,E=Object.keys($);if(o.sortKeys===!0)E.sort();else if(typeof o.sortKeys=="function")E.sort(o.sortKeys);else if(o.sortKeys)throw new a("sortKeys must be a boolean or a function");for(let j=0,q=E.length;j<q;j+=1){let Y="";(!S||B!=="")&&(Y+=ye(o,y));const G=E[j];let ne=$[G];if(o.replacer&&(ne=o.replacer.call($,G,ne)),!b(o,y+1,G,!0,!0,!0))continue;const ae=o.tag!==null&&o.tag!=="?"||o.dump&&o.dump.length>1024;ae&&(o.dump&&f===o.dump.charCodeAt(0)?Y+="?":Y+="? "),Y+=o.dump,ae&&(Y+=ye(o,y)),b(o,y+1,ne,!0,ae)&&(o.dump&&f===o.dump.charCodeAt(0)?Y+=":":Y+=": ",Y+=o.dump,B+=Y)}o.tag=_,o.dump=B||"{}"}function m(o,y,$){const S=$?o.explicitTypes:o.implicitTypes;for(let B=0,_=S.length;B<_;B+=1){const E=S[B];if((E.instanceOf||E.predicate)&&(!E.instanceOf||typeof y=="object"&&y instanceof E.instanceOf)&&(!E.predicate||E.predicate(y))){if($?E.multi&&E.representName?o.tag=E.representName(y):o.tag=E.tag:o.tag="?",E.represent){const j=o.styleMap[E.tag]||E.defaultStyle;let q;if(g.call(E.represent)==="[object Function]")q=E.represent(y,j);else if(l.call(E.represent,j))q=E.represent[j](y,j);else throw new a("!<"+E.tag+'> tag resolver accepts not "'+j+'" style');o.dump=q}return!0}}return!1}function b(o,y,$,S,B,_,E){o.tag=null,o.dump=$,m(o,$,!1)||m(o,$,!0);const j=g.call(o.dump),q=S;S&&(S=o.flowLevel<0||o.flowLevel>y);const Y=j==="[object Object]"||j==="[object Array]";let G,ne;if(Y&&(G=o.duplicates.indexOf($),ne=G!==-1),(o.tag!==null&&o.tag!=="?"||ne||o.indent!==2&&y>0)&&(B=!1),ne&&o.usedDuplicates[G])o.dump="*ref_"+G;else{if(Y&&ne&&!o.usedDuplicates[G]&&(o.usedDuplicates[G]=!0),j==="[object Object]")S&&Object.keys(o.dump).length!==0?(t(o,y,o.dump,B),ne&&(o.dump="&ref_"+G+o.dump)):(Ue(o,y,o.dump),ne&&(o.dump="&ref_"+G+" "+o.dump));else if(j==="[object Array]")S&&o.dump.length!==0?(o.noArrayIndent&&!E&&y>0?Me(o,y-1,o.dump,B):Me(o,y,o.dump,B),ne&&(o.dump="&ref_"+G+o.dump)):(Fe(o,y,o.dump),ne&&(o.dump="&ref_"+G+" "+o.dump));else if(j==="[object String]")o.tag!=="?"&&Pe(o,o.dump,y,_,q);else{if(j==="[object Undefined]")return!1;if(o.skipInvalid)return!1;throw new a("unacceptable kind of an object to dump "+j)}if(o.tag!==null&&o.tag!=="?"){let ae=encodeURI(o.tag[0]==="!"?o.tag.slice(1):o.tag).replace(/!/g,"%21");o.tag[0]==="!"?ae="!"+ae:ae.slice(0,18)==="tag:yaml.org,2002:"?ae="!!"+ae.slice(18):ae="!<"+ae+">",o.dump=ae+" "+o.dump}}return!0}function x(o,y){const $=[],S=[];v(o,$,S);const B=S.length;for(let _=0;_<B;_+=1)y.duplicates.push($[S[_]]);y.usedDuplicates=new Array(B)}function v(o,y,$){if(o!==null&&typeof o=="object"){const S=y.indexOf(o);if(S!==-1)$.indexOf(S)===-1&&$.push(S);else if(y.push(o),Array.isArray(o))for(let B=0,_=o.length;B<_;B+=1)v(o[B],y,$);else{const B=Object.keys(o);for(let _=0,E=B.length;_<E;_+=1)v(o[B[_]],y,$)}}}function O(o,y){y=y||{};const $=new re(y);$.noRefs||x(o,$);let S=o;return $.replacer&&(S=$.replacer.call({"":S},"",S)),b($,0,S,!0,!0)?$.dump+`
32
+ `:""}i.exports.dump=O}),At=bn(le((n,i)=>{var r=Bn(),a=xn();function d(g,l){return function(){throw new Error("Function yaml."+g+" is removed in js-yaml 4. Use yaml."+l+" instead, which is now safe by default.")}}i.exports.Type=fe(),i.exports.Schema=ut(),i.exports.FAILSAFE_SCHEMA=mt(),i.exports.JSON_SCHEMA=kt(),i.exports.CORE_SCHEMA=Ct(),i.exports.DEFAULT_SCHEMA=Je(),i.exports.load=r.load,i.exports.loadAll=r.loadAll,i.exports.dump=a.dump,i.exports.YAMLException=$e(),i.exports.types={binary:Bt(),float:vt(),map:ft(),null:yt(),pairs:Tt(),set:wt(),timestamp:bt(),bool:gt(),int:ht(),merge:St(),omap:xt(),seq:pt(),str:dt()},i.exports.safeLoad=d("safeLoad","load"),i.exports.safeLoadAll=d("safeLoadAll","loadAll"),i.exports.safeDump=d("safeDump","dump")})()),{Type:Dr,Schema:Kr,FAILSAFE_SCHEMA:Rr,JSON_SCHEMA:Lr,CORE_SCHEMA:Fr,DEFAULT_SCHEMA:Mr,load:Pr,loadAll:qr,dump:jr,YAMLException:Ur,types:zr,safeLoad:Hr,safeLoadAll:Yr,safeDump:Gr}=At.default,Et=At.default;const Tn=e.defineComponent({__name:"DeckCallout",emits:["click-cta","dismiss"],setup(n){const{i18n:{t:i},i18nT:r}=C.composables.useI18n();return(a,d)=>{const g=e.resolveComponent("KAlert");return e.openBlock(),e.createBlock(g,{class:"deck-callout",dismissible:"",onDismiss:d[1]||(d[1]=l=>a.$emit("dismiss"))},{default:e.withCtx(()=>[e.createVNode(e.unref(r),{keypath:"deckCallout.body"},{cta:e.withCtx(()=>[e.createElementVNode("button",{class:"cta",type:"button",onClick:d[0]||(d[0]=l=>a.$emit("click-cta"))},e.toDisplayString(e.unref(i)("deckCallout.cta")),1)]),_:1})]),_:1})}}}),wn=C._export_sfc(Tn,[["__scopeId","data-v-0bf1334c"]]),Qe=e.defineComponent({inheritAttrs:!1,__name:"YamlCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},deckCalloutPreferenceKey:{type:String,required:!1,default:""}},emits:["deck-callout:click-cta","deck-callout:dismiss"],setup(n,{emit:i}){const r=n,a=i,d=e.ref("visible"),g=f=>{const h=Object.fromEntries(Object.entries(f).filter(([,c])=>c!==null&&c!==""&&(Array.isArray(c)?c.length!==0:!0)));return Object.keys(h).length===0&&h.constructor===Object?"":Et.dump(h).trim()},l=e.computed(()=>g(r.entityRecord)),u=e.computed(()=>g(r.unredactedRecord||r.entityRecord));e.watch(()=>r.deckCalloutPreferenceKey,f=>{if(f){const h=localStorage.getItem(f);d.value=h==="dismissed"?"dismissed":"visible"}},{immediate:!0}),e.watch(d,f=>{const h=r.deckCalloutPreferenceKey;h&&localStorage.setItem(h,f)});function p(){d.value="dismissed",a("deck-callout:dismiss")}return(f,h)=>{const c=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock(e.Fragment,null,[r.deckCalloutPreferenceKey&&d.value==="visible"?(e.openBlock(),e.createBlock(wn,{key:0,onClickCta:h[0]||(h[0]=s=>f.$emit("deck-callout:click-cta")),onDismiss:h[1]||(h[1]=s=>p())})):e.createCommentVNode("",!0),e.createElementVNode("div",e.mergeProps({class:"yaml-config config-card-code-block"},f.$attrs),[r.entityRecord?(e.openBlock(),e.createBlock(c,{key:0,id:"yaml-codeblock",code:l.value,"copy-code":u.value,"data-dd-privacy":"mask",language:"yaml",theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["code","copy-code","onCodeBlockRender"])):e.createCommentVNode("",!0)],16)],64)}}}),An={class:"terraform-config config-card-code-block"},ue=" ",ot="TF_MULTILINE_EOT",He="cloud_gateway_addon",Xe=e.defineComponent({__name:"TerraformCodeBlock",props:{entityRecord:{type:Object,required:!0},unredactedRecord:{type:Object,default:null},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},credentialType:{type:String,default:""},subEntityType:{type:String,default:""}},setup(n){const i=n,r=e.computed(()=>{const T=i.entityRecord;if(!T||typeof T!="object")return!1;const I=T.config;return!I||typeof I!="object"?!1:typeof I.managed_cache<"u"||typeof I.capacity_config<"u"}),a=e.computed(()=>typeof i.entityType=="string"&&i.entityType.length>0?i.entityType:r.value?He:C.SupportedEntityType.Partial),d=e.computed(()=>C.EventGatewayTypesArray.includes(a.value)),g=e.computed(()=>C.IdentityTypesArray.includes(a.value)),l=(T,I)=>{if(T.includes(`
33
+ `)){const N=I+ue,w=T.split(`
34
34
  `).map(U=>`${N}${U}`).join(`
35
35
  `);return`<<-${ot}
36
- ${x}
37
- ${N}${ot}`}return`"${w.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`},d=(w,I)=>{const L=ue;let N="";return typeof w=="string"?N+=`${L}${I} = ${l(w,L)}
38
- `:N+=`${L}${I} = ${String(w??"")}
39
- `,N},m=(w,I,L="")=>{if(typeof w!="object")return"Invalid object";const N=ue+L;let x="";if(I&&(x+=`${N}${I} = {
40
- `),w===null)return I?x+=`${N}}`:x="{}",x;const U=Object.fromEntries(Object.entries(w).filter(([,X])=>X!==null));let z="";for(const[X,M]of Object.entries(U))Array.isArray(M)?M.length===0?z="[]":(z=`[
36
+ ${w}
37
+ ${N}${ot}`}return`"${T.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`},u=(T,I)=>{const F=ue;let N="";return typeof T=="string"?N+=`${F}${I} = ${l(T,F)}
38
+ `:N+=`${F}${I} = ${String(T??"")}
39
+ `,N},p=(T,I,F="")=>{if(typeof T!="object")return"Invalid object";const N=ue+F;let w="";if(I&&(w+=`${N}${I} = {
40
+ `),T===null)return I?w+=`${N}}`:w="{}",w;const U=Object.fromEntries(Object.entries(T).filter(([,Z])=>Z!==null));let z="";for(const[Z,M]of Object.entries(U))Array.isArray(M)?M.length===0?z="[]":(z=`[
41
41
  `,z+=f(M,void 0,N),z+=`${N}${ue}]`):M&&typeof M=="object"?(z=`{
42
- `,z+=m(M,void 0,N),z+=`${N}${ue}}`):typeof M=="string"?z=l(M,N+ue):z=String(M??""),x+=`${N}${ue}${X} = ${z}
43
- `;return I?x+=`${N}}
44
- `:x},f=(w,I,L="")=>{if(!Array.isArray(w))return"Invalid array";const N=ue+L;let x="";I&&(w.length===0?x+=`${N}${I} = [`:x+=`${N}${I} = [
45
- `);for(let U=0;U<w.length;U++){const z=w[U];typeof z=="object"?(x+=`${N}${ue}{
46
- `,x+=m(z,void 0,N),x+=`${N}${ue}}`):typeof z=="string"?x+=`${N}${ue}${l(z,N+ue)}`:x+=`${N}${ue}${String(z??"")}`,U<w.length-1&&(x+=","),x+=`
47
- `}return I&&(w.length===0?x+=`]
48
- `:x+=`${N}]
49
- `),x},h=w=>w.replace(/\$\{/g,()=>"$${"),c=w=>{let I="";for(const[L,N]of Object.entries(w))Array.isArray(N)?I+=f(N,L):typeof N=="object"?I+=m(N,L):I+=d(N,L);return h(I)},s=w=>{var U,z,X,M,D,E;const I=Object.fromEntries(Object.entries(w).filter(([,F])=>F!=null)),L=w.config?Object.fromEntries(Object.entries(w==null?void 0:w.config).filter(([,F])=>F!=null)):void 0;if(L&&(I.config=L),Object.keys(I).length===0)return"";delete I.id;let N="",x="";if((U=I.service)!=null&&U.id?(x="service",delete I.service):(z=I.route)!=null&&z.id?(x="route",delete I.route):(X=I.consumer)!=null&&X.id?(x="consumer",delete I.consumer):(M=I.consumer_group)!=null&&M.id?(x="consumer_group",delete I.consumer_group):(D=I.certificate)!=null&&D.id?(x="certificate",delete I.certificate):(E=I.set)!=null&&E.id&&(x="set",delete I.set),u.value){const F=i.subEntityType?`${a.value}_${i.subEntityType}`:a.value;N+=`resource "konnect_event_gateway_${F}" "my_eventgateway${F.replaceAll("_","")}" {
42
+ `,z+=p(M,void 0,N),z+=`${N}${ue}}`):typeof M=="string"?z=l(M,N+ue):z=String(M??""),w+=`${N}${ue}${Z} = ${z}
43
+ `;return I?w+=`${N}}
44
+ `:w},f=(T,I,F="")=>{if(!Array.isArray(T))return"Invalid array";const N=ue+F;let w="";I&&(T.length===0?w+=`${N}${I} = [`:w+=`${N}${I} = [
45
+ `);for(let U=0;U<T.length;U++){const z=T[U];typeof z=="object"?(w+=`${N}${ue}{
46
+ `,w+=p(z,void 0,N),w+=`${N}${ue}}`):typeof z=="string"?w+=`${N}${ue}${l(z,N+ue)}`:w+=`${N}${ue}${String(z??"")}`,U<T.length-1&&(w+=","),w+=`
47
+ `}return I&&(T.length===0?w+=`]
48
+ `:w+=`${N}]
49
+ `),w},h=T=>T.replace(/\$\{/g,()=>"$${"),c=T=>{let I="";for(const[F,N]of Object.entries(T))Array.isArray(N)?I+=f(N,F):typeof N=="object"?I+=p(N,F):I+=u(N,F);return h(I)},s=T=>{var U,z,Z,M,D,A;const I=Object.fromEntries(Object.entries(T).filter(([,L])=>L!=null)),F=T.config?Object.fromEntries(Object.entries(T==null?void 0:T.config).filter(([,L])=>L!=null)):void 0;if(F&&(I.config=F),Object.keys(I).length===0)return"";delete I.id;let N="",w="";if((U=I.service)!=null&&U.id?(w="service",delete I.service):(z=I.route)!=null&&z.id?(w="route",delete I.route):(Z=I.consumer)!=null&&Z.id?(w="consumer",delete I.consumer):(M=I.consumer_group)!=null&&M.id?(w="consumer_group",delete I.consumer_group):(D=I.certificate)!=null&&D.id?(w="certificate",delete I.certificate):(A=I.set)!=null&&A.id&&(w="set",delete I.set),d.value){const L=i.subEntityType?`${a.value}_${i.subEntityType}`:a.value;N+=`resource "konnect_event_gateway_${L}" "my_eventgateway${L.replaceAll("_","")}" {
50
50
  `,N+=`${ue}provider = konnect-beta
51
- `}else if(a.value===C.SupportedEntityType.Plugin){const F=i.credentialType.replace(/-/g,"_")||(I.name+"").replace(/-/g,"_");delete I.name,N+=`resource "konnect_gateway_plugin_${F}" "my_${F}" {
51
+ `}else if(a.value===C.SupportedEntityType.Plugin){const L=i.credentialType.replace(/-/g,"_")||(I.name+"").replace(/-/g,"_");delete I.name,N+=`resource "konnect_gateway_plugin_${L}" "my_${L}" {
52
52
  `}else g.value?(N+=`resource "konnect_${a.value}" "my_${a.value}" {
53
53
  `,N+=`${ue}provider = konnect-beta
54
54
  `):r.value||a.value===He?N+=`resource "konnect_cloud_gateway_addon" "managed_cache" {
55
55
  `:N+=`resource "konnect_gateway_${a.value}" "my_${a.value}" {
56
- `;return N+=c(I),!u.value&&!g.value&&a.value!==He?N+=`${ue}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
57
- `:x&&(N+=`${ue}${x} = {
58
- `,N+=`${ue}${ue}id = konnect_gateway_${x}.my_${x}.id
56
+ `;return N+=c(I),!d.value&&!g.value&&a.value!==He?N+=`${ue}control_plane_id = konnect_gateway_control_plane.my_konnect_cp.id
57
+ `:w&&(N+=`${ue}${w} = {
58
+ `,N+=`${ue}${ue}id = konnect_gateway_${w}.my_${w}.id
59
59
  `,N+=`${ue}}
60
60
  `),N+=`}
61
- `,N},k=e.computed(()=>s(i.entityRecord)),R=e.computed(()=>s(i.unredactedRecord||i.entityRecord));return(w,I)=>{const L=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock("div",An,[i.entityRecord?(e.openBlock(),e.createBlock(L,{key:0,id:"terraform-codeblock",code:k.value,"copy-code":R.value,"data-dd-privacy":"mask",language:"terraform",theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["code","copy-code","onCodeBlockRender"])):e.createCommentVNode("",!0)])}}}),En=e.defineComponent({__name:"GeneratePatModal",props:{visible:{type:Boolean},generateKonnectPat:{type:Function}},emits:["generated","dismiss"],setup(n,{emit:i}){const r=n,a=i,{i18n:{t:u}}=C.composables.useI18n(),g=e.ref(""),l=e.ref("30"),d=e.ref(!1),m=e.ref(""),f=[{value:"30",label:u("generatePatModal.fields.expiresAt.n_days",{n:30})},{value:"60",label:u("generatePatModal.fields.expiresAt.n_days",{n:60})},{value:"90",label:u("generatePatModal.fields.expiresAt.n_days",{n:90})},{value:"180",label:u("generatePatModal.fields.expiresAt.n_days",{n:180})},{value:"365",label:u("generatePatModal.fields.expiresAt.n_days",{n:365})}],h=()=>{a("dismiss")},c=async()=>{if(!g.value)return;m.value="",d.value=!0;const s=new Date;s.setDate(s.getDate()+Number(l.value));try{const k=await r.generateKonnectPat(g.value,s);a("generated",k)}catch(k){console.error("Failed to create PAT:",k),m.value=k instanceof Error?k.message:String(k)}finally{d.value=!1}};return(s,k)=>{const R=e.resolveComponent("KInput"),w=e.resolveComponent("KSelect"),I=e.resolveComponent("KAlert"),L=e.resolveComponent("KButton"),N=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(N,{class:"generate-pat-modal","max-width":"640px",title:e.unref(u)("generatePatModal.title"),visible:n.visible,onCancel:h,onProceed:c},{"footer-actions":e.withCtx(()=>[e.createVNode(L,{appearance:"tertiary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("generatePatModal.actions.cancel")),1)]),_:1}),e.createVNode(L,{appearance:"primary",disabled:!g.value||d.value,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.value?e.unref(u)("generatePatModal.actions.generating"):e.unref(u)("generatePatModal.actions.generate")),1)]),_:1},8,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(u)("generatePatModal.description")),1),e.createVNode(R,{modelValue:g.value,"onUpdate:modelValue":k[0]||(k[0]=x=>g.value=x),label:e.unref(u)("generatePatModal.fields.name.label"),placeholder:e.unref(u)("generatePatModal.fields.name.placeholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(w,{modelValue:l.value,"onUpdate:modelValue":k[1]||(k[1]=x=>l.value=x),items:f,label:e.unref(u)("generatePatModal.fields.expiresAt.label"),placeholder:e.unref(u)("generatePatModal.fields.expiresAt.placeholder"),required:""},null,8,["modelValue","label","placeholder"]),m.value?(e.openBlock(),e.createBlock(I,{key:0,appearance:"danger",message:m.value},null,8,["message"])):e.createCommentVNode("",!0)]),_:1},8,["title","visible"])}}}),Nt=C._export_sfc(En,[["__scopeId","data-v-be3cd315"]]),Nn={class:"step-title"},_n={key:3,class:"konnect-pat-actions"},$n={class:"step-title"},In={class:"customization-secret-advise"},On=e.defineComponent({__name:"DeckCodeBlockInternal",props:{app:{},entityRecord:{},unredactedRecord:{},entityType:{},geoApiServerUrl:{},controlPlaneName:{},kongAdminApiUrl:{},workspace:{},isCustomizing:{type:Boolean},generateKonnectPat:{type:Function}},setup(n){const i=e.inject(C.DECK_COMMAND_EDITOR_KEY,null),r=n;r.isCustomizing&&!i&&console.warn(C.DECK_COMMAND_EDITOR_MISSING_WARNING);const{i18n:a,i18nT:u}=C.composables.useI18n(),{t:g}=a,l=e.ref(""),d=e.ref(""),m=e.ref(""),f=e.ref(!1),h=[{value:"bash",label:"Linux / macOS Bash"},{value:"powershell",label:"Windows PowerShell"}],c=e.ref(navigator.userAgent.toLowerCase().includes("windows")?"powershell":"bash"),s=e.computed(()=>{const N={_format_version:"3.0"};return r.controlPlaneName&&(N._konnect={control_plane_name:r.controlPlaneName}),r.workspace&&(N._workspace=r.workspace),N}),k=N=>{var X,M,D,E,F;const x=Object.fromEntries(Object.entries(N).filter(([,ee])=>ee!==null&&ee!==""&&(Array.isArray(ee)?ee.length!==0:!0)));r.entityType===C.SupportedEntityType.Plugin?((X=x.service)!=null&&X.id&&(x.service=x.service.id),(M=x.route)!=null&&M.id&&(x.route=x.route.id),(D=x.consumer)!=null&&D.id&&(x.consumer=x.consumer.id),(E=x.consumer_group)!=null&&E.id&&(x.consumer_group=x.consumer_group.id)):r.entityType===C.SupportedEntityType.Key&&(F=x.key_set)!=null&&F.id&&(x.key_set=x.key_set.id);const U=r.entityType===C.SupportedEntityType.KeySet?"key_sets":r.entityType+"s",z={...s.value,[U]:[x]};return Et.dump(z,{quotingType:'"'}).trim()},R=e.computed(()=>k(r.entityRecord)),w=e.computed(()=>k(r.unredactedRecord||r.entityRecord)),I=e.computed(()=>c.value==="bash"?`export DECK_KONNECT_TOKEN='${l.value||"YOUR_KONNECT_PAT"}'`:`$env:DECK_KONNECT_TOKEN = "${l.value||"YOUR_KONNECT_PAT"}"`);function L(N){l.value=N,f.value=!1}return e.watchEffect(()=>{let N="deck gateway apply -";r.geoApiServerUrl?N+=` --konnect-addr ${r.geoApiServerUrl}`:r.kongAdminApiUrl&&(N+=` --kong-addr ${r.kongAdminApiUrl}`),c.value==="bash"?(d.value=`echo '
61
+ `,N},k=e.computed(()=>s(i.entityRecord)),R=e.computed(()=>s(i.unredactedRecord||i.entityRecord));return(T,I)=>{const F=e.resolveComponent("KCodeBlock");return e.openBlock(),e.createElementBlock("div",An,[i.entityRecord?(e.openBlock(),e.createBlock(F,{key:0,id:"terraform-codeblock",code:k.value,"copy-code":R.value,"data-dd-privacy":"mask",language:"terraform",theme:"dark",onCodeBlockRender:e.unref(Se)},null,8,["code","copy-code","onCodeBlockRender"])):e.createCommentVNode("",!0)])}}}),En=e.defineComponent({__name:"GeneratePatModal",props:{visible:{type:Boolean},generateKonnectPat:{type:Function}},emits:["generated","dismiss"],setup(n,{emit:i}){const r=n,a=i,{i18n:{t:d}}=C.composables.useI18n(),g=e.ref(""),l=e.ref("30"),u=e.ref(!1),p=e.ref(""),f=[{value:"30",label:d("generatePatModal.fields.expiresAt.n_days",{n:30})},{value:"60",label:d("generatePatModal.fields.expiresAt.n_days",{n:60})},{value:"90",label:d("generatePatModal.fields.expiresAt.n_days",{n:90})},{value:"180",label:d("generatePatModal.fields.expiresAt.n_days",{n:180})},{value:"365",label:d("generatePatModal.fields.expiresAt.n_days",{n:365})}],h=()=>{a("dismiss")},c=async()=>{if(!g.value)return;p.value="",u.value=!0;const s=new Date;s.setDate(s.getDate()+Number(l.value));try{const k=await r.generateKonnectPat(g.value,s);a("generated",k)}catch(k){console.error("Failed to create PAT:",k),p.value=k instanceof Error?k.message:String(k)}finally{u.value=!1}};return(s,k)=>{const R=e.resolveComponent("KInput"),T=e.resolveComponent("KSelect"),I=e.resolveComponent("KAlert"),F=e.resolveComponent("KButton"),N=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(N,{class:"generate-pat-modal","max-width":"640px",title:e.unref(d)("generatePatModal.title"),visible:n.visible,onCancel:h,onProceed:c},{"footer-actions":e.withCtx(()=>[e.createVNode(F,{appearance:"tertiary",onClick:h},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("generatePatModal.actions.cancel")),1)]),_:1}),e.createVNode(F,{appearance:"primary",disabled:!g.value||u.value,onClick:c},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(u.value?e.unref(d)("generatePatModal.actions.generating"):e.unref(d)("generatePatModal.actions.generate")),1)]),_:1},8,["disabled"])]),default:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(e.unref(d)("generatePatModal.description")),1),e.createVNode(R,{modelValue:g.value,"onUpdate:modelValue":k[0]||(k[0]=w=>g.value=w),label:e.unref(d)("generatePatModal.fields.name.label"),placeholder:e.unref(d)("generatePatModal.fields.name.placeholder"),required:""},null,8,["modelValue","label","placeholder"]),e.createVNode(T,{modelValue:l.value,"onUpdate:modelValue":k[1]||(k[1]=w=>l.value=w),items:f,label:e.unref(d)("generatePatModal.fields.expiresAt.label"),placeholder:e.unref(d)("generatePatModal.fields.expiresAt.placeholder"),required:""},null,8,["modelValue","label","placeholder"]),p.value?(e.openBlock(),e.createBlock(I,{key:0,appearance:"danger",message:p.value},null,8,["message"])):e.createCommentVNode("",!0)]),_:1},8,["title","visible"])}}}),Nt=C._export_sfc(En,[["__scopeId","data-v-be3cd315"]]),Nn={class:"step-title"},_n={key:3,class:"konnect-pat-actions"},$n={class:"step-title"},In={class:"customization-secret-advise"},On=e.defineComponent({__name:"DeckCodeBlockInternal",props:{app:{},entityRecord:{},unredactedRecord:{},entityType:{},geoApiServerUrl:{},controlPlaneName:{},kongAdminApiUrl:{},workspace:{},isCustomizing:{type:Boolean},generateKonnectPat:{type:Function}},setup(n){const i=e.inject(C.DECK_COMMAND_EDITOR_KEY,null),r=n;r.isCustomizing&&!i&&console.warn(C.DECK_COMMAND_EDITOR_MISSING_WARNING);const{i18n:a,i18nT:d}=C.composables.useI18n(),{t:g}=a,l=e.ref(""),u=e.ref(""),p=e.ref(""),f=e.ref(!1),h=[{value:"bash",label:"Linux / macOS Bash"},{value:"powershell",label:"Windows PowerShell"}],c=e.ref(navigator.userAgent.toLowerCase().includes("windows")?"powershell":"bash"),s=e.computed(()=>{const N={_format_version:"3.0"};return r.controlPlaneName&&(N._konnect={control_plane_name:r.controlPlaneName}),r.workspace&&(N._workspace=r.workspace),N}),k=N=>{var Z,M,D,A,L;const w=Object.fromEntries(Object.entries(N).filter(([,ee])=>ee!==null&&ee!==""&&(Array.isArray(ee)?ee.length!==0:!0)));r.entityType===C.SupportedEntityType.Plugin?((Z=w.service)!=null&&Z.id&&(w.service=w.service.id),(M=w.route)!=null&&M.id&&(w.route=w.route.id),(D=w.consumer)!=null&&D.id&&(w.consumer=w.consumer.id),(A=w.consumer_group)!=null&&A.id&&(w.consumer_group=w.consumer_group.id)):r.entityType===C.SupportedEntityType.Key&&(L=w.key_set)!=null&&L.id&&(w.key_set=w.key_set.id);const U=r.entityType===C.SupportedEntityType.KeySet?"key_sets":r.entityType+"s",z={...s.value,[U]:[w]};return Et.dump(z,{quotingType:'"'}).trim()},R=e.computed(()=>k(r.entityRecord)),T=e.computed(()=>k(r.unredactedRecord||r.entityRecord)),I=e.computed(()=>c.value==="bash"?`export DECK_KONNECT_TOKEN='${l.value||"YOUR_KONNECT_PAT"}'`:`$env:DECK_KONNECT_TOKEN = "${l.value||"YOUR_KONNECT_PAT"}"`);function F(N){l.value=N,f.value=!1}return e.watchEffect(()=>{let N="deck gateway apply -";r.geoApiServerUrl?N+=` --konnect-addr ${r.geoApiServerUrl}`:r.kongAdminApiUrl&&(N+=` --kong-addr ${r.kongAdminApiUrl}`),c.value==="bash"?(u.value=`echo '
62
62
  ${R.value}
63
- ' | ${N}`,m.value=`echo '
64
- ${w.value}
65
- ' | ${N}`):(d.value=`@'
63
+ ' | ${N}`,p.value=`echo '
64
+ ${T.value}
65
+ ' | ${N}`):(u.value=`@'
66
66
  ${R.value}
67
- '@ | ${N}`,m.value=`@'
68
- ${w.value}
69
- '@ | ${N}`)}),(N,x)=>{const U=e.resolveComponent("KSelect"),z=e.resolveComponent("KBadge"),X=e.resolveComponent("KCodeBlock"),M=e.resolveComponent("KAlert"),D=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"deck-config config-card-code-block"},N.$attrs),[e.createVNode(U,{modelValue:c.value,"onUpdate:modelValue":x[0]||(x[0]=E=>c.value=E),items:h},{"item-template":e.withCtx(({item:E})=>[E.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(de.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(de.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(E.label),1)]),"selected-item-template":e.withCtx(({item:E})=>[E.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(de.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(de.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(E.label),1)]),_:1},8,["modelValue"]),e.createElementVNode("div",Nn,e.toDisplayString(e.unref(g)("deckCodeBlock.steps.step_1")),1),n.isCustomizing?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(u),{key:0,"data-testid":`deck-hint-${n.app}`,keypath:`deckCodeBlock.hint.${n.app}`,tag:"p"},e.createSlots({link:e.withCtx(()=>[e.createVNode(e.unref(xe.KExternalLink),{href:n.app==="konnect"?"https://developer.konghq.com/deck/get-started/":"https://developer.konghq.com/deck/gateway/configuration/"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).t("deckCodeBlock.documentation")),1)]),_:1},8,["href"])]),_:2},[n.app==="konnect"?{name:"token",fn:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[...x[4]||(x[4]=[e.createTextVNode("DECK_KONNECT_TOKEN",-1)])]),_:1})]),key:"0"}:void 0]),1032,["data-testid","keypath"])),n.app==="konnect"?(e.openBlock(),e.createBlock(X,{key:1,id:"deck-env-codeblock",class:e.normalizeClass({customization:r.isCustomizing}),code:I.value,language:c.value,"single-line":"",theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","language","theme","onCodeBlockRender"])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createBlock(M,{key:2,class:"copy-konnect-pat-alert"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)("deckCodeBlock.customization.copy_pat")),1)]),_:1})):r.isCustomizing&&r.generateKonnectPat?(e.openBlock(),e.createElementBlock("div",_n,[e.createVNode(D,{appearance:"secondary","data-testid":"generate-konnect-pat-button",onClick:x[1]||(x[1]=E=>f.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)("deckCodeBlock.customization.generate_pat")),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(g)("deckCodeBlock.customization.reuse_pat")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",$n,e.toDisplayString(e.unref(g)("deckCodeBlock.steps.step_2")),1),r.entityRecord&&!r.isCustomizing?(e.openBlock(),e.createBlock(X,{key:4,id:"deck-codeblock",class:e.normalizeClass({customization:r.isCustomizing}),code:d.value,"copy-code":m.value,"data-dd-privacy":"mask",language:c.value,theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","copy-code","language","theme","onCodeBlockRender"])):r.entityRecord&&r.isCustomizing&&e.unref(i)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("div",In,e.toDisplayString(e.unref(g)("deckCodeBlock.customization.secret_advise")),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)),{modelValue:m.value,"onUpdate:modelValue":x[2]||(x[2]=E=>m.value=E),language:c.value},null,8,["modelValue","language"])),e.createVNode(M,{class:"customization-footer-reminder"},{icon:e.withCtx(()=>[e.createVNode(e.unref(de.InfoIcon))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(g)("deckCodeBlock.customization.footer_reminder")),1)]),_:1})],64)):e.createCommentVNode("",!0)],16),r.isCustomizing&&r.generateKonnectPat?(e.openBlock(),e.createBlock(Nt,{key:0,"generate-konnect-pat":r.generateKonnectPat,visible:f.value,onDismiss:x[3]||(x[3]=E=>f.value=!1),onGenerated:L},null,8,["generate-konnect-pat","visible"])):e.createCommentVNode("",!0)],64)}}}),rt=C._export_sfc(On,[["__scopeId","data-v-991fe861"]]),Ze=e.defineComponent({inheritAttrs:!1,__name:"DeckCodeBlock",props:{app:{},entityRecord:{},unredactedRecord:{},entityType:{},geoApiServerUrl:{},controlPlaneName:{},kongAdminApiUrl:{},workspace:{},customizationOptions:{type:[Boolean,Object]},isCustomizationModalVisible:{type:Boolean}},emits:["customization-close"],setup(n){const i=n,{i18n:{t:r}}=C.composables.useI18n(),a=e.computed(()=>{if(i.app==="konnect"&&i.customizationOptions&&typeof i.customizationOptions!="boolean")return i.customizationOptions.generateKonnectPat});return(u,g)=>{const l=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.entityRecord?(e.openBlock(),e.createBlock(rt,e.mergeProps({key:0},u.$attrs,{app:i.app,"control-plane-name":i.app==="konnect"?i.controlPlaneName:void 0,"entity-record":i.entityRecord,"entity-type":i.entityType,"geo-api-server-url":i.app==="konnect"?i.geoApiServerUrl:void 0,"kong-admin-api-url":i.app==="kongManager"?i.kongAdminApiUrl:void 0,"unredacted-record":i.unredactedRecord,workspace:i.workspace||void 0}),null,16,["app","control-plane-name","entity-record","entity-type","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0),i.entityRecord?(e.openBlock(),e.createBlock(l,{key:1,"action-button-appearance":"tertiary","action-button-text":e.unref(r)("baseConfigCard.actions.deck_customize_cancel"),"hide-cancel-button":"","max-width":"640px",title:e.unref(r)("deckCodeBlock.customization.title"),visible:i.isCustomizationModalVisible,onCancel:g[0]||(g[0]=d=>u.$emit("customization-close")),onProceed:g[1]||(g[1]=d=>u.$emit("customization-close"))},{default:e.withCtx(()=>[e.createVNode(rt,{app:i.app,"control-plane-name":i.app==="konnect"?i.controlPlaneName:void 0,"entity-record":i.entityRecord,"entity-type":i.entityType,"generate-konnect-pat":a.value,"geo-api-server-url":i.app==="konnect"?i.geoApiServerUrl:void 0,"is-customizing":"","kong-admin-api-url":i.app==="kongManager"?i.kongAdminApiUrl:void 0,"unredacted-record":i.unredactedRecord,workspace:i.workspace||void 0},null,8,["app","control-plane-name","entity-record","entity-type","generate-konnect-pat","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])]),_:1},8,["action-button-text","title","visible"])):e.createCommentVNode("",!0)],64)}}}),Vn={key:0,class:"config-card-display-form"},Dn=["data-testid"],Kn={key:0,class:"config-card-prop-section-title"},Rn=e.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:n=>C.CONFIG_CARD_FORMATS.includes(n)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},codeBlockRecord:{type:Object,default:void 0},codeBlockRecordRedacted:{type:Object,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,default:!1},fetcherUrl:{type:String,required:!1,default:""},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},isDeckCustomizationVisible:{type:Boolean,required:!1,default:!1}},emits:["deck-customization:close","request-deck-format"],setup(n){const i=n,r=e.useSlots(),{i18n:{t:a}}=C.composables.useI18n(),u=s=>!!(s.tooltip||r[`${s.key}-label-tooltip`]),g=s=>{if(s==null)return;let k=JSON.parse(JSON.stringify(s));return i.codeBlockRecordFormatter&&(k=i.codeBlockRecordFormatter(k,i.format)),i.preserveCodeBlockTimestamps||(delete k.created_at,delete k.updated_at),k},l=e.computed(()=>g(i.codeBlockRecordRedacted||i.codeBlockRecord||i.record)),d=e.computed(()=>g(i.codeBlockRecord||i.record)),m=e.computed(()=>i.fetcherUrl.replace(/(\?|&)__ui_data=true/,"")),{isDeckEnabled:f,deckCustomizationOptions:h,deckCalloutPreferenceKey:c}=C.composables.useBaseEntityDeckOptions(()=>i.config,()=>i.entityType);return(s,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.format==="structured"?(e.openBlock(),e.createElementBlock("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propListTypes,R=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${R}-props`,class:e.normalizeClass(`config-card-details-${R}-props`),"data-testid":`config-card-details-${R}-props`},[R!=="basic"?(e.openBlock(),e.createElementBlock("div",Kn,e.toDisplayString(R==="advanced"?e.unref(a)("baseConfigCard.sections.advanced"):R==="plugin"?e.unref(a)("baseConfigCard.sections.plugin"):e.unref(a)("baseConfigCard.sections.policy")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propertyCollections[R],w=>e.renderSlot(s.$slots,`config-card-item-${w.key}`,{row:w},()=>[(e.openBlock(),e.createBlock(Ge,{key:w.key,item:w},e.createSlots({label:e.withCtx(()=>[e.renderSlot(s.$slots,`${w.key}-label`,{row:w},void 0,!0)]),[w.key]:e.withCtx(({rowValue:I})=>[e.renderSlot(s.$slots,w.key,{row:w,rowValue:I},void 0,!0)]),_:2},[u(w)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(s.$slots,`${w.key}-label-tooltip`,{row:w},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))],!0)),256))],10,Dn))),128))])):e.createCommentVNode("",!0),n.format==="json"&&l.value?(e.openBlock(),e.createBlock(We,{key:1,config:i.config,"entity-record":l.value,"fetcher-url":m.value,"request-method":"get","unredacted-record":d.value},null,8,["config","entity-record","fetcher-url","unredacted-record"])):e.createCommentVNode("",!0),n.format==="yaml"&&l.value?(e.openBlock(),e.createBlock(Qe,{key:2,"deck-callout-preference-key":e.unref(f)?e.unref(c):void 0,"entity-record":l.value,"unredacted-record":d.value,"onDeckCallout:clickCta":k[0]||(k[0]=R=>s.$emit("request-deck-format"))},null,8,["deck-callout-preference-key","entity-record","unredacted-record"])):e.createCommentVNode("",!0),n.format==="terraform"&&l.value?(e.openBlock(),e.createBlock(Xe,{key:3,"entity-record":l.value,"entity-type":i.entityType,"sub-entity-type":i.subEntityType,"unredacted-record":d.value},null,8,["entity-record","entity-type","sub-entity-type","unredacted-record"])):e.createCommentVNode("",!0),n.format==="deck"&&l.value?(e.openBlock(),e.createBlock(Ze,{key:4,app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(h),"entity-record":l.value,"entity-type":i.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":n.isDeckCustomizationVisible,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,"unredacted-record":d.value,workspace:n.config.workspace||void 0,onCustomizationClose:k[1]||(k[1]=R=>s.$emit("deck-customization:close"))},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0)],64))}}),_t=C._export_sfc(Rn,[["__scopeId","data-v-83075649"]]),Ln={class:"config-card-title","data-testid":"config-card-title"},Fn={class:"config-card-actions"},Mn={class:"row"},Pn=["href"],qn={key:2,class:"config-card-details-section"},jn=e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},policyConfigKey:{type:String,required:!1,default:""},policyConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},recordResolver:{type:Function,required:!1,default:n=>n},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},codeBlockRecordResolver:{type:Function,required:!1,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,required:!1,default:!1},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"},formatsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","configFormatChange"],setup(n,{emit:i}){var Z;const r=i,a=n,{i18n:{t:u}}=C.composables.useI18n(),{getMessageFromError:g}=C.composables.useErrors(),{convertKeyToTitle:l}=C.composables.useStringHelpers();C.composables.useSubSchema(a.pluginConfigKey);const{axiosInstance:d}=C.composables.useAxios((Z=a.config)==null?void 0:Z.axiosRequestConfig),m=e.ref(!1),{isDeckEnabled:f,deckCustomizationOptions:h}=C.composables.useBaseEntityDeckOptions(()=>a.config,()=>a.entityType),c=e.computed(()=>{const V=[{label:u("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:u("baseForm.configuration.json"),value:"json"},{label:u("baseForm.configuration.yaml"),value:"yaml"}];a.config.app==="konnect"&&V.splice(2,0,{label:u("baseForm.configuration.terraform"),value:"terraform"}),f.value&&V.push({label:u("baseForm.configuration.deck"),value:"deck"});const P=new Set(a.formatsToHide);return V.filter(J=>J.value==="structured"||!P.has(J.value))}),s=e.ref("structured"),k=V=>{s.value=V==null?void 0:V.value,r("configFormatChange",s.value)},R=(V,P)=>{localStorage.setItem(V,P)};e.watch(s,V=>{a.config.formatPreferenceKey&&R(a.config.formatPreferenceKey,V)}),e.onMounted(()=>{var V;if(a.config.formatPreferenceKey){const P=localStorage.getItem(a.config.formatPreferenceKey),J=c.value;P&&J.some(K=>K.value===P)?s.value=P:s.value=((V=J[0])==null?void 0:V.value)??"structured",R(a.config.formatPreferenceKey,s.value)}});const w={id:{type:C.ConfigurationSchemaType.ID,label:u("baseConfigCard.commonFields.id_label"),order:0,section:C.ConfigurationSchemaSection.Basic},name:{order:1,section:C.ConfigurationSchemaSection.Basic},enabled:{type:C.ConfigurationSchemaType.BadgeStatus,order:2,section:C.ConfigurationSchemaSection.Basic},updated_at:{type:C.ConfigurationSchemaType.Date,label:u("baseConfigCard.commonFields.updated_at_label"),order:3,section:C.ConfigurationSchemaSection.Basic},created_at:{type:C.ConfigurationSchemaType.Date,label:u("baseConfigCard.commonFields.created_at_label"),order:4,section:C.ConfigurationSchemaSection.Basic},tags:{type:C.ConfigurationSchemaType.BadgeTag,order:-1,section:C.ConfigurationSchemaSection.Basic},labels:{type:C.ConfigurationSchemaType.BadgeTag,order:-1,section:C.ConfigurationSchemaSection.Basic},partials:{type:C.ConfigurationSchemaType.LinkInternal,label:u("baseConfigCard.commonFields.partial_label"),order:-1,section:C.ConfigurationSchemaSection.Basic}},I=e.ref(!1),L=e.ref(!1),N=e.ref(""),x=e.ref({}),U=e.ref(null),z=e.computed(()=>{if(!(!a.codeBlockRecordResolver||U.value==null))return a.codeBlockRecordResolver(U.value)}),X=e.ref(!1),M=e.computed(()=>{var P;const V={...z.value||x.value};for(const J in V)((P=a.configSchema[J])==null?void 0:P.type)===C.ConfigurationSchemaType.Redacted&&(V[J]="********");return a.codeBlockRecordResolver?a.codeBlockRecordResolver(V):V}),D=e.computed(()=>{var J,K,ce;if(!x.value)return[];const V=[],P=Object.keys(x.value).length;for(const Q in x.value){if(Q==="__ui_data")continue;const H=(K=(J=a.configSchema)==null?void 0:J[Q])==null?void 0:K.order,ie=(ce=w[Q])==null?void 0:ce.order;let re=P;(ie||ie===0)&&(re=ie===-1?P+1:ie),H&&(re=H===-1?P+1:H),V.push([Q,re])}return V.sort(function(Q,H){return Q[1]-H[1]}),V.map(Q=>{var ye,be;const H=Q[0],ie=(ye=x.value)==null?void 0:ye[H],re=((be=a.configSchema)==null?void 0:be[H])||{},oe=w[H];return{key:H,value:ie,hidden:re.hidden||!1,type:re.type??((oe==null?void 0:oe.type)||C.ConfigurationSchemaType.Text),label:re.label??((oe==null?void 0:oe.label)||l(H)),tooltip:re.tooltip??((oe==null?void 0:oe.tooltip)||void 0),section:re.section??((oe==null?void 0:oe.section)||C.ConfigurationSchemaSection.Advanced)}}).filter(Q=>!Q.hidden&&Q.key!==a.pluginConfigKey)}),E=e.computed(()=>{var K,ce;if(!x.value||!a.pluginConfigKey)return[];const V=x.value[a.pluginConfigKey]||{},P=Object.keys(V).length,J=[];for(const Q in V){const H=(ce=(K=a.pluginConfigSchema)==null?void 0:K[Q])==null?void 0:ce.order,ie=V[Q];let re=ie!=null&&ie!==""?P-1:P;H&&(re=H===-1?P+1:H),J.push([Q,re])}return J.sort(function(Q,H){return Q[1]-H[1]}),J.map(Q=>{var oe;const H=Q[0],ie=V[H],re=((oe=a.pluginConfigSchema)==null?void 0:oe[H])||{};return{key:H,value:ie,hidden:re.hidden||!1,type:re.type??C.ConfigurationSchemaType.Text,label:re.label??l(H),tooltip:re.tooltip??void 0,section:C.ConfigurationSchemaSection.Plugin}}).filter(Q=>!Q.hidden)}),F=e.computed(()=>{var K,ce;if(!x.value||!a.policyConfigKey)return[];const V=x.value[a.policyConfigKey]||{},P=Object.keys(V).length,J=[];for(const Q in V){const H=(ce=(K=a.policyConfigSchema)==null?void 0:K[Q])==null?void 0:ce.order,ie=V[Q];let re=ie!=null&&ie!==""?P-1:P;H&&(re=H===-1?P+1:H),J.push([Q,re])}return J.sort(function(Q,H){return Q[1]-H[1]}),J.map(Q=>{var oe;const H=Q[0],ie=V[H],re=((oe=a.policyConfigSchema)==null?void 0:oe[H])||{};return{key:H,value:ie,hidden:re.hidden||!1,type:re.type??C.ConfigurationSchemaType.Text,label:re.label??l(H),tooltip:re.tooltip??void 0,section:C.ConfigurationSchemaSection.Policy}}).filter(Q=>!Q.hidden)}),ee=e.computed(()=>{var V,P,J,K,ce,Q;return{basic:(V=D.value)==null?void 0:V.filter(H=>H.section===C.ConfigurationSchemaSection.Basic),advanced:(P=D.value)==null?void 0:P.filter(H=>H.section===C.ConfigurationSchemaSection.Advanced),plugin:(K=E.value)==null?void 0:K.concat((J=D.value)==null?void 0:J.filter(H=>H.section===C.ConfigurationSchemaSection.Plugin)),policy:(Q=F.value)==null?void 0:Q.concat((ce=D.value)==null?void 0:ce.filter(H=>H.section===C.ConfigurationSchemaSection.Policy))}}),te=e.computed(()=>{const V=[];return ee.value.basic.length&&V.push("basic"),ee.value.advanced.length&&V.push("advanced"),ee.value.plugin.length&&V.push("plugin"),ee.value.policy.length&&V.push("policy"),V}),W=e.computed(()=>{var P,J;let V=`${a.config.apiBaseUrl}${a.fetchUrl}`;return a.config.app==="konnect"&&(V=V.replace(/{controlPlaneId}/gi,((P=a.config)==null?void 0:P.controlPlaneId)||"")),V.replace(/\/{workspace}/gi,(J=a.config)!=null&&J.workspace?`/${a.config.workspace}`:"").replace(/{id}/gi,a.config.entityId)});return e.watch(I,V=>{r("loading",V)},{immediate:!0}),e.onBeforeMount(async()=>{L.value=!1,I.value=!0;try{const{data:V}=await d.get(W.value);if(U.value=V,a.dataKey)if(typeof V[a.dataKey]<"u")x.value={...V[a.dataKey]};else throw new Error(u("errors.dataKeyUndefined",{dataKey:a.dataKey}));else a.recordResolver?x.value={...a.recordResolver(V)}:x.value={...V};Object.keys(a.configSchema).filter(J=>a.configSchema[J].forceShow).forEach(J=>{x.value&&typeof x.value[J]>"u"&&(x.value[J]=null)}),r("fetch:success",V)}catch(V){U.value=null;const P=g(V);N.value=P.startsWith("code")?u("baseConfigCard.errors.load"):P,L.value=!0,r("fetch:error",V)}finally{I.value=!1}}),(V,P)=>{const J=e.resolveComponent("KCheckbox"),K=e.resolveComponent("KLabel"),ce=e.resolveComponent("KSelect"),Q=e.resolveComponent("KButton"),H=e.resolveComponent("KSkeleton"),ie=e.resolveComponent("KEmptyState"),re=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(re,{class:"kong-ui-entity-base-config-card","title-tag":n.titleTag},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.renderSlot(V.$slots,"actions",{},void 0,!0),s.value!=="structured"?(e.openBlock(),e.createBlock(J,{key:0,modelValue:X.value,"onUpdate:modelValue":P[0]||(P[0]=oe=>X.value=oe),class:"sensitive-fields-checkbox","data-testid":"sensitive-fields-checkbox",label:e.unref(u)("baseConfigCard.actions.sensitive_fields")},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createElementVNode("div",Mn,[e.createVNode(K,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:1}),e.createVNode(ce,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=oe=>s.value=oe),"data-testid":"select-config-format",items:c.value,onChange:k},null,8,["modelValue","items"])]),s.value==="deck"&&e.unref(h)?(e.openBlock(),e.createBlock(Q,{key:1,appearance:"secondary",class:"button-customize-deck","data-testid":"config-deck-customize-button",onClick:P[2]||(P[2]=oe=>m.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseConfigCard.actions.deck_customize")),1)]),_:1})):e.createCommentVNode("",!0),n.configCardDoc?(e.openBlock(),e.createBlock(Q,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:n.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(de.BookIcon),{size:`var(--kui-icon-size-40, ${e.unref(Ne)})`},null,8,["size"])],8,Pn)]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(H,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):L.value?(e.openBlock(),e.createBlock(ie,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(N.value),1)]),_:1})):(e.openBlock(),e.createElementBlock("div",qn,[e.createVNode(_t,{"code-block-record":z.value,"code-block-record-formatter":n.codeBlockRecordFormatter,"code-block-record-redacted":X.value?void 0:M.value,config:n.config,"entity-type":n.entityType,"fetcher-url":W.value,format:s.value,"is-deck-customization-visible":m.value,"preserve-code-block-timestamps":n.preserveCodeBlockTimestamps,"prop-list-types":te.value,"property-collections":ee.value,record:x.value,"sub-entity-type":n.subEntityType,"onDeckCustomization:close":P[3]||(P[3]=oe=>m.value=!1),onRequestDeckFormat:P[4]||(P[4]=oe=>s.value="deck")},e.createSlots({_:2},[e.renderList(Object.keys(V.$slots),oe=>({name:oe,fn:e.withCtx(ye=>[e.renderSlot(V.$slots,oe,e.mergeProps({record:x.value},ye),void 0,!0)])}))]),1032,["code-block-record","code-block-record-formatter","code-block-record-redacted","config","entity-type","fetcher-url","format","is-deck-customization-visible","preserve-code-block-timestamps","prop-list-types","property-collections","record","sub-entity-type"])]))]),_:2},[n.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",Ln,[e.renderSlot(V.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),Un=C._export_sfc(jn,[["__scopeId","data-v-fcf2efdc"]]),zn=["novalidate"],Hn={key:0,class:"button-customize-deck-wrapper"},Yn=e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string")},editId:{type:String,required:!1,default:null},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"},actionTeleportTarget:{type:String,default:void 0},hideActions:{type:Boolean,default:!1},slidoutTopOffset:{type:Number,default:60},alignActionButtonToLeft:{type:Boolean,default:!1},saveButtonText:{type:String,default:void 0},cancelButtonText:{type:String,default:void 0},slideoutFetchUrl:{type:String,default:void 0},slideoutRequestMethod:{type:String,default:void 0},slideoutDeckEntityType:{type:String,default:void 0},tabsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","submit","cancel","codeBlockTabChange"],setup(n,{expose:i,emit:r}){var ee,te;const a=e.inject(C.PLUGIN_FORM_LAYOUT_STATE,e.ref(!1)),u=r,g=n,l=Mt.useRouter(),{i18n:{t:d}}=C.composables.useI18n(),{getMessageFromError:m}=C.composables.useErrors(),{axiosInstance:f}=C.composables.useAxios((ee=g.config)==null?void 0:ee.axiosRequestConfig),h=e.ref(!1),c=e.computed(()=>!!g.editId),s=e.ref(!1),k=e.ref(""),R=e.computed(()=>g.canSubmit===!1||g.isReadonly),w=e.ref(!1),I=e.computed(()=>{var Z,V;let W=`${g.config.apiBaseUrl}${g.fetchUrl}`;return g.config.app==="konnect"&&(W=W.replace(/{controlPlaneId}/gi,((Z=g.config)==null?void 0:Z.controlPlaneId)||"")),W=W.replace(/\/{workspace}/gi,(V=g.config)!=null&&V.workspace?`/${g.config.workspace}`:""),g.editId?(W=W.replace(/{id}/gi,g.editId),W):(W=W.replace(/\/{id}/gi,""),W)}),L=e.ref(!1),{isDeckEnabled:N,deckCustomizationOptions:x,deckCalloutPreferenceKey:U}=C.composables.useBaseFormDeckOptions(()=>g.config,()=>g.entityType),z=()=>{w.value=!w.value},X=()=>{g.config.cancelRoute?l.push(g.config.cancelRoute):M()},M=()=>{u("cancel")},D=()=>{R.value||u("submit")},E=e.computed(()=>{const W=[{title:d("baseForm.configuration.json"),hash:"#json"},{title:d("baseForm.configuration.yaml"),hash:"#yaml"}];g.config.app==="konnect"&&g.entityType!==C.SupportedEntityType.Other&&W.splice(1,0,{title:d("baseForm.configuration.terraform"),hash:"#terraform"}),N.value&&W.push({title:d("baseForm.configuration.deck"),hash:"#deck"});const Z=new Set(g.tabsToHide.map(V=>`#${V}`));return W.filter(V=>!Z.has(V.hash))}),F=e.ref((te=E.value[0])==null?void 0:te.hash);return e.watch(E,W=>{var Z;W.some(V=>V.hash===F.value)||(F.value=(Z=W[0])==null?void 0:Z.hash)}),e.watch(()=>h.value,W=>{u("loading",W)},{immediate:!0}),e.onBeforeMount(async()=>{if(g.editId)try{s.value=!1,h.value=!0;const{data:W}=await f.get(I.value);u("fetch:success",W)}catch(W){const Z=m(W);k.value=Z.startsWith("code")?d("baseForm.errors.edit"):Z,s.value=!0,u("fetch:error",W)}finally{h.value=!1}}),i({viewConfig:z,formCancel:M,formSubmit:D}),(W,Z)=>{const V=e.resolveComponent("KSkeleton"),P=e.resolveComponent("KEmptyState"),J=e.resolveComponent("KAlert"),K=e.resolveComponent("KButton"),ce=e.resolveComponent("KTabs"),Q=e.resolveComponent("KSlideout");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.wrapperComponent),{class:e.normalizeClass(["kong-ui-entity-base-form",{"new-form-layout":e.unref(a)&&n.entityType===e.unref(C.SupportedEntityType).Plugin}])},{default:e.withCtx(()=>[h.value?(e.openBlock(),e.createBlock(V,{key:0,type:"form"})):s.value?(e.openBlock(),e.createBlock(P,{key:1,"action-button-text":e.unref(d)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:X},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(k.value),1)]),_:1},8,["action-button-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:g.noValidate,onReset:e.withModifiers(M,["prevent"]),onSubmit:e.withModifiers(D,["prevent"])},[e.renderSlot(W.$slots,"default",{},void 0,!0),n.errorMessage?(e.openBlock(),e.createBlock(J,{key:0,appearance:"danger",class:"form-error","data-testid":"form-error",message:n.errorMessage},null,8,["message"])):e.createCommentVNode("",!0),n.hideActions?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.Teleport,{key:1,disabled:!n.actionTeleportTarget,to:n.actionTeleportTarget},[e.createElementVNode("div",{class:e.normalizeClass(["form-actions",{"form-actions-reverted":n.alignActionButtonToLeft}]),"data-testid":"form-actions"},[e.renderSlot(W.$slots,"form-actions",{},()=>[e.createVNode(K,{appearance:"tertiary","data-testid":`${n.entityType}-${c.value?"edit":"create"}-form-view-configuration`,onClick:Z[0]||(Z[0]=H=>z())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(w.value?e.unref(d)("baseForm.actions.hideConfiguration"):e.unref(d)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),e.createVNode(K,{appearance:"secondary","data-testid":`${n.entityType}-${c.value?"edit":"create"}-form-cancel`,disabled:n.isReadonly,type:"reset",onClick:Z[1]||(Z[1]=H=>!!n.actionTeleportTarget&&M())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelButtonText??e.unref(d)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),e.createVNode(K,{appearance:"primary","data-testid":`${n.entityType}-${c.value?"edit":"create"}-form-submit`,disabled:R.value,type:"submit",onClick:Z[2]||(Z[2]=H=>!!n.actionTeleportTarget&&D())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.saveButtonText??e.unref(d)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,zn)),e.createVNode(Q,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":n.slidoutTopOffset,title:e.unref(d)("baseForm.configuration.title"),visible:w.value,onClose:Z[8]||(Z[8]=H=>z())},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(W.$slots,"configuration-slideout-message",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("baseForm.configuration.message")),1)],!0)]),e.createVNode(ce,{modelValue:F.value,"onUpdate:modelValue":Z[6]||(Z[6]=H=>F.value=H),"data-testid":"form-view-configuration-slideout-tabs",tabs:E.value,onChange:Z[7]||(Z[7]=H=>u("codeBlockTabChange",H.replace("#","")))},{json:e.withCtx(()=>[e.createVNode(We,{config:n.config,"entity-record":g.formFields,"fetcher-url":g.slideoutFetchUrl??I.value,"request-method":g.slideoutRequestMethod??(g.editId?"put":"post")},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:e.withCtx(()=>[e.createVNode(Qe,{"deck-callout-preference-key":e.unref(N)?e.unref(U):void 0,"entity-record":g.formFields,"onDeckCallout:clickCta":Z[3]||(Z[3]=H=>F.value="#deck")},null,8,["deck-callout-preference-key","entity-record"])]),terraform:e.withCtx(()=>[e.createVNode(Xe,{"entity-record":g.formFields,"entity-type":n.entityType,"sub-entity-type":n.subEntityType},null,8,["entity-record","entity-type","sub-entity-type"])]),deck:e.withCtx(()=>[e.unref(x)?(e.openBlock(),e.createElementBlock("div",Hn,[e.createVNode(K,{appearance:"secondary",class:"button-customize-deck",onClick:Z[4]||(Z[4]=H=>L.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("baseConfigCard.actions.deck_customize")),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(Ze,{app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(x),"entity-record":g.formFields,"entity-type":g.slideoutDeckEntityType??n.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":L.value,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,workspace:n.config.workspace||void 0,onCustomizationClose:Z[5]||(Z[5]=H=>L.value=!1)},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","workspace"])]),_:1},8,["modelValue","tabs"])]),_:3},8,["offset-top","title","visible"])]),_:3},8,["class"])}}}),Gn=C._export_sfc(Yn,[["__scopeId","data-v-b3590221"]]),Wn=["data-truncate"],Jn=e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(n){const i=n,r=e.computed(()=>{var I;return((I=i.rowEl)==null?void 0:I.querySelector(`[data-testid="${i.keyName}"]`))||null}),a=e.computed(()=>{var I;return((I=r.value)==null?void 0:I.querySelector('[data-truncate="true"]'))||null}),u=e.computed(()=>{var L,N;const I=(L=i.rowEl)==null?void 0:L.querySelectorAll("td");return I?((N=I[0])==null?void 0:N.getAttribute("data-testid"))===i.keyName:!0}),g=e.computed(()=>u.value||i.tooltip);let l;const d=()=>{l&&(l.disconnect(),l=void 0)},m=()=>{var L,N,x;let I=((L=r.value)==null?void 0:L.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const U=window.getComputedStyle(r.value);I-=(parseFloat(U.paddingLeft)||0)+(parseFloat(U.paddingRight)||0)}h.value=((N=a.value)==null?void 0:N.getBoundingClientRect().width)||0,c.value=I,s.value=((x=f.value)==null?void 0:x.innerText)||""},f=e.ref({}),h=e.ref(0),c=e.ref(0),s=e.ref(""),k=e.computed(()=>[a.value,r.value]),R=e.watch(k,I=>{if(g.value&&(d(),"ResizeObserver"in window&&window)){l=new ResizeObserver(L=>{window.requestAnimationFrame(()=>{!Array.isArray(L)||!L.length||m()})});for(const L of I)L&&l.observe(L)}},{immediate:!0,flush:"post",deep:!0}),w=e.computed(()=>g.value?h.value>c.value:!1);return e.onMounted(()=>{m()}),e.onUnmounted(()=>{R()}),(I,L)=>{const N=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:f,class:"content-wrapper"},[g.value?(e.openBlock(),e.createElementBlock("span",{key:0,"data-truncate":g.value||void 0},[e.createVNode(N,{"max-width":"300",placement:"bottom-start",text:w.value?s.value:""},{default:e.withCtx(()=>[e.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Wn)):e.renderSlot(I.$slots,"default",{key:1},void 0,!0)],512)}}}),Qn=C._export_sfc(Jn,[["__scopeId","data-v-a3a65cac"]]),Xn={class:"toolbar-container"},Zn={key:0,class:"toolbar-button-container"},eo={key:0,class:"hidden"},to=e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},rowKey:{type:[String,Function],default:"id"},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:null},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},paginationAttributes:{type:Object,default:()=>({})},hidePaginationWhenOptional:{type:Boolean,default:!0},disableSorting:{type:Boolean,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:""},defaultTablePreferences:{type:Object,default:null,required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1},hidePagination:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:void 0},disablePaginationPageJump:{type:Boolean,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof n=="boolean")},paginationType:{type:String,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(n))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(n,{emit:i}){const r=n,a=i,{i18n:{t:u}}=C.composables.useI18n(),g=e.computed(()=>{var E,F;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(E=r.errorMessage)==null?void 0:E.title,message:(F=r.errorMessage)==null?void 0:F.message}}),l=e.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),d=e.computed(()=>{const E=[];return Object.keys(r.tableHeaders).forEach(ee=>{const te=r.tableHeaders[ee];E.push({label:te.label??ee,key:ee,sortable:te.sortable??!1,hidable:te.hidable??!0})}),r.enableEntityActions&&E.push({key:"actions",hideLabel:!0}),E}),m=E=>({"data-rowid":E.id,"data-testid":E.name,...r.rowAttributes(E)}),f=e.ref({}),h=E=>{var F;return(F=f.value)==null?void 0:F.$el.querySelector(`[data-rowid="${E.id}"]`)},c=E=>{const F={"data-testid":E.headerKey,...r.cellAttributes(E)};return E.colIndex===0&&(F.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),F},s=E=>{N(E),a("state",E)},k=()=>{a("empty-state-cta-clicked"),R()},R=()=>{a("clear-search-input")},w=e.computed(()=>r.disableRowClick?void 0:(E,F)=>{a("click:row",F)}),I=E=>{a("sort",E)},{hideTableToolbar:L,handleStateChange:N}=C.composables.useTableState(()=>r.query),{setTablePreferences:x,getTablePreferences:U}=C.ft(),z=e.ref(U(l.value,r.defaultTablePreferences)),X=e.computed(()=>{const E=U(l.value);return{...r.initialFetcherParams,...E}}),M=E=>{z.value=E,d.value.forEach(F=>{!("hidable"in F)||!z.value.columnVisibility||F.hidable===!1&&(z.value.columnVisibility[F.key]=!0)}),l.value&&x(l.value,E)},D=e.computed(()=>({disablePageJump:r.disablePaginationPageJump,offset:r.paginationType==="offset",...r.paginationAttributes}));return(E,F)=>{const ee=e.resolveComponent("KTableData"),te=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(te,{class:"kong-ui-entity-base-table",title:n.title,"title-tag":n.titleTag},{default:e.withCtx(()=>[e.createVNode(ee,{ref_key:"tableRefs",ref:f,"cache-identifier":l.value,"cell-attrs":c,"client-sort":n.enableClientSort,"empty-state-action-message":n.query?e.unref(u)("baseTable.emptyState.noSearchResultsCtaText"):n.emptyStateOptions.ctaText,"empty-state-action-route":n.query?void 0:n.emptyStateOptions.ctaPath,"empty-state-icon-variant":n.query?"search":"kong","empty-state-message":n.query?e.unref(u)("baseTable.emptyState.noSearchResultsMessage"):n.emptyStateOptions.message,"empty-state-title":n.query?e.unref(u)("baseTable.emptyState.noSearchResultsTitle"):n.emptyStateOptions.title,error:g.value.hasError,"error-state-message":g.value.message,"error-state-title":g.value.title,fetcher:n.fetcher,"fetcher-cache-key":String(n.fetcherCacheKey),headers:d.value,"hide-pagination":n.hidePagination,"hide-pagination-when-optional":n.hidePaginationWhenOptional,"hide-toolbar":n.hideToolbar??e.unref(L),"initial-fetcher-params":X.value,loading:n.isLoading,"pagination-attributes":D.value,"resize-columns":"","row-attrs":m,"row-key":n.rowKey,"search-input":n.query,"sort-handler-function":n.enableClientSort?n.sortHandlerFunction:void 0,sortable:!n.disableSorting,"table-preferences":z.value,onEmptyStateActionClick:k,"onRow:click":w.value,onSort:F[0]||(F[0]=W=>I(W)),onState:s,"onUpdate:tablePreferences":M},e.createSlots({toolbar:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.renderSlot(E.$slots,"toolbar-filter",{},void 0,!0),E.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Zn,[e.renderSlot(E.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)])]),"action-items":e.withCtx(({row:W})=>[e.renderSlot(E.$slots,"actions",{row:W},void 0,!0)]),_:2},[E.$slots["empty-state"]?{name:"empty-state",fn:e.withCtx(()=>[e.renderSlot(E.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,e.renderList(n.tableHeaders,(W,Z)=>({name:Z,fn:e.withCtx(({row:V,rowValue:P})=>[e.createVNode(Qn,{"key-name":String(Z),"row-el":h(V),tooltip:W.tooltip},{default:e.withCtx(()=>[e.renderSlot(E.$slots,Z,{row:V,rowKey:n.rowKey,rowValue:P},()=>[e.createTextVNode(e.toDisplayString(P),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),n.query?void 0:{name:"empty-state-action-icon",fn:e.withCtx(()=>[e.createVNode(e.unref(de.AddIcon))]),key:"1"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-pagination-when-optional","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click"]),E.$slots["outside-actions"]&&e.unref(L)?(e.openBlock(),e.createElementBlock("div",eo,[e.renderSlot(E.$slots,"outside-actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),no=C._export_sfc(to,[["__scopeId","data-v-09e101d4"]]),oo={key:0,class:"kong-ui-entity-delete-error"},ro={key:1,class:"description"},io=e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},entityTypeDisplay:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""},confirmationPrompt:{type:String,default:""},stackedCopy:{type:Boolean,default:!1}},emits:["cancel","proceed"],setup(n,{emit:i}){const{i18nT:r}=C.composables.useI18n(),a=n,u=i,g=e.computed(()=>a.entityTypeDisplay.trim()!==""?a.entityTypeDisplay:a.entityType),l=e.computed(()=>a.needConfirm?a.entityName:""),d=()=>{u("cancel")},m=()=>{u("proceed")};return(f,h)=>{const c=e.resolveComponent("KAlert"),s=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(s,{"action-button-appearance":"danger","action-button-disabled":n.actionPending,"action-button-text":"Yes, delete",class:e.normalizeClass(["kong-ui-entity-delete-modal",{"kong-ui-entity-delete-modal-stacked-copy":n.stackedCopy}]),"confirmation-prompt":n.confirmationPrompt||void 0,"confirmation-text":l.value,"data-testid":"entity-delete-modal",title:n.title,visible:n.visible,onCancel:d,onProceed:m},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["body",{"body-stacked-copy":n.stackedCopy}])},[n.error?(e.openBlock(),e.createElementBlock("div",oo,[e.createVNode(c,{appearance:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.error),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"message",{},()=>[e.createVNode(e.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"])],!0),a.description||f.$slots.description?(e.openBlock(),e.createElementBlock("div",ro,[e.renderSlot(f.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0)],2)]),_:3},8,["action-button-disabled","class","confirmation-prompt","confirmation-text","title","visible"])}}}),lo=C._export_sfc(io,[["__scopeId","data-v-fc366e0c"]]),ao={key:1,class:"kong-ui-entity-filter"},co={class:"kong-ui-entity-filter-menu"},so=["data-testid"],uo=["onClick","onKeydown"],po={class:"menu-item-indicator"},fo={class:"menu-item-body"},mo=["for"],yo={class:"menu-item-buttons"},go={class:"filter-clear-button-container"},ho=e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:i}){const{i18n:{t:r}}=C.composables.useI18n(),a=n,u=i,g=e.ref(!1),l=e.ref({}),d=e.ref(new Set),m=e.computed(()=>{const M=[];return new URLSearchParams(a.modelValue).forEach((D,E)=>{D!==""&&M.push(E)}),M}),f=e.computed(()=>{const M=a.config.fields;return Object.keys(M).filter(D=>{var E;return(E=M==null?void 0:M[D])==null?void 0:E.searchable}).map(D=>({label:M[D].label||D,value:D,expanded:!1}))});e.watch(()=>a.modelValue,M=>{l.value={},new URLSearchParams(M).forEach((D,E)=>{l.value[E]=D})});const h=()=>{g.value=!g.value},c=M=>{d.value.has(M)?d.value.delete(M):d.value.add(M)},s=M=>{u("update:modelValue",M)},k=()=>{s("")},R=M=>`filter-${M}`,w=M=>{var D,E;return(((E=(D=a.config.schema)==null?void 0:D[M])==null?void 0:E.values)??[]).map(F=>typeof F=="string"?{value:F,label:F}:F)},I=M=>{var D,E;return((E=(D=a.config.schema)==null?void 0:D[M])==null?void 0:E.type)??"text"},L=M=>{l.value={...l.value,[M]:""},x()},N=()=>{l.value={},x(!0)},x=(M=!1)=>{const D=Object.keys(l.value).reduce((E,F)=>(l.value[F]&&(E[F]=`${l.value[F]}`),E),{});M&&(g.value=!1),u("update:modelValue",new URLSearchParams(D).toString())},U=M=>{var D,E;return!!((E=(D=a.config.schema)==null?void 0:D[M])!=null&&E.filterFunction)},z=(M,D)=>{var F;const E=(F=a.config.schema)==null?void 0:F[M];return(E==null?void 0:E.filterFunction)===void 0?!0:E.filterFunction(D)},X=(M,D)=>{l.value[M]=D?D.custom?String(D.label):String(D.value):""};return(M,D)=>{const E=e.resolveComponent("KInput"),F=e.resolveComponent("KButton"),ee=e.resolveComponent("KSelect");return n.config.isExactMatch?(e.openBlock(),e.createBlock(E,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":n.modelValue,placeholder:n.config.placeholder,"onUpdate:modelValue":s},{before:e.withCtx(()=>[e.createVNode(e.unref(de.FilterIcon),{decorative:""})]),after:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(de.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:k},null,512),[[e.vShow,n.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",ao,[e.createVNode(F,{appearance:"tertiary","data-testid":"filter-button",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(de.FilterIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("filter.filterButtonText"))+" "+e.toDisplayString(m.value.length>0?`(${m.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:h},null,512),[[e.vShow,g.value]]),e.withDirectives(e.createElementVNode("div",co,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,te=>{var W,Z,V,P;return e.openBlock(),e.createElementBlock("div",{key:te.value,class:"kong-ui-entity-filter-menu-item","data-testid":te.value},[e.createElementVNode("span",{class:e.normalizeClass(["menu-item-title",{expanded:d.value.has(te.value)}]),role:"button",tabindex:"0",onClick:J=>c(te.value),onKeydown:e.withKeys(J=>c(te.value),["enter"])},[e.createTextVNode(e.toDisplayString(te.label)+" ",1),e.withDirectives(e.createElementVNode("span",po,null,512),[[e.vShow,m.value.includes(te.value)]]),e.createVNode(e.unref(de.ChevronDownIcon),{class:e.normalizeClass(["menu-item-expand-icon",{expanded:d.value.has(te.value)}]),color:`var(--kui-color-text-neutral-weak, ${e.unref(Gt)})`},null,8,["class","color"])],42,uo),e.withDirectives(e.createElementVNode("div",fo,[e.createElementVNode("label",{class:"menu-item-label",for:R(te.value)},e.toDisplayString(e.unref(r)("filter.fieldLabel")),9,mo),((Z=(W=n.config.schema)==null?void 0:W[te.value])==null?void 0:Z.type)==="select"?(e.openBlock(),e.createBlock(ee,{key:0,id:R(te.value),"enable-filtering":U(te.value),"enable-item-creation":(P=(V=n.config.schema)==null?void 0:V[te.value])==null?void 0:P.enableItemCreation,"filter-function":J=>z(te.value,J),items:w(te.value),"model-value":l.value[te.value],placeholder:e.unref(r)("filter.selectPlaceholder"),onChange:J=>X(te.value,J)},null,8,["id","enable-filtering","enable-item-creation","filter-function","items","model-value","placeholder","onChange"])):(e.openBlock(),e.createBlock(E,{key:1,id:R(te.value),modelValue:l.value[te.value],"onUpdate:modelValue":J=>l.value[te.value]=J,autocomplete:"off",placeholder:e.unref(r)("filter.inputPlaceholder"),type:I(te.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[e.vShow,d.value.has(te.value)]]),e.withDirectives(e.createElementVNode("div",yo,[e.createVNode(F,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:D[0]||(D[0]=J=>x(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.applyButtonText")),1)]),_:1}),e.createVNode(F,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:J=>L(te.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearButtonText")),1)]),_:1},8,["onClick"])],512),[[e.vShow,d.value.has(te.value)]])],8,so)}),128)),e.createElementVNode("div",go,[e.createVNode(F,{appearance:"tertiary",size:"small",onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[e.vShow,g.value]])]))}}}),vo=C._export_sfc(ho,[["__scopeId","data-v-10015be6"]]),ko=e.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(n,{emit:i}){const{i18n:{t:r},i18nT:a}=C.composables.useI18n(),u=n,g=i,l=e.ref(!1),d=e.computed(()=>u.action==="enable"?r("toggleModal.enable.title",{entityType:u.entityType}):r("toggleModal.disable.title",{entityType:u.entityType})),m=e.computed(()=>u.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),f=()=>g("cancel"),h=async()=>{if(u.onConfirm){l.value=!0;try{await u.onConfirm(),g("proceed")}catch(c){console.error(c)}finally{l.value=!1}}};return(c,s)=>{const k=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(k,{"action-button-disabled":l.value,"action-button-text":m.value,"data-testid":`${n.entityType}-${n.entityId}-toggle-prompt`,title:d.value,visible:n.visible,onCancel:f,onProceed:h},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:`toggleModal.${u.action}.message`,scope:"global"},{entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.entityType),1)]),entityName:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(n.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),Co=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(n){const i=n,r=e.ref(void 0),a=e.computed(()=>r.value===!0||r.value!==void 0&&i.forceShow===!0);return e.watch(()=>i.authFunction,async()=>{r.value=await i.authFunction()},{immediate:!0}),(u,g)=>a.value?e.renderSlot(u.$slots,"default",{key:0,isAllowed:r.value}):e.createCommentVNode("",!0)}}),pe=[];for(let n=0;n<256;++n)pe.push((n+256).toString(16).slice(1));function bo(n,i=0){return(pe[n[i+0]]+pe[n[i+1]]+pe[n[i+2]]+pe[n[i+3]]+"-"+pe[n[i+4]]+pe[n[i+5]]+"-"+pe[n[i+6]]+pe[n[i+7]]+"-"+pe[n[i+8]]+pe[n[i+9]]+"-"+pe[n[i+10]]+pe[n[i+11]]+pe[n[i+12]]+pe[n[i+13]]+pe[n[i+14]]+pe[n[i+15]]).toLowerCase()}const So=new Uint8Array(16);function Bo(){return crypto.getRandomValues(So)}function To(n,i,r){return crypto.randomUUID?crypto.randomUUID():xo(n)}function xo(n,i,r){var u;n=n||{};const a=n.random??((u=n.rng)==null?void 0:u.call(n))??Bo();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,bo(a)}const wo=["aria-labelledby"],Ao={class:"form-section-wrapper"},Eo={key:1,class:"form-section-description"},No={key:2,class:"form-section-footer"},_o={class:"form-section-content"},$o=e.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(n){const i=e.useSlots(),r=To();return(a,u)=>(e.openBlock(),e.createElementBlock("div",{"aria-labelledby":n.title?e.unref(r):void 0,class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":n.hasDivider}]),role:"group"},[e.createElementVNode("div",Ao,[n.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:n.stickyInfoHeader}])},[n.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.titleTag),{key:0,id:e.unref(r),class:"form-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["id"])):e.createCommentVNode("",!0),n.description||e.unref(i).description?(e.openBlock(),e.createElementBlock("div",Eo,[e.renderSlot(a.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(i).footer?(e.openBlock(),e.createElementBlock("div",No,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",_o,[e.renderSlot(a.$slots,"default",{},void 0,!0)])])],10,wo))}}),Io=C._export_sfc($o,[["__scopeId","data-v-ccd29028"]]),Oo={class:"header"},Vo={key:0,class:"step","data-testid":"form-block-step"},Do={class:"header-content"},Ko={class:"header-title","data-testid":"header-title"},Ro={key:0,class:"header-description","data-testid":"header-description"},Lo={key:1,class:"header-extra","data-testid":"header-extra"},Fo={class:"content","data-testid":"form-block-content"},Mo=e.defineComponent({__name:"EntityFormBlock",props:{step:{default:()=>{}},title:{default:""},description:{default:""}},setup(n){const i=e.useSlots();return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-entity-form-block",{stepped:n.step!==void 0||i.step}])},[e.createElementVNode("header",Oo,[n.step!==void 0||i.step?(e.openBlock(),e.createElementBlock("div",Vo,[e.renderSlot(r.$slots,"step",{},()=>[e.createTextVNode(e.toDisplayString(n.step),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Do,[e.createElementVNode("h2",Ko,[e.renderSlot(r.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)]),n.description||i.description?(e.openBlock(),e.createElementBlock("div",Ro,[e.renderSlot(r.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0)]),i.extra?(e.openBlock(),e.createElementBlock("div",Lo,[e.renderSlot(r.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fo,[e.renderSlot(r.$slots,"default",{},void 0,!0)])],2))}}),Po=C._export_sfc(Mo,[["__scopeId","data-v-7dd2f21d"]]),qo={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},jo={key:0,class:"deleted-entity"},Uo={key:1},zo=["onClick"],Ho=e.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(n){const i=n,r=e.ref(),{isTruncated:a}=C.composables.useTruncationDetector(r),{i18n:{t:u}}=C.composables.useI18n(),g=u("global.actions.copyId"),l=e.ref(g),d=e.computed(()=>i.entityLinkData.deleted??!1),m=e.computed(()=>{var c;return(c=i.entityLinkData.id)!=null&&c.toString().includes(":")?i.entityLinkData.id.toString().split(":")[1]:i.entityLinkData.id}),f=e.computed(()=>{var c;return`${(c=m.value)==null?void 0:c.toString().slice(0,5)} (deleted)`}),h=async c=>{await c(m.value||"")&&(l.value=u("global.actions.copyToClipboard"),setTimeout(()=>{l.value=g},1800))};return(c,s)=>{const k=e.resolveComponent("KTooltip"),R=e.resolveComponent("KExternalLink"),w=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",qo,[d.value?(e.openBlock(),e.createElementBlock("div",jo,e.toDisplayString(f.value),1)):m.value?m.value?(e.openBlock(),e.createBlock(R,{key:2,class:"entity-link","hide-icon":!n.newWindow,href:n.externalLink,target:n.newWindow?"_blank":"_self"},{default:e.withCtx(()=>[e.createVNode(k,{text:e.unref(a)&&n.entityLinkData.label||""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},e.toDisplayString(n.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(" – "))),m.value&&n.allowCopy?(e.openBlock(),e.createBlock(k,{key:l.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:l.value},{default:e.withCtx(()=>[e.createVNode(w,null,{default:e.withCtx(({copyToClipboard:I})=>[e.createElementVNode("span",{class:"entity-link-copy-id",onClick:e.withModifiers(L=>h(I),["stop"])},[e.createVNode(e.unref(de.CopyIcon),{class:"copy-icon",color:`var(--kui-color-text-primary, ${e.unref(Wt)})`,"data-testid":"copy-id",size:`var(--kui-icon-size-30, ${e.unref(Qt)})`},null,8,["color","size"])],8,zo)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0)])}}}),Yo=C._export_sfc(Ho,[["__scopeId","data-v-6668aea9"]]),Go={class:"kong-ui-public-entity-empty-state"},Wo={class:"entity-empty-state-content"},Jo={key:0,class:"empty-state-image"},Qo={key:1,class:"entity-empty-state-title"},Xo={key:2,class:"entity-empty-state-description"},Zo={key:3,class:"entity-empty-state-pricing"},er={key:0,class:"entity-empty-state-message"},tr={key:1,class:"entity-empty-state-action"},nr={key:2,class:"entity-empty-state-card-container"},or={key:0,class:"feature-icon"},rr={class:"card-header"},ir=["title"],lr={key:3,class:"entity-empty-state-bottom-container"},ar=e.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:n=>Ye.includes(n)},title:{type:String,default:""},description:{type:String,default:""},pricing:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},actionButtonText:{type:String,default:""},learnMore:{type:Boolean,default:!1},features:{type:Array,default:()=>[]}},emits:["click:create","click:learn-more"],setup(n){const i=n,{i18n:{t:r}}=C.composables.useI18n(),a=e.ref(!1),u=e.computed(()=>a.value&&!!i.actionButtonText),g=e.computed(()=>Ye.includes(i.appearance)?i.appearance:["primary",i.appearance]);return e.onBeforeMount(async()=>{a.value=await i.canCreate()}),e.onMounted(()=>e.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
70
- Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(l,d)=>{const m=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",Wo,[l.$slots.image?(e.openBlock(),e.createElementBlock("div",Jo,[e.renderSlot(l.$slots,"image",{},void 0,!0)])):e.createCommentVNode("",!0),n.title||l.$slots.title?(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("h1",{class:e.normalizeClass(g.value)},[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],2)])):e.createCommentVNode("",!0),n.description||l.$slots.default?(e.openBlock(),e.createElementBlock("div",Xo,[e.renderSlot(l.$slots,"default",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),n.pricing||l.$slots.pricing?(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString(e.unref(r)("emptyState.pricingTitle")),1),d[2]||(d[2]=e.createTextVNode()),e.renderSlot(l.$slots,"pricing",{},()=>[e.createTextVNode(e.toDisplayString(n.pricing),1)],!0)])])):e.createCommentVNode("",!0)]),l.$slots.message?(e.openBlock(),e.createElementBlock("div",er,[e.renderSlot(l.$slots,"message",{},void 0,!0)])):e.createCommentVNode("",!0),u.value||n.learnMore||l.$slots.actions?(e.openBlock(),e.createElementBlock("div",tr,[e.renderSlot(l.$slots,"actions",{},()=>[u.value?(e.openBlock(),e.createBlock(e.unref(xe.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:n.appearance==="secondary"?"medium":"large",onClick:d[0]||(d[0]=f=>l.$emit("click:create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(de.AddIcon)),e.createTextVNode(" "+e.toDisplayString(n.actionButtonText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0),n.learnMore?(e.openBlock(),e.createBlock(e.unref(xe.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:n.appearance==="secondary"?"medium":"large",onClick:d[1]||(d[1]=f=>l.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(de.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("emptyState.learnMore")),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),n.features.length?(e.openBlock(),e.createElementBlock("div",nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.features,(f,h)=>(e.openBlock(),e.createBlock(m,{key:`feature-${h}-card`,class:"entity-empty-state-card"},{title:e.withCtx(()=>[l.$slots[`feature-${h}-icon`]?(e.openBlock(),e.createElementBlock("div",or,[e.renderSlot(l.$slots,`feature-${h}-icon`,{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",rr,e.toDisplayString(f.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{title:f.description},e.toDisplayString(f.description),9,ir)]),_:2},1024))),128))])):e.createCommentVNode("",!0),l.$slots.bottom?(e.openBlock(),e.createElementBlock("div",lr,[e.renderSlot(l.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),cr=C._export_sfc(ar,[["__scopeId","data-v-0b2e9081"]]),sr={key:0,class:"sensitive-input-hint","data-testid":"sensitive-input-hint"},ur={class:"sensitive-input-hint-text"},dr="••••••••••••••",pr=e.defineComponent({__name:"SensitiveInput",props:{modelValue:{default:""},mode:{default:"create"},generator:{type:Function},showOneTimeHint:{type:Boolean,default:!1},labels:{},label:{},labelAttributes:{},placeholder:{},help:{},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{}},emits:["update:modelValue","rotate","generate","generated"],setup(n,{expose:i,emit:r}){e.useCssVars(D=>({v430bd82e:X.value}));const a=r,{i18n:{t:u}}=C.composables.useI18n(),g=e.ref(n.mode==="edit"?"masked":"editing"),l=e.ref(!1),d=e.ref(!1),m=e.computed(()=>g.value==="masked"),f=dr,h=e.computed(()=>n.placeholder??u("sensitiveInput.placeholder")),c=e.computed(()=>{var D;return((D=n.labels)==null?void 0:D.rotateLabel)??u("sensitiveInput.rotateKey")}),s=e.computed(()=>{var D;return((D=n.labels)==null?void 0:D.generateLabel)??u("sensitiveInput.generateKey")}),k=e.computed(()=>{var D;return((D=n.labels)==null?void 0:D.hintLabel)??u("sensitiveInput.oneTimeHint")}),R=e.computed(()=>m.value||l.value?"text":"password");e.watch(()=>n.showOneTimeHint,D=>{D&&(l.value=!0)},{immediate:!0});const w=D=>{a("update:modelValue",D)},I=(D=!0)=>{g.value="editing",l.value=!1,D&&a("rotate")};i({enterEditing:()=>I(!1)});const L=()=>{l.value=!l.value},N=async()=>{if(!(!n.generator||d.value)){d.value=!0,a("generate");try{const D=await n.generator();a("update:modelValue",D),l.value=!0,a("generated",D)}finally{d.value=!1}}},x=e.useTemplateRef("rootElement");let U,z;const X=e.ref(`calc(${nt} + ${Ne} + ${tt})`),M=()=>{var E;const D=(E=x.value)==null?void 0:E.querySelector(".after-content-wrapper");D&&(X.value=`calc(${nt} + ${D.offsetWidth}px + ${tt})`)};return e.onMounted(()=>{var E;const D=(E=x.value)==null?void 0:E.querySelector(".after-content-wrapper");U=new ResizeObserver(()=>{z=window.requestAnimationFrame(()=>M())}),D&&U.observe(D),M()}),e.onBeforeUnmount(()=>{U==null||U.disconnect(),z!==void 0&&window.cancelAnimationFrame(z)}),(D,E)=>{const F=e.resolveComponent("KButton"),ee=e.resolveComponent("KInput"),te=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:x,class:"kong-ui-public-sensitive-input"},[e.createVNode(ee,{autocomplete:"off","data-testid":"sensitive-input",disabled:n.disabled,error:n.error,"error-message":n.errorMessage,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":m.value?e.unref(f):n.modelValue,placeholder:m.value?void 0:h.value,readonly:m.value||n.readonly,required:n.required,type:R.value,"onUpdate:modelValue":w},{after:e.withCtx(()=>[m.value?(e.openBlock(),e.createBlock(F,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:E[0]||(E[0]=W=>I(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.generator?(e.openBlock(),e.createBlock(F,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||d.value,size:"small",onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value?e.unref(de.VisibilityOffIcon):e.unref(de.VisibilityIcon)),{"aria-label":l.value?e.unref(u)("sensitiveInput.hideKey"):e.unref(u)("sensitiveInput.showKey"),class:"sensitive-input-toggle",color:"currentColor","data-testid":"sensitive-input-toggle",role:"button",size:`var(--kui-icon-size-40, ${e.unref(Ne)})`,tabindex:"0",onClick:L,onKeydown:e.withKeys(e.withModifiers(L,["prevent"]),["enter","space"])},null,40,["aria-label","size","onKeydown"]))],64))]),_:1},8,["disabled","error","error-message","help","label","label-attributes","model-value","placeholder","readonly","required","type"]),n.showOneTimeHint?(e.openBlock(),e.createElementBlock("div",sr,[e.createVNode(e.unref(de.InfoIcon),{class:"sensitive-input-hint-icon",color:`var(--kui-color-text-info, ${e.unref(Yt)})`,size:`var(--kui-icon-size-40, ${e.unref(Ne)})`},null,8,["color","size"]),e.createElementVNode("span",ur,e.toDisplayString(k.value),1),e.createVNode(te,null,{default:e.withCtx(({copyToClipboard:W})=>[e.createVNode(F,{appearance:"none",class:"sensitive-input-action sensitive-input-copy","data-testid":"sensitive-input-copy",icon:!0,onClick:Z=>W(n.modelValue)},{default:e.withCtx(()=>[e.createVNode(e.unref(de.CopyIcon),{color:"currentColor",size:`var(--kui-icon-size-40, ${e.unref(Ne)})`},null,8,["size"]),e.createTextVNode(" "+e.toDisplayString(e.unref(u)("sensitiveInput.copy")),1)]),_:1},8,["onClick"])]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(D.$slots,"alert",{},void 0,!0)],512)}}}),fr=C._export_sfc(pr,[["__scopeId","data-v-9efb72a4"]]),mr={key:1},yr=e.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(n){const i=n,r=e.computed(()=>{if(Array.isArray(i.tags))return i.tags;if(typeof i.tags=="string")try{const a=JSON.parse(i.tags);return Array.isArray(a)?a:[]}catch{return[]}return[]});return(a,u)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createBlock(e.unref(xe.KTruncate),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,l=>(e.openBlock(),e.createBlock(e.unref(xe.KBadge),{key:l,"max-width":n.tagMaxWidth,onClick:u[0]||(u[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(e.openBlock(),e.createElementBlock("span",mr,"-"))}}}),{useAxios:gr,useDeleteUrlBuilder:hr,useBaseEntityDeckOptions:vr,useBaseFormDeckOptions:kr,useErrors:Cr,useExternalLinkCreator:br,useFetchUrlBuilder:Sr,useFetcher:Br,useFetcherCacheKey:Tr,useDebouncedFilter:xr,useStringHelpers:wr,useHelpers:Ar,useGatewayFeatureSupported:Er,useTruncationDetector:Nr,useValidators:_r,useSchemaProvider:$r,useTableState:Ir}=C.composables;exports.CONFIG_CARD_FORMATS=C.CONFIG_CARD_FORMATS;exports.ConfigurationSchemaSection=C.ConfigurationSchemaSection;exports.ConfigurationSchemaType=C.ConfigurationSchemaType;exports.DECK_COMMAND_EDITOR_KEY=C.DECK_COMMAND_EDITOR_KEY;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=C.DECK_COMMAND_EDITOR_MISSING_WARNING;exports.EventGatewayTypesArray=C.EventGatewayTypesArray;exports.FetcherStatus=C.FetcherStatus;exports.IdentityTypesArray=C.IdentityTypesArray;exports.PLUGIN_FORM_LAYOUT_STATE=C.PLUGIN_FORM_LAYOUT_STATE;exports.SupportedEntityDeckArray=C.SupportedEntityDeckArray;exports.SupportedEntityType=C.SupportedEntityType;exports.SupportedEntityTypesArray=C.SupportedEntityTypesArray;exports.isSupportedDeckEntityType=C.isSupportedDeckEntityType;exports.Appearances=Ye;exports.BASE_FORM_CONFIG_TABS=Pt;exports.ConfigCardDisplay=_t;exports.ConfigCardItem=Ge;exports.DeckCodeBlock=Ze;exports.EntityBaseConfigCard=Un;exports.EntityBaseForm=Gn;exports.EntityBaseFormType=lt;exports.EntityBaseTable=no;exports.EntityDeleteModal=lo;exports.EntityEmptyState=cr;exports.EntityFilter=vo;exports.EntityFormBlock=Po;exports.EntityFormSection=Io;exports.EntityLink=Yo;exports.EntityToggleModal=ko;exports.EntityTypes=it;exports.GeneratePatModal=Nt;exports.InternalLinkItem=ct;exports.JsonCodeBlock=We;exports.PermissionsWrapper=Co;exports.SensitiveInput=fr;exports.TableTags=yr;exports.TerraformCodeBlock=Xe;exports.YamlCodeBlock=Qe;exports.highlightCodeBlock=Se;exports.useAxios=gr;exports.useBaseEntityDeckOptions=vr;exports.useBaseFormDeckOptions=kr;exports.useDebouncedFilter=xr;exports.useDeleteUrlBuilder=hr;exports.useErrors=Cr;exports.useExternalLinkCreator=br;exports.useFetchUrlBuilder=Sr;exports.useFetcher=Br;exports.useFetcherCacheKey=Tr;exports.useGatewayFeatureSupported=Er;exports.useHelpers=Ar;exports.useSchemaProvider=$r;exports.useStringHelpers=wr;exports.useTableState=Ir;exports.useTruncationDetector=Nr;exports.useValidators=_r;
67
+ '@ | ${N}`,p.value=`@'
68
+ ${T.value}
69
+ '@ | ${N}`)}),(N,w)=>{const U=e.resolveComponent("KSelect"),z=e.resolveComponent("KBadge"),Z=e.resolveComponent("KCodeBlock"),M=e.resolveComponent("KAlert"),D=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",e.mergeProps({class:"deck-config config-card-code-block"},N.$attrs),[e.createVNode(U,{modelValue:c.value,"onUpdate:modelValue":w[0]||(w[0]=A=>c.value=A),items:h},{"item-template":e.withCtx(({item:A})=>[A.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(de.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(de.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(A.label),1)]),"selected-item-template":e.withCtx(({item:A})=>[A.value==="powershell"?(e.openBlock(),e.createBlock(e.unref(de.LanguageShellIcon),{key:0})):(e.openBlock(),e.createBlock(e.unref(de.LanguageBashIcon),{key:1})),e.createTextVNode(" "+e.toDisplayString(A.label),1)]),_:1},8,["modelValue"]),e.createElementVNode("div",Nn,e.toDisplayString(e.unref(g)("deckCodeBlock.steps.step_1")),1),n.isCustomizing?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(d),{key:0,"data-testid":`deck-hint-${n.app}`,keypath:`deckCodeBlock.hint.${n.app}`,tag:"p"},e.createSlots({link:e.withCtx(()=>[e.createVNode(e.unref(Te.KExternalLink),{href:n.app==="konnect"?"https://developer.konghq.com/deck/get-started/":"https://developer.konghq.com/deck/gateway/configuration/"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).t("deckCodeBlock.documentation")),1)]),_:1},8,["href"])]),_:2},[n.app==="konnect"?{name:"token",fn:e.withCtx(()=>[e.createVNode(z,null,{default:e.withCtx(()=>[...w[4]||(w[4]=[e.createTextVNode("DECK_KONNECT_TOKEN",-1)])]),_:1})]),key:"0"}:void 0]),1032,["data-testid","keypath"])),n.app==="konnect"?(e.openBlock(),e.createBlock(Z,{key:1,id:"deck-env-codeblock",class:e.normalizeClass({customization:r.isCustomizing}),code:I.value,language:c.value,"single-line":"",theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","language","theme","onCodeBlockRender"])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createBlock(M,{key:2,class:"copy-konnect-pat-alert"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)("deckCodeBlock.customization.copy_pat")),1)]),_:1})):r.isCustomizing&&r.generateKonnectPat?(e.openBlock(),e.createElementBlock("div",_n,[e.createVNode(D,{appearance:"secondary","data-testid":"generate-konnect-pat-button",onClick:w[1]||(w[1]=A=>f.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(g)("deckCodeBlock.customization.generate_pat")),1)]),_:1}),e.createElementVNode("div",null,e.toDisplayString(e.unref(g)("deckCodeBlock.customization.reuse_pat")),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",$n,e.toDisplayString(e.unref(g)("deckCodeBlock.steps.step_2")),1),r.entityRecord&&!r.isCustomizing?(e.openBlock(),e.createBlock(Z,{key:4,id:"deck-codeblock",class:e.normalizeClass({customization:r.isCustomizing}),code:u.value,"copy-code":p.value,"data-dd-privacy":"mask",language:c.value,theme:n.isCustomizing?"light":"dark",onCodeBlockRender:e.unref(Se)},null,8,["class","code","copy-code","language","theme","onCodeBlockRender"])):r.entityRecord&&r.isCustomizing&&e.unref(i)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:5},[e.createElementVNode("div",In,e.toDisplayString(e.unref(g)("deckCodeBlock.customization.secret_advise")),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(i)),{modelValue:p.value,"onUpdate:modelValue":w[2]||(w[2]=A=>p.value=A),language:c.value},null,8,["modelValue","language"])),e.createVNode(M,{class:"customization-footer-reminder"},{icon:e.withCtx(()=>[e.createVNode(e.unref(de.InfoIcon))]),default:e.withCtx(()=>[e.createTextVNode(" "+e.toDisplayString(e.unref(g)("deckCodeBlock.customization.footer_reminder")),1)]),_:1})],64)):e.createCommentVNode("",!0)],16),r.isCustomizing&&r.generateKonnectPat?(e.openBlock(),e.createBlock(Nt,{key:0,"generate-konnect-pat":r.generateKonnectPat,visible:f.value,onDismiss:w[3]||(w[3]=A=>f.value=!1),onGenerated:F},null,8,["generate-konnect-pat","visible"])):e.createCommentVNode("",!0)],64)}}}),rt=C._export_sfc(On,[["__scopeId","data-v-991fe861"]]),Ze=e.defineComponent({inheritAttrs:!1,__name:"DeckCodeBlock",props:{app:{},entityRecord:{},unredactedRecord:{},entityType:{},geoApiServerUrl:{},controlPlaneName:{},kongAdminApiUrl:{},workspace:{},customizationOptions:{type:[Boolean,Object]},isCustomizationModalVisible:{type:Boolean}},emits:["customization-close"],setup(n){const i=n,{i18n:{t:r}}=C.composables.useI18n(),a=e.computed(()=>{if(i.app==="konnect"&&i.customizationOptions&&typeof i.customizationOptions!="boolean")return i.customizationOptions.generateKonnectPat});return(d,g)=>{const l=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[i.entityRecord?(e.openBlock(),e.createBlock(rt,e.mergeProps({key:0},d.$attrs,{app:i.app,"control-plane-name":i.app==="konnect"?i.controlPlaneName:void 0,"entity-record":i.entityRecord,"entity-type":i.entityType,"geo-api-server-url":i.app==="konnect"?i.geoApiServerUrl:void 0,"kong-admin-api-url":i.app==="kongManager"?i.kongAdminApiUrl:void 0,"unredacted-record":i.unredactedRecord,workspace:i.workspace||void 0}),null,16,["app","control-plane-name","entity-record","entity-type","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0),i.entityRecord?(e.openBlock(),e.createBlock(l,{key:1,"action-button-appearance":"tertiary","action-button-text":e.unref(r)("baseConfigCard.actions.deck_customize_cancel"),"hide-cancel-button":"","max-width":"640px",title:e.unref(r)("deckCodeBlock.customization.title"),visible:i.isCustomizationModalVisible,onCancel:g[0]||(g[0]=u=>d.$emit("customization-close")),onProceed:g[1]||(g[1]=u=>d.$emit("customization-close"))},{default:e.withCtx(()=>[e.createVNode(rt,{app:i.app,"control-plane-name":i.app==="konnect"?i.controlPlaneName:void 0,"entity-record":i.entityRecord,"entity-type":i.entityType,"generate-konnect-pat":a.value,"geo-api-server-url":i.app==="konnect"?i.geoApiServerUrl:void 0,"is-customizing":"","kong-admin-api-url":i.app==="kongManager"?i.kongAdminApiUrl:void 0,"unredacted-record":i.unredactedRecord,workspace:i.workspace||void 0},null,8,["app","control-plane-name","entity-record","entity-type","generate-konnect-pat","geo-api-server-url","kong-admin-api-url","unredacted-record","workspace"])]),_:1},8,["action-button-text","title","visible"])):e.createCommentVNode("",!0)],64)}}}),Vn={key:0,class:"config-card-display-form"},Dn=["data-testid"],Kn={key:0,class:"config-card-prop-section-title"},Rn=e.defineComponent({__name:"ConfigCardDisplay",props:{config:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},propertyCollections:{type:Object,required:!1,default:()=>null},format:{type:String,required:!1,default:"structured",validator:n=>C.CONFIG_CARD_FORMATS.includes(n)},propListTypes:{type:Array,required:!1,default:()=>[]},record:{type:Object,required:!1,default:()=>({})},codeBlockRecord:{type:Object,default:void 0},codeBlockRecordRedacted:{type:Object,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,default:!1},fetcherUrl:{type:String,required:!1,default:""},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},isDeckCustomizationVisible:{type:Boolean,required:!1,default:!1}},emits:["deck-customization:close","request-deck-format"],setup(n){const i=n,r=e.useSlots(),{i18n:{t:a}}=C.composables.useI18n(),d=s=>!!(s.tooltip||r[`${s.key}-label-tooltip`]),g=s=>{if(s==null)return;let k=JSON.parse(JSON.stringify(s));return i.codeBlockRecordFormatter&&(k=i.codeBlockRecordFormatter(k,i.format)),i.preserveCodeBlockTimestamps||(delete k.created_at,delete k.updated_at),k},l=e.computed(()=>g(i.codeBlockRecordRedacted||i.codeBlockRecord||i.record)),u=e.computed(()=>g(i.codeBlockRecord||i.record)),p=e.computed(()=>i.fetcherUrl.replace(/(\?|&)__ui_data=true/,"")),{isDeckEnabled:f,deckCustomizationOptions:h,deckCalloutPreferenceKey:c}=C.composables.useBaseEntityDeckOptions(()=>i.config,()=>i.entityType);return(s,k)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[n.format==="structured"?(e.openBlock(),e.createElementBlock("div",Vn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propListTypes,R=>(e.openBlock(),e.createElementBlock("div",{key:`config-card-details-${R}-props`,class:e.normalizeClass(`config-card-details-${R}-props`),"data-testid":`config-card-details-${R}-props`},[R!=="basic"?(e.openBlock(),e.createElementBlock("div",Kn,e.toDisplayString(R==="advanced"?e.unref(a)("baseConfigCard.sections.advanced"):R==="plugin"?e.unref(a)("baseConfigCard.sections.plugin"):e.unref(a)("baseConfigCard.sections.policy")),1)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.propertyCollections[R],T=>e.renderSlot(s.$slots,`config-card-item-${T.key}`,{row:T},()=>[(e.openBlock(),e.createBlock(Ge,{key:T.key,item:T},e.createSlots({label:e.withCtx(()=>[e.renderSlot(s.$slots,`${T.key}-label`,{row:T},void 0,!0)]),[T.key]:e.withCtx(({rowValue:I})=>[e.renderSlot(s.$slots,T.key,{row:T,rowValue:I},void 0,!0)]),_:2},[d(T)?{name:"label-tooltip",fn:e.withCtx(()=>[e.renderSlot(s.$slots,`${T.key}-label-tooltip`,{row:T},void 0,!0)]),key:"0"}:void 0]),1032,["item"]))],!0)),256))],10,Dn))),128))])):e.createCommentVNode("",!0),n.format==="json"&&l.value?(e.openBlock(),e.createBlock(We,{key:1,config:i.config,"entity-record":l.value,"fetcher-url":p.value,"request-method":"get","unredacted-record":u.value},null,8,["config","entity-record","fetcher-url","unredacted-record"])):e.createCommentVNode("",!0),n.format==="yaml"&&l.value?(e.openBlock(),e.createBlock(Qe,{key:2,"deck-callout-preference-key":e.unref(f)?e.unref(c):void 0,"entity-record":l.value,"unredacted-record":u.value,"onDeckCallout:clickCta":k[0]||(k[0]=R=>s.$emit("request-deck-format"))},null,8,["deck-callout-preference-key","entity-record","unredacted-record"])):e.createCommentVNode("",!0),n.format==="terraform"&&l.value?(e.openBlock(),e.createBlock(Xe,{key:3,"entity-record":l.value,"entity-type":i.entityType,"sub-entity-type":i.subEntityType,"unredacted-record":u.value},null,8,["entity-record","entity-type","sub-entity-type","unredacted-record"])):e.createCommentVNode("",!0),n.format==="deck"&&l.value?(e.openBlock(),e.createBlock(Ze,{key:4,app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(h),"entity-record":l.value,"entity-type":i.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":n.isDeckCustomizationVisible,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,"unredacted-record":u.value,workspace:n.config.workspace||void 0,onCustomizationClose:k[1]||(k[1]=R=>s.$emit("deck-customization:close"))},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","unredacted-record","workspace"])):e.createCommentVNode("",!0)],64))}}),_t=C._export_sfc(Rn,[["__scopeId","data-v-83075649"]]),Ln={class:"config-card-title","data-testid":"config-card-title"},Fn={class:"config-card-actions"},Mn={class:"row"},Pn=["href"],qn={key:2,class:"config-card-details-section"},jn=e.defineComponent({__name:"EntityBaseConfigCard",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="kongManager"&&typeof n.workspace!="string"||!n.entityId)},configSchema:{type:Object,required:!1,default:()=>({})},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,default:""},pluginConfigKey:{type:String,required:!1,default:""},pluginConfigSchema:{type:Object,required:!1,default:()=>({})},policyConfigKey:{type:String,required:!1,default:""},policyConfigSchema:{type:Object,required:!1,default:()=>({})},fetchUrl:{type:String,required:!0},dataKey:{type:String,required:!1,default:""},recordResolver:{type:Function,required:!1,default:n=>n},codeBlockRecordFormatter:{type:Function,required:!1,default:n=>n},codeBlockRecordResolver:{type:Function,required:!1,default:void 0},preserveCodeBlockTimestamps:{type:Boolean,required:!1,default:!1},hideTitle:{type:Boolean,default:!1},label:{type:String,default:"Format: ",required:!1},configCardDoc:{type:String,default:"",required:!1},titleTag:{type:String,default:"h2"},formatsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","configFormatChange"],setup(n,{emit:i}){var X;const r=i,a=n,{i18n:{t:d}}=C.composables.useI18n(),{getMessageFromError:g}=C.composables.useErrors(),{convertKeyToTitle:l}=C.composables.useStringHelpers();C.composables.useSubSchema(a.pluginConfigKey);const{axiosInstance:u}=C.composables.useAxios((X=a.config)==null?void 0:X.axiosRequestConfig),p=e.ref(!1),{isDeckEnabled:f,deckCustomizationOptions:h}=C.composables.useBaseEntityDeckOptions(()=>a.config,()=>a.entityType),c=e.computed(()=>{const V=[{label:d("baseConfigCard.general.structuredFormat"),value:"structured",selected:!0},{label:d("baseForm.configuration.json"),value:"json"},{label:d("baseForm.configuration.yaml"),value:"yaml"}];a.config.app==="konnect"&&V.splice(2,0,{label:d("baseForm.configuration.terraform"),value:"terraform"}),f.value&&V.push({label:d("baseForm.configuration.deck"),value:"deck"});const P=new Set(a.formatsToHide);return V.filter(W=>W.value==="structured"||!P.has(W.value))}),s=e.ref("structured"),k=V=>{s.value=V==null?void 0:V.value,r("configFormatChange",s.value)},R=(V,P)=>{localStorage.setItem(V,P)};e.watch(s,V=>{a.config.formatPreferenceKey&&R(a.config.formatPreferenceKey,V)}),e.onMounted(()=>{var V;if(a.config.formatPreferenceKey){const P=localStorage.getItem(a.config.formatPreferenceKey),W=c.value;P&&W.some(K=>K.value===P)?s.value=P:s.value=((V=W[0])==null?void 0:V.value)??"structured",R(a.config.formatPreferenceKey,s.value)}});const T={id:{type:C.ConfigurationSchemaType.ID,label:d("baseConfigCard.commonFields.id_label"),order:0,section:C.ConfigurationSchemaSection.Basic},name:{order:1,section:C.ConfigurationSchemaSection.Basic},enabled:{type:C.ConfigurationSchemaType.BadgeStatus,order:2,section:C.ConfigurationSchemaSection.Basic},updated_at:{type:C.ConfigurationSchemaType.Date,label:d("baseConfigCard.commonFields.updated_at_label"),order:3,section:C.ConfigurationSchemaSection.Basic},created_at:{type:C.ConfigurationSchemaType.Date,label:d("baseConfigCard.commonFields.created_at_label"),order:4,section:C.ConfigurationSchemaSection.Basic},tags:{type:C.ConfigurationSchemaType.BadgeTag,order:-1,section:C.ConfigurationSchemaSection.Basic},labels:{type:C.ConfigurationSchemaType.BadgeTag,order:-1,section:C.ConfigurationSchemaSection.Basic},partials:{type:C.ConfigurationSchemaType.LinkInternal,label:d("baseConfigCard.commonFields.partial_label"),order:-1,section:C.ConfigurationSchemaSection.Basic}},I=e.ref(!1),F=e.ref(!1),N=e.ref(""),w=e.ref({}),U=e.ref(null),z=e.computed(()=>{if(!(!a.codeBlockRecordResolver||U.value==null))return a.codeBlockRecordResolver(U.value)}),Z=e.ref(!1),M=e.computed(()=>{var P;const V={...z.value||w.value};for(const W in V)((P=a.configSchema[W])==null?void 0:P.type)===C.ConfigurationSchemaType.Redacted&&(V[W]="********");return a.codeBlockRecordResolver?a.codeBlockRecordResolver(V):V}),D=e.computed(()=>{var W,K,ce;if(!w.value)return[];const V=[],P=Object.keys(w.value).length;for(const J in w.value){if(J==="__ui_data")continue;const H=(K=(W=a.configSchema)==null?void 0:W[J])==null?void 0:K.order,ie=(ce=T[J])==null?void 0:ce.order;let re=P;(ie||ie===0)&&(re=ie===-1?P+1:ie),H&&(re=H===-1?P+1:H),V.push([J,re])}return V.sort(function(J,H){return J[1]-H[1]}),V.map(J=>{var ye,be;const H=J[0],ie=(ye=w.value)==null?void 0:ye[H],re=((be=a.configSchema)==null?void 0:be[H])||{},oe=T[H];return{key:H,value:ie,hidden:re.hidden||!1,type:re.type??((oe==null?void 0:oe.type)||C.ConfigurationSchemaType.Text),label:re.label??((oe==null?void 0:oe.label)||l(H)),tooltip:re.tooltip??((oe==null?void 0:oe.tooltip)||void 0),section:re.section??((oe==null?void 0:oe.section)||C.ConfigurationSchemaSection.Advanced)}}).filter(J=>!J.hidden&&J.key!==a.pluginConfigKey)}),A=e.computed(()=>{var K,ce;if(!w.value||!a.pluginConfigKey)return[];const V=w.value[a.pluginConfigKey]||{},P=Object.keys(V).length,W=[];for(const J in V){const H=(ce=(K=a.pluginConfigSchema)==null?void 0:K[J])==null?void 0:ce.order,ie=V[J];let re=ie!=null&&ie!==""?P-1:P;H&&(re=H===-1?P+1:H),W.push([J,re])}return W.sort(function(J,H){return J[1]-H[1]}),W.map(J=>{var oe;const H=J[0],ie=V[H],re=((oe=a.pluginConfigSchema)==null?void 0:oe[H])||{};return{key:H,value:ie,hidden:re.hidden||!1,type:re.type??C.ConfigurationSchemaType.Text,label:re.label??l(H),tooltip:re.tooltip??void 0,section:C.ConfigurationSchemaSection.Plugin}}).filter(J=>!J.hidden)}),L=e.computed(()=>{var K,ce;if(!w.value||!a.policyConfigKey)return[];const V=w.value[a.policyConfigKey]||{},P=Object.keys(V).length,W=[];for(const J in V){const H=(ce=(K=a.policyConfigSchema)==null?void 0:K[J])==null?void 0:ce.order,ie=V[J];let re=ie!=null&&ie!==""?P-1:P;H&&(re=H===-1?P+1:H),W.push([J,re])}return W.sort(function(J,H){return J[1]-H[1]}),W.map(J=>{var oe;const H=J[0],ie=V[H],re=((oe=a.policyConfigSchema)==null?void 0:oe[H])||{};return{key:H,value:ie,hidden:re.hidden||!1,type:re.type??C.ConfigurationSchemaType.Text,label:re.label??l(H),tooltip:re.tooltip??void 0,section:C.ConfigurationSchemaSection.Policy}}).filter(J=>!J.hidden)}),ee=e.computed(()=>{var V,P,W,K,ce,J;return{basic:(V=D.value)==null?void 0:V.filter(H=>H.section===C.ConfigurationSchemaSection.Basic),advanced:(P=D.value)==null?void 0:P.filter(H=>H.section===C.ConfigurationSchemaSection.Advanced),plugin:(K=A.value)==null?void 0:K.concat((W=D.value)==null?void 0:W.filter(H=>H.section===C.ConfigurationSchemaSection.Plugin)),policy:(J=L.value)==null?void 0:J.concat((ce=D.value)==null?void 0:ce.filter(H=>H.section===C.ConfigurationSchemaSection.Policy))}}),te=e.computed(()=>{const V=[];return ee.value.basic.length&&V.push("basic"),ee.value.advanced.length&&V.push("advanced"),ee.value.plugin.length&&V.push("plugin"),ee.value.policy.length&&V.push("policy"),V}),Q=e.computed(()=>{var P,W;let V=`${a.config.apiBaseUrl}${a.fetchUrl}`;return a.config.app==="konnect"&&(V=V.replace(/{controlPlaneId}/gi,((P=a.config)==null?void 0:P.controlPlaneId)||"")),V.replace(/\/{workspace}/gi,(W=a.config)!=null&&W.workspace?`/${a.config.workspace}`:"").replace(/{id}/gi,a.config.entityId)});return e.watch(I,V=>{r("loading",V)},{immediate:!0}),e.onBeforeMount(async()=>{F.value=!1,I.value=!0;try{const{data:V}=await u.get(Q.value);if(U.value=V,a.dataKey)if(typeof V[a.dataKey]<"u")w.value={...V[a.dataKey]};else throw new Error(d("errors.dataKeyUndefined",{dataKey:a.dataKey}));else a.recordResolver?w.value={...a.recordResolver(V)}:w.value={...V};Object.keys(a.configSchema).filter(W=>a.configSchema[W].forceShow).forEach(W=>{w.value&&typeof w.value[W]>"u"&&(w.value[W]=null)}),r("fetch:success",V)}catch(V){U.value=null;const P=g(V);N.value=P.startsWith("code")?d("baseConfigCard.errors.load"):P,F.value=!0,r("fetch:error",V)}finally{I.value=!1}}),(V,P)=>{const W=e.resolveComponent("KCheckbox"),K=e.resolveComponent("KLabel"),ce=e.resolveComponent("KSelect"),J=e.resolveComponent("KButton"),H=e.resolveComponent("KSkeleton"),ie=e.resolveComponent("KEmptyState"),re=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(re,{class:"kong-ui-entity-base-config-card","title-tag":n.titleTag},e.createSlots({actions:e.withCtx(()=>[e.createElementVNode("div",Fn,[e.renderSlot(V.$slots,"actions",{},void 0,!0),s.value!=="structured"?(e.openBlock(),e.createBlock(W,{key:0,modelValue:Z.value,"onUpdate:modelValue":P[0]||(P[0]=oe=>Z.value=oe),class:"sensitive-fields-checkbox","data-testid":"sensitive-fields-checkbox",label:e.unref(d)("baseConfigCard.actions.sensitive_fields")},null,8,["modelValue","label"])):e.createCommentVNode("",!0),e.createElementVNode("div",Mn,[e.createVNode(K,{class:"config-format-select-label","data-testid":"config-format-select-label"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:1}),e.createVNode(ce,{modelValue:s.value,"onUpdate:modelValue":P[1]||(P[1]=oe=>s.value=oe),"data-testid":"select-config-format",items:c.value,onChange:k},null,8,["modelValue","items"])]),s.value==="deck"&&e.unref(h)?(e.openBlock(),e.createBlock(J,{key:1,appearance:"secondary",class:"button-customize-deck","data-testid":"config-deck-customize-button",onClick:P[2]||(P[2]=oe=>p.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("baseConfigCard.actions.deck_customize")),1)]),_:1})):e.createCommentVNode("",!0),n.configCardDoc?(e.openBlock(),e.createBlock(J,{key:2,appearance:"tertiary",class:"book-icon","data-testid":"book-icon"},{default:e.withCtx(()=>[e.createElementVNode("a",{href:n.configCardDoc,rel:"noopener",target:"_blank"},[e.createVNode(e.unref(de.BookIcon),{size:`var(--kui-icon-size-40, ${e.unref(Ne)})`},null,8,["size"])],8,Pn)]),_:1})):e.createCommentVNode("",!0)])]),default:e.withCtx(()=>[I.value?(e.openBlock(),e.createBlock(H,{key:0,"data-testid":"config-card-loader","table-columns":2,type:"table"})):F.value?(e.openBlock(),e.createBlock(ie,{key:1,"data-testid":"config-card-fetch-error","icon-variant":"error"},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(N.value),1)]),_:1})):(e.openBlock(),e.createElementBlock("div",qn,[e.createVNode(_t,{"code-block-record":z.value,"code-block-record-formatter":n.codeBlockRecordFormatter,"code-block-record-redacted":Z.value?void 0:M.value,config:n.config,"entity-type":n.entityType,"fetcher-url":Q.value,format:s.value,"is-deck-customization-visible":p.value,"preserve-code-block-timestamps":n.preserveCodeBlockTimestamps,"prop-list-types":te.value,"property-collections":ee.value,record:w.value,"sub-entity-type":n.subEntityType,"onDeckCustomization:close":P[3]||(P[3]=oe=>p.value=!1),onRequestDeckFormat:P[4]||(P[4]=oe=>s.value="deck")},e.createSlots({_:2},[e.renderList(Object.keys(V.$slots),oe=>({name:oe,fn:e.withCtx(ye=>[e.renderSlot(V.$slots,oe,e.mergeProps({record:w.value},ye),void 0,!0)])}))]),1032,["code-block-record","code-block-record-formatter","code-block-record-redacted","config","entity-type","fetcher-url","format","is-deck-customization-visible","preserve-code-block-timestamps","prop-list-types","property-collections","record","sub-entity-type"])]))]),_:2},[n.hideTitle?void 0:{name:"title",fn:e.withCtx(()=>[e.createElementVNode("span",Ln,[e.renderSlot(V.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("baseConfigCard.title")),1)],!0)])]),key:"0"}]),1032,["title-tag"])}}}),Un=C._export_sfc(jn,[["__scopeId","data-v-fcf2efdc"]]),zn=["novalidate"],Hn={key:0,class:"button-customize-deck-wrapper"},Yn=e.defineComponent({__name:"EntityBaseForm",props:{config:{type:Object,required:!0,validator:n=>!(!n||!["konnect","kongManager"].includes(n==null?void 0:n.app)||n.app==="konnect"&&!n.controlPlaneId||n.app==="kongManager"&&typeof n.workspace!="string")},editId:{type:String,required:!1,default:null},entityType:{type:String,required:!0,validator:n=>C.SupportedEntityTypesArray.includes(n)},subEntityType:{type:String,required:!1,default:""},fetchUrl:{type:String,required:!1,default:""},isReadonly:{type:Boolean,required:!1,default:!1},canSubmit:{type:Boolean,required:!1,default:void 0},errorMessage:{type:String,required:!1,default:""},formFields:{type:Object,required:!0},noValidate:{type:Boolean,default:!1},wrapperComponent:{type:String,default:"KCard"},actionTeleportTarget:{type:String,default:void 0},hideActions:{type:Boolean,default:!1},slidoutTopOffset:{type:Number,default:60},alignActionButtonToLeft:{type:Boolean,default:!1},saveButtonText:{type:String,default:void 0},cancelButtonText:{type:String,default:void 0},slideoutFetchUrl:{type:String,default:void 0},slideoutRequestMethod:{type:String,default:void 0},slideoutDeckEntityType:{type:String,default:void 0},tabsToHide:{type:Array,required:!1,default:()=>[]}},emits:["loading","fetch:success","fetch:error","submit","cancel","codeBlockTabChange"],setup(n,{expose:i,emit:r}){var ee,te;const a=e.inject(C.PLUGIN_FORM_LAYOUT_STATE,e.ref(!1)),d=r,g=n,l=Mt.useRouter(),{i18n:{t:u}}=C.composables.useI18n(),{getMessageFromError:p}=C.composables.useErrors(),{axiosInstance:f}=C.composables.useAxios((ee=g.config)==null?void 0:ee.axiosRequestConfig),h=e.ref(!1),c=e.computed(()=>!!g.editId),s=e.ref(!1),k=e.ref(""),R=e.computed(()=>g.canSubmit===!1||g.isReadonly),T=e.ref(!1),I=e.computed(()=>{var X,V;let Q=`${g.config.apiBaseUrl}${g.fetchUrl}`;return g.config.app==="konnect"&&(Q=Q.replace(/{controlPlaneId}/gi,((X=g.config)==null?void 0:X.controlPlaneId)||"")),Q=Q.replace(/\/{workspace}/gi,(V=g.config)!=null&&V.workspace?`/${g.config.workspace}`:""),g.editId?(Q=Q.replace(/{id}/gi,g.editId),Q):(Q=Q.replace(/\/{id}/gi,""),Q)}),F=e.ref(!1),{isDeckEnabled:N,deckCustomizationOptions:w,deckCalloutPreferenceKey:U}=C.composables.useBaseFormDeckOptions(()=>g.config,()=>g.entityType),z=()=>{T.value=!T.value},Z=()=>{g.config.cancelRoute?l.push(g.config.cancelRoute):M()},M=()=>{d("cancel")},D=()=>{R.value||d("submit")},A=e.computed(()=>{const Q=[{title:u("baseForm.configuration.json"),hash:"#json"},{title:u("baseForm.configuration.yaml"),hash:"#yaml"}];g.config.app==="konnect"&&g.entityType!==C.SupportedEntityType.Other&&Q.splice(1,0,{title:u("baseForm.configuration.terraform"),hash:"#terraform"}),N.value&&Q.push({title:u("baseForm.configuration.deck"),hash:"#deck"});const X=new Set(g.tabsToHide.map(V=>`#${V}`));return Q.filter(V=>!X.has(V.hash))}),L=e.ref((te=A.value[0])==null?void 0:te.hash);return e.watch(A,Q=>{var X;Q.some(V=>V.hash===L.value)||(L.value=(X=Q[0])==null?void 0:X.hash)}),e.watch(()=>h.value,Q=>{d("loading",Q)},{immediate:!0}),e.onBeforeMount(async()=>{if(g.editId)try{s.value=!1,h.value=!0;const{data:Q}=await f.get(I.value);d("fetch:success",Q)}catch(Q){const X=p(Q);k.value=X.startsWith("code")?u("baseForm.errors.edit"):X,s.value=!0,d("fetch:error",Q)}finally{h.value=!1}}),i({viewConfig:z,formCancel:M,formSubmit:D}),(Q,X)=>{const V=e.resolveComponent("KSkeleton"),P=e.resolveComponent("KEmptyState"),W=e.resolveComponent("KAlert"),K=e.resolveComponent("KButton"),ce=e.resolveComponent("KTabs"),J=e.resolveComponent("KSlideout");return e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.wrapperComponent),{class:e.normalizeClass(["kong-ui-entity-base-form",{"new-form-layout":e.unref(a)&&n.entityType===e.unref(C.SupportedEntityType).Plugin}])},{default:e.withCtx(()=>[h.value?(e.openBlock(),e.createBlock(V,{key:0,type:"form"})):s.value?(e.openBlock(),e.createBlock(P,{key:1,"action-button-text":e.unref(u)("baseForm.actions.back"),"data-testid":"form-fetch-error","icon-variant":"error",onClickAction:Z},{default:e.withCtx(()=>[e.createElementVNode("h3",null,e.toDisplayString(k.value),1)]),_:1},8,["action-button-text"])):(e.openBlock(),e.createElementBlock("form",{key:2,"data-testid":"form-content",novalidate:g.noValidate,onReset:e.withModifiers(M,["prevent"]),onSubmit:e.withModifiers(D,["prevent"])},[e.renderSlot(Q.$slots,"default",{},void 0,!0),n.errorMessage?(e.openBlock(),e.createBlock(W,{key:0,appearance:"danger",class:"form-error","data-testid":"form-error",message:n.errorMessage},null,8,["message"])):e.createCommentVNode("",!0),n.hideActions?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.Teleport,{key:1,disabled:!n.actionTeleportTarget,to:n.actionTeleportTarget},[e.createElementVNode("div",{class:e.normalizeClass(["form-actions",{"form-actions-reverted":n.alignActionButtonToLeft}]),"data-testid":"form-actions"},[e.renderSlot(Q.$slots,"form-actions",{},()=>[e.createVNode(K,{appearance:"tertiary","data-testid":`${n.entityType}-${c.value?"edit":"create"}-form-view-configuration`,onClick:X[0]||(X[0]=H=>z())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.value?e.unref(u)("baseForm.actions.hideConfiguration"):e.unref(u)("baseForm.actions.viewConfiguration")),1)]),_:1},8,["data-testid"]),e.createVNode(K,{appearance:"secondary","data-testid":`${n.entityType}-${c.value?"edit":"create"}-form-cancel`,disabled:n.isReadonly,type:"reset",onClick:X[1]||(X[1]=H=>!!n.actionTeleportTarget&&M())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.cancelButtonText??e.unref(u)("baseForm.actions.cancel")),1)]),_:1},8,["data-testid","disabled"]),e.createVNode(K,{appearance:"primary","data-testid":`${n.entityType}-${c.value?"edit":"create"}-form-submit`,disabled:R.value,type:"submit",onClick:X[2]||(X[2]=H=>!!n.actionTeleportTarget&&D())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.saveButtonText??e.unref(u)("baseForm.actions.save")),1)]),_:1},8,["data-testid","disabled"])],!0)],2)],8,["disabled","to"]))],40,zn)),e.createVNode(J,{"close-on-blur":!1,"data-testid":"form-view-configuration-slideout","has-overlay":!1,"offset-top":n.slidoutTopOffset,title:e.unref(u)("baseForm.configuration.title"),visible:T.value,onClose:X[8]||(X[8]=H=>z())},{default:e.withCtx(()=>[e.createElementVNode("div",null,[e.renderSlot(Q.$slots,"configuration-slideout-message",{},()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseForm.configuration.message")),1)],!0)]),e.createVNode(ce,{modelValue:L.value,"onUpdate:modelValue":X[6]||(X[6]=H=>L.value=H),"data-testid":"form-view-configuration-slideout-tabs",tabs:A.value,onChange:X[7]||(X[7]=H=>d("codeBlockTabChange",H.replace("#","")))},{json:e.withCtx(()=>[e.createVNode(We,{config:n.config,"entity-record":g.formFields,"fetcher-url":g.slideoutFetchUrl??I.value,"request-method":g.slideoutRequestMethod??(g.editId?"put":"post")},null,8,["config","entity-record","fetcher-url","request-method"])]),yaml:e.withCtx(()=>[e.createVNode(Qe,{"deck-callout-preference-key":e.unref(N)?e.unref(U):void 0,"entity-record":g.formFields,"onDeckCallout:clickCta":X[3]||(X[3]=H=>L.value="#deck")},null,8,["deck-callout-preference-key","entity-record"])]),terraform:e.withCtx(()=>[e.createVNode(Xe,{"entity-record":g.formFields,"entity-type":n.entityType,"sub-entity-type":n.subEntityType},null,8,["entity-record","entity-type","sub-entity-type"])]),deck:e.withCtx(()=>[e.unref(w)?(e.openBlock(),e.createElementBlock("div",Hn,[e.createVNode(K,{appearance:"secondary",class:"button-customize-deck",onClick:X[4]||(X[4]=H=>F.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("baseConfigCard.actions.deck_customize")),1)]),_:1})])):e.createCommentVNode("",!0),e.createVNode(Ze,{app:n.config.app,"control-plane-name":n.config.app==="konnect"?n.config.controlPlaneName:void 0,"customization-options":e.unref(w),"entity-record":g.formFields,"entity-type":g.slideoutDeckEntityType??n.entityType,"geo-api-server-url":n.config.app==="konnect"?n.config.geoApiServerUrl:void 0,"is-customization-modal-visible":F.value,"kong-admin-api-url":n.config.app==="kongManager"?n.config.apiBaseUrl:void 0,workspace:n.config.workspace||void 0,onCustomizationClose:X[5]||(X[5]=H=>F.value=!1)},null,8,["app","control-plane-name","customization-options","entity-record","entity-type","geo-api-server-url","is-customization-modal-visible","kong-admin-api-url","workspace"])]),_:1},8,["modelValue","tabs"])]),_:3},8,["offset-top","title","visible"])]),_:3},8,["class"])}}}),Gn=C._export_sfc(Yn,[["__scopeId","data-v-b3590221"]]),Wn=["data-truncate"],Jn=e.defineComponent({__name:"EntityBaseTableCell",props:{keyName:{type:String,required:!0},rowEl:{type:[Object,null],required:!0},tooltip:{type:Boolean,default:!1}},setup(n){const i=n,r=e.computed(()=>{var I;return((I=i.rowEl)==null?void 0:I.querySelector(`[data-testid="${i.keyName}"]`))||null}),a=e.computed(()=>{var I;return((I=r.value)==null?void 0:I.querySelector('[data-truncate="true"]'))||null}),d=e.computed(()=>{var F,N;const I=(F=i.rowEl)==null?void 0:F.querySelectorAll("td");return I?((N=I[0])==null?void 0:N.getAttribute("data-testid"))===i.keyName:!0}),g=e.computed(()=>d.value||i.tooltip);let l;const u=()=>{l&&(l.disconnect(),l=void 0)},p=()=>{var F,N,w;let I=((F=r.value)==null?void 0:F.clientWidth)||0;if(r.value&&"getComputedStyle"in window){const U=window.getComputedStyle(r.value);I-=(parseFloat(U.paddingLeft)||0)+(parseFloat(U.paddingRight)||0)}h.value=((N=a.value)==null?void 0:N.getBoundingClientRect().width)||0,c.value=I,s.value=((w=f.value)==null?void 0:w.innerText)||""},f=e.ref({}),h=e.ref(0),c=e.ref(0),s=e.ref(""),k=e.computed(()=>[a.value,r.value]),R=e.watch(k,I=>{if(g.value&&(u(),"ResizeObserver"in window&&window)){l=new ResizeObserver(F=>{window.requestAnimationFrame(()=>{!Array.isArray(F)||!F.length||p()})});for(const F of I)F&&l.observe(F)}},{immediate:!0,flush:"post",deep:!0}),T=e.computed(()=>g.value?h.value>c.value:!1);return e.onMounted(()=>{p()}),e.onUnmounted(()=>{R()}),(I,F)=>{const N=e.resolveComponent("KTooltip");return e.openBlock(),e.createElementBlock("span",{ref_key:"contentRef",ref:f,class:"content-wrapper"},[g.value?(e.openBlock(),e.createElementBlock("span",{key:0,"data-truncate":g.value||void 0},[e.createVNode(N,{"max-width":"300",placement:"bottom-start",text:T.value?s.value:""},{default:e.withCtx(()=>[e.renderSlot(I.$slots,"default",{},void 0,!0)]),_:3},8,["text"])],8,Wn)):e.renderSlot(I.$slots,"default",{key:1},void 0,!0)],512)}}}),Qn=C._export_sfc(Jn,[["__scopeId","data-v-a3a65cac"]]),Xn={class:"toolbar-container"},Zn={key:0,class:"toolbar-button-container"},eo={key:0,class:"hidden"},to=e.defineComponent({__name:"EntityBaseTable",props:{tableHeaders:{type:Object,required:!0,default:()=>({})},fetcher:{type:Function,required:!0,default:async()=>({data:[],total:0})},initialFetcherParams:{type:Object,default:null},rowKey:{type:[String,Function],default:"id"},cacheIdentifier:{type:String,default:""},fetcherCacheKey:{type:Number,default:1},isLoading:{type:Boolean,default:!1},query:{type:String,default:""},enableClientSort:{type:Boolean,default:!1},sortHandlerFunction:{type:Function,default:null},enableEntityActions:{type:Boolean,default:!0},emptyStateOptions:{type:Object,default:()=>({})},errorMessage:{type:[String,Object],default:null},paginationAttributes:{type:Object,default:()=>({})},hidePaginationWhenOptional:{type:Boolean,default:!0},disableSorting:{type:Boolean,default:void 0},cellAttributes:{type:Function,default:()=>({})},rowAttributes:{type:Function,default:()=>({})},preferencesStorageKey:{type:String,default:""},defaultTablePreferences:{type:Object,default:null,required:!1},title:{type:String,default:""},titleTag:{type:String,default:"h2"},disableRowClick:{type:Boolean,default:!1},hidePagination:{type:Boolean,default:!1},hideToolbar:{type:Boolean,default:void 0},disablePaginationPageJump:{type:Boolean,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `disablePaginationPageJump` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),typeof n=="boolean")},paginationType:{type:String,default:void 0,validator:n=>(n&&console.warn("EntityBaseTable: `paginationType` is deprecated in favour of `paginationAttributes`. Please update your code to use `paginationAttributes` instead."),["default","offset"].includes(n))}},emits:["click:row","sort","clear-search-input","empty-state-cta-clicked","state"],setup(n,{emit:i}){const r=n,a=i,{i18n:{t:d}}=C.composables.useI18n(),g=e.computed(()=>{var A,L;return typeof r.errorMessage=="string"?{hasError:!!r.errorMessage,title:r.errorMessage,message:void 0}:{hasError:!!r.errorMessage,title:(A=r.errorMessage)==null?void 0:A.title,message:(L=r.errorMessage)==null?void 0:L.message}}),l=e.computed(()=>r.cacheIdentifier||r.preferencesStorageKey),u=e.computed(()=>{const A=[];return Object.keys(r.tableHeaders).forEach(ee=>{const te=r.tableHeaders[ee];A.push({label:te.label??ee,key:ee,sortable:te.sortable??!1,hidable:te.hidable??!0})}),r.enableEntityActions&&A.push({key:"actions",hideLabel:!0}),A}),p=A=>({"data-rowid":A.id,"data-testid":A.name,...r.rowAttributes(A)}),f=e.ref({}),h=A=>{var L;return(L=f.value)==null?void 0:L.$el.querySelector(`[data-rowid="${A.id}"]`)},c=A=>{const L={"data-testid":A.headerKey,...r.cellAttributes(A)};return A.colIndex===0&&(L.style={maxWidth:"250px",overflowX:"hidden",textOverflow:"ellipsis"}),L},s=A=>{N(A),a("state",A)},k=()=>{a("empty-state-cta-clicked"),R()},R=()=>{a("clear-search-input")},T=e.computed(()=>r.disableRowClick?void 0:(A,L)=>{a("click:row",L)}),I=A=>{a("sort",A)},{hideTableToolbar:F,handleStateChange:N}=C.composables.useTableState(()=>r.query),{setTablePreferences:w,getTablePreferences:U}=C.ft(),z=e.ref(U(l.value,r.defaultTablePreferences)),Z=e.computed(()=>{const A=U(l.value);return{...r.initialFetcherParams,...A}}),M=A=>{z.value=A,u.value.forEach(L=>{!("hidable"in L)||!z.value.columnVisibility||L.hidable===!1&&(z.value.columnVisibility[L.key]=!0)}),l.value&&w(l.value,A)},D=e.computed(()=>({disablePageJump:r.disablePaginationPageJump,offset:r.paginationType==="offset",...r.paginationAttributes}));return(A,L)=>{const ee=e.resolveComponent("KTableData"),te=e.resolveComponent("KCard");return e.openBlock(),e.createBlock(te,{class:"kong-ui-entity-base-table",title:n.title,"title-tag":n.titleTag},{default:e.withCtx(()=>[e.createVNode(ee,{ref_key:"tableRefs",ref:f,"cache-identifier":l.value,"cell-attrs":c,"client-sort":n.enableClientSort,"empty-state-action-message":n.query?e.unref(d)("baseTable.emptyState.noSearchResultsCtaText"):n.emptyStateOptions.ctaText,"empty-state-action-route":n.query?void 0:n.emptyStateOptions.ctaPath,"empty-state-icon-variant":n.query?"search":"kong","empty-state-message":n.query?e.unref(d)("baseTable.emptyState.noSearchResultsMessage"):n.emptyStateOptions.message,"empty-state-title":n.query?e.unref(d)("baseTable.emptyState.noSearchResultsTitle"):n.emptyStateOptions.title,error:g.value.hasError,"error-state-message":g.value.message,"error-state-title":g.value.title,fetcher:n.fetcher,"fetcher-cache-key":String(n.fetcherCacheKey),headers:u.value,"hide-pagination":n.hidePagination,"hide-pagination-when-optional":n.hidePaginationWhenOptional,"hide-toolbar":n.hideToolbar??e.unref(F),"initial-fetcher-params":Z.value,loading:n.isLoading,"pagination-attributes":D.value,"resize-columns":"","row-attrs":p,"row-key":n.rowKey,"search-input":n.query,"sort-handler-function":n.enableClientSort?n.sortHandlerFunction:void 0,sortable:!n.disableSorting,"table-preferences":z.value,onEmptyStateActionClick:k,"onRow:click":T.value,onSort:L[0]||(L[0]=Q=>I(Q)),onState:s,"onUpdate:tablePreferences":M},e.createSlots({toolbar:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.renderSlot(A.$slots,"toolbar-filter",{},void 0,!0),A.$slots["toolbar-button"]?(e.openBlock(),e.createElementBlock("div",Zn,[e.renderSlot(A.$slots,"toolbar-button",{},void 0,!0)])):e.createCommentVNode("",!0)])]),"action-items":e.withCtx(({row:Q})=>[e.renderSlot(A.$slots,"actions",{row:Q},void 0,!0)]),_:2},[A.$slots["empty-state"]?{name:"empty-state",fn:e.withCtx(()=>[e.renderSlot(A.$slots,"empty-state",{},void 0,!0)]),key:"0"}:void 0,e.renderList(n.tableHeaders,(Q,X)=>({name:X,fn:e.withCtx(({row:V,rowValue:P})=>[e.createVNode(Qn,{"key-name":String(X),"row-el":h(V),tooltip:Q.tooltip},{default:e.withCtx(()=>[e.renderSlot(A.$slots,X,{row:V,rowKey:n.rowKey,rowValue:P},()=>[e.createTextVNode(e.toDisplayString(P),1)],!0)]),_:2},1032,["key-name","row-el","tooltip"])])})),n.query?void 0:{name:"empty-state-action-icon",fn:e.withCtx(()=>[e.createVNode(e.unref(de.AddIcon))]),key:"1"}]),1032,["cache-identifier","client-sort","empty-state-action-message","empty-state-action-route","empty-state-icon-variant","empty-state-message","empty-state-title","error","error-state-message","error-state-title","fetcher","fetcher-cache-key","headers","hide-pagination","hide-pagination-when-optional","hide-toolbar","initial-fetcher-params","loading","pagination-attributes","row-key","search-input","sort-handler-function","sortable","table-preferences","onRow:click"]),A.$slots["outside-actions"]&&e.unref(F)?(e.openBlock(),e.createElementBlock("div",eo,[e.renderSlot(A.$slots,"outside-actions",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3},8,["title","title-tag"])}}}),no=C._export_sfc(to,[["__scopeId","data-v-09e101d4"]]),oo={key:0,class:"kong-ui-entity-delete-error"},ro={key:1,class:"description"},io=e.defineComponent({__name:"EntityDeleteModal",props:{visible:{type:Boolean,required:!0},title:{type:String,default:"Delete"},entityType:{type:String,required:!0},entityName:{type:String,default:""},entityTypeDisplay:{type:String,default:""},needConfirm:{type:Boolean,default:!0},description:{type:String,default:""},actionPending:{type:Boolean,default:!1},error:{type:String,default:""},confirmationPrompt:{type:String,default:""},stackedCopy:{type:Boolean,default:!1}},emits:["cancel","proceed"],setup(n,{emit:i}){const{i18nT:r}=C.composables.useI18n(),a=n,d=i,g=e.computed(()=>a.entityTypeDisplay.trim()!==""?a.entityTypeDisplay:a.entityType),l=e.computed(()=>a.needConfirm?a.entityName:""),u=()=>{d("cancel")},p=()=>{d("proceed")};return(f,h)=>{const c=e.resolveComponent("KAlert"),s=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(s,{"action-button-appearance":"danger","action-button-disabled":n.actionPending,"action-button-text":"Yes, delete",class:e.normalizeClass(["kong-ui-entity-delete-modal",{"kong-ui-entity-delete-modal-stacked-copy":n.stackedCopy}]),"confirmation-prompt":n.confirmationPrompt||void 0,"confirmation-text":l.value,"data-testid":"entity-delete-modal",title:n.title,visible:n.visible,onCancel:u,onProceed:p},{default:e.withCtx(()=>[e.createElementVNode("div",{class:e.normalizeClass(["body",{"body-stacked-copy":n.stackedCopy}])},[n.error?(e.openBlock(),e.createElementBlock("div",oo,[e.createVNode(c,{appearance:"danger"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.error),1)]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"message",{},()=>[e.createVNode(e.unref(r),{class:"message",keypath:a.entityName?"deleteModal.messageWithName":"deleteModal.message",tag:"p"},e.createSlots({entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(g.value),1)]),_:2},[a.entityName?{name:"entityName",fn:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(a.entityName),1)]),key:"0"}:void 0]),1032,["keypath"])],!0),a.description||f.$slots.description?(e.openBlock(),e.createElementBlock("div",ro,[e.renderSlot(f.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(a.description),1)],!0)])):e.createCommentVNode("",!0)],2)]),_:3},8,["action-button-disabled","class","confirmation-prompt","confirmation-text","title","visible"])}}}),lo=C._export_sfc(io,[["__scopeId","data-v-fc366e0c"]]),ao={key:1,class:"kong-ui-entity-filter"},co={class:"kong-ui-entity-filter-menu"},so=["data-testid"],uo=["onClick","onKeydown"],po={class:"menu-item-indicator"},fo={class:"menu-item-body"},mo=["for"],yo={class:"menu-item-buttons"},go={class:"filter-clear-button-container"},ho=e.defineComponent({__name:"EntityFilter",props:{config:{type:Object,required:!0,default:()=>({isExactMatch:!0,placeholder:""})},modelValue:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:i}){const{i18n:{t:r}}=C.composables.useI18n(),a=n,d=i,g=e.ref(!1),l=e.ref({}),u=e.ref(new Set),p=e.computed(()=>{const M=[];return new URLSearchParams(a.modelValue).forEach((D,A)=>{D!==""&&M.push(A)}),M}),f=e.computed(()=>{const M=a.config.fields;return Object.keys(M).filter(D=>{var A;return(A=M==null?void 0:M[D])==null?void 0:A.searchable}).map(D=>({label:M[D].label||D,value:D,expanded:!1}))});e.watch(()=>a.modelValue,M=>{l.value={},new URLSearchParams(M).forEach((D,A)=>{l.value[A]=D})});const h=()=>{g.value=!g.value},c=M=>{u.value.has(M)?u.value.delete(M):u.value.add(M)},s=M=>{d("update:modelValue",M)},k=()=>{s("")},R=M=>`filter-${M}`,T=M=>{var D,A;return(((A=(D=a.config.schema)==null?void 0:D[M])==null?void 0:A.values)??[]).map(L=>typeof L=="string"?{value:L,label:L}:L)},I=M=>{var D,A;return((A=(D=a.config.schema)==null?void 0:D[M])==null?void 0:A.type)??"text"},F=M=>{l.value={...l.value,[M]:""},w()},N=()=>{l.value={},w(!0)},w=(M=!1)=>{const D=Object.keys(l.value).reduce((A,L)=>(l.value[L]&&(A[L]=`${l.value[L]}`),A),{});M&&(g.value=!1),d("update:modelValue",new URLSearchParams(D).toString())},U=M=>{var D,A;return!!((A=(D=a.config.schema)==null?void 0:D[M])!=null&&A.filterFunction)},z=(M,D)=>{var L;const A=(L=a.config.schema)==null?void 0:L[M];return(A==null?void 0:A.filterFunction)===void 0?!0:A.filterFunction(D)},Z=(M,D)=>{l.value[M]=D?D.custom?String(D.label):String(D.value):""};return(M,D)=>{const A=e.resolveComponent("KInput"),L=e.resolveComponent("KButton"),ee=e.resolveComponent("KSelect");return n.config.isExactMatch?(e.openBlock(),e.createBlock(A,{key:0,autocomplete:"off",class:"kong-ui-entity-filter-input","data-testid":"search-input","model-value":n.modelValue,placeholder:n.config.placeholder,"onUpdate:modelValue":s},{before:e.withCtx(()=>[e.createVNode(e.unref(de.FilterIcon),{decorative:""})]),after:e.withCtx(()=>[e.withDirectives(e.createVNode(e.unref(de.CloseIcon),{class:"kong-ui-entity-filter-clear",role:"button",tabindex:"0",onClick:k},null,512),[[e.vShow,n.modelValue!==""]])]),_:1},8,["model-value","placeholder"])):(e.openBlock(),e.createElementBlock("div",ao,[e.createVNode(L,{appearance:"tertiary","data-testid":"filter-button",onClick:h},{default:e.withCtx(()=>[e.createVNode(e.unref(de.FilterIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("filter.filterButtonText"))+" "+e.toDisplayString(p.value.length>0?`(${p.value.length})`:""),1)]),_:1}),e.withDirectives(e.createElementVNode("div",{class:"kong-ui-entity-filter-backdrop",onClick:h},null,512),[[e.vShow,g.value]]),e.withDirectives(e.createElementVNode("div",co,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,te=>{var Q,X,V,P;return e.openBlock(),e.createElementBlock("div",{key:te.value,class:"kong-ui-entity-filter-menu-item","data-testid":te.value},[e.createElementVNode("span",{class:e.normalizeClass(["menu-item-title",{expanded:u.value.has(te.value)}]),role:"button",tabindex:"0",onClick:W=>c(te.value),onKeydown:e.withKeys(W=>c(te.value),["enter"])},[e.createTextVNode(e.toDisplayString(te.label)+" ",1),e.withDirectives(e.createElementVNode("span",po,null,512),[[e.vShow,p.value.includes(te.value)]]),e.createVNode(e.unref(de.ChevronDownIcon),{class:e.normalizeClass(["menu-item-expand-icon",{expanded:u.value.has(te.value)}]),color:`var(--kui-color-text-neutral-weak, ${e.unref(Gt)})`},null,8,["class","color"])],42,uo),e.withDirectives(e.createElementVNode("div",fo,[e.createElementVNode("label",{class:"menu-item-label",for:R(te.value)},e.toDisplayString(e.unref(r)("filter.fieldLabel")),9,mo),((X=(Q=n.config.schema)==null?void 0:Q[te.value])==null?void 0:X.type)==="select"?(e.openBlock(),e.createBlock(ee,{key:0,id:R(te.value),"enable-filtering":U(te.value),"enable-item-creation":(P=(V=n.config.schema)==null?void 0:V[te.value])==null?void 0:P.enableItemCreation,"filter-function":W=>z(te.value,W),items:T(te.value),"model-value":l.value[te.value],placeholder:e.unref(r)("filter.selectPlaceholder"),onChange:W=>Z(te.value,W)},null,8,["id","enable-filtering","enable-item-creation","filter-function","items","model-value","placeholder","onChange"])):(e.openBlock(),e.createBlock(A,{key:1,id:R(te.value),modelValue:l.value[te.value],"onUpdate:modelValue":W=>l.value[te.value]=W,autocomplete:"off",placeholder:e.unref(r)("filter.inputPlaceholder"),type:I(te.value)},null,8,["id","modelValue","onUpdate:modelValue","placeholder","type"]))],512),[[e.vShow,u.value.has(te.value)]]),e.withDirectives(e.createElementVNode("div",yo,[e.createVNode(L,{appearance:"tertiary","data-testid":"apply-filter",size:"small",onClick:D[0]||(D[0]=W=>w(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.applyButtonText")),1)]),_:1}),e.createVNode(L,{appearance:"tertiary","data-testid":"clear-filter",size:"small",onClick:W=>F(te.value)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearButtonText")),1)]),_:1},8,["onClick"])],512),[[e.vShow,u.value.has(te.value)]])],8,so)}),128)),e.createElementVNode("div",go,[e.createVNode(L,{appearance:"tertiary",size:"small",onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("filter.clearAllButtonText")),1)]),_:1})])],512),[[e.vShow,g.value]])]))}}}),vo=C._export_sfc(ho,[["__scopeId","data-v-10015be6"]]),ko=e.defineComponent({__name:"EntityToggleModal",props:{visible:{type:Boolean,required:!0},action:{type:String,required:!0},entityId:{type:String,required:!0},entityType:{type:String,required:!0},entityName:{type:String,required:!0},onConfirm:{type:Function,required:!1,default:null}},emits:["cancel","proceed"],setup(n,{emit:i}){const{i18n:{t:r},i18nT:a}=C.composables.useI18n(),d=n,g=i,l=e.ref(!1),u=e.computed(()=>d.action==="enable"?r("toggleModal.enable.title",{entityType:d.entityType}):r("toggleModal.disable.title",{entityType:d.entityType})),p=e.computed(()=>d.action==="enable"?r("toggleModal.enable.confirmText"):r("toggleModal.disable.confirmText")),f=()=>g("cancel"),h=async()=>{if(d.onConfirm){l.value=!0;try{await d.onConfirm(),g("proceed")}catch(c){console.error(c)}finally{l.value=!1}}};return(c,s)=>{const k=e.resolveComponent("KPrompt");return e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(k,{"action-button-disabled":l.value,"action-button-text":p.value,"data-testid":`${n.entityType}-${n.entityId}-toggle-prompt`,title:u.value,visible:n.visible,onCancel:f,onProceed:h},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:`toggleModal.${d.action}.message`,scope:"global"},{entityType:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.entityType),1)]),entityName:e.withCtx(()=>[e.createElementVNode("strong",null,e.toDisplayString(n.entityName),1)]),_:1},8,["keypath"])]),_:1},8,["action-button-disabled","action-button-text","data-testid","title","visible"])])}}}),Co=e.defineComponent({__name:"PermissionsWrapper",props:{authFunction:{type:Function,required:!0,default:async()=>!0},forceShow:{type:Boolean,default:!1}},setup(n){const i=n,r=e.ref(void 0),a=e.computed(()=>r.value===!0||r.value!==void 0&&i.forceShow===!0);return e.watch(()=>i.authFunction,async()=>{r.value=await i.authFunction()},{immediate:!0}),(d,g)=>a.value?e.renderSlot(d.$slots,"default",{key:0,isAllowed:r.value}):e.createCommentVNode("",!0)}}),pe=[];for(let n=0;n<256;++n)pe.push((n+256).toString(16).slice(1));function bo(n,i=0){return(pe[n[i+0]]+pe[n[i+1]]+pe[n[i+2]]+pe[n[i+3]]+"-"+pe[n[i+4]]+pe[n[i+5]]+"-"+pe[n[i+6]]+pe[n[i+7]]+"-"+pe[n[i+8]]+pe[n[i+9]]+"-"+pe[n[i+10]]+pe[n[i+11]]+pe[n[i+12]]+pe[n[i+13]]+pe[n[i+14]]+pe[n[i+15]]).toLowerCase()}const So=new Uint8Array(16);function Bo(){return crypto.getRandomValues(So)}function xo(n,i,r){return crypto.randomUUID?crypto.randomUUID():To(n)}function To(n,i,r){var d;n=n||{};const a=n.random??((d=n.rng)==null?void 0:d.call(n))??Bo();if(a.length<16)throw new Error("Random bytes length must be >= 16");return a[6]=a[6]&15|64,a[8]=a[8]&63|128,bo(a)}const wo=["aria-labelledby"],Ao={class:"form-section-wrapper"},Eo={key:1,class:"form-section-description"},No={key:2,class:"form-section-footer"},_o={class:"form-section-content"},$o=e.defineComponent({__name:"EntityFormSection",props:{title:{type:String,default:""},description:{type:String,default:""},hasDivider:{type:Boolean,default:!1},stickyInfoHeader:{type:Boolean,default:!0},hideInfoHeader:{type:Boolean,default:!1},titleTag:{type:String,default:"h2"}},setup(n){const i=e.useSlots(),r=xo();return(a,d)=>(e.openBlock(),e.createElementBlock("div",{"aria-labelledby":n.title?e.unref(r):void 0,class:e.normalizeClass(["kong-ui-entity-form-section",{"has-divider":n.hasDivider}]),role:"group"},[e.createElementVNode("div",Ao,[n.hideInfoHeader?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["form-section-info",{sticky:n.stickyInfoHeader}])},[n.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.titleTag),{key:0,id:e.unref(r),class:"form-section-title"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.title),1)]),_:1},8,["id"])):e.createCommentVNode("",!0),n.description||e.unref(i).description?(e.openBlock(),e.createElementBlock("div",Eo,[e.renderSlot(a.$slots,"description",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),e.unref(i).footer?(e.openBlock(),e.createElementBlock("div",No,[e.renderSlot(a.$slots,"footer",{},void 0,!0)])):e.createCommentVNode("",!0)],2)),e.createElementVNode("div",_o,[e.renderSlot(a.$slots,"default",{},void 0,!0)])])],10,wo))}}),Io=C._export_sfc($o,[["__scopeId","data-v-ccd29028"]]),Oo={class:"header"},Vo={key:0,class:"step","data-testid":"form-block-step"},Do={class:"header-content"},Ko={class:"header-title","data-testid":"header-title"},Ro={key:0,class:"header-description","data-testid":"header-description"},Lo={key:1,class:"header-extra","data-testid":"header-extra"},Fo={class:"content","data-testid":"form-block-content"},Mo=e.defineComponent({__name:"EntityFormBlock",props:{step:{default:()=>{}},title:{default:""},description:{default:""}},setup(n){const i=e.useSlots();return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kong-ui-entity-form-block",{stepped:n.step!==void 0||i.step}])},[e.createElementVNode("header",Oo,[n.step!==void 0||i.step?(e.openBlock(),e.createElementBlock("div",Vo,[e.renderSlot(r.$slots,"step",{},()=>[e.createTextVNode(e.toDisplayString(n.step),1)],!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Do,[e.createElementVNode("h2",Ko,[e.renderSlot(r.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)]),n.description||i.description?(e.openBlock(),e.createElementBlock("div",Ro,[e.renderSlot(r.$slots,"description",{},()=>[e.createTextVNode(e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0)]),i.extra?(e.openBlock(),e.createElementBlock("div",Lo,[e.renderSlot(r.$slots,"extra",{},void 0,!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("div",Fo,[e.renderSlot(r.$slots,"default",{},void 0,!0)])],2))}}),Po=C._export_sfc(Mo,[["__scopeId","data-v-7dd2f21d"]]),qo={class:"kong-ui-public-entity-link","data-testid":"entity-link-parent"},jo={key:0,class:"deleted-entity"},Uo={key:1},zo=["onClick"],Ho=e.defineComponent({__name:"EntityLink",props:{entityLinkData:{type:Object,required:!0},externalLink:{type:String,required:!1,default:""},newWindow:{type:Boolean,required:!1,default:!1},allowCopy:{type:Boolean,required:!1,default:!1}},setup(n){const i=n,r=e.ref(),{isTruncated:a}=C.composables.useTruncationDetector(r),{i18n:{t:d}}=C.composables.useI18n(),g=d("global.actions.copyId"),l=e.ref(g),u=e.computed(()=>i.entityLinkData.deleted??!1),p=e.computed(()=>{var c;return(c=i.entityLinkData.id)!=null&&c.toString().includes(":")?i.entityLinkData.id.toString().split(":")[1]:i.entityLinkData.id}),f=e.computed(()=>{var c;return`${(c=p.value)==null?void 0:c.toString().slice(0,5)} (deleted)`}),h=async c=>{await c(p.value||"")&&(l.value=d("global.actions.copyToClipboard"),setTimeout(()=>{l.value=g},1800))};return(c,s)=>{const k=e.resolveComponent("KTooltip"),R=e.resolveComponent("KExternalLink"),T=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",qo,[u.value?(e.openBlock(),e.createElementBlock("div",jo,e.toDisplayString(f.value),1)):p.value?p.value?(e.openBlock(),e.createBlock(R,{key:2,class:"entity-link","hide-icon":!n.newWindow,href:n.externalLink,target:n.newWindow?"_blank":"_self"},{default:e.withCtx(()=>[e.createVNode(k,{text:e.unref(a)&&n.entityLinkData.label||""},{default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"textContent",ref:r,class:"entity-link-label"},e.toDisplayString(n.entityLinkData.label),513)]),_:1},8,["text"])]),_:1},8,["hide-icon","href","target"])):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Uo,e.toDisplayString(" – "))),p.value&&n.allowCopy?(e.openBlock(),e.createBlock(k,{key:l.value,class:"copy-uuid-tooltip","max-width":"160",placement:"bottom-end",text:l.value},{default:e.withCtx(()=>[e.createVNode(T,null,{default:e.withCtx(({copyToClipboard:I})=>[e.createElementVNode("span",{class:"entity-link-copy-id",onClick:e.withModifiers(F=>h(I),["stop"])},[e.createVNode(e.unref(de.CopyIcon),{class:"copy-icon",color:`var(--kui-color-text-primary, ${e.unref(Wt)})`,"data-testid":"copy-id",size:`var(--kui-icon-size-30, ${e.unref(Qt)})`},null,8,["color","size"])],8,zo)]),_:1})]),_:1},8,["text"])):e.createCommentVNode("",!0)])}}}),Yo=C._export_sfc(Ho,[["__scopeId","data-v-6668aea9"]]),Go={class:"kong-ui-public-entity-empty-state"},Wo={class:"entity-empty-state-content"},Jo={key:0,class:"empty-state-image"},Qo={key:1,class:"entity-empty-state-title"},Xo={key:2,class:"entity-empty-state-description"},Zo={key:3,class:"entity-empty-state-pricing"},er={key:0,class:"entity-empty-state-message"},tr={key:1,class:"entity-empty-state-action"},nr={key:2,class:"entity-empty-state-card-container"},or={key:0,class:"feature-icon"},rr={class:"card-header"},ir=["title"],lr={key:3,class:"entity-empty-state-bottom-container"},ar=e.defineComponent({__name:"EntityEmptyState",props:{appearance:{type:String,default:()=>"primary",validator:n=>Ye.includes(n)},title:{type:String,default:""},description:{type:String,default:""},pricing:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},actionButtonText:{type:String,default:""},learnMore:{type:Boolean,default:!1},features:{type:Array,default:()=>[]}},emits:["click:create","click:learn-more"],setup(n){const i=n,{i18n:{t:r}}=C.composables.useI18n(),a=e.ref(!1),d=e.computed(()=>a.value&&!!i.actionButtonText),g=e.computed(()=>Ye.includes(i.appearance)?i.appearance:["primary",i.appearance]);return e.onBeforeMount(async()=>{a.value=await i.canCreate()}),e.onMounted(()=>e.warn(`EntityEmptyState is deprecated and will be removed in future releases. Please use the KEmptyState component instead.
70
+ Docs: https://kongponents.konghq.com/components/empty-state.html.`)),(l,u)=>{const p=e.resolveComponent("KCard");return e.openBlock(),e.createElementBlock("div",Go,[e.createElementVNode("div",Wo,[l.$slots.image?(e.openBlock(),e.createElementBlock("div",Jo,[e.renderSlot(l.$slots,"image",{},void 0,!0)])):e.createCommentVNode("",!0),n.title||l.$slots.title?(e.openBlock(),e.createElementBlock("div",Qo,[e.createElementVNode("h1",{class:e.normalizeClass(g.value)},[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(n.title),1)],!0)],2)])):e.createCommentVNode("",!0),n.description||l.$slots.default?(e.openBlock(),e.createElementBlock("div",Xo,[e.renderSlot(l.$slots,"default",{},()=>[e.createElementVNode("p",null,e.toDisplayString(n.description),1)],!0)])):e.createCommentVNode("",!0),n.pricing||l.$slots.pricing?(e.openBlock(),e.createElementBlock("div",Zo,[e.createElementVNode("p",null,[e.createElementVNode("b",null,e.toDisplayString(e.unref(r)("emptyState.pricingTitle")),1),u[2]||(u[2]=e.createTextVNode()),e.renderSlot(l.$slots,"pricing",{},()=>[e.createTextVNode(e.toDisplayString(n.pricing),1)],!0)])])):e.createCommentVNode("",!0)]),l.$slots.message?(e.openBlock(),e.createElementBlock("div",er,[e.renderSlot(l.$slots,"message",{},void 0,!0)])):e.createCommentVNode("",!0),d.value||n.learnMore||l.$slots.actions?(e.openBlock(),e.createElementBlock("div",tr,[e.renderSlot(l.$slots,"actions",{},()=>[d.value?(e.openBlock(),e.createBlock(e.unref(Te.KButton),{key:0,appearance:"primary","data-testid":"entity-create-button",size:n.appearance==="secondary"?"medium":"large",onClick:u[0]||(u[0]=f=>l.$emit("click:create"))},{default:e.withCtx(()=>[e.createVNode(e.unref(de.AddIcon)),e.createTextVNode(" "+e.toDisplayString(n.actionButtonText),1)]),_:1},8,["size"])):e.createCommentVNode("",!0),n.learnMore?(e.openBlock(),e.createBlock(e.unref(Te.KButton),{key:1,appearance:"secondary","data-testid":"entity-learn-more-button",size:n.appearance==="secondary"?"medium":"large",onClick:u[1]||(u[1]=f=>l.$emit("click:learn-more"))},{default:e.withCtx(()=>[e.createVNode(e.unref(de.BookIcon),{decorative:""}),e.createTextVNode(" "+e.toDisplayString(e.unref(r)("emptyState.learnMore")),1)]),_:1},8,["size"])):e.createCommentVNode("",!0)],!0)])):e.createCommentVNode("",!0),n.features.length?(e.openBlock(),e.createElementBlock("div",nr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.features,(f,h)=>(e.openBlock(),e.createBlock(p,{key:`feature-${h}-card`,class:"entity-empty-state-card"},{title:e.withCtx(()=>[l.$slots[`feature-${h}-icon`]?(e.openBlock(),e.createElementBlock("div",or,[e.renderSlot(l.$slots,`feature-${h}-icon`,{},void 0,!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",rr,e.toDisplayString(f.title),1)]),default:e.withCtx(()=>[e.createElementVNode("div",{title:f.description},e.toDisplayString(f.description),9,ir)]),_:2},1024))),128))])):e.createCommentVNode("",!0),l.$slots.bottom?(e.openBlock(),e.createElementBlock("div",lr,[e.renderSlot(l.$slots,"bottom",{},void 0,!0)])):e.createCommentVNode("",!0)])}}}),cr=C._export_sfc(ar,[["__scopeId","data-v-0b2e9081"]]),sr={key:0,class:"sensitive-input-error-message","data-testid":"sensitive-input-error-message"},ur={class:"sensitive-input-textarea-actions"},dr={key:2,class:"sensitive-input-hint","data-testid":"sensitive-input-hint"},pr={class:"sensitive-input-hint-text"},fr="••••••••••••••",mr=e.defineComponent({__name:"SensitiveInput",props:{modelValue:{default:""},mode:{default:"create"},generator:{type:Function},showOneTimeHint:{type:Boolean,default:!1},labels:{},label:{},labelAttributes:{},placeholder:{},help:{},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},error:{type:Boolean,default:!1},errorMessage:{},multiline:{type:Boolean,default:!1}},emits:["update:modelValue","rotate","generate","generated"],setup(n,{expose:i,emit:r}){e.useCssVars(D=>({v41f8c11f:Z.value}));const a=r,{i18n:{t:d}}=C.composables.useI18n(),g=e.ref(n.mode==="edit"?"masked":"editing"),l=e.ref(!1),u=e.ref(!1),p=e.computed(()=>g.value==="masked"),f=fr,h=e.computed(()=>n.placeholder??d("sensitiveInput.placeholder")),c=e.computed(()=>{var D;return((D=n.labels)==null?void 0:D.rotateLabel)??d("sensitiveInput.rotateKey")}),s=e.computed(()=>{var D;return((D=n.labels)==null?void 0:D.generateLabel)??d("sensitiveInput.generateKey")}),k=e.computed(()=>{var D;return((D=n.labels)==null?void 0:D.hintLabel)??d("sensitiveInput.oneTimeHint")}),R=e.computed(()=>p.value||l.value?"text":"password");e.watch(()=>n.showOneTimeHint,D=>{D&&(l.value=!0)},{immediate:!0});const T=D=>{a("update:modelValue",D)},I=(D=!0)=>{g.value="editing",l.value=!1,D&&a("rotate")};i({enterEditing:()=>I(!1)});const F=()=>{l.value=!l.value},N=async()=>{if(!(!n.generator||u.value)){u.value=!0,a("generate");try{const D=await n.generator();a("update:modelValue",D),l.value=!0,a("generated",D)}finally{u.value=!1}}},w=e.useTemplateRef("rootElement");let U,z;const Z=e.ref(`calc(${nt} + ${Ne} + ${tt})`),M=()=>{var A;const D=(A=w.value)==null?void 0:A.querySelector(".after-content-wrapper");D&&(Z.value=`calc(${nt} + ${D.offsetWidth}px + ${tt})`)};return e.onMounted(()=>{var A;const D=(A=w.value)==null?void 0:A.querySelector(".after-content-wrapper");U=new ResizeObserver(()=>{z=window.requestAnimationFrame(()=>M())}),D&&U.observe(D),M()}),e.onBeforeUnmount(()=>{U==null||U.disconnect(),z!==void 0&&window.cancelAnimationFrame(z)}),(D,A)=>{const L=e.resolveComponent("KButton"),ee=e.resolveComponent("KInput"),te=e.resolveComponent("KTextArea"),Q=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",{ref_key:"rootElement",ref:w,class:"kong-ui-public-sensitive-input"},[n.multiline?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(te,{autocomplete:"off","character-limit":!1,"data-testid":"sensitive-input",disabled:n.disabled||void 0,error:n.error,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":p.value?e.unref(f):n.modelValue,placeholder:p.value?void 0:h.value,readonly:p.value||n.readonly||void 0,required:n.required||void 0,resizable:"","onUpdate:modelValue":T},null,8,["disabled","error","help","label","label-attributes","model-value","placeholder","readonly","required"]),n.error&&n.errorMessage?(e.openBlock(),e.createElementBlock("p",sr,e.toDisplayString(n.errorMessage),1)):e.createCommentVNode("",!0),e.createElementVNode("div",ur,[p.value?(e.openBlock(),e.createBlock(L,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:A[1]||(A[1]=X=>I(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):n.generator?(e.openBlock(),e.createBlock(L,{key:1,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||u.value,size:"small",onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0)])],64)):(e.openBlock(),e.createBlock(ee,{key:0,autocomplete:"off","data-testid":"sensitive-input",disabled:n.disabled,error:n.error,"error-message":n.errorMessage,help:n.help,label:n.label,"label-attributes":n.labelAttributes,"model-value":p.value?e.unref(f):n.modelValue,placeholder:p.value?void 0:h.value,readonly:p.value||n.readonly,required:n.required,type:R.value,"onUpdate:modelValue":T},{after:e.withCtx(()=>[p.value?(e.openBlock(),e.createBlock(L,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-rotate",size:"small",onClick:A[0]||(A[0]=X=>I(!0))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.value),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[n.generator?(e.openBlock(),e.createBlock(L,{key:0,appearance:"tertiary",class:"sensitive-input-action","data-testid":"sensitive-input-generate",disabled:n.disabled||u.value,size:"small",onClick:N},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value),1)]),_:1},8,["disabled"])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.value?e.unref(de.VisibilityOffIcon):e.unref(de.VisibilityIcon)),{"aria-label":l.value?e.unref(d)("sensitiveInput.hideKey"):e.unref(d)("sensitiveInput.showKey"),class:"sensitive-input-toggle",color:"currentColor","data-testid":"sensitive-input-toggle",role:"button",size:`var(--kui-icon-size-40, ${e.unref(Ne)})`,tabindex:"0",onClick:F,onKeydown:e.withKeys(e.withModifiers(F,["prevent"]),["enter","space"])},null,40,["aria-label","size","onKeydown"]))],64))]),_:1},8,["disabled","error","error-message","help","label","label-attributes","model-value","placeholder","readonly","required","type"])),n.showOneTimeHint?(e.openBlock(),e.createElementBlock("div",dr,[e.createVNode(e.unref(de.InfoIcon),{class:"sensitive-input-hint-icon",color:`var(--kui-color-text-info, ${e.unref(Yt)})`,size:`var(--kui-icon-size-40, ${e.unref(Ne)})`},null,8,["color","size"]),e.createElementVNode("span",pr,e.toDisplayString(k.value),1),e.createVNode(Q,null,{default:e.withCtx(({copyToClipboard:X})=>[e.createVNode(L,{appearance:"none",class:"sensitive-input-action sensitive-input-copy","data-testid":"sensitive-input-copy",icon:!0,onClick:V=>X(n.modelValue)},{default:e.withCtx(()=>[e.createVNode(e.unref(de.CopyIcon),{color:"currentColor",size:`var(--kui-icon-size-40, ${e.unref(Ne)})`},null,8,["size"]),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("sensitiveInput.copy")),1)]),_:1},8,["onClick"])]),_:1})])):e.createCommentVNode("",!0),e.renderSlot(D.$slots,"alert",{},void 0,!0)],512)}}}),yr=C._export_sfc(mr,[["__scopeId","data-v-ae0726c4"]]),gr={key:1},hr=e.defineComponent({__name:"TableTags",props:{tags:{type:[Array,String],default:()=>[]},tagMaxWidth:{type:String,default:void 0}},setup(n){const i=n,r=e.computed(()=>{if(Array.isArray(i.tags))return i.tags;if(typeof i.tags=="string")try{const a=JSON.parse(i.tags);return Array.isArray(a)?a:[]}catch{return[]}return[]});return(a,d)=>{var g;return((g=r.value)==null?void 0:g.length)>0?(e.openBlock(),e.createBlock(e.unref(Te.KTruncate),{key:0},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,l=>(e.openBlock(),e.createBlock(e.unref(Te.KBadge),{key:l,"max-width":n.tagMaxWidth,onClick:d[0]||(d[0]=e.withModifiers(()=>{},["stop"]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l),1)]),_:2},1032,["max-width"]))),128))]),_:1})):(e.openBlock(),e.createElementBlock("span",gr,"-"))}}}),{useAxios:vr,useDeleteUrlBuilder:kr,useBaseEntityDeckOptions:Cr,useBaseFormDeckOptions:br,useErrors:Sr,useExternalLinkCreator:Br,useFetchUrlBuilder:xr,useFetcher:Tr,useFetcherCacheKey:wr,useDebouncedFilter:Ar,useStringHelpers:Er,useHelpers:Nr,useGatewayFeatureSupported:_r,useTruncationDetector:$r,useValidators:Ir,useSchemaProvider:Or,useTableState:Vr}=C.composables;exports.CONFIG_CARD_FORMATS=C.CONFIG_CARD_FORMATS;exports.ConfigurationSchemaSection=C.ConfigurationSchemaSection;exports.ConfigurationSchemaType=C.ConfigurationSchemaType;exports.DECK_COMMAND_EDITOR_KEY=C.DECK_COMMAND_EDITOR_KEY;exports.DECK_COMMAND_EDITOR_MISSING_WARNING=C.DECK_COMMAND_EDITOR_MISSING_WARNING;exports.EventGatewayTypesArray=C.EventGatewayTypesArray;exports.FetcherStatus=C.FetcherStatus;exports.IdentityTypesArray=C.IdentityTypesArray;exports.PLUGIN_FORM_LAYOUT_STATE=C.PLUGIN_FORM_LAYOUT_STATE;exports.SupportedEntityDeckArray=C.SupportedEntityDeckArray;exports.SupportedEntityType=C.SupportedEntityType;exports.SupportedEntityTypesArray=C.SupportedEntityTypesArray;exports.isSupportedDeckEntityType=C.isSupportedDeckEntityType;exports.Appearances=Ye;exports.BASE_FORM_CONFIG_TABS=Pt;exports.ConfigCardDisplay=_t;exports.ConfigCardItem=Ge;exports.DeckCodeBlock=Ze;exports.EntityBaseConfigCard=Un;exports.EntityBaseForm=Gn;exports.EntityBaseFormType=lt;exports.EntityBaseTable=no;exports.EntityDeleteModal=lo;exports.EntityEmptyState=cr;exports.EntityFilter=vo;exports.EntityFormBlock=Po;exports.EntityFormSection=Io;exports.EntityLink=Yo;exports.EntityToggleModal=ko;exports.EntityTypes=it;exports.GeneratePatModal=Nt;exports.InternalLinkItem=ct;exports.JsonCodeBlock=We;exports.PermissionsWrapper=Co;exports.SensitiveInput=yr;exports.TableTags=hr;exports.TerraformCodeBlock=Xe;exports.YamlCodeBlock=Qe;exports.highlightCodeBlock=Se;exports.useAxios=vr;exports.useBaseEntityDeckOptions=Cr;exports.useBaseFormDeckOptions=br;exports.useDebouncedFilter=Ar;exports.useDeleteUrlBuilder=kr;exports.useErrors=Sr;exports.useExternalLinkCreator=Br;exports.useFetchUrlBuilder=xr;exports.useFetcher=Tr;exports.useFetcherCacheKey=wr;exports.useGatewayFeatureSupported=_r;exports.useHelpers=Nr;exports.useSchemaProvider=Or;exports.useStringHelpers=Er;exports.useTableState=Vr;exports.useTruncationDetector=$r;exports.useValidators=Ir;