@kong-ui-public/entities-redis-configurations 0.1.13 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- (function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x["kong-ui-public-entities-redis-configurations"]={},x.Vue,null,null,x["kong-ui-public-entities-shared"],x["kong-ui-public-entities-vaults"],x.VueRouter,x.KongIcons,x["kong-ui-public-i18n"],x["kong-ui-public-entities-plugins"]))})(this,function(x,e,xi,Ii,u,fe,Qe,Q,Xe,Ze){"use strict";var b=(t=>(t[t.HOST_PORT_CE=0]="HOST_PORT_CE",t[t.HOST_PORT_EE=1]="HOST_PORT_EE",t[t.SENTINEL=2]="SENTINEL",t[t.CLUSTER=3]="CLUSTER",t))(b||{}),U=(t=>(t.REDIS_CE="redis-ce",t.REDIS_EE="redis-ee",t))(U||{}),et=typeof global=="object"&&global&&global.Object===Object&&global,zt=typeof self=="object"&&self&&self.Object===Object&&self,F=et||zt||Function("return this")(),oe=F.Symbol,tt=Object.prototype,Wt=tt.hasOwnProperty,Gt=tt.toString,ue=oe?oe.toStringTag:void 0;function Jt(t){var n=Wt.call(t,ue),r=t[ue];try{t[ue]=void 0;var i=!0}catch{}var o=Gt.call(t);return i&&(n?t[ue]=r:delete t[ue]),o}var Yt=Object.prototype,Qt=Yt.toString;function Xt(t){return Qt.call(t)}var Zt="[object Null]",en="[object Undefined]",nt=oe?oe.toStringTag:void 0;function pe(t){return t==null?t===void 0?en:Zt:nt&&nt in Object(t)?Jt(t):Xt(t)}function me(t){return t!=null&&typeof t=="object"}var Te=Array.isArray;function rt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var tn="[object AsyncFunction]",nn="[object Function]",rn="[object GeneratorFunction]",on="[object Proxy]";function ot(t){if(!rt(t))return!1;var n=pe(t);return n==nn||n==rn||n==tn||n==on}var Pe=F["__core-js_shared__"],it=function(){var t=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function an(t){return!!it&&it in t}var ln=Function.prototype,sn=ln.toString;function X(t){if(t!=null){try{return sn.call(t)}catch{}try{return t+""}catch{}}return""}var dn=/[\\^$.*+?()[\]{}|]/g,cn=/^\[object .+?Constructor\]$/,fn=Function.prototype,un=Object.prototype,pn=fn.toString,mn=un.hasOwnProperty,gn=RegExp("^"+pn.call(mn).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _n(t){if(!rt(t)||an(t))return!1;var n=ot(t)?gn:cn;return n.test(X(t))}function yn(t,n){return t==null?void 0:t[n]}function ie(t,n){var r=yn(t,n);return _n(r)?r:void 0}var Ae=ie(F,"WeakMap"),bn=9007199254740991,hn=/^(?:0|[1-9]\d*)$/;function Cn(t,n){var r=typeof t;return n=n??bn,!!n&&(r=="number"||r!="symbol"&&hn.test(t))&&t>-1&&t%1==0&&t<n}function at(t,n){return t===n||t!==t&&n!==n}var Tn=9007199254740991;function lt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tn}function wn(t){return t!=null&&lt(t.length)&&!ot(t)}var En=Object.prototype;function kn(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||En;return t===r}function Sn(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}var Vn="[object Arguments]";function st(t){return me(t)&&pe(t)==Vn}var dt=Object.prototype,xn=dt.hasOwnProperty,In=dt.propertyIsEnumerable,Rn=st(function(){return arguments}())?st:function(t){return me(t)&&xn.call(t,"callee")&&!In.call(t,"callee")};function On(){return!1}var ct=typeof x=="object"&&x&&!x.nodeType&&x,ft=ct&&typeof module=="object"&&module&&!module.nodeType&&module,Nn=ft&&ft.exports===ct,ut=Nn?F.Buffer:void 0,Pn=ut?ut.isBuffer:void 0,$e=Pn||On,An="[object Arguments]",$n="[object Array]",Bn="[object Boolean]",Dn="[object Date]",vn="[object Error]",Ln="[object Function]",Mn="[object Map]",Un="[object Number]",jn="[object Object]",Fn="[object RegExp]",Hn="[object Set]",Kn="[object String]",qn="[object WeakMap]",zn="[object ArrayBuffer]",Wn="[object DataView]",Gn="[object Float32Array]",Jn="[object Float64Array]",Yn="[object Int8Array]",Qn="[object Int16Array]",Xn="[object Int32Array]",Zn="[object Uint8Array]",er="[object Uint8ClampedArray]",tr="[object Uint16Array]",nr="[object Uint32Array]",R={};R[Gn]=R[Jn]=R[Yn]=R[Qn]=R[Xn]=R[Zn]=R[er]=R[tr]=R[nr]=!0,R[An]=R[$n]=R[zn]=R[Bn]=R[Wn]=R[Dn]=R[vn]=R[Ln]=R[Mn]=R[Un]=R[jn]=R[Fn]=R[Hn]=R[Kn]=R[qn]=!1;function rr(t){return me(t)&&lt(t.length)&&!!R[pe(t)]}function or(t){return function(n){return t(n)}}var pt=typeof x=="object"&&x&&!x.nodeType&&x,ge=pt&&typeof module=="object"&&module&&!module.nodeType&&module,ir=ge&&ge.exports===pt,Be=ir&&et.process,mt=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||Be&&Be.binding&&Be.binding("util")}catch{}}(),gt=mt&&mt.isTypedArray,_t=gt?or(gt):rr,ar=Object.prototype,lr=ar.hasOwnProperty;function sr(t,n){var r=Te(t),i=!r&&Rn(t),o=!r&&!i&&$e(t),a=!r&&!i&&!o&&_t(t),p=r||i||o||a,g=p?Sn(t.length,String):[],s=g.length;for(var f in t)lr.call(t,f)&&!(p&&(f=="length"||o&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Cn(f,s)))&&g.push(f);return g}function dr(t,n){return function(r){return t(n(r))}}var cr=dr(Object.keys,Object),fr=Object.prototype,ur=fr.hasOwnProperty;function pr(t){if(!kn(t))return cr(t);var n=[];for(var r in Object(t))ur.call(t,r)&&r!="constructor"&&n.push(r);return n}function mr(t){return wn(t)?sr(t):pr(t)}var _e=ie(Object,"create");function gr(){this.__data__=_e?_e(null):{},this.size=0}function _r(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var yr="__lodash_hash_undefined__",br=Object.prototype,hr=br.hasOwnProperty;function Cr(t){var n=this.__data__;if(_e){var r=n[t];return r===yr?void 0:r}return hr.call(n,t)?n[t]:void 0}var Tr=Object.prototype,wr=Tr.hasOwnProperty;function Er(t){var n=this.__data__;return _e?n[t]!==void 0:wr.call(n,t)}var kr="__lodash_hash_undefined__";function Sr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_e&&n===void 0?kr:n,this}function Z(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}Z.prototype.clear=gr,Z.prototype.delete=_r,Z.prototype.get=Cr,Z.prototype.has=Er,Z.prototype.set=Sr;function Vr(){this.__data__=[],this.size=0}function we(t,n){for(var r=t.length;r--;)if(at(t[r][0],n))return r;return-1}var xr=Array.prototype,Ir=xr.splice;function Rr(t){var n=this.__data__,r=we(n,t);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Ir.call(n,r,1),--this.size,!0}function Or(t){var n=this.__data__,r=we(n,t);return r<0?void 0:n[r][1]}function Nr(t){return we(this.__data__,t)>-1}function Pr(t,n){var r=this.__data__,i=we(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function H(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}H.prototype.clear=Vr,H.prototype.delete=Rr,H.prototype.get=Or,H.prototype.has=Nr,H.prototype.set=Pr;var ye=ie(F,"Map");function Ar(){this.size=0,this.__data__={hash:new Z,map:new(ye||H),string:new Z}}function $r(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Ee(t,n){var r=t.__data__;return $r(n)?r[typeof n=="string"?"string":"hash"]:r.map}function Br(t){var n=Ee(this,t).delete(t);return this.size-=n?1:0,n}function Dr(t){return Ee(this,t).get(t)}function vr(t){return Ee(this,t).has(t)}function Lr(t,n){var r=Ee(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}function ee(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}ee.prototype.clear=Ar,ee.prototype.delete=Br,ee.prototype.get=Dr,ee.prototype.has=vr,ee.prototype.set=Lr;function Mr(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}function Ur(){this.__data__=new H,this.size=0}function jr(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Fr(t){return this.__data__.get(t)}function Hr(t){return this.__data__.has(t)}var Kr=200;function qr(t,n){var r=this.__data__;if(r instanceof H){var i=r.__data__;if(!ye||i.length<Kr-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new ee(i)}return r.set(t,n),this.size=r.size,this}function W(t){var n=this.__data__=new H(t);this.size=n.size}W.prototype.clear=Ur,W.prototype.delete=jr,W.prototype.get=Fr,W.prototype.has=Hr,W.prototype.set=qr;function zr(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var p=t[r];n(p,r,t)&&(a[o++]=p)}return a}function Wr(){return[]}var Gr=Object.prototype,Jr=Gr.propertyIsEnumerable,yt=Object.getOwnPropertySymbols,Yr=yt?function(t){return t==null?[]:(t=Object(t),zr(yt(t),function(n){return Jr.call(t,n)}))}:Wr;function Qr(t,n,r){var i=n(t);return Te(t)?i:Mr(i,r(t))}function bt(t){return Qr(t,mr,Yr)}var De=ie(F,"DataView"),ve=ie(F,"Promise"),Le=ie(F,"Set"),ht="[object Map]",Xr="[object Object]",Ct="[object Promise]",Tt="[object Set]",wt="[object WeakMap]",Et="[object DataView]",Zr=X(De),eo=X(ye),to=X(ve),no=X(Le),ro=X(Ae),G=pe;(De&&G(new De(new ArrayBuffer(1)))!=Et||ye&&G(new ye)!=ht||ve&&G(ve.resolve())!=Ct||Le&&G(new Le)!=Tt||Ae&&G(new Ae)!=wt)&&(G=function(t){var n=pe(t),r=n==Xr?t.constructor:void 0,i=r?X(r):"";if(i)switch(i){case Zr:return Et;case eo:return ht;case to:return Ct;case no:return Tt;case ro:return wt}return n});var kt=F.Uint8Array,oo="__lodash_hash_undefined__";function io(t){return this.__data__.set(t,oo),this}function ao(t){return this.__data__.has(t)}function ke(t){var n=-1,r=t==null?0:t.length;for(this.__data__=new ee;++n<r;)this.add(t[n])}ke.prototype.add=ke.prototype.push=io,ke.prototype.has=ao;function lo(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}function so(t,n){return t.has(n)}var co=1,fo=2;function St(t,n,r,i,o,a){var p=r&co,g=t.length,s=n.length;if(g!=s&&!(p&&s>g))return!1;var f=a.get(t),_=a.get(n);if(f&&_)return f==n&&_==t;var h=-1,y=!0,T=r&fo?new ke:void 0;for(a.set(t,n),a.set(n,t);++h<g;){var l=t[h],w=n[h];if(i)var k=p?i(w,l,h,n,t,a):i(l,w,h,t,n,a);if(k!==void 0){if(k)continue;y=!1;break}if(T){if(!lo(n,function(S,d){if(!so(T,d)&&(l===S||o(l,S,r,i,a)))return T.push(d)})){y=!1;break}}else if(!(l===w||o(l,w,r,i,a))){y=!1;break}}return a.delete(t),a.delete(n),y}function uo(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}function po(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}var mo=1,go=2,_o="[object Boolean]",yo="[object Date]",bo="[object Error]",ho="[object Map]",Co="[object Number]",To="[object RegExp]",wo="[object Set]",Eo="[object String]",ko="[object Symbol]",So="[object ArrayBuffer]",Vo="[object DataView]",Vt=oe?oe.prototype:void 0,Me=Vt?Vt.valueOf:void 0;function xo(t,n,r,i,o,a,p){switch(r){case Vo:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case So:return!(t.byteLength!=n.byteLength||!a(new kt(t),new kt(n)));case _o:case yo:case Co:return at(+t,+n);case bo:return t.name==n.name&&t.message==n.message;case To:case Eo:return t==n+"";case ho:var g=uo;case wo:var s=i&mo;if(g||(g=po),t.size!=n.size&&!s)return!1;var f=p.get(t);if(f)return f==n;i|=go,p.set(t,n);var _=St(g(t),g(n),i,o,a,p);return p.delete(t),_;case ko:if(Me)return Me.call(t)==Me.call(n)}return!1}var Io=1,Ro=Object.prototype,Oo=Ro.hasOwnProperty;function No(t,n,r,i,o,a){var p=r&Io,g=bt(t),s=g.length,f=bt(n),_=f.length;if(s!=_&&!p)return!1;for(var h=s;h--;){var y=g[h];if(!(p?y in n:Oo.call(n,y)))return!1}var T=a.get(t),l=a.get(n);if(T&&l)return T==n&&l==t;var w=!0;a.set(t,n),a.set(n,t);for(var k=p;++h<s;){y=g[h];var S=t[y],d=n[y];if(i)var V=p?i(d,S,y,n,t,a):i(S,d,y,t,n,a);if(!(V===void 0?S===d||o(S,d,r,i,a):V)){w=!1;break}k||(k=y=="constructor")}if(w&&!k){var $=t.constructor,N=n.constructor;$!=N&&"constructor"in t&&"constructor"in n&&!(typeof $=="function"&&$ instanceof $&&typeof N=="function"&&N instanceof N)&&(w=!1)}return a.delete(t),a.delete(n),w}var Po=1,xt="[object Arguments]",It="[object Array]",Se="[object Object]",Ao=Object.prototype,Rt=Ao.hasOwnProperty;function $o(t,n,r,i,o,a){var p=Te(t),g=Te(n),s=p?It:G(t),f=g?It:G(n);s=s==xt?Se:s,f=f==xt?Se:f;var _=s==Se,h=f==Se,y=s==f;if(y&&$e(t)){if(!$e(n))return!1;p=!0,_=!1}if(y&&!_)return a||(a=new W),p||_t(t)?St(t,n,r,i,o,a):xo(t,n,s,r,i,o,a);if(!(r&Po)){var T=_&&Rt.call(t,"__wrapped__"),l=h&&Rt.call(n,"__wrapped__");if(T||l){var w=T?t.value():t,k=l?n.value():n;return a||(a=new W),o(w,k,r,i,a)}}return y?(a||(a=new W),No(t,n,r,i,o,a)):!1}function Ot(t,n,r,i,o){return t===n?!0:t==null||n==null||!me(t)&&!me(n)?t!==t&&n!==n:$o(t,n,r,i,Ot,o)}function Bo(t,n){return Ot(t,n)}for(var B=[],Ue=0;Ue<256;++Ue)B.push((Ue+256).toString(16).slice(1));function Do(t,n=0){return(B[t[n+0]]+B[t[n+1]]+B[t[n+2]]+B[t[n+3]]+"-"+B[t[n+4]]+B[t[n+5]]+"-"+B[t[n+6]]+B[t[n+7]]+"-"+B[t[n+8]]+B[t[n+9]]+"-"+B[t[n+10]]+B[t[n+11]]+B[t[n+12]]+B[t[n+13]]+B[t[n+14]]+B[t[n+15]]).toLowerCase()}var Ve,vo=new Uint8Array(16);function Lo(){if(!Ve&&(Ve=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ve))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ve(vo)}var Mo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Nt={randomUUID:Mo};function Uo(t,n,r){if(Nt.randomUUID&&!n&&!t)return Nt.randomUUID();t=t||{};var i=t.random||(t.rng||Lo)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Do(i)}const Pt={ip:"127.0.0.1",port:6379},At={host:"127.0.0.1",port:6379},je=b.HOST_PORT_CE,$t={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3},jo=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:Pt,DEFAULT_FIELDS:$t,DEFAULT_REDIS_TYPE:je,DEFAULT_SENTINEL_NODE:At},Symbol.toStringTag,{value:"Module"})),be=t=>({...t,id:Uo()}),Fe=t=>{const{id:n,...r}=t;return r},Bt=()=>be(At),Dt=()=>be(Pt),xe=t=>{var n,r;return t.type===U.REDIS_CE?b.HOST_PORT_CE:(n=t.config.sentinel_nodes)!=null&&n.length?b.SENTINEL:(r=t.config.cluster_nodes)!=null&&r.length?b.CLUSTER:b.HOST_PORT_EE},He=t=>t===b.HOST_PORT_CE?U.REDIS_CE:U.REDIS_EE,C={int(t,n){return t==null?n:parseInt(t.toString(),10)},str(t,n){return t==null||t===""?n:t.toString()},removeIdClusterNodes(t){return t.map(n=>({...Fe(n),port:C.int(n.port)}))},removeIdFromSentinelNodes(t){return t.map(n=>({...Fe(n),port:C.int(n.port)}))},addIdToClusterNodes(t){return t.map(be)},addIdToSentinelNodes(t){return t.map(be)},removeNullValues(t){const n={...t};for(const r in n)n[r]===null&&delete n[r];return n}},Fo=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:Dt,genDefaultSentinelNode:Bt,getRedisType:xe,mapRedisTypeToPartialType:He,shallowCopyWithId:be,shallowCopyWithoutId:Fe,standardize:C},Symbol.toStringTag,{value:"Module"})),Ie="/v2/control-planes/{controlPlaneId}/core-entities",Re="/{workspace}",he={list:{konnect:`${Ie}/partials`,kongManager:`${Re}/partials`},form:{konnect:{create:`${Ie}/partials`,edit:`${Ie}/partials/{id}`},kongManager:{create:`${Re}/partials`,edit:`${Re}/partials/{id}`}},links:{konnect:`${Ie}/partials/{id}/links`,kongManager:`${Re}/partials/{id}/links`}},Ho=t=>{const{partialId:n,config:r,defaultRedisType:i=je}=t,o=!!n,{axiosInstance:a}=u.useAxios(r.axiosRequestConfig),{getMessageFromError:p}=u.useErrors(),g=e.computed(()=>n?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),s=e.reactive({fields:{name:"",type:He(i),config:JSON.parse(JSON.stringify($t))},readonly:!1,errorMessage:""}),f=e.ref(),_=e.ref(i),h=e.computed(()=>_.value===b.HOST_PORT_EE||_.value===b.CLUSTER||_.value===b.SENTINEL);e.watch(_,d=>{s.fields.type=He(d)});const y=e.computed(()=>{var V;if(o&&Bo(f.value,T.value)||!s.fields.name.length)return!1;const{config:d}=s.fields;switch(_.value){case b.HOST_PORT_CE:case b.HOST_PORT_EE:return!!d.host&&d.host.length>0&&!!d.port&&d.port>0;case b.CLUSTER:return!!d.cluster_nodes.length&&d.cluster_nodes.every($=>$.ip.length>0);case b.SENTINEL:return!!d.sentinel_nodes.length&&d.sentinel_nodes.every($=>$.host.length>0)&&!!((V=d.sentinel_master)!=null&&V.length)&&d.sentinel_role&&!!d.sentinel_role.length;default:throw new Error("Invalid redis type")}}),T=e.computed(()=>{switch(_.value){case b.HOST_PORT_CE:return{name:s.fields.name,type:s.fields.type,config:{host:s.fields.config.host,port:C.int(s.fields.config.port),timeout:C.int(s.fields.config.timeout),username:C.str(s.fields.config.username,null),database:C.int(s.fields.config.database),password:C.str(s.fields.config.password,null),ssl:s.fields.config.ssl,ssl_verify:s.fields.config.ssl_verify,server_name:C.str(s.fields.config.server_name,null)}};case b.HOST_PORT_EE:return{name:s.fields.name,type:s.fields.type,config:{connect_timeout:C.int(s.fields.config.connect_timeout),connection_is_proxied:s.fields.config.connection_is_proxied,database:C.int(s.fields.config.database),host:s.fields.config.host,keepalive_backlog:C.int(s.fields.config.keepalive_backlog),keepalive_pool_size:C.int(s.fields.config.keepalive_pool_size),password:C.str(s.fields.config.password,null),port:C.int(s.fields.config.port),read_timeout:C.int(s.fields.config.read_timeout),send_timeout:C.int(s.fields.config.send_timeout),server_name:C.str(s.fields.config.server_name,null),ssl_verify:s.fields.config.ssl_verify,ssl:s.fields.config.ssl,username:C.str(s.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case b.CLUSTER:return{name:s.fields.name,type:s.fields.type,config:{cluster_nodes:C.removeIdClusterNodes(s.fields.config.cluster_nodes),cluster_max_redirections:C.int(s.fields.config.cluster_max_redirections),username:C.str(s.fields.config.username,null),password:C.str(s.fields.config.password,null),ssl:s.fields.config.ssl,ssl_verify:s.fields.config.ssl_verify,server_name:C.str(s.fields.config.server_name,null),connect_timeout:C.int(s.fields.config.connect_timeout),database:C.int(s.fields.config.database),send_timeout:C.int(s.fields.config.send_timeout),read_timeout:C.int(s.fields.config.read_timeout),keepalive_pool_size:C.int(s.fields.config.keepalive_pool_size),keepalive_backlog:C.int(s.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case b.SENTINEL:return{name:s.fields.name,type:s.fields.type,config:{sentinel_master:C.str(s.fields.config.sentinel_master,null),sentinel_nodes:C.removeIdFromSentinelNodes(s.fields.config.sentinel_nodes),sentinel_role:C.str(s.fields.config.sentinel_role,null),sentinel_username:C.str(s.fields.config.sentinel_username,null),sentinel_password:C.str(s.fields.config.sentinel_password,null),username:C.str(s.fields.config.username,null),password:C.str(s.fields.config.password,null),ssl:s.fields.config.ssl,ssl_verify:s.fields.config.ssl_verify,server_name:C.str(s.fields.config.server_name,null),database:C.int(s.fields.config.database),connect_timeout:C.int(s.fields.config.connect_timeout),send_timeout:C.int(s.fields.config.send_timeout),read_timeout:C.int(s.fields.config.read_timeout),keepalive_pool_size:C.int(s.fields.config.keepalive_pool_size),keepalive_backlog:C.int(s.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),l=e.computed(()=>{let d=`${r.apiBaseUrl}${he.form[r.app][g.value]}`;return r.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),d=d.replace(/{id}/gi,n||""),d}),w=e.computed(()=>{var d;return(d=he.form[r==null?void 0:r.app])==null?void 0:d.edit});return{form:s,canSubmit:y,payload:T,isEdit:o,redisType:_,redisTypeIsEnterprise:h,formType:g,fetchUrl:w,submit:async()=>{try{return s.readonly=!0,s.errorMessage="",g.value===u.EntityBaseFormType.Create?await a.post(l.value,T.value):await a.patch(l.value,T.value)}catch(d){throw s.errorMessage=p(d),s.readonly=!1,d}},setInitialFormValues:d=>{s.fields.config=Object.assign({},s.fields.config,C.removeNullValues(d.config)),s.fields.config.sentinel_nodes=C.addIdToSentinelNodes(d.config.sentinel_nodes??[]),s.fields.config.cluster_nodes=C.addIdToClusterNodes(d.config.cluster_nodes??[]),s.fields.name=d.name,s.fields.type=d.type,_.value=xe(d),f.value=JSON.parse(JSON.stringify(T.value))}}},Ko={class:"array-card-container"},qo=e.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(t){return(n,r)=>{const i=e.resolveComponent("KCard"),o=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",Ko,[e.createVNode(i,{class:"card"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),e.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:t.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.TrashIcon))]),_:1},8,["disabled"])])}}}),K=(t,n)=>{const r=t.__vccOpts||t;for(const[i,o]of n)r[i]=o;return r},vt=K(qo,[["__scopeId","data-v-a2c96337"]]),zo={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",no_results:"No results found"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Wo(){const t=Xe.createI18n("en-us",zo);return{i18n:t,i18nT:Xe.i18nTComponent(t)}}const J={useI18n:Wo},Go={class:"cluster-node-items"},Jo=K(e.defineComponent({__name:"ClusterNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=J.useI18n(),i=()=>{n.value.push(Dt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),s=e.resolveComponent("KInput"),f=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,h)=>(e.openBlock(),e.createBlock(vt,{key:`${h}`,"data-testid":"redis-cluster-nodes",disabled:a.readonly,onRemoveItem:y=>o(h)},{default:e.withCtx(()=>[e.createElementVNode("div",Go,[e.createVNode(s,{modelValue:_.ip,"onUpdate:modelValue":y=>_.ip=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(s,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(f,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-7c2d61b0"]]),Yo={class:"sentinel-node-items"},Qo=K(e.defineComponent({__name:"SentinelNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=J.useI18n(),i=()=>{n.value.push(Bt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),s=e.resolveComponent("KInput"),f=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,h)=>(e.openBlock(),e.createBlock(vt,{key:_.id,"data-testid":"redis-sentinel-nodes",disabled:a.readonly,onRemoveItem:y=>o(h)},{default:e.withCtx(()=>[e.createElementVNode("div",Yo,[e.createVNode(s,{modelValue:_.host,"onUpdate:modelValue":y=>_.host=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(s,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(f,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-c7c67147"]]);var Ke=new WeakMap,Lt=0;function Xo(t){if(!t.length)return"";for(var n="arg",r=0;r<t.length;++r){var i=void 0;t[r]===null||typeof t[r]!="object"&&typeof t[r]!="function"?typeof t[r]=="string"?i='"'+t[r]+'"':i=String(t[r]):Ke.has(t[r])?i=Ke.get(t[r]):(i=Lt,Ke.set(t[r],Lt++)),n+="@"+i}return n}function Zo(t){if(typeof t=="function")try{t=t()}catch{t=""}return Array.isArray(t)?t=Xo(t):t=String(t||""),t}var qe=function(){function t(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return t.prototype.serializeKey=function(n){return Zo(n)},t.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},t.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,p=Date.now(),g={data:r,createdAt:p,expiresAt:a?p+a:1/0};this.dispatchExpire(a,g,o),this.items.set(o,g)},t.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),p=a>=r.expiresAt;p&&o.delete(i)},n)},t.prototype.delete=function(n){this.items.delete(n)},t}();function ei(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function ti(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ni=function(t){return fetch(t).then(function(n){return n.json()})};const ze={isOnline:ei,isDocumentVisible:ti,fetcher:ni};var q=function(){return q=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},q.apply(this,arguments)},ae=function(t,n,r,i){function o(a){return a instanceof r?a:new r(function(p){p(a)})}return new(r||(r=Promise))(function(a,p){function g(_){try{f(i.next(_))}catch(h){p(h)}}function s(_){try{f(i.throw(_))}catch(h){p(h)}}function f(_){_.done?a(_.value):o(_.value).then(g,s)}f((i=i.apply(t,n||[])).next())})},le=function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(f){return function(_){return s([f,_])}}function s(f){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=f[0]&2?o.return:f[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,f[1])).done)return a;switch(o=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,o=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=n.call(t,r)}catch(_){f=[6,_],o=0}finally{i=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ri=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),o,a=[],p;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(g){p={error:g}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(p)throw p.error}}return a},oi=function(t,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return t.concat(a||Array.prototype.slice.call(n))},Mt=new qe,Oe=new qe,We=new qe,Ut={cache:Mt,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:ze.fetcher,isOnline:ze.isOnline,isDocumentVisible:ze.isDocumentVisible};function ii(t,n,r){var i=Oe.get(t);if(i)i.data.push(n);else{var o=5e3;Oe.set(t,[n],r>0?r+o:r)}}function ai(t,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){t(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var jt=function(t,n,r,i){return r===void 0&&(r=Mt),i===void 0&&(i=Ut.ttl),ae(void 0,void 0,void 0,function(){var o,a,p,g,s,f,_;return le(this,function(h){switch(h.label){case 0:if(!si(n))return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,n];case 2:return o=h.sent(),[3,4];case 3:return g=h.sent(),a=g,[3,4];case 4:return[3,6];case 5:o=n,h.label=6;case 6:if(p=!1,s={data:o,error:a,isValidating:p},typeof o<"u")try{r.set(t,s,i)}catch(y){console.error("swrv(mutate): failed to set cache",y)}return f=Oe.get(t),f&&f.data.length&&(_=f.data.filter(function(y){return y.key===t}),_.forEach(function(y,T){typeof s.data<"u"&&(y.data=s.data),y.error=s.error,y.isValidating=s.isValidating;var l=T===_.length-1;l||delete _[T]}),_=_.filter(Boolean)),[2,s]}})})};function li(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=q({},Ut),p=!1,g=!1,s=e.getCurrentInstance(),f=(s==null?void 0:s.proxy)||s;if(!f)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var _=(f==null?void 0:f.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=q(q({},a),n[2]));var h=_?a.serverTTL:a.ttl,y=typeof i=="function"?i:e.ref(i);typeof o>"u"&&(o=a.fetcher);var T=null;T||(T=e.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var l=function(d,V){return ae(t,void 0,void 0,function(){var $,N,z,j,D,Y,v,te=this;return le(this,function(ne){switch(ne.label){case 0:return $=T.data===void 0,N=y.value,N?(z=a.cache.get(N),j=z&&z.data,T.isValidating=!0,j&&(T.data=j.data,T.error=j.error),D=d||o,!D||!a.isDocumentVisible()&&!$||(V==null?void 0:V.forceRevalidate)!==void 0&&!(V!=null&&V.forceRevalidate)?(T.isValidating=!1,[2]):z&&(Y=!!(Date.now()-z.createdAt>=a.dedupingInterval||V!=null&&V.forceRevalidate),!Y)?(T.isValidating=!1,[2]):(v=function(){return ae(te,void 0,void 0,function(){var L,se,re,de;return le(this,function(I){switch(I.label){case 0:return L=We.get(N),L?[3,2]:(se=Array.isArray(N)?N:[N],re=D.apply(void 0,oi([],ri(se),!1)),We.set(N,re,a.dedupingInterval),[4,jt(N,re,a.cache,h)]);case 1:return I.sent(),[3,4];case 2:return[4,jt(N,L.data,a.cache,h)];case 3:I.sent(),I.label=4;case 4:return T.isValidating=!1,We.delete(N),T.error!==void 0&&(de=!p&&a.shouldRetryOnError&&(V?V.shouldRetryOnError:!0),de&&ai(l,V?V.errorRetryCount:1,a)),[2]}})})},j&&a.revalidateDebounce?(setTimeout(function(){return ae(te,void 0,void 0,function(){return le(this,function(L){switch(L.label){case 0:return p?[3,2]:[4,v()];case 1:L.sent(),L.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,v()];case 2:ne.sent(),ne.label=3;case 3:return[2]}})})},w=function(){return ae(t,void 0,void 0,function(){return le(this,function(d){return[2,l(null,{shouldRetryOnError:!1})]})})},k=null;e.onMounted(function(){var d=function(){return ae(t,void 0,void 0,function(){return le(this,function(V){switch(V.label){case 0:return!T.error&&a.isOnline()?[4,l()]:[3,2];case 1:return V.sent(),[3,3];case 2:k&&clearTimeout(k),V.label=3;case 3:return a.refreshInterval&&!p&&(k=setTimeout(d,a.refreshInterval)),[2]}})})};a.refreshInterval&&(k=setTimeout(d,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",w,!1),window.addEventListener("focus",w,!1))}),e.onUnmounted(function(){p=!0,k&&clearTimeout(k),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",w,!1),window.removeEventListener("focus",w,!1));var d=Oe.get(y.value);d&&(d.data=d.data.filter(function(V){return V!==T}))});try{e.watch(y,function(d){e.isReadonly(y)||(y.value=d),T.key=d,T.isValidating=!!d,ii(y.value,T,h),!_&&!g&&y.value&&l(),g=!1},{immediate:!0})}catch{}var S=q(q({},e.toRefs(T)),{mutate:function(d,V){return l(d,q(q({},V),{forceRevalidate:!0}))}});return S}function si(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function Ft(t){return`redis-partial-links-${t}`}const Ce=t=>{const{axiosInstance:n}=u.useAxios(t.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:p}=r;let g=`${t.apiBaseUrl}${he.links[t.app]}`;t.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:"")),g=g.replace(/{id}/gi,i||""),p&&(g=`${g}?${p}`);const{data:s}=await n.get(g,{params:{size:o,offset:a}});return s}}},Ht=t=>{const{partialId:n,config:r}=t,{fetcher:i}=Ce(r),o=e.ref([]),{data:a}=li(Ft(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return e.watch(a,()=>{var p;o.value=((p=a.value)==null?void 0:p.data)??[]}),o},di={class:"kong-ui-entities-redis-configurations-form"},ci=K(e.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o},i18nT:a}=J.useI18n(),p=Qe.useRouter(),g=e.ref(),s=e.ref(),f=(I,m)=>{g.value=I??"",s.value=m},_=I=>{var m;(m=s.value)==null||m.call(s,I),g.value=!1},h=e.computed(()=>[{label:o("form.options.type.host_port"),group:` ${o("form.options.type.open_source")}`,value:b.HOST_PORT_CE,selected:d.value===b.HOST_PORT_CE,disabled:S&&V.value||!S&&r.disabledPartialType===U.REDIS_CE},{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:b.HOST_PORT_EE,selected:d.value===b.HOST_PORT_EE,disabled:!S&&r.disabledPartialType===U.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:b.CLUSTER,selected:d.value===b.CLUSTER,disabled:!S&&r.disabledPartialType===U.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:b.SENTINEL,selected:d.value===b.SENTINEL,disabled:!S&&r.disabledPartialType===U.REDIS_EE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],T=I=>{const m=I.value===b.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${I.label}${m}`},{form:l,canSubmit:w,payload:k,isEdit:S,redisType:d,redisTypeIsEnterprise:V,fetchUrl:$,submit:N,setInitialFormValues:z}=Ho({partialId:r.partialId,defaultRedisType:r.disabledPartialType===U.REDIS_CE?b.HOST_PORT_EE:b.HOST_PORT_CE,config:r.config}),{fetcher:j}=Ce(r.config),D=e.ref(!1),Y=e.ref(!1),v=e.ref(0),te=async()=>{try{if(S&&!Y.value){const{count:m}=await j({partialId:r.partialId});if(v.value=m,m>0){D.value=!0;return}}const{data:I}=await N();i("update",I)}catch(I){i("error",I)}},ne=()=>{D.value=!1,Y.value=!0,te()},L=()=>{r.config.cancelRoute&&p.push(r.config.cancelRoute),i("cancel")},se=I=>{i("loading",I)},re=I=>{i("error",I)},de=I=>{z(I)};return e.onBeforeMount(async()=>{if(S){const{count:I}=await j({partialId:r.partialId});v.value=I}}),(I,m)=>{const Je=e.resolveComponent("KAlert"),Ne=e.resolveComponent("KSelect"),A=e.resolveComponent("KInput"),ce=e.resolveComponent("KCheckbox"),E=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",di,[e.createVNode(e.unref(u.EntityBaseForm),{"action-teleport-target":t.actionTeleportTarget,"can-submit":e.unref(w),config:t.config,"edit-id":t.partialId,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"error-message":e.unref(l).errorMessage,"fetch-url":e.unref($),"form-fields":e.unref(k),"is-readonly":e.unref(l).readonly,"slidout-top-offset":t.slidoutTopOffset,onCancel:L,"onFetch:error":re,"onFetch:success":de,onLoading:se,onSubmit:te},{default:e.withCtx(()=>[v.value>0&&e.unref(S)?(e.openBlock(),e.createBlock(Je,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:v.value})),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-type-section",description:e.unref(o)("form.sections.type.description"),title:e.unref(o)("form.sections.type.title")},{default:e.withCtx(()=>[e.createVNode(Ne,{modelValue:e.unref(d),"onUpdate:modelValue":m[0]||(m[0]=c=>e.isRef(d)?d.value=c:null),"data-testid":"redis-type-select",disabled:e.unref(S)&&e.unref(d)===e.unref(b).HOST_PORT_CE,items:h.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:e.unref(o)("form.fields.type.label"),readonly:e.unref(l).readonly,required:""},{"selected-item-template":e.withCtx(({item:c})=>[e.createTextVNode(e.toDisplayString(T(c)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-general-section",description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.name,"onUpdate:modelValue":m[1]||(m[1]=c=>e.unref(l).fields.name=c),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:e.unref(S),label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:e.unref(l).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"])]),_:1},8,["description","title"]),e.unref(d)===e.unref(b).SENTINEL?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:1,"data-testid":"redis-sentinel-configuration-section",description:e.unref(o)("form.sections.sentinel_configuration.description"),title:e.unref(o)("form.sections.sentinel_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.config.sentinel_master,"onUpdate:modelValue":m[2]||(m[2]=c=>e.unref(l).fields.config.sentinel_master=c),"data-testid":"redis-sentinel-master-input",label:e.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Ne,{modelValue:e.unref(l).fields.config.sentinel_role,"onUpdate:modelValue":m[3]||(m[3]=c=>e.unref(l).fields.config.sentinel_role=c),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:e.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Qo,{modelValue:e.unref(l).fields.config.sentinel_nodes,"onUpdate:modelValue":m[4]||(m[4]=c=>e.unref(l).fields.config.sentinel_nodes=c),readonly:e.unref(l).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.sentinel_username,"onUpdate:modelValue":m[5]||(m[5]=c=>e.unref(l).fields.config.sentinel_username=c),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.sentinel_username=c,value:e.unref(l).fields.config.sentinel_username,onOpen:m[6]||(m[6]=(c,O)=>f(c,O))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.sentinel_password,"onUpdate:modelValue":m[7]||(m[7]=c=>e.unref(l).fields.config.sentinel_password=c),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.sentinel_password=c,value:e.unref(l).fields.config.sentinel_password,onOpen:m[8]||(m[8]=(c,O)=>f(c,O))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).CLUSTER?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:2,"data-testid":"redis-cluster-configuration-section",description:e.unref(o)("form.sections.cluster.description"),title:e.unref(o)("form.sections.cluster.title")},{default:e.withCtx(()=>[e.createVNode(Jo,{modelValue:e.unref(l).fields.config.cluster_nodes,"onUpdate:modelValue":m[9]||(m[9]=c=>e.unref(l).fields.config.cluster_nodes=c),readonly:e.unref(l).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.cluster_max_redirections,"onUpdate:modelValue":m[10]||(m[10]=c=>e.unref(l).fields.config.cluster_max_redirections=c),"data-testid":"redis-cluster-max-redirections-input",label:e.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:e.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:e.unref(o)("form.sections.connection.description"),title:e.unref(o)("form.sections.connection.title")},{default:e.withCtx(()=>[e.unref(d)===e.unref(b).HOST_PORT_CE||e.unref(d)===e.unref(b).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:0,modelValue:e.unref(l).fields.config.host,"onUpdate:modelValue":m[11]||(m[11]=c=>e.unref(l).fields.config.host=c),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:e.unref(o)("form.fields.host.label"),"label-attributes":{info:e.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).HOST_PORT_CE||e.unref(d)===e.unref(b).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:1,modelValue:e.unref(l).fields.config.port,"onUpdate:modelValue":m[12]||(m[12]=c=>e.unref(l).fields.config.port=c),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:e.unref(o)("form.fields.port.label"),"label-attributes":{info:e.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).HOST_PORT_EE?(e.openBlock(),e.createBlock(ce,{key:2,modelValue:e.unref(l).fields.config.connection_is_proxied,"onUpdate:modelValue":m[13]||(m[13]=c=>e.unref(l).fields.config.connection_is_proxied=c),"data-testid":"redis-connection-is-proxied-checkbox",disabled:e.unref(l).readonly,label:e.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:e.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).HOST_PORT_CE?(e.openBlock(),e.createBlock(A,{key:3,modelValue:e.unref(l).fields.config.timeout,"onUpdate:modelValue":m[14]||(m[14]=c=>e.unref(l).fields.config.timeout=c),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:e.unref(o)("form.fields.timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.createVNode(A,{modelValue:e.unref(l).fields.config.database,"onUpdate:modelValue":m[15]||(m[15]=c=>e.unref(l).fields.config.database=c),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:e.unref(o)("form.fields.database.label"),"label-attributes":{info:e.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.username,"onUpdate:modelValue":m[16]||(m[16]=c=>e.unref(l).fields.config.username=c),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:e.unref(o)("form.fields.username.label"),"label-attributes":{info:e.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.username=c,value:e.unref(l).fields.config.username,onOpen:m[17]||(m[17]=(c,O)=>f(c,O))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.password,"onUpdate:modelValue":m[18]||(m[18]=c=>e.unref(l).fields.config.password=c),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:e.unref(o)("form.fields.password.label"),"label-attributes":{info:e.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.password=c,value:e.unref(l).fields.config.password,onOpen:m[19]||(m[19]=(c,O)=>f(c,O))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:e.unref(o)("form.sections.tls.description"),title:e.unref(o)("form.sections.tls.title")},{default:e.withCtx(()=>[e.createVNode(ce,{modelValue:e.unref(l).fields.config.ssl,"onUpdate:modelValue":m[20]||(m[20]=c=>e.unref(l).fields.config.ssl=c),"data-testid":"redis-ssl-checkbox",description:e.unref(o)("form.fields.ssl.description"),disabled:e.unref(l).readonly,label:e.unref(o)("form.fields.ssl.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(ce,{modelValue:e.unref(l).fields.config.ssl_verify,"onUpdate:modelValue":m[21]||(m[21]=c=>e.unref(l).fields.config.ssl_verify=c),"data-testid":"redis-ssl-verify-checkbox",description:e.unref(o)("form.fields.ssl_verify.description"),disabled:e.unref(l).readonly,label:e.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.server_name,"onUpdate:modelValue":m[22]||(m[22]=c=>e.unref(l).fields.config.server_name=c),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.server_name.label"),"label-attributes":{info:e.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"]),e.unref(d)!==e.unref(b).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:3,"data-testid":"redis-keepalive-section",description:e.unref(o)("form.sections.keepalive.description"),title:e.unref(o)("form.sections.keepalive.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.config.keepalive_backlog,"onUpdate:modelValue":m[23]||(m[23]=c=>e.unref(l).fields.config.keepalive_backlog=c),"data-testid":"redis-keepalive-backlog-input",label:e.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.keepalive_pool_size,"onUpdate:modelValue":m[24]||(m[24]=c=>e.unref(l).fields.config.keepalive_pool_size=c),"data-testid":"redis-keepalive-pool-size-input",label:e.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(d)!==e.unref(b).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:4,"data-testid":"redis-read-write-configuration-section",description:e.unref(o)("form.sections.read_write_configuration.description"),title:e.unref(o)("form.sections.read_write_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.config.read_timeout,"onUpdate:modelValue":m[25]||(m[25]=c=>e.unref(l).fields.config.read_timeout=c),"data-testid":"redis-read-timeout-input",label:e.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.send_timeout,"onUpdate:modelValue":m[26]||(m[26]=c=>e.unref(l).fields.config.send_timeout=c),"data-testid":"redis-send-timeout-input",label:e.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.connect_timeout,"onUpdate:modelValue":m[27]||(m[27]=c=>e.unref(l).fields.config.connect_timeout=c),"data-testid":"redis-connect-timeout-input",label:e.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),e.createVNode(e.unref(fe.VaultSecretPicker),{config:r.config,setup:g.value,onCancel:m[28]||(m[28]=()=>g.value=!1),onProceed:_},null,8,["config","setup"]),e.createVNode(E,{"action-button-text":e.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:e.unref(o)("form.edit_warning_modal.title"),visible:D.value,onCancel:m[29]||(m[29]=c=>D.value=!1),onProceed:ne},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:v.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-50ae1abf"]]),fi="#00abd2",ui="24px",pi={class:"linked-plugins","data-testid":"linked-plugins-inline"},Ge=7,mi=K(e.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},partialId:{type:String,required:!0}},setup(t){const n=t,r=Ht({config:n.config,partialId:n.partialId});return(i,o)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).slice(0,Ge),p=>(e.openBlock(),e.createBlock(e.unref(Ze.PluginIcon),{key:p.id,name:p.name,size:24},null,8,["name"]))),128)),e.unref(r).length-Ge>0?(e.openBlock(),e.createBlock(a,{key:0,appearance:"info"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(e.unref(r).length-Ge),1)]),_:1})):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-6fbbce03"]]),gi={class:"plugin-item"},_i=K(e.defineComponent({__name:"PluginItem",props:{pluginName:{type:String,required:!0}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(e.unref(Ze.PluginIcon),{name:t.pluginName,size:24},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(t.pluginName),1)]))}}),[["__scopeId","data-v-d3c7b010"]]),yi={class:"toolbar-container"},Kt=K(e.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=J.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:p}=Ce(r.config),g=e.ref(0),s=async y=>{const{data:T,count:l}=await p({partialId:r.partialId,size:y.pageSize,offset:y.offset,query:y.query});g.value=l;const w={total:l,data:T};return i("load",w),w},f=e.ref(""),_=e.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),h=y=>{i("view-plugin",{id:y.id,plugin:y.name})};return(y,T)=>{const l=e.resolveComponent("KDropdownItem"),w=e.resolveComponent("KTableData");return e.openBlock(),e.createBlock(w,{"cache-identifier":e.unref(Ft)(t.partialId),fetcher:s,headers:a,"pagination-attributes":{totalCount:g.value,disablePageJump:!0},"search-input":f.value},e.createSlots({name:e.withCtx(({rowValue:k})=>[e.createVNode(_i,{"plugin-name":k},null,8,["plugin-name"])]),"action-items":e.withCtx(({row:k})=>[e.createVNode(l,{onClick:S=>h(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("actions.view_plugin")),1)]),_:2},1032,["onClick"])]),_:2},[t.filterBarEnabled?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(e.unref(u.EntityFilter),{modelValue:f.value,"onUpdate:modelValue":T[0]||(T[0]=k=>f.value=k),config:_.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-d6a2e2f4"]]),bi={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},hi=K(e.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(t,{emit:n}){const r=n,{i18n:{t:i}}=J.useI18n(),o=e.ref(0),a=e.computed(()=>i("linked_plugins_modal.title",{count:o.value})),p=()=>{r("cancel")},g=()=>{r("proceed")};return(s,f)=>{const _=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(_,{"action-button-text":e.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:t.visible,onCancel:p,onProceed:g},{default:e.withCtx(()=>[e.createVNode(Kt,{config:t.config,"partial-id":t.redisConfigurationId,onLoad:f[0]||(f[0]=({total:h})=>o.value=h),onViewPlugin:f[1]||(f[1]=h=>r("view-plugin",h))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),qt=e.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(t,{emit:n}){const{i18n:{t:r}}=J.useI18n(),i=n,o=()=>{i("close")};return(a,p)=>{const g=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(g,{"action-button-text":e.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:e.unref(r)("delete.title"),visible:t.visible,onCancel:o,onProceed:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),Ci={class:"kong-ui-entities-partials-list"},Ti={class:"empty-state-icon-gateway"},wi=K(e.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(t,{emit:n}){var ce;const r=n,i=t,o=e.computed(()=>{var c,O;let E=`${i.config.apiBaseUrl}${he.list[i.config.app]}`;return i.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,((c=i.config)==null?void 0:c.controlPlaneId)||""):i.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,(O=i.config)!=null&&O.workspace?`/${i.config.workspace}`:"")),E}),a=e.ref(!1),p=e.ref(""),g=e.ref(null),s=e.ref(void 0),f=e.ref(!1),_=e.ref(!1),h=e.ref(""),y=e.ref(!1),T=u.useDeleteUrlBuilder(i.config,o.value),l=e.ref(1),w=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:k,fetcherState:S}=u.useFetcher(i.config,o.value),{i18n:{t:d}}=J.useI18n(),{axiosInstance:V}=u.useAxios((ce=i.config)==null?void 0:ce.axiosRequestConfig),$=Qe.useRouter(),N=e.ref(""),z=e.computed(()=>{const E=i.config.app==="konnect"||i.config.isExactMatch;if(E)return{isExactMatch:!0,placeholder:d("search.placeholder")};const{name:c}=Y;return{isExactMatch:E,fields:{name:c},schema:i.config.filterSchema}}),{fetcher:j}=Ce(i.config),D=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${d("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:d("redis.title")}),Y={name:{label:d("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:d("list.table_headers.type")},plugins:{label:d("list.table_headers.plugins")}},v=E=>({label:d("actions.view"),to:i.config.getViewRoute(E)}),te=E=>({label:d("actions.edit"),to:i.config.getEditRoute(E)}),ne=async E=>{const{count:c}=await j({partialId:E.id});c>0?y.value=!0:(s.value=E,f.value=!0)},L=()=>{N.value=""},se=async E=>{var O;await((O=i.canRetrieve)==null?void 0:O.call(i,E))&&$.push(i.config.getViewRoute(E.id))},re=()=>{f.value=!1},de=E=>{p.value=E,a.value=!0},I=async()=>{var E,c,O;if((E=s.value)!=null&&E.id){_.value=!0;try{await V.delete(T(s.value.id)),_.value=!1,f.value=!1,m(),r("delete:success",s.value)}catch(M){h.value=((O=(c=M.response)==null?void 0:c.data)==null?void 0:O.message)||M.message||d("errors.delete"),r("error",M)}finally{_.value=!1}}},m=()=>{l.value++},Je=E=>{switch(xe(E)){case b.HOST_PORT_CE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_open_source")}`;case b.HOST_PORT_EE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_enterprise")}`;case b.SENTINEL:return`${d("form.options.type.sentinel")}${d("form.options.type.suffix_enterprise")}`;case b.CLUSTER:return`${d("form.options.type.cluster")}${d("form.options.type.suffix_enterprise")}`}},Ne=()=>{$.push(i.config.createRoute)},A=(E,c)=>{const O=E.id;if(!c(O)){r("copy:error",{entity:E,field:"id",message:d("errors.copy")});return}r("copy:success",{entity:E,field:"id",message:d("copy.success",{val:O})})};return e.watch(S,E=>{var c,O,M;if(E.status===u.FetcherStatus.Error){g.value={title:d("errors.general")},(M=(O=(c=E.error)==null?void 0:c.response)==null?void 0:O.data)!=null&&M.message&&(g.value.message=E.error.response.data.message),r("error",E.error);return}g.value=null}),e.watch(i.canCreate,async E=>{await E?D.value.ctaText=d("actions.create"):D.value.ctaText=void 0},{immediate:!0}),(E,c)=>{const O=e.resolveComponent("KButton"),M=e.resolveComponent("KDropdownItem"),Vi=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ci,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":w.value,"empty-state-options":D.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(k),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:N.value,"table-headers":Y,onClearSearchInput:L,"onClick:row":c[2]||(c[2]=P=>se(P)),onSort:m},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:N.value,"onUpdate:modelValue":c[0]||(c[0]=P=>N.value=P),config:z.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(O,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:e.withCtx(({rowValue:P})=>[e.createElementVNode("b",null,e.toDisplayString(P??"-"),1)]),type:e.withCtx(({row:P})=>[e.createTextVNode(e.toDisplayString(Je(P)),1)]),plugins:e.withCtx(({row:P})=>[e.createVNode(mi,{config:t.config,"partial-id":P.id,onClick:e.withModifiers(Ye=>de(P.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:e.withCtx(({row:P})=>[e.createVNode(Vi,null,{default:e.withCtx(({copyToClipboard:Ye})=>[e.createVNode(M,{"data-testid":"action-entity-copy-id",onClick:qi=>A(P,Ye)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(P)},{default:e.withCtx(()=>[e.createVNode(M,{"data-testid":"action-entity-view","has-divider":"",item:v(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canEdit(P)},{default:e.withCtx(()=>[e.createVNode(M,{"data-testid":"action-entity-edit",item:te(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canDelete(P)},{default:e.withCtx(()=>[e.createVNode(M,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ye=>ne(P)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(e.unref(u.EntityEmptyState),{"action-button-text":e.unref(d)("list.action"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"redis-entity-empty-state",description:e.unref(d)("list.empty_state.description"),features:[{title:e.unref(d)("list.empty_state.feature_1.title"),description:e.unref(d)("list.empty_state.feature_1.description")},{title:e.unref(d)("list.empty_state.feature_2.title"),description:e.unref(d)("list.empty_state.feature_2.description")}],"learn-more":t.config.app==="konnect",title:e.unref(d)("redis.title"),"onClick:create":Ne,"onClick:learnMore":c[1]||(c[1]=()=>r("click:learn-more"))},{image:e.withCtx(()=>[e.createElementVNode("div",Ti,[e.createVNode(e.unref(Q.DeployIcon),{color:e.unref(fi),size:e.unref(ui)},null,8,["color","size"])])]),"feature-0-icon":e.withCtx(()=>[e.createVNode(e.unref(Q.DeployIcon))]),"feature-1-icon":e.withCtx(()=>[e.createVNode(e.unref(Q.RuntimesIcon))]),_:1},8,["action-button-text","can-create","description","features","learn-more","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query"]),e.createVNode(qt,{visible:y.value,onClose:c[3]||(c[3]=P=>y.value=!1)},null,8,["visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":_.value,description:e.unref(d)("delete.description"),"entity-name":s.value&&(s.value.name||s.value.id),"entity-type":e.unref(u.EntityTypes).RedisConfiguration,error:h.value,"need-confirmation":!0,title:e.unref(d)("delete.title"),visible:f.value,onCancel:re,onProceed:I},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.createVNode(hi,{config:t.config,"redis-configuration-id":p.value,visible:a.value,onCancel:c[4]||(c[4]=P=>a.value=!1),onProceed:c[5]||(c[5]=P=>a.value=!1),onViewPlugin:c[6]||(c[6]=P=>r("click:plugin",P))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-cc7bdee7"]]),Ei={class:"kong-ui-consumer-group-entity-config-card"},ki=e.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=J.useI18n(),a=e.computed(()=>he.form[r.config.app].edit),p=e.ref(je),g=l=>{p.value=xe(l),i("fetch:success",l)},s=e.computed(()=>{const l=p.value===b.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let w="";switch(p.value){case b.HOST_PORT_CE:w=o("form.options.type.host_port");break;case b.HOST_PORT_EE:w=o("form.options.type.host_port");break;case b.CLUSTER:w=o("form.options.type.cluster");break;case b.SENTINEL:w=o("form.options.type.sentinel");break}return`${w}${l}`}),f=l=>({id:l.id,name:l.name,created_at:l.created_at,updated_at:l.updated_at,type:l.type,...l.config}),_=l=>{const{id:w,name:k,created_at:S,updated_at:d,type:V,...$}=l;return{id:w,name:k,created_at:S,updated_at:d,type:V,config:$}},h={id:{},name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},updated_at:{},created_at:{},type:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")}},y=l=>{const w={},k=Object.keys(h);for(const S of k)l.includes(S)?w[S]={...h[S],order:l.indexOf(S)+1}:w[S]={...h[S],hidden:!0};return w},T=e.computed(()=>{const l=["id","name","type","updated_at","created_at"];switch(p.value){case b.HOST_PORT_CE:return y([...l,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name"]);case b.HOST_PORT_EE:return y([...l,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case b.CLUSTER:return y([...l,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case b.SENTINEL:return y([...l,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(l,w)=>(e.openBlock(),e.createElementBlock("div",Ei,[e.createVNode(e.unref(u.EntityBaseConfigCard),{"code-block-record-formatter":_,config:t.config,"config-card-doc":t.configCardDoc,"config-schema":T.value,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"fetch-url":a.value,"hide-title":t.hideTitle,"record-resolver":f,"onFetch:error":w[0]||(w[0]=k=>l.$emit("fetch:error",k)),"onFetch:success":g,onLoading:w[1]||(w[1]=k=>l.$emit("loading",k))},{type:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(s.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),Si={useLinkedPlugins:Ht,useLinkedPluginsFetcher:Ce};x.DeleteWarningModal=qt,x.LinkedPlugins=Kt,x.PartialType=U,x.RedisConfigurationConfigCard=ki,x.RedisConfigurationForm=ci,x.RedisConfigurationList=wi,x.RedisType=b,x.composables=Si,x.constants=jo,x.helpers=Fo,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
1
+ (function(x,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@kong-ui-public/entities-shared/dist/style.css"),require("@kong-ui-public/entities-vaults/dist/style.css"),require("@kong-ui-public/entities-shared"),require("@kong-ui-public/entities-vaults"),require("vue-router"),require("@kong/icons"),require("@kong-ui-public/i18n"),require("@kong-ui-public/entities-plugins")):typeof define=="function"&&define.amd?define(["exports","vue","@kong-ui-public/entities-shared/dist/style.css","@kong-ui-public/entities-vaults/dist/style.css","@kong-ui-public/entities-shared","@kong-ui-public/entities-vaults","vue-router","@kong/icons","@kong-ui-public/i18n","@kong-ui-public/entities-plugins"],e):(x=typeof globalThis<"u"?globalThis:x||self,e(x["kong-ui-public-entities-redis-configurations"]={},x.Vue,null,null,x["kong-ui-public-entities-shared"],x["kong-ui-public-entities-vaults"],x.VueRouter,x.KongIcons,x["kong-ui-public-i18n"],x["kong-ui-public-entities-plugins"]))})(this,function(x,e,xi,Ii,u,fe,Qe,Q,Xe,Ze){"use strict";var b=(t=>(t[t.HOST_PORT_CE=0]="HOST_PORT_CE",t[t.HOST_PORT_EE=1]="HOST_PORT_EE",t[t.SENTINEL=2]="SENTINEL",t[t.CLUSTER=3]="CLUSTER",t))(b||{}),U=(t=>(t.REDIS_CE="redis-ce",t.REDIS_EE="redis-ee",t))(U||{}),et=typeof global=="object"&&global&&global.Object===Object&&global,zt=typeof self=="object"&&self&&self.Object===Object&&self,F=et||zt||Function("return this")(),oe=F.Symbol,tt=Object.prototype,Wt=tt.hasOwnProperty,Gt=tt.toString,ue=oe?oe.toStringTag:void 0;function Jt(t){var n=Wt.call(t,ue),r=t[ue];try{t[ue]=void 0;var i=!0}catch{}var o=Gt.call(t);return i&&(n?t[ue]=r:delete t[ue]),o}var Yt=Object.prototype,Qt=Yt.toString;function Xt(t){return Qt.call(t)}var Zt="[object Null]",en="[object Undefined]",nt=oe?oe.toStringTag:void 0;function pe(t){return t==null?t===void 0?en:Zt:nt&&nt in Object(t)?Jt(t):Xt(t)}function me(t){return t!=null&&typeof t=="object"}var Te=Array.isArray;function rt(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}var tn="[object AsyncFunction]",nn="[object Function]",rn="[object GeneratorFunction]",on="[object Proxy]";function ot(t){if(!rt(t))return!1;var n=pe(t);return n==nn||n==rn||n==tn||n==on}var Pe=F["__core-js_shared__"],it=function(){var t=/[^.]+$/.exec(Pe&&Pe.keys&&Pe.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function an(t){return!!it&&it in t}var ln=Function.prototype,sn=ln.toString;function X(t){if(t!=null){try{return sn.call(t)}catch{}try{return t+""}catch{}}return""}var dn=/[\\^$.*+?()[\]{}|]/g,cn=/^\[object .+?Constructor\]$/,fn=Function.prototype,un=Object.prototype,pn=fn.toString,mn=un.hasOwnProperty,gn=RegExp("^"+pn.call(mn).replace(dn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _n(t){if(!rt(t)||an(t))return!1;var n=ot(t)?gn:cn;return n.test(X(t))}function yn(t,n){return t==null?void 0:t[n]}function ie(t,n){var r=yn(t,n);return _n(r)?r:void 0}var Ae=ie(F,"WeakMap"),bn=9007199254740991,hn=/^(?:0|[1-9]\d*)$/;function Cn(t,n){var r=typeof t;return n=n??bn,!!n&&(r=="number"||r!="symbol"&&hn.test(t))&&t>-1&&t%1==0&&t<n}function at(t,n){return t===n||t!==t&&n!==n}var Tn=9007199254740991;function lt(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tn}function wn(t){return t!=null&&lt(t.length)&&!ot(t)}var En=Object.prototype;function kn(t){var n=t&&t.constructor,r=typeof n=="function"&&n.prototype||En;return t===r}function Sn(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}var Vn="[object Arguments]";function st(t){return me(t)&&pe(t)==Vn}var dt=Object.prototype,xn=dt.hasOwnProperty,In=dt.propertyIsEnumerable,Rn=st(function(){return arguments}())?st:function(t){return me(t)&&xn.call(t,"callee")&&!In.call(t,"callee")};function On(){return!1}var ct=typeof x=="object"&&x&&!x.nodeType&&x,ft=ct&&typeof module=="object"&&module&&!module.nodeType&&module,Nn=ft&&ft.exports===ct,ut=Nn?F.Buffer:void 0,Pn=ut?ut.isBuffer:void 0,$e=Pn||On,An="[object Arguments]",$n="[object Array]",Bn="[object Boolean]",Dn="[object Date]",Ln="[object Error]",Mn="[object Function]",vn="[object Map]",Un="[object Number]",jn="[object Object]",Fn="[object RegExp]",Hn="[object Set]",Kn="[object String]",qn="[object WeakMap]",zn="[object ArrayBuffer]",Wn="[object DataView]",Gn="[object Float32Array]",Jn="[object Float64Array]",Yn="[object Int8Array]",Qn="[object Int16Array]",Xn="[object Int32Array]",Zn="[object Uint8Array]",er="[object Uint8ClampedArray]",tr="[object Uint16Array]",nr="[object Uint32Array]",R={};R[Gn]=R[Jn]=R[Yn]=R[Qn]=R[Xn]=R[Zn]=R[er]=R[tr]=R[nr]=!0,R[An]=R[$n]=R[zn]=R[Bn]=R[Wn]=R[Dn]=R[Ln]=R[Mn]=R[vn]=R[Un]=R[jn]=R[Fn]=R[Hn]=R[Kn]=R[qn]=!1;function rr(t){return me(t)&&lt(t.length)&&!!R[pe(t)]}function or(t){return function(n){return t(n)}}var pt=typeof x=="object"&&x&&!x.nodeType&&x,ge=pt&&typeof module=="object"&&module&&!module.nodeType&&module,ir=ge&&ge.exports===pt,Be=ir&&et.process,mt=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||Be&&Be.binding&&Be.binding("util")}catch{}}(),gt=mt&&mt.isTypedArray,_t=gt?or(gt):rr,ar=Object.prototype,lr=ar.hasOwnProperty;function sr(t,n){var r=Te(t),i=!r&&Rn(t),o=!r&&!i&&$e(t),a=!r&&!i&&!o&&_t(t),p=r||i||o||a,g=p?Sn(t.length,String):[],s=g.length;for(var f in t)lr.call(t,f)&&!(p&&(f=="length"||o&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||Cn(f,s)))&&g.push(f);return g}function dr(t,n){return function(r){return t(n(r))}}var cr=dr(Object.keys,Object),fr=Object.prototype,ur=fr.hasOwnProperty;function pr(t){if(!kn(t))return cr(t);var n=[];for(var r in Object(t))ur.call(t,r)&&r!="constructor"&&n.push(r);return n}function mr(t){return wn(t)?sr(t):pr(t)}var _e=ie(Object,"create");function gr(){this.__data__=_e?_e(null):{},this.size=0}function _r(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}var yr="__lodash_hash_undefined__",br=Object.prototype,hr=br.hasOwnProperty;function Cr(t){var n=this.__data__;if(_e){var r=n[t];return r===yr?void 0:r}return hr.call(n,t)?n[t]:void 0}var Tr=Object.prototype,wr=Tr.hasOwnProperty;function Er(t){var n=this.__data__;return _e?n[t]!==void 0:wr.call(n,t)}var kr="__lodash_hash_undefined__";function Sr(t,n){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=_e&&n===void 0?kr:n,this}function Z(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}Z.prototype.clear=gr,Z.prototype.delete=_r,Z.prototype.get=Cr,Z.prototype.has=Er,Z.prototype.set=Sr;function Vr(){this.__data__=[],this.size=0}function we(t,n){for(var r=t.length;r--;)if(at(t[r][0],n))return r;return-1}var xr=Array.prototype,Ir=xr.splice;function Rr(t){var n=this.__data__,r=we(n,t);if(r<0)return!1;var i=n.length-1;return r==i?n.pop():Ir.call(n,r,1),--this.size,!0}function Or(t){var n=this.__data__,r=we(n,t);return r<0?void 0:n[r][1]}function Nr(t){return we(this.__data__,t)>-1}function Pr(t,n){var r=this.__data__,i=we(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}function H(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}H.prototype.clear=Vr,H.prototype.delete=Rr,H.prototype.get=Or,H.prototype.has=Nr,H.prototype.set=Pr;var ye=ie(F,"Map");function Ar(){this.size=0,this.__data__={hash:new Z,map:new(ye||H),string:new Z}}function $r(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}function Ee(t,n){var r=t.__data__;return $r(n)?r[typeof n=="string"?"string":"hash"]:r.map}function Br(t){var n=Ee(this,t).delete(t);return this.size-=n?1:0,n}function Dr(t){return Ee(this,t).get(t)}function Lr(t){return Ee(this,t).has(t)}function Mr(t,n){var r=Ee(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}function ee(t){var n=-1,r=t==null?0:t.length;for(this.clear();++n<r;){var i=t[n];this.set(i[0],i[1])}}ee.prototype.clear=Ar,ee.prototype.delete=Br,ee.prototype.get=Dr,ee.prototype.has=Lr,ee.prototype.set=Mr;function vr(t,n){for(var r=-1,i=n.length,o=t.length;++r<i;)t[o+r]=n[r];return t}function Ur(){this.__data__=new H,this.size=0}function jr(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}function Fr(t){return this.__data__.get(t)}function Hr(t){return this.__data__.has(t)}var Kr=200;function qr(t,n){var r=this.__data__;if(r instanceof H){var i=r.__data__;if(!ye||i.length<Kr-1)return i.push([t,n]),this.size=++r.size,this;r=this.__data__=new ee(i)}return r.set(t,n),this.size=r.size,this}function W(t){var n=this.__data__=new H(t);this.size=n.size}W.prototype.clear=Ur,W.prototype.delete=jr,W.prototype.get=Fr,W.prototype.has=Hr,W.prototype.set=qr;function zr(t,n){for(var r=-1,i=t==null?0:t.length,o=0,a=[];++r<i;){var p=t[r];n(p,r,t)&&(a[o++]=p)}return a}function Wr(){return[]}var Gr=Object.prototype,Jr=Gr.propertyIsEnumerable,yt=Object.getOwnPropertySymbols,Yr=yt?function(t){return t==null?[]:(t=Object(t),zr(yt(t),function(n){return Jr.call(t,n)}))}:Wr;function Qr(t,n,r){var i=n(t);return Te(t)?i:vr(i,r(t))}function bt(t){return Qr(t,mr,Yr)}var De=ie(F,"DataView"),Le=ie(F,"Promise"),Me=ie(F,"Set"),ht="[object Map]",Xr="[object Object]",Ct="[object Promise]",Tt="[object Set]",wt="[object WeakMap]",Et="[object DataView]",Zr=X(De),eo=X(ye),to=X(Le),no=X(Me),ro=X(Ae),G=pe;(De&&G(new De(new ArrayBuffer(1)))!=Et||ye&&G(new ye)!=ht||Le&&G(Le.resolve())!=Ct||Me&&G(new Me)!=Tt||Ae&&G(new Ae)!=wt)&&(G=function(t){var n=pe(t),r=n==Xr?t.constructor:void 0,i=r?X(r):"";if(i)switch(i){case Zr:return Et;case eo:return ht;case to:return Ct;case no:return Tt;case ro:return wt}return n});var kt=F.Uint8Array,oo="__lodash_hash_undefined__";function io(t){return this.__data__.set(t,oo),this}function ao(t){return this.__data__.has(t)}function ke(t){var n=-1,r=t==null?0:t.length;for(this.__data__=new ee;++n<r;)this.add(t[n])}ke.prototype.add=ke.prototype.push=io,ke.prototype.has=ao;function lo(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}function so(t,n){return t.has(n)}var co=1,fo=2;function St(t,n,r,i,o,a){var p=r&co,g=t.length,s=n.length;if(g!=s&&!(p&&s>g))return!1;var f=a.get(t),_=a.get(n);if(f&&_)return f==n&&_==t;var C=-1,y=!0,T=r&fo?new ke:void 0;for(a.set(t,n),a.set(n,t);++C<g;){var l=t[C],w=n[C];if(i)var k=p?i(w,l,C,n,t,a):i(l,w,C,t,n,a);if(k!==void 0){if(k)continue;y=!1;break}if(T){if(!lo(n,function(S,d){if(!so(T,d)&&(l===S||o(l,S,r,i,a)))return T.push(d)})){y=!1;break}}else if(!(l===w||o(l,w,r,i,a))){y=!1;break}}return a.delete(t),a.delete(n),y}function uo(t){var n=-1,r=Array(t.size);return t.forEach(function(i,o){r[++n]=[o,i]}),r}function po(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}var mo=1,go=2,_o="[object Boolean]",yo="[object Date]",bo="[object Error]",ho="[object Map]",Co="[object Number]",To="[object RegExp]",wo="[object Set]",Eo="[object String]",ko="[object Symbol]",So="[object ArrayBuffer]",Vo="[object DataView]",Vt=oe?oe.prototype:void 0,ve=Vt?Vt.valueOf:void 0;function xo(t,n,r,i,o,a,p){switch(r){case Vo:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case So:return!(t.byteLength!=n.byteLength||!a(new kt(t),new kt(n)));case _o:case yo:case Co:return at(+t,+n);case bo:return t.name==n.name&&t.message==n.message;case To:case Eo:return t==n+"";case ho:var g=uo;case wo:var s=i&mo;if(g||(g=po),t.size!=n.size&&!s)return!1;var f=p.get(t);if(f)return f==n;i|=go,p.set(t,n);var _=St(g(t),g(n),i,o,a,p);return p.delete(t),_;case ko:if(ve)return ve.call(t)==ve.call(n)}return!1}var Io=1,Ro=Object.prototype,Oo=Ro.hasOwnProperty;function No(t,n,r,i,o,a){var p=r&Io,g=bt(t),s=g.length,f=bt(n),_=f.length;if(s!=_&&!p)return!1;for(var C=s;C--;){var y=g[C];if(!(p?y in n:Oo.call(n,y)))return!1}var T=a.get(t),l=a.get(n);if(T&&l)return T==n&&l==t;var w=!0;a.set(t,n),a.set(n,t);for(var k=p;++C<s;){y=g[C];var S=t[y],d=n[y];if(i)var V=p?i(d,S,y,n,t,a):i(S,d,y,t,n,a);if(!(V===void 0?S===d||o(S,d,r,i,a):V)){w=!1;break}k||(k=y=="constructor")}if(w&&!k){var $=t.constructor,O=n.constructor;$!=O&&"constructor"in t&&"constructor"in n&&!(typeof $=="function"&&$ instanceof $&&typeof O=="function"&&O instanceof O)&&(w=!1)}return a.delete(t),a.delete(n),w}var Po=1,xt="[object Arguments]",It="[object Array]",Se="[object Object]",Ao=Object.prototype,Rt=Ao.hasOwnProperty;function $o(t,n,r,i,o,a){var p=Te(t),g=Te(n),s=p?It:G(t),f=g?It:G(n);s=s==xt?Se:s,f=f==xt?Se:f;var _=s==Se,C=f==Se,y=s==f;if(y&&$e(t)){if(!$e(n))return!1;p=!0,_=!1}if(y&&!_)return a||(a=new W),p||_t(t)?St(t,n,r,i,o,a):xo(t,n,s,r,i,o,a);if(!(r&Po)){var T=_&&Rt.call(t,"__wrapped__"),l=C&&Rt.call(n,"__wrapped__");if(T||l){var w=T?t.value():t,k=l?n.value():n;return a||(a=new W),o(w,k,r,i,a)}}return y?(a||(a=new W),No(t,n,r,i,o,a)):!1}function Ot(t,n,r,i,o){return t===n?!0:t==null||n==null||!me(t)&&!me(n)?t!==t&&n!==n:$o(t,n,r,i,Ot,o)}function Bo(t,n){return Ot(t,n)}for(var B=[],Ue=0;Ue<256;++Ue)B.push((Ue+256).toString(16).slice(1));function Do(t,n=0){return(B[t[n+0]]+B[t[n+1]]+B[t[n+2]]+B[t[n+3]]+"-"+B[t[n+4]]+B[t[n+5]]+"-"+B[t[n+6]]+B[t[n+7]]+"-"+B[t[n+8]]+B[t[n+9]]+"-"+B[t[n+10]]+B[t[n+11]]+B[t[n+12]]+B[t[n+13]]+B[t[n+14]]+B[t[n+15]]).toLowerCase()}var Ve,Lo=new Uint8Array(16);function Mo(){if(!Ve&&(Ve=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ve))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ve(Lo)}var vo=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const Nt={randomUUID:vo};function Uo(t,n,r){if(Nt.randomUUID&&!n&&!t)return Nt.randomUUID();t=t||{};var i=t.random||(t.rng||Mo)();return i[6]=i[6]&15|64,i[8]=i[8]&63|128,Do(i)}const Pt={ip:"127.0.0.1",port:6379},At={host:"127.0.0.1",port:6379},je=b.HOST_PORT_CE,$t={port:6379,host:"127.0.0.1",database:0,username:"",password:"",ssl:!1,ssl_verify:!1,server_name:"",connect_timeout:2e3,send_timeout:2e3,read_timeout:2e3,sentinel_username:"",sentinel_password:"",keepalive_pool_size:256,keepalive_backlog:0,sentinel_master:"",sentinel_nodes:[],cluster_nodes:[],cluster_max_redirections:0,connection_is_proxied:!1,timeout:2e3},jo=Object.freeze(Object.defineProperty({__proto__:null,DEFAULT_CLUSTER_NODE:Pt,DEFAULT_FIELDS:$t,DEFAULT_REDIS_TYPE:je,DEFAULT_SENTINEL_NODE:At},Symbol.toStringTag,{value:"Module"})),be=t=>({...t,id:Uo()}),Fe=t=>{const{id:n,...r}=t;return r},Bt=()=>be(At),Dt=()=>be(Pt),xe=t=>{var n,r;return t.type===U.REDIS_CE?b.HOST_PORT_CE:(n=t.config.sentinel_nodes)!=null&&n.length?b.SENTINEL:(r=t.config.cluster_nodes)!=null&&r.length?b.CLUSTER:b.HOST_PORT_EE},He=t=>t===b.HOST_PORT_CE?U.REDIS_CE:U.REDIS_EE,h={int(t,n){return t==null?n:parseInt(t.toString(),10)},str(t,n){return t==null||t===""?n:t.toString()},removeIdClusterNodes(t){return t.map(n=>({...Fe(n),port:h.int(n.port)}))},removeIdFromSentinelNodes(t){return t.map(n=>({...Fe(n),port:h.int(n.port)}))},addIdToClusterNodes(t){return t.map(be)},addIdToSentinelNodes(t){return t.map(be)},removeNullValues(t){const n={...t};for(const r in n)n[r]===null&&delete n[r];return n},stringToArray(t,n=","){return t?t.split(n).map(r=>String(r||"").trim()).filter(r=>r!==""):[]},arrayToString(t,n=", "){return t?t.join(n):""}},Fo=Object.freeze(Object.defineProperty({__proto__:null,genDefaultClusterNode:Dt,genDefaultSentinelNode:Bt,getRedisType:xe,mapRedisTypeToPartialType:He,shallowCopyWithId:be,shallowCopyWithoutId:Fe,standardize:h},Symbol.toStringTag,{value:"Module"})),Ie="/v2/control-planes/{controlPlaneId}/core-entities",Re="/{workspace}",he={list:{konnect:`${Ie}/partials`,kongManager:`${Re}/partials`},form:{konnect:{create:`${Ie}/partials`,edit:`${Ie}/partials/{id}`},kongManager:{create:`${Re}/partials`,edit:`${Re}/partials/{id}`}},links:{konnect:`${Ie}/partials/{id}/links`,kongManager:`${Re}/partials/{id}/links`}},Ho=t=>{const{partialId:n,config:r,defaultRedisType:i=je}=t,o=!!n,{axiosInstance:a}=u.useAxios(r.axiosRequestConfig),{getMessageFromError:p}=u.useErrors(),g=e.computed(()=>n?u.EntityBaseFormType.Edit:u.EntityBaseFormType.Create),s=e.reactive({fields:{name:"",tags:"",type:He(i),config:JSON.parse(JSON.stringify($t))},readonly:!1,errorMessage:""}),f=e.ref(),_=e.ref(i),C=e.computed(()=>_.value===b.HOST_PORT_EE||_.value===b.CLUSTER||_.value===b.SENTINEL);e.watch(_,d=>{s.fields.type=He(d)});const y=e.computed(()=>{var V;if(o&&Bo(f.value,T.value)||!s.fields.name.length)return!1;const{config:d}=s.fields;switch(_.value){case b.HOST_PORT_CE:case b.HOST_PORT_EE:return!!d.host&&d.host.length>0&&!!d.port&&d.port>0;case b.CLUSTER:return!!d.cluster_nodes.length&&d.cluster_nodes.every($=>$.ip.length>0);case b.SENTINEL:return!!d.sentinel_nodes.length&&d.sentinel_nodes.every($=>$.host.length>0)&&!!((V=d.sentinel_master)!=null&&V.length)&&d.sentinel_role&&!!d.sentinel_role.length;default:throw new Error("Invalid redis type")}}),T=e.computed(()=>{switch(_.value){case b.HOST_PORT_CE:return{name:s.fields.name,type:s.fields.type,tags:h.stringToArray(s.fields.tags),config:{host:s.fields.config.host,port:h.int(s.fields.config.port),timeout:h.int(s.fields.config.timeout),username:h.str(s.fields.config.username,null),database:h.int(s.fields.config.database),password:h.str(s.fields.config.password,null),ssl:s.fields.config.ssl,ssl_verify:s.fields.config.ssl_verify,server_name:h.str(s.fields.config.server_name,null)}};case b.HOST_PORT_EE:return{name:s.fields.name,type:s.fields.type,tags:h.stringToArray(s.fields.tags),config:{connect_timeout:h.int(s.fields.config.connect_timeout),connection_is_proxied:s.fields.config.connection_is_proxied,database:h.int(s.fields.config.database),host:s.fields.config.host,keepalive_backlog:h.int(s.fields.config.keepalive_backlog),keepalive_pool_size:h.int(s.fields.config.keepalive_pool_size),password:h.str(s.fields.config.password,null),port:h.int(s.fields.config.port),read_timeout:h.int(s.fields.config.read_timeout),send_timeout:h.int(s.fields.config.send_timeout),server_name:h.str(s.fields.config.server_name,null),ssl_verify:s.fields.config.ssl_verify,ssl:s.fields.config.ssl,username:h.str(s.fields.config.username,null),cluster_nodes:null,cluster_max_redirections:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null}};case b.CLUSTER:return{name:s.fields.name,type:s.fields.type,tags:h.stringToArray(s.fields.tags),config:{cluster_nodes:h.removeIdClusterNodes(s.fields.config.cluster_nodes),cluster_max_redirections:h.int(s.fields.config.cluster_max_redirections),username:h.str(s.fields.config.username,null),password:h.str(s.fields.config.password,null),ssl:s.fields.config.ssl,ssl_verify:s.fields.config.ssl_verify,server_name:h.str(s.fields.config.server_name,null),connect_timeout:h.int(s.fields.config.connect_timeout),database:h.int(s.fields.config.database),send_timeout:h.int(s.fields.config.send_timeout),read_timeout:h.int(s.fields.config.read_timeout),keepalive_pool_size:h.int(s.fields.config.keepalive_pool_size),keepalive_backlog:h.int(s.fields.config.keepalive_backlog),connection_is_proxied:null,sentinel_master:null,sentinel_role:null,sentinel_nodes:null,sentinel_username:null,sentinel_password:null,host:null,port:null}};case b.SENTINEL:return{name:s.fields.name,type:s.fields.type,tags:h.stringToArray(s.fields.tags),config:{sentinel_master:h.str(s.fields.config.sentinel_master,null),sentinel_nodes:h.removeIdFromSentinelNodes(s.fields.config.sentinel_nodes),sentinel_role:h.str(s.fields.config.sentinel_role,null),sentinel_username:h.str(s.fields.config.sentinel_username,null),sentinel_password:h.str(s.fields.config.sentinel_password,null),username:h.str(s.fields.config.username,null),password:h.str(s.fields.config.password,null),ssl:s.fields.config.ssl,ssl_verify:s.fields.config.ssl_verify,server_name:h.str(s.fields.config.server_name,null),database:h.int(s.fields.config.database),connect_timeout:h.int(s.fields.config.connect_timeout),send_timeout:h.int(s.fields.config.send_timeout),read_timeout:h.int(s.fields.config.read_timeout),keepalive_pool_size:h.int(s.fields.config.keepalive_pool_size),keepalive_backlog:h.int(s.fields.config.keepalive_backlog),connection_is_proxied:null,cluster_nodes:null,cluster_max_redirections:null,host:null,port:null}};default:throw new Error("Invalid redis type")}}),l=e.computed(()=>{let d=`${r.apiBaseUrl}${he.form[r.app][g.value]}`;return r.app==="konnect"?d=d.replace(/{controlPlaneId}/gi,(r==null?void 0:r.controlPlaneId)||""):r.app==="kongManager"&&(d=d.replace(/\/{workspace}/gi,r!=null&&r.workspace?`/${r.workspace}`:"")),d=d.replace(/{id}/gi,n||""),d}),w=e.computed(()=>{var d;return(d=he.form[r==null?void 0:r.app])==null?void 0:d.edit});return{form:s,canSubmit:y,payload:T,isEdit:o,redisType:_,redisTypeIsEnterprise:C,formType:g,fetchUrl:w,submit:async()=>{try{return s.readonly=!0,s.errorMessage="",g.value===u.EntityBaseFormType.Create?await a.post(l.value,T.value):await a.patch(l.value,T.value)}catch(d){throw s.errorMessage=p(d),s.readonly=!1,d}},setInitialFormValues:d=>{s.fields.config=Object.assign({},s.fields.config,h.removeNullValues(d.config)),s.fields.config.sentinel_nodes=h.addIdToSentinelNodes(d.config.sentinel_nodes??[]),s.fields.config.cluster_nodes=h.addIdToClusterNodes(d.config.cluster_nodes??[]),s.fields.name=d.name,s.fields.type=d.type,s.fields.tags=h.arrayToString(d.tags),_.value=xe(d),f.value=JSON.parse(JSON.stringify(T.value))}}},Ko={class:"array-card-container"},qo=e.defineComponent({__name:"FieldArrayCardContainer",props:{model:{type:Object,default:()=>null},schema:{type:Object,default:()=>null},index:{type:Number,default:void 0},disabled:{type:Boolean,default:!1}},emits:["remove-item"],setup(t){return(n,r)=>{const i=e.resolveComponent("KCard"),o=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",Ko,[e.createVNode(i,{class:"card"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default",{},void 0,!0)]),_:3}),e.createVNode(o,{appearance:"tertiary",class:"array-card-remove-button",disabled:t.disabled,onClick:r[0]||(r[0]=a=>n.$emit("remove-item"))},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.TrashIcon))]),_:1},8,["disabled"])])}}}),K=(t,n)=>{const r=t.__vccOpts||t;for(const[i,o]of n)r[i]=o;return r},Lt=K(qo,[["__scopeId","data-v-a2c96337"]]),zo={actions:{create:"New Redis Configuration",copy_id:"Copy ID",copy_json:"Copy JSON",edit:"Edit",delete:"Delete",done:"Done",view:"View Details",loading:"Loading...",view_plugin:"View Plugin",close:"Close"},search:{placeholder:"Filter by name",no_results:"No results found"},delete:{title:"Delete Redis configuration",description:"You’re about to delete this item. Are you sure you want to proceed?",warning:"To delete this configuration, first remove it from all associated plugins."},errors:{copy:"Failed to copy to clipboard",general:"Redis configuration could not be retrieved",delete:"The redis configuration could not be deleted at this time."},copy:{success:"Copied {val} to clipboard"},form:{sections:{type:{title:"Redis type",description:"Both Enterprise and Open Source plugins support Redis. Enterprise plugins can connect to a standalone Redis instance (host/port), Cluster, or Sentinel, while Open Source plugins support only a simplified host/port configuration."},general:{title:"General information",description:"Name your Redis configuration."},connection:{title:"Connection settings",description:"Define the Redis server’s host, port, authentication, and timeout options for establishing a connection."},cluster:{title:"Cluster configuration",description:"Enables data sharding and distribution across multiple Redis nodes, allowing for scalability and load balancing."},tls:{title:"TLS settings",description:"Configure secure connections to Redis, including SSL and verification options."},keepalive:{title:"Keepalive configuration",description:"Keepalive reuses active connections to Redis, improving performance and efficiency."},read_write_configuration:{title:"Read/Write configuration",description:"Set timeouts for reading from and writing to the Redis server to control data transmission reliability."},sentinel_configuration:{title:"Sentinel configuration",description:"Manages Redis failover and high availability by connecting to Sentinel nodes that monitor and switch masters."}},fields:{type:{label:"Redis type"},name:{label:"Name",placeholder:"Enter unique name"},tags:{label:"Tags",placeholder:"Enter a list of tags separated by comma",help:"e.g. tag1, tag2, tag3",tooltip:"An optional set of strings associated with the Route for grouping and filtering."},host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},database:{label:"Database",tooltip:"Database to use for the Redis connection."},password:{label:"Password",tooltip:"Password to use for Redis connections. If undefined, no AUTH commands are sent to Redis."},username:{label:"Username",tooltip:"Username to use for Redis connections. If undefined, ACL authentication won't be performed. This requires Redis v6.0.0+. To be compatible with Redis v5.x.y, you can set it to `default`."},ssl:{label:"SSL",description:"If set to true, uses SSL to connect to Redis.",tooltip:"If set to true, uses SSL to connect to Redis."},ssl_verify:{label:"SSL Verify",description:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong. conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ss1_verify_depth accordingly.",tooltip:"If set to true, verifies the validity of the server SSL certificate. If setting this parameter, also configure lua_ssl_trusted_certificate in kong.conf to specify the CA (or server) certificate used by your Redis server. You may also need to configure lua_ssl_verify_depth accordingly."},server_name:{label:"Server name",tooltip:"A string representing an SNI (server name indication) value for TLS."},keepalive_backlog:{label:"Keepalive backlog",tooltip:"Limits the total number of opened connections for a pool. If the connection pool is full, connection queues above the limit go into the backlog queue. If the backlog queue is full, subsequent connect operations fail and return `nil`. Queued operations (subject to set timeouts) resume once the number of connections in the pool is less than `keepalive_pool_size`. If latency is high or throughput is low, try increasing this value. Empirically, this value is larger than `keepalive_pool_size`."},keepalive_pool_size:{label:"Keepalive pool size",tooltip:"The size limit for every cosocket connection pool associated with every remote server, per worker process. If neither `keepalive_pool_size` nor `keepalive_backlog` is specified, no pool is created. If `keepalive_pool_size` isn't specified but `keepalive_backlog` is specified, then the pool uses the default value. Try to increase (e.g. 512) this value if latency is high or throughput is low."},read_timeout:{label:"Read timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},send_timeout:{label:"Send timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},connect_timeout:{label:"Connect timeout",tooltip:"An integer representing a timeout in milliseconds. Must be between 0 and 2^31-2."},sentinel_master:{label:"Sentinel master",tooltip:"Sentinel master to use for Redis connections. Defining this value implies using Redis Sentinel."},sentinel_role:{label:"Sentinel role",tooltip:"Sentinel role to use for Redis connections when the `redis` strategy is defined. Defining this value implies using Redis Sentinel."},sentinel_username:{label:"Sentinel username",tooltip:"Sentinel username to authenticate with a Redis Sentinel instance. If undefined, ACL authentication won't be performed. This requires Redis v6.2.0+."},sentinel_password:{label:"Sentinel password",tooltip:"Sentinel password to authenticate with a Redis Sentinel instance. If undefined, no AUTH commands are sent to Redis Sentinels."},cluster_node_ip:{label:"IP",tooltip:"A string representing a host name, such as example.com."},cluster_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."},cluster_max_redirections:{label:"Cluster max redirections",tooltip:"Maximum retry attempts for redirection."},timeout:{label:"Timeout",tooltip:"redis schema field `timeout` is deprecated, use `connect_timeout`, `send_timeout` and `read_timeout`"},connection_is_proxied:{label:"Connection is proxied",tooltip:"If the connection to Redis is proxied (e.g. Envoy), set it `true`. Set the `host` and `port` to point to the proxy address."},cluster_nodes:{title:"Cluster nodes",tooltip:"Cluster addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Cluster. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_nodes:{title:"Sentinel nodes",tooltip:"Sentinel node addresses to use for Redis connections when the `redis` strategy is defined. Defining this field implies using a Redis Sentinel. The minimum length of the array is 1 element.",add_button:"New item"},sentinel_node_host:{label:"Host",tooltip:"A string representing a host name, such as example.com."},sentinel_node_port:{label:"Port",tooltip:"An integer representing a port number between 0 and 65535, inclusive."}},options:{type:{host_port:"Host/Port",cluster:"Cluster",sentinel:"Sentinel",open_source:"Open Source",enterprise:"Enterprise",suffix_open_source:" (Open Source)",suffix_enterprise:" (Enterprise)"},sentinel_role:{master:"master",slave:"slave",any:"any"}},edit_warning_modal:{title:"Edit Redis configuration",description:"This Redis configuration is connected to {pluginCount}. Any updates will take effect across all associated instances.",plugin_count:"{count} plugin(s)",confirm:"Confirm"}},linked_plugins_modal:{title:"Associated plugins ({count})",headers:{plugin:"Plugin",instance_name:"Name"}},redis:{title:"Redis Configurations",empty_state:{title:"Configure a Redis Configuration",description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing."}},list:{action:"New configuration",table_headers:{name:"Name",type:"Type",plugins:"Plugins",tags:"Tags"},empty_state:{description:"Set up shared Redis configurations for your gateway plugins to store and retrieve data — like counters or other data — needed during request processing.",feature_1:{title:"Store your Redis configurations",description:"Define a Redis configuration once and use it across multiple plugins."},feature_2:{title:"Sync across plugins",description:"Edits to your configuration will be cascaded automatically to all associated plugins."}}}};function Wo(){const t=Xe.createI18n("en-us",zo);return{i18n:t,i18nT:Xe.i18nTComponent(t)}}const J={useI18n:Wo},Go={class:"cluster-node-items"},Jo=K(e.defineComponent({__name:"ClusterNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=J.useI18n(),i=()=>{n.value.push(Dt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),s=e.resolveComponent("KInput"),f=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.cluster_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,C)=>(e.openBlock(),e.createBlock(Lt,{key:`${C}`,"data-testid":"redis-cluster-nodes",disabled:a.readonly,onRemoveItem:y=>o(C)},{default:e.withCtx(()=>[e.createElementVNode("div",Go,[e.createVNode(s,{modelValue:_.ip,"onUpdate:modelValue":y=>_.ip=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.cluster_node_ip.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_ip.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"ip",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(s,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.cluster_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.cluster_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(f,{appearance:"tertiary","data-testid":"redis-add-cluster-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.cluster_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-7c2d61b0"]]),Yo={class:"sentinel-node-items"},Qo=K(e.defineComponent({__name:"SentinelNodes",props:e.mergeModels({readonly:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const n=e.useModel(t,"modelValue"),{i18n:{t:r}}=J.useI18n(),i=()=>{n.value.push(Bt())},o=a=>{n.value.splice(a,1)};return(a,p)=>{const g=e.resolveComponent("KLabel"),s=e.resolveComponent("KInput"),f=e.resolveComponent("KButton");return e.openBlock(),e.createElementBlock("div",null,[e.createVNode(g,{class:"required",info:e.unref(r)("form.fields.sentinel_nodes.tooltip"),"tooltip-attributes":{maxWidth:"400"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.title")),1)]),_:1},8,["info"]),e.createElementVNode("div",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(_,C)=>(e.openBlock(),e.createBlock(Lt,{key:_.id,"data-testid":"redis-sentinel-nodes",disabled:a.readonly,onRemoveItem:y=>o(C)},{default:e.withCtx(()=>[e.createElementVNode("div",Yo,[e.createVNode(s,{modelValue:_.host,"onUpdate:modelValue":y=>_.host=y,modelModifiers:{trim:!0},label:e.unref(r)("form.fields.sentinel_node_host.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_host.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"host",readonly:a.readonly,required:""},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"]),e.createVNode(s,{modelValue:_.port,"onUpdate:modelValue":y=>_.port=y,label:e.unref(r)("form.fields.sentinel_node_port.label"),"label-attributes":{info:e.unref(r)("form.fields.sentinel_node_port.tooltip"),tooltipAttributes:{maxWidth:"400"}},name:"port",readonly:a.readonly,type:"number"},null,8,["modelValue","onUpdate:modelValue","label","label-attributes","readonly"])])]),_:2},1032,["disabled","onRemoveItem"]))),128)),e.createVNode(f,{appearance:"tertiary","data-testid":"redis-add-sentinel-node-button",disabled:a.readonly,onClick:i},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddCircleIcon)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("form.fields.sentinel_nodes.add_button")),1)]),_:1},8,["disabled"])])])}}}),[["__scopeId","data-v-c7c67147"]]);var Ke=new WeakMap,Mt=0;function Xo(t){if(!t.length)return"";for(var n="arg",r=0;r<t.length;++r){var i=void 0;t[r]===null||typeof t[r]!="object"&&typeof t[r]!="function"?typeof t[r]=="string"?i='"'+t[r]+'"':i=String(t[r]):Ke.has(t[r])?i=Ke.get(t[r]):(i=Mt,Ke.set(t[r],Mt++)),n+="@"+i}return n}function Zo(t){if(typeof t=="function")try{t=t()}catch{t=""}return Array.isArray(t)?t=Xo(t):t=String(t||""),t}var qe=function(){function t(n){n===void 0&&(n=0),this.items=new Map,this.ttl=n}return t.prototype.serializeKey=function(n){return Zo(n)},t.prototype.get=function(n){var r=this.serializeKey(n);return this.items.get(r)},t.prototype.set=function(n,r,i){var o=this.serializeKey(n),a=i||this.ttl,p=Date.now(),g={data:r,createdAt:p,expiresAt:a?p+a:1/0};this.dispatchExpire(a,g,o),this.items.set(o,g)},t.prototype.dispatchExpire=function(n,r,i){var o=this;n&&setTimeout(function(){var a=Date.now(),p=a>=r.expiresAt;p&&o.delete(i)},n)},t.prototype.delete=function(n){this.items.delete(n)},t}();function ei(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function ti(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var ni=function(t){return fetch(t).then(function(n){return n.json()})};const ze={isOnline:ei,isDocumentVisible:ti,fetcher:ni};var q=function(){return q=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},q.apply(this,arguments)},ae=function(t,n,r,i){function o(a){return a instanceof r?a:new r(function(p){p(a)})}return new(r||(r=Promise))(function(a,p){function g(_){try{f(i.next(_))}catch(C){p(C)}}function s(_){try{f(i.throw(_))}catch(C){p(C)}}function f(_){_.done?a(_.value):o(_.value).then(g,s)}f((i=i.apply(t,n||[])).next())})},le=function(t,n){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,p;return p={next:g(0),throw:g(1),return:g(2)},typeof Symbol=="function"&&(p[Symbol.iterator]=function(){return this}),p;function g(f){return function(_){return s([f,_])}}function s(f){if(i)throw new TypeError("Generator is already executing.");for(;r;)try{if(i=1,o&&(a=f[0]&2?o.return:f[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,f[1])).done)return a;switch(o=0,a&&(f=[f[0]&2,a.value]),f[0]){case 0:case 1:a=f;break;case 4:return r.label++,{value:f[1],done:!1};case 5:r.label++,o=f[1],f=[0];continue;case 7:f=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(f[0]===6||f[0]===2)){r=0;continue}if(f[0]===3&&(!a||f[1]>a[0]&&f[1]<a[3])){r.label=f[1];break}if(f[0]===6&&r.label<a[1]){r.label=a[1],a=f;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(f);break}a[2]&&r.ops.pop(),r.trys.pop();continue}f=n.call(t,r)}catch(_){f=[6,_],o=0}finally{i=a=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},ri=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var i=r.call(t),o,a=[],p;try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(g){p={error:g}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(p)throw p.error}}return a},oi=function(t,n,r){if(r||arguments.length===2)for(var i=0,o=n.length,a;i<o;i++)(a||!(i in n))&&(a||(a=Array.prototype.slice.call(n,0,i)),a[i]=n[i]);return t.concat(a||Array.prototype.slice.call(n))},vt=new qe,Oe=new qe,We=new qe,Ut={cache:vt,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:ze.fetcher,isOnline:ze.isOnline,isDocumentVisible:ze.isDocumentVisible};function ii(t,n,r){var i=Oe.get(t);if(i)i.data.push(n);else{var o=5e3;Oe.set(t,[n],r>0?r+o:r)}}function ai(t,n,r){if(r.isDocumentVisible()&&!(r.errorRetryCount!==void 0&&n>r.errorRetryCount)){var i=Math.min(n||0,r.errorRetryCount),o=i*r.errorRetryInterval;setTimeout(function(){t(null,{errorRetryCount:i+1,shouldRetryOnError:!0})},o)}}var jt=function(t,n,r,i){return r===void 0&&(r=vt),i===void 0&&(i=Ut.ttl),ae(void 0,void 0,void 0,function(){var o,a,p,g,s,f,_;return le(this,function(C){switch(C.label){case 0:if(!si(n))return[3,5];C.label=1;case 1:return C.trys.push([1,3,,4]),[4,n];case 2:return o=C.sent(),[3,4];case 3:return g=C.sent(),a=g,[3,4];case 4:return[3,6];case 5:o=n,C.label=6;case 6:if(p=!1,s={data:o,error:a,isValidating:p},typeof o<"u")try{r.set(t,s,i)}catch(y){console.error("swrv(mutate): failed to set cache",y)}return f=Oe.get(t),f&&f.data.length&&(_=f.data.filter(function(y){return y.key===t}),_.forEach(function(y,T){typeof s.data<"u"&&(y.data=s.data),y.error=s.error,y.isValidating=s.isValidating;var l=T===_.length-1;l||delete _[T]}),_=_.filter(Boolean)),[2,s]}})})};function li(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i,o,a=q({},Ut),p=!1,g=!1,s=e.getCurrentInstance(),f=(s==null?void 0:s.proxy)||s;if(!f)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var _=(f==null?void 0:f.$isServer)||!1;n.length>=1&&(i=n[0]),n.length>=2&&(o=n[1]),n.length>2&&(a=q(q({},a),n[2]));var C=_?a.serverTTL:a.ttl,y=typeof i=="function"?i:e.ref(i);typeof o>"u"&&(o=a.fetcher);var T=null;T||(T=e.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var l=function(d,V){return ae(t,void 0,void 0,function(){var $,O,z,j,D,Y,L,te=this;return le(this,function(ne){switch(ne.label){case 0:return $=T.data===void 0,O=y.value,O?(z=a.cache.get(O),j=z&&z.data,T.isValidating=!0,j&&(T.data=j.data,T.error=j.error),D=d||o,!D||!a.isDocumentVisible()&&!$||(V==null?void 0:V.forceRevalidate)!==void 0&&!(V!=null&&V.forceRevalidate)?(T.isValidating=!1,[2]):z&&(Y=!!(Date.now()-z.createdAt>=a.dedupingInterval||V!=null&&V.forceRevalidate),!Y)?(T.isValidating=!1,[2]):(L=function(){return ae(te,void 0,void 0,function(){var M,se,re,de;return le(this,function(I){switch(I.label){case 0:return M=We.get(O),M?[3,2]:(se=Array.isArray(O)?O:[O],re=D.apply(void 0,oi([],ri(se),!1)),We.set(O,re,a.dedupingInterval),[4,jt(O,re,a.cache,C)]);case 1:return I.sent(),[3,4];case 2:return[4,jt(O,M.data,a.cache,C)];case 3:I.sent(),I.label=4;case 4:return T.isValidating=!1,We.delete(O),T.error!==void 0&&(de=!p&&a.shouldRetryOnError&&(V?V.shouldRetryOnError:!0),de&&ai(l,V?V.errorRetryCount:1,a)),[2]}})})},j&&a.revalidateDebounce?(setTimeout(function(){return ae(te,void 0,void 0,function(){return le(this,function(M){switch(M.label){case 0:return p?[3,2]:[4,L()];case 1:M.sent(),M.label=2;case 2:return[2]}})})},a.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,L()];case 2:ne.sent(),ne.label=3;case 3:return[2]}})})},w=function(){return ae(t,void 0,void 0,function(){return le(this,function(d){return[2,l(null,{shouldRetryOnError:!1})]})})},k=null;e.onMounted(function(){var d=function(){return ae(t,void 0,void 0,function(){return le(this,function(V){switch(V.label){case 0:return!T.error&&a.isOnline()?[4,l()]:[3,2];case 1:return V.sent(),[3,3];case 2:k&&clearTimeout(k),V.label=3;case 3:return a.refreshInterval&&!p&&(k=setTimeout(d,a.refreshInterval)),[2]}})})};a.refreshInterval&&(k=setTimeout(d,a.refreshInterval)),a.revalidateOnFocus&&(document.addEventListener("visibilitychange",w,!1),window.addEventListener("focus",w,!1))}),e.onUnmounted(function(){p=!0,k&&clearTimeout(k),a.revalidateOnFocus&&(document.removeEventListener("visibilitychange",w,!1),window.removeEventListener("focus",w,!1));var d=Oe.get(y.value);d&&(d.data=d.data.filter(function(V){return V!==T}))});try{e.watch(y,function(d){e.isReadonly(y)||(y.value=d),T.key=d,T.isValidating=!!d,ii(y.value,T,C),!_&&!g&&y.value&&l(),g=!1},{immediate:!0})}catch{}var S=q(q({},e.toRefs(T)),{mutate:function(d,V){return l(d,q(q({},V),{forceRevalidate:!0}))}});return S}function si(t){return t!==null&&typeof t=="object"&&typeof t.then=="function"}function Ft(t){return`redis-partial-links-${t}`}const Ce=t=>{const{axiosInstance:n}=u.useAxios(t.axiosRequestConfig);return{fetcher:async r=>{const{partialId:i,size:o,offset:a,query:p}=r;let g=`${t.apiBaseUrl}${he.links[t.app]}`;t.app==="konnect"?g=g.replace(/{controlPlaneId}/gi,(t==null?void 0:t.controlPlaneId)||""):t.app==="kongManager"&&(g=g.replace(/\/{workspace}/gi,t!=null&&t.workspace?`/${t.workspace}`:"")),g=g.replace(/{id}/gi,i||""),p&&(g=`${g}?${p}`);const{data:s}=await n.get(g,{params:{size:o,offset:a}});return s}}},Ht=t=>{const{partialId:n,config:r}=t,{fetcher:i}=Ce(r),o=e.ref([]),{data:a}=li(Ft(n),()=>i({partialId:n}),{revalidateOnFocus:!1});return e.watch(a,()=>{var p;o.value=((p=a.value)==null?void 0:p.data)??[]}),o},di={class:"kong-ui-entities-redis-configurations-form"},ci=K(e.defineComponent({__name:"RedisConfigurationForm",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||(t==null?void 0:t.app)==="konnect"&&!(t!=null&&t.controlPlaneId)||(t==null?void 0:t.app)==="kongManager"&&typeof(t==null?void 0:t.workspace)!="string")},partialId:{type:String,required:!1,default:""},actionTeleportTarget:{type:String},slidoutTopOffset:{type:Number,default:60},disabledPartialType:{type:String,default:""}},emits:["update","error","loading","cancel"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o},i18nT:a}=J.useI18n(),p=Qe.useRouter(),g=e.ref(),s=e.ref(),f=(I,m)=>{g.value=I??"",s.value=m},_=I=>{var m;(m=s.value)==null||m.call(s,I),g.value=!1},C=e.computed(()=>[{label:o("form.options.type.host_port"),group:` ${o("form.options.type.open_source")}`,value:b.HOST_PORT_CE,selected:d.value===b.HOST_PORT_CE,disabled:S&&V.value||!S&&r.disabledPartialType===U.REDIS_CE},{label:o("form.options.type.host_port"),group:o("form.options.type.enterprise"),value:b.HOST_PORT_EE,selected:d.value===b.HOST_PORT_EE,disabled:!S&&r.disabledPartialType===U.REDIS_EE},{label:o("form.options.type.cluster"),group:o("form.options.type.enterprise"),value:b.CLUSTER,selected:d.value===b.CLUSTER,disabled:!S&&r.disabledPartialType===U.REDIS_EE},{label:o("form.options.type.sentinel"),group:o("form.options.type.enterprise"),value:b.SENTINEL,selected:d.value===b.SENTINEL,disabled:!S&&r.disabledPartialType===U.REDIS_EE}]),y=[{label:o("form.options.sentinel_role.master"),value:"master"},{label:o("form.options.sentinel_role.slave"),value:"slave"},{label:o("form.options.sentinel_role.any"),value:"any"}],T=I=>{const m=I.value===b.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");return`${I.label}${m}`},{form:l,canSubmit:w,payload:k,isEdit:S,redisType:d,redisTypeIsEnterprise:V,fetchUrl:$,submit:O,setInitialFormValues:z}=Ho({partialId:r.partialId,defaultRedisType:r.disabledPartialType===U.REDIS_CE?b.HOST_PORT_EE:b.HOST_PORT_CE,config:r.config}),{fetcher:j}=Ce(r.config),D=e.ref(!1),Y=e.ref(!1),L=e.ref(0),te=async()=>{try{if(S&&!Y.value){const{count:m}=await j({partialId:r.partialId});if(L.value=m,m>0){D.value=!0;return}}const{data:I}=await O();i("update",I)}catch(I){i("error",I)}},ne=()=>{D.value=!1,Y.value=!0,te()},M=()=>{r.config.cancelRoute&&p.push(r.config.cancelRoute),i("cancel")},se=I=>{i("loading",I)},re=I=>{i("error",I)},de=I=>{z(I)};return e.onBeforeMount(async()=>{if(S){const{count:I}=await j({partialId:r.partialId});L.value=I}}),(I,m)=>{const Je=e.resolveComponent("KAlert"),Ne=e.resolveComponent("KSelect"),A=e.resolveComponent("KInput"),ce=e.resolveComponent("KCheckbox"),E=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",di,[e.createVNode(e.unref(u.EntityBaseForm),{"action-teleport-target":t.actionTeleportTarget,"can-submit":e.unref(w),config:t.config,"edit-id":t.partialId,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"error-message":e.unref(l).errorMessage,"fetch-url":e.unref($),"form-fields":e.unref(k),"is-readonly":e.unref(l).readonly,"slidout-top-offset":t.slidoutTopOffset,onCancel:M,"onFetch:error":re,"onFetch:success":de,onLoading:se,onSubmit:te},{default:e.withCtx(()=>[L.value>0&&e.unref(S)?(e.openBlock(),e.createBlock(Je,{key:0,appearance:"warning",class:"warning-alert","data-testid":"redis-update-warning-alert"},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:L.value})),1)]),_:1})]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-type-section",description:e.unref(o)("form.sections.type.description"),title:e.unref(o)("form.sections.type.title")},{default:e.withCtx(()=>[e.createVNode(Ne,{modelValue:e.unref(d),"onUpdate:modelValue":m[0]||(m[0]=c=>e.isRef(d)?d.value=c:null),"data-testid":"redis-type-select",disabled:e.unref(S)&&e.unref(d)===e.unref(b).HOST_PORT_CE,items:C.value,"kpop-attributes":{"data-testid":"redis-type-select-popover"},label:e.unref(o)("form.fields.type.label"),readonly:e.unref(l).readonly,required:""},{"selected-item-template":e.withCtx(({item:c})=>[e.createTextVNode(e.toDisplayString(T(c)),1)]),_:1},8,["modelValue","disabled","items","label","readonly"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-general-section",description:e.unref(o)("form.sections.general.description"),title:e.unref(o)("form.sections.general.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.name,"onUpdate:modelValue":m[1]||(m[1]=c=>e.unref(l).fields.name=c),modelModifiers:{trim:!0},"data-testid":"redis-name-input",disabled:e.unref(S),label:e.unref(o)("form.fields.name.label"),placeholder:e.unref(o)("form.fields.name.placeholder"),readonly:e.unref(l).readonly,required:""},null,8,["modelValue","disabled","label","placeholder","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.tags,"onUpdate:modelValue":m[2]||(m[2]=c=>e.unref(l).fields.tags=c),modelModifiers:{trim:!0},"data-testid":"redis-tags-input",help:e.unref(o)("form.fields.tags.help"),label:e.unref(o)("form.fields.tags.label"),"label-attributes":{info:e.unref(o)("form.fields.tags.tooltip"),tooltipAttributes:{maxWidth:"400"}},placeholder:e.unref(o)("form.fields.tags.placeholder"),readonly:e.unref(l).readonly},null,8,["modelValue","help","label","label-attributes","placeholder","readonly"])]),_:1},8,["description","title"]),e.unref(d)===e.unref(b).SENTINEL?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:1,"data-testid":"redis-sentinel-configuration-section",description:e.unref(o)("form.sections.sentinel_configuration.description"),title:e.unref(o)("form.sections.sentinel_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.config.sentinel_master,"onUpdate:modelValue":m[3]||(m[3]=c=>e.unref(l).fields.config.sentinel_master=c),"data-testid":"redis-sentinel-master-input",label:e.unref(o)("form.fields.sentinel_master.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_master.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Ne,{modelValue:e.unref(l).fields.config.sentinel_role,"onUpdate:modelValue":m[4]||(m[4]=c=>e.unref(l).fields.config.sentinel_role=c),"data-testid":"redis-sentinel-role-select",items:y,"kpop-attributes":{"data-testid":"redis-sentinel-role-select-popover"},label:e.unref(o)("form.fields.sentinel_role.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_role.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,required:""},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(Qo,{modelValue:e.unref(l).fields.config.sentinel_nodes,"onUpdate:modelValue":m[5]||(m[5]=c=>e.unref(l).fields.config.sentinel_nodes=c),readonly:e.unref(l).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.sentinel_username,"onUpdate:modelValue":m[6]||(m[6]=c=>e.unref(l).fields.config.sentinel_username=c),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_username.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.sentinel_username=c,value:e.unref(l).fields.config.sentinel_username,onOpen:m[7]||(m[7]=(c,N)=>f(c,N))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.sentinel_password,"onUpdate:modelValue":m[8]||(m[8]=c=>e.unref(l).fields.config.sentinel_password=c),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.sentinel_password.label"),"label-attributes":{info:e.unref(o)("form.fields.sentinel_password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.sentinel_password=c,value:e.unref(l).fields.config.sentinel_password,onOpen:m[9]||(m[9]=(c,N)=>f(c,N))},null,8,["disabled","update","value"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).CLUSTER?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:2,"data-testid":"redis-cluster-configuration-section",description:e.unref(o)("form.sections.cluster.description"),title:e.unref(o)("form.sections.cluster.title")},{default:e.withCtx(()=>[e.createVNode(Jo,{modelValue:e.unref(l).fields.config.cluster_nodes,"onUpdate:modelValue":m[10]||(m[10]=c=>e.unref(l).fields.config.cluster_nodes=c),readonly:e.unref(l).readonly},null,8,["modelValue","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.cluster_max_redirections,"onUpdate:modelValue":m[11]||(m[11]=c=>e.unref(l).fields.config.cluster_max_redirections=c),"data-testid":"redis-cluster-max-redirections-input",label:e.unref(o)("form.fields.cluster_max_redirections.label"),"label-attributes":{info:e.unref(o)("form.fields.cluster_max_redirections.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-connection-configuration-section",description:e.unref(o)("form.sections.connection.description"),title:e.unref(o)("form.sections.connection.title")},{default:e.withCtx(()=>[e.unref(d)===e.unref(b).HOST_PORT_CE||e.unref(d)===e.unref(b).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:0,modelValue:e.unref(l).fields.config.host,"onUpdate:modelValue":m[12]||(m[12]=c=>e.unref(l).fields.config.host=c),modelModifiers:{trim:!0},"data-testid":"redis-host-input",label:e.unref(o)("form.fields.host.label"),"label-attributes":{info:e.unref(o)("form.fields.host.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).HOST_PORT_CE||e.unref(d)===e.unref(b).HOST_PORT_EE?(e.openBlock(),e.createBlock(A,{key:1,modelValue:e.unref(l).fields.config.port,"onUpdate:modelValue":m[13]||(m[13]=c=>e.unref(l).fields.config.port=c),modelModifiers:{trim:!0},"data-testid":"redis-port-input",label:e.unref(o)("form.fields.port.label"),"label-attributes":{info:e.unref(o)("form.fields.port.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).HOST_PORT_EE?(e.openBlock(),e.createBlock(ce,{key:2,modelValue:e.unref(l).fields.config.connection_is_proxied,"onUpdate:modelValue":m[14]||(m[14]=c=>e.unref(l).fields.config.connection_is_proxied=c),"data-testid":"redis-connection-is-proxied-checkbox",disabled:e.unref(l).readonly,label:e.unref(o)("form.fields.connection_is_proxied.label"),"label-attributes":{info:e.unref(o)("form.fields.connection_is_proxied.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","disabled","label","label-attributes"])):e.createCommentVNode("",!0),e.unref(d)===e.unref(b).HOST_PORT_CE?(e.openBlock(),e.createBlock(A,{key:3,modelValue:e.unref(l).fields.config.timeout,"onUpdate:modelValue":m[15]||(m[15]=c=>e.unref(l).fields.config.timeout=c),modelModifiers:{trim:!0},"data-testid":"redis-timeout-input",label:e.unref(o)("form.fields.timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])):e.createCommentVNode("",!0),e.createVNode(A,{modelValue:e.unref(l).fields.config.database,"onUpdate:modelValue":m[16]||(m[16]=c=>e.unref(l).fields.config.database=c),modelModifiers:{trim:!0},"data-testid":"redis-database-input",label:e.unref(o)("form.fields.database.label"),"label-attributes":{info:e.unref(o)("form.fields.database.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.username,"onUpdate:modelValue":m[17]||(m[17]=c=>e.unref(l).fields.config.username=c),modelModifiers:{trim:!0},"data-testid":"redis-username-input",label:e.unref(o)("form.fields.username.label"),"label-attributes":{info:e.unref(o)("form.fields.username.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.username=c,value:e.unref(l).fields.config.username,onOpen:m[18]||(m[18]=(c,N)=>f(c,N))},null,8,["disabled","update","value"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.password,"onUpdate:modelValue":m[19]||(m[19]=c=>e.unref(l).fields.config.password=c),modelModifiers:{trim:!0},"data-testid":"redis-password-input",label:e.unref(o)("form.fields.password.label"),"label-attributes":{info:e.unref(o)("form.fields.password.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,"show-password-mask-toggle":"",type:"password"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(e.unref(fe.VaultSecretPickerProvider),{class:"secret-picker-provider",disabled:e.unref(l).readonly,update:c=>e.unref(l).fields.config.password=c,value:e.unref(l).fields.config.password,onOpen:m[20]||(m[20]=(c,N)=>f(c,N))},null,8,["disabled","update","value"])]),_:1},8,["description","title"]),e.createVNode(e.unref(u.EntityFormSection),{"data-testid":"redis-tls-configuration-section",description:e.unref(o)("form.sections.tls.description"),title:e.unref(o)("form.sections.tls.title")},{default:e.withCtx(()=>[e.createVNode(ce,{modelValue:e.unref(l).fields.config.ssl,"onUpdate:modelValue":m[21]||(m[21]=c=>e.unref(l).fields.config.ssl=c),"data-testid":"redis-ssl-checkbox",description:e.unref(o)("form.fields.ssl.description"),disabled:e.unref(l).readonly,label:e.unref(o)("form.fields.ssl.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(ce,{modelValue:e.unref(l).fields.config.ssl_verify,"onUpdate:modelValue":m[22]||(m[22]=c=>e.unref(l).fields.config.ssl_verify=c),"data-testid":"redis-ssl-verify-checkbox",description:e.unref(o)("form.fields.ssl_verify.description"),disabled:e.unref(l).readonly,label:e.unref(o)("form.fields.ssl_verify.label"),"label-attributes":{info:e.unref(o)("form.fields.ssl_verify.tooltip"),tooltipAttributes:{maxWidth:"400"}}},null,8,["modelValue","description","disabled","label","label-attributes"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.server_name,"onUpdate:modelValue":m[23]||(m[23]=c=>e.unref(l).fields.config.server_name=c),modelModifiers:{trim:!0},label:e.unref(o)("form.fields.server_name.label"),"label-attributes":{info:e.unref(o)("form.fields.server_name.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"]),e.unref(d)!==e.unref(b).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:3,"data-testid":"redis-keepalive-section",description:e.unref(o)("form.sections.keepalive.description"),title:e.unref(o)("form.sections.keepalive.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.config.keepalive_backlog,"onUpdate:modelValue":m[24]||(m[24]=c=>e.unref(l).fields.config.keepalive_backlog=c),"data-testid":"redis-keepalive-backlog-input",label:e.unref(o)("form.fields.keepalive_backlog.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_backlog.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.keepalive_pool_size,"onUpdate:modelValue":m[25]||(m[25]=c=>e.unref(l).fields.config.keepalive_pool_size=c),"data-testid":"redis-keepalive-pool-size-input",label:e.unref(o)("form.fields.keepalive_pool_size.label"),"label-attributes":{info:e.unref(o)("form.fields.keepalive_pool_size.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0),e.unref(d)!==e.unref(b).HOST_PORT_CE?(e.openBlock(),e.createBlock(e.unref(u.EntityFormSection),{key:4,"data-testid":"redis-read-write-configuration-section",description:e.unref(o)("form.sections.read_write_configuration.description"),title:e.unref(o)("form.sections.read_write_configuration.title")},{default:e.withCtx(()=>[e.createVNode(A,{modelValue:e.unref(l).fields.config.read_timeout,"onUpdate:modelValue":m[26]||(m[26]=c=>e.unref(l).fields.config.read_timeout=c),"data-testid":"redis-read-timeout-input",label:e.unref(o)("form.fields.read_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.read_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.send_timeout,"onUpdate:modelValue":m[27]||(m[27]=c=>e.unref(l).fields.config.send_timeout=c),"data-testid":"redis-send-timeout-input",label:e.unref(o)("form.fields.send_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.send_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"]),e.createVNode(A,{modelValue:e.unref(l).fields.config.connect_timeout,"onUpdate:modelValue":m[28]||(m[28]=c=>e.unref(l).fields.config.connect_timeout=c),"data-testid":"redis-connect-timeout-input",label:e.unref(o)("form.fields.connect_timeout.label"),"label-attributes":{info:e.unref(o)("form.fields.connect_timeout.tooltip"),tooltipAttributes:{maxWidth:"400"}},readonly:e.unref(l).readonly,type:"number"},null,8,["modelValue","label","label-attributes","readonly"])]),_:1},8,["description","title"])):e.createCommentVNode("",!0)]),_:1},8,["action-teleport-target","can-submit","config","edit-id","entity-type","error-message","fetch-url","form-fields","is-readonly","slidout-top-offset"])]),e.createVNode(e.unref(fe.VaultSecretPicker),{config:r.config,setup:g.value,onCancel:m[29]||(m[29]=()=>g.value=!1),onProceed:_},null,8,["config","setup"]),e.createVNode(E,{"action-button-text":e.unref(o)("form.edit_warning_modal.confirm"),"data-testid":"redis-update-warning-modal","hide-cancel-button":"","max-width":"640",title:e.unref(o)("form.edit_warning_modal.title"),visible:D.value,onCancel:m[30]||(m[30]=c=>D.value=!1),onProceed:ne},{default:e.withCtx(()=>[e.createVNode(e.unref(a),{keypath:"form.edit_warning_modal.description",tag:"div"},{pluginCount:e.withCtx(()=>[e.createElementVNode("b",null,e.toDisplayString(e.unref(o)("form.edit_warning_modal.plugin_count",{count:L.value})),1)]),_:1})]),_:1},8,["action-button-text","title","visible"])],64)}}}),[["__scopeId","data-v-2b122b08"]]),fi="#00abd2",ui="24px",pi={class:"linked-plugins","data-testid":"linked-plugins-inline"},Ge=7,mi=K(e.defineComponent({__name:"LinkedPluginsInline",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},partialId:{type:String,required:!0}},setup(t){const n=t,r=Ht({config:n.config,partialId:n.partialId});return(i,o)=>{const a=e.resolveComponent("KBadge");return e.openBlock(),e.createElementBlock("div",pi,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(r).slice(0,Ge),p=>(e.openBlock(),e.createBlock(e.unref(Ze.PluginIcon),{key:p.id,name:p.name,size:24},null,8,["name"]))),128)),e.unref(r).length-Ge>0?(e.openBlock(),e.createBlock(a,{key:0,appearance:"info"},{default:e.withCtx(()=>[e.createTextVNode(" +"+e.toDisplayString(e.unref(r).length-Ge),1)]),_:1})):e.createCommentVNode("",!0)])}}}),[["__scopeId","data-v-6fbbce03"]]),gi={class:"plugin-item"},_i=K(e.defineComponent({__name:"PluginItem",props:{pluginName:{type:String,required:!0}},setup(t){return(n,r)=>(e.openBlock(),e.createElementBlock("div",gi,[e.createVNode(e.unref(Ze.PluginIcon),{name:t.pluginName,size:24},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(t.pluginName),1)]))}}),[["__scopeId","data-v-d3c7b010"]]),yi={class:"toolbar-container"},Kt=K(e.defineComponent({__name:"LinkedPluginList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},isExactMatch:{type:Boolean,default:!1},filterBarEnabled:{type:Boolean,default:!1},partialId:{type:String,required:!0}},emits:["view-plugin","load"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=J.useI18n(),a=[{key:"name",label:o("linked_plugins_modal.headers.plugin")},{key:"instance_name",label:o("linked_plugins_modal.headers.instance_name")},{key:"actions",hideLabel:!0}],{fetcher:p}=Ce(r.config),g=e.ref(0),s=async y=>{const{data:T,count:l}=await p({partialId:r.partialId,size:y.pageSize,offset:y.offset,query:y.query});g.value=l;const w={total:l,data:T};return i("load",w),w},f=e.ref(""),_=e.computed(()=>r.config.app==="konnect"||r.isExactMatch?{isExactMatch:!0}:{isExactMatch:!1,fields:{name:{searchable:!0}},schema:{name:{type:"text"}}}),C=y=>{i("view-plugin",{id:y.id,plugin:y.name})};return(y,T)=>{const l=e.resolveComponent("KDropdownItem"),w=e.resolveComponent("KTableData");return e.openBlock(),e.createBlock(w,{"cache-identifier":e.unref(Ft)(t.partialId),fetcher:s,headers:a,"pagination-attributes":{totalCount:g.value,disablePageJump:!0},"search-input":f.value},e.createSlots({name:e.withCtx(({rowValue:k})=>[e.createVNode(_i,{"plugin-name":k},null,8,["plugin-name"])]),"action-items":e.withCtx(({row:k})=>[e.createVNode(l,{onClick:S=>C(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("actions.view_plugin")),1)]),_:2},1032,["onClick"])]),_:2},[t.filterBarEnabled?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",yi,[e.createVNode(e.unref(u.EntityFilter),{modelValue:f.value,"onUpdate:modelValue":T[0]||(T[0]=k=>f.value=k),config:_.value},null,8,["modelValue","config"])])]),key:"0"}:void 0]),1032,["cache-identifier","pagination-attributes","search-input"])}}}),[["__scopeId","data-v-d6a2e2f4"]]),bi={class:"linked-plugins-modal","data-testid":"linked-plugins-modal"},hi=K(e.defineComponent({__name:"LinkedPluginListModal",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string")},redisConfigurationId:{type:String,required:!0},visible:{type:Boolean,required:!0,default:!1}},emits:["cancel","proceed","view-plugin"],setup(t,{emit:n}){const r=n,{i18n:{t:i}}=J.useI18n(),o=e.ref(0),a=e.computed(()=>i("linked_plugins_modal.title",{count:o.value})),p=()=>{r("cancel")},g=()=>{r("proceed")};return(s,f)=>{const _=e.resolveComponent("KModal");return e.openBlock(),e.createElementBlock("div",bi,[e.createVNode(_,{"action-button-text":e.unref(i)("actions.done"),"hide-cancel-button":"",title:a.value,visible:t.visible,onCancel:p,onProceed:g},{default:e.withCtx(()=>[e.createVNode(Kt,{config:t.config,"partial-id":t.redisConfigurationId,onLoad:f[0]||(f[0]=({total:C})=>o.value=C),onViewPlugin:f[1]||(f[1]=C=>r("view-plugin",C))},null,8,["config","partial-id"])]),_:1},8,["action-button-text","title","visible"])])}}}),[["__scopeId","data-v-6148b8bd"]]),qt=e.defineComponent({__name:"DeleteWarningModal",props:{visible:{type:Boolean,required:!0}},emits:["close"],setup(t,{emit:n}){const{i18n:{t:r}}=J.useI18n(),i=n,o=()=>{i("close")};return(a,p)=>{const g=e.resolveComponent("KModal");return e.openBlock(),e.createBlock(g,{"action-button-text":e.unref(r)("actions.close"),"data-testid":"remove-links-modal","hide-cancel-button":"","max-width":"640",title:e.unref(r)("delete.title"),visible:t.visible,onCancel:o,onProceed:o},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("delete.warning")),1)]),_:1},8,["action-button-text","title","visible"])}}}),Ci={class:"kong-ui-entities-partials-list"},Ti={class:"empty-state-icon-gateway"},wi=K(e.defineComponent({__name:"RedisConfigurationList",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||!t.createRoute||!t.getViewRoute||!t.getEditRoute)},cacheIdentifier:{type:String,default:""},canCreate:{type:Function,required:!1,default:async()=>!0},canDelete:{type:Function,required:!1,default:async()=>!0},canEdit:{type:Function,required:!1,default:async()=>!0},canRetrieve:{type:Function,required:!1,default:async()=>!0},enableV2EmptyStates:{type:Boolean,default:!1}},emits:["click:learn-more","click:plugin","copy:error","copy:success","delete:success","error"],setup(t,{emit:n}){var ce;const r=n,i=t,o=e.computed(()=>{var c,N;let E=`${i.config.apiBaseUrl}${he.list[i.config.app]}`;return i.config.app==="konnect"?E=E.replace(/{controlPlaneId}/gi,((c=i.config)==null?void 0:c.controlPlaneId)||""):i.config.app==="kongManager"&&(E=E.replace(/\/{workspace}/gi,(N=i.config)!=null&&N.workspace?`/${i.config.workspace}`:"")),E}),a=e.ref(!1),p=e.ref(""),g=e.ref(null),s=e.ref(void 0),f=e.ref(!1),_=e.ref(!1),C=e.ref(""),y=e.ref(!1),T=u.useDeleteUrlBuilder(i.config,o.value),l=e.ref(1),w=e.computed(()=>i.config.app!=="kongManager"||!!i.config.disableSorting),{fetcher:k,fetcherState:S}=u.useFetcher(i.config,o.value),{i18n:{t:d}}=J.useI18n(),{axiosInstance:V}=u.useAxios((ce=i.config)==null?void 0:ce.axiosRequestConfig),$=Qe.useRouter(),O=e.ref(""),z=e.computed(()=>{const E=i.config.app==="konnect"||i.config.isExactMatch;if(E)return{isExactMatch:!0,placeholder:d("search.placeholder")};const{name:c}=Y;return{isExactMatch:E,fields:{name:c},schema:i.config.filterSchema}}),{fetcher:j}=Ce(i.config),D=e.ref({ctaPath:i.config.createRoute,ctaText:void 0,message:`${d("redis.empty_state.description")}${i.config.additionMessageForEmptyState?` ${i.config.additionMessageForEmptyState}`:""}`,title:d("redis.title")}),Y={name:{label:d("list.table_headers.name"),searchable:!0,hidable:!1,sortable:!0},type:{label:d("list.table_headers.type")},tags:{label:d("list.table_headers.tags")},plugins:{label:d("list.table_headers.plugins")}},L=E=>({label:d("actions.view"),to:i.config.getViewRoute(E)}),te=E=>({label:d("actions.edit"),to:i.config.getEditRoute(E)}),ne=async E=>{const{count:c}=await j({partialId:E.id});c>0?y.value=!0:(s.value=E,f.value=!0)},M=()=>{O.value=""},se=async E=>{var N;await((N=i.canRetrieve)==null?void 0:N.call(i,E))&&$.push(i.config.getViewRoute(E.id))},re=()=>{f.value=!1},de=E=>{p.value=E,a.value=!0},I=async()=>{var E,c,N;if((E=s.value)!=null&&E.id){_.value=!0;try{await V.delete(T(s.value.id)),_.value=!1,f.value=!1,m(),r("delete:success",s.value)}catch(v){C.value=((N=(c=v.response)==null?void 0:c.data)==null?void 0:N.message)||v.message||d("errors.delete"),r("error",v)}finally{_.value=!1}}},m=()=>{l.value++},Je=E=>{switch(xe(E)){case b.HOST_PORT_CE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_open_source")}`;case b.HOST_PORT_EE:return`${d("form.options.type.host_port")}${d("form.options.type.suffix_enterprise")}`;case b.SENTINEL:return`${d("form.options.type.sentinel")}${d("form.options.type.suffix_enterprise")}`;case b.CLUSTER:return`${d("form.options.type.cluster")}${d("form.options.type.suffix_enterprise")}`}},Ne=()=>{$.push(i.config.createRoute)},A=(E,c)=>{const N=E.id;if(!c(N)){r("copy:error",{entity:E,field:"id",message:d("errors.copy")});return}r("copy:success",{entity:E,field:"id",message:d("copy.success",{val:N})})};return e.watch(S,E=>{var c,N,v;if(E.status===u.FetcherStatus.Error){g.value={title:d("errors.general")},(v=(N=(c=E.error)==null?void 0:c.response)==null?void 0:N.data)!=null&&v.message&&(g.value.message=E.error.response.data.message),r("error",E.error);return}g.value=null}),e.watch(i.canCreate,async E=>{await E?D.value.ctaText=d("actions.create"):D.value.ctaText=void 0},{immediate:!0}),(E,c)=>{const N=e.resolveComponent("KButton"),v=e.resolveComponent("KDropdownItem"),Vi=e.resolveComponent("KClipboardProvider");return e.openBlock(),e.createElementBlock("div",Ci,[e.createVNode(e.unref(u.EntityBaseTable),{"cache-identifier":t.cacheIdentifier,"disable-sorting":w.value,"empty-state-options":D.value,"enable-entity-actions":"","error-message":g.value,fetcher:e.unref(k),"fetcher-cache-key":l.value,"pagination-type":"offset","preferences-storage-key":"kong-ui-entities-redis-configuration-list",query:O.value,"table-headers":Y,onClearSearchInput:M,"onClick:row":c[2]||(c[2]=P=>se(P)),onSort:m},e.createSlots({"toolbar-filter":e.withCtx(()=>[e.createVNode(e.unref(u.EntityFilter),{modelValue:O.value,"onUpdate:modelValue":c[0]||(c[0]=P=>O.value=P),config:z.value},null,8,["modelValue","config"])]),"toolbar-button":e.withCtx(()=>[e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canCreate()},{default:e.withCtx(()=>[e.createVNode(N,{appearance:"primary","data-testid":"toolbar-add-redis-configuration",size:"large",to:t.config.createRoute},{default:e.withCtx(()=>[e.createVNode(e.unref(Q.AddIcon)),e.createTextVNode(" "+e.toDisplayString(e.unref(d)("actions.create")),1)]),_:1},8,["to"])]),_:1},8,["auth-function"])]),name:e.withCtx(({rowValue:P})=>[e.createElementVNode("b",null,e.toDisplayString(P??"-"),1)]),type:e.withCtx(({row:P})=>[e.createTextVNode(e.toDisplayString(Je(P)),1)]),tags:e.withCtx(({rowValue:P})=>[e.createVNode(e.unref(u.TableTags),{tags:P},null,8,["tags"])]),plugins:e.withCtx(({row:P})=>[e.createVNode(mi,{config:t.config,"partial-id":P.id,onClick:e.withModifiers(Ye=>de(P.id),["stop"])},null,8,["config","partial-id","onClick"])]),actions:e.withCtx(({row:P})=>[e.createVNode(Vi,null,{default:e.withCtx(({copyToClipboard:Ye})=>[e.createVNode(v,{"data-testid":"action-entity-copy-id",onClick:qi=>A(P,Ye)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.copy_id")),1)]),_:2},1032,["onClick"])]),_:2},1024),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canRetrieve(P)},{default:e.withCtx(()=>[e.createVNode(v,{"data-testid":"action-entity-view","has-divider":"",item:L(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canEdit(P)},{default:e.withCtx(()=>[e.createVNode(v,{"data-testid":"action-entity-edit",item:te(P.id)},null,8,["item"])]),_:2},1032,["auth-function"]),e.createVNode(e.unref(u.PermissionsWrapper),{"auth-function":()=>t.canDelete(P)},{default:e.withCtx(()=>[e.createVNode(v,{danger:"","data-testid":"action-entity-delete","has-divider":"",onClick:Ye=>ne(P)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)("actions.delete")),1)]),_:2},1032,["onClick"])]),_:2},1032,["auth-function"])]),_:2},[t.enableV2EmptyStates&&t.config.app==="konnect"?{name:"empty-state",fn:e.withCtx(()=>[e.createVNode(e.unref(u.EntityEmptyState),{"action-button-text":e.unref(d)("list.action"),appearance:"secondary","can-create":()=>t.canCreate(),"data-testid":"redis-entity-empty-state",description:e.unref(d)("list.empty_state.description"),features:[{title:e.unref(d)("list.empty_state.feature_1.title"),description:e.unref(d)("list.empty_state.feature_1.description")},{title:e.unref(d)("list.empty_state.feature_2.title"),description:e.unref(d)("list.empty_state.feature_2.description")}],"learn-more":t.config.app==="konnect",title:e.unref(d)("redis.title"),"onClick:create":Ne,"onClick:learnMore":c[1]||(c[1]=()=>r("click:learn-more"))},{image:e.withCtx(()=>[e.createElementVNode("div",Ti,[e.createVNode(e.unref(Q.DeployIcon),{color:e.unref(fi),size:e.unref(ui)},null,8,["color","size"])])]),"feature-0-icon":e.withCtx(()=>[e.createVNode(e.unref(Q.DeployIcon))]),"feature-1-icon":e.withCtx(()=>[e.createVNode(e.unref(Q.RuntimesIcon))]),_:1},8,["action-button-text","can-create","description","features","learn-more","title"])]),key:"0"}:void 0]),1032,["cache-identifier","disable-sorting","empty-state-options","error-message","fetcher","fetcher-cache-key","query"]),e.createVNode(qt,{visible:y.value,onClose:c[3]||(c[3]=P=>y.value=!1)},null,8,["visible"]),e.createVNode(e.unref(u.EntityDeleteModal),{"action-pending":_.value,description:e.unref(d)("delete.description"),"entity-name":s.value&&(s.value.name||s.value.id),"entity-type":e.unref(u.EntityTypes).RedisConfiguration,error:C.value,"need-confirmation":!0,title:e.unref(d)("delete.title"),visible:f.value,onCancel:re,onProceed:I},null,8,["action-pending","description","entity-name","entity-type","error","title","visible"]),e.createVNode(hi,{config:t.config,"redis-configuration-id":p.value,visible:a.value,onCancel:c[4]||(c[4]=P=>a.value=!1),onProceed:c[5]||(c[5]=P=>a.value=!1),onViewPlugin:c[6]||(c[6]=P=>r("click:plugin",P))},null,8,["config","redis-configuration-id","visible"])])}}}),[["__scopeId","data-v-5063721d"]]),Ei={class:"kong-ui-consumer-group-entity-config-card"},ki=e.defineComponent({__name:"RedisConfigurationConfigCard",props:{config:{type:Object,required:!0,validator:t=>!(!t||!["konnect","kongManager"].includes(t==null?void 0:t.app)||t.app==="konnect"&&!t.controlPlaneId||t.app==="kongManager"&&typeof t.workspace!="string"||!t.entityId)},configCardDoc:{type:String,default:"",required:!1},hideTitle:{type:Boolean,default:!0}},emits:["loading","fetch:error","fetch:success"],setup(t,{emit:n}){const r=t,i=n,{i18n:{t:o}}=J.useI18n(),a=e.computed(()=>he.form[r.config.app].edit),p=e.ref(je),g=l=>{p.value=xe(l),i("fetch:success",l)},s=e.computed(()=>{const l=p.value===b.HOST_PORT_CE?o("form.options.type.suffix_open_source"):o("form.options.type.suffix_enterprise");let w="";switch(p.value){case b.HOST_PORT_CE:w=o("form.options.type.host_port");break;case b.HOST_PORT_EE:w=o("form.options.type.host_port");break;case b.CLUSTER:w=o("form.options.type.cluster");break;case b.SENTINEL:w=o("form.options.type.sentinel");break}return`${w}${l}`}),f=l=>({id:l.id,name:l.name,tags:l.tags,created_at:l.created_at,updated_at:l.updated_at,type:l.type,...l.config}),_=l=>{const{id:w,name:k,created_at:S,updated_at:d,type:V,tags:$,...O}=l;return{id:w,name:k,tags:$,created_at:S,updated_at:d,type:V,config:O}},C={id:{},name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.name.label")},tags:{type:u.ConfigurationSchemaType.BadgeTag,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.tags.label"),tooltip:o("form.fields.tags.tooltip")},updated_at:{},created_at:{},type:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.type.label")},cluster_max_redirections:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.cluster_max_redirections.tooltip"),label:o("form.fields.cluster_max_redirections.label")},cluster_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.cluster_nodes.title"),tooltip:o("form.fields.cluster_nodes.tooltip")},connect_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connect_timeout.label"),tooltip:o("form.fields.connect_timeout.tooltip")},connection_is_proxied:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.connection_is_proxied.label"),tooltip:o("form.fields.connection_is_proxied.tooltip")},database:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.database.label"),tooltip:o("form.fields.database.tooltip")},host:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.host.label"),tooltip:o("form.fields.host.tooltip")},keepalive_backlog:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_backlog.label"),tooltip:o("form.fields.keepalive_backlog.tooltip")},keepalive_pool_size:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.keepalive_pool_size.label"),tooltip:o("form.fields.keepalive_pool_size.tooltip")},password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.password.label"),tooltip:o("form.fields.password.tooltip")},port:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.port.label"),tooltip:o("form.fields.port.tooltip")},read_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.read_timeout.label"),tooltip:o("form.fields.read_timeout.tooltip")},send_timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.send_timeout.label"),tooltip:o("form.fields.send_timeout.tooltip")},sentinel_master:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_master.label"),tooltip:o("form.fields.sentinel_master.tooltip")},sentinel_nodes:{type:u.ConfigurationSchemaType.JsonArray,section:u.ConfigurationSchemaSection.Basic,tooltip:o("form.fields.sentinel_nodes.tooltip")},sentinel_password:{type:u.ConfigurationSchemaType.Redacted,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_password.label"),tooltip:o("form.fields.sentinel_password.tooltip")},sentinel_role:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_role.label"),tooltip:o("form.fields.sentinel_role.tooltip")},sentinel_username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.sentinel_username.label"),tooltip:o("form.fields.sentinel_username.tooltip")},server_name:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.server_name.label"),tooltip:o("form.fields.server_name.tooltip")},ssl_verify:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl_verify.label"),tooltip:o("form.fields.ssl_verify.tooltip")},ssl:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.ssl.label"),tooltip:o("form.fields.ssl.tooltip")},timeout:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.timeout.label"),tooltip:o("form.fields.timeout.tooltip")},username:{type:u.ConfigurationSchemaType.Text,section:u.ConfigurationSchemaSection.Basic,label:o("form.fields.username.label"),tooltip:o("form.fields.username.tooltip")}},y=l=>{const w={},k=Object.keys(C);for(const S of k)l.includes(S)?w[S]={...C[S],order:l.indexOf(S)+1}:w[S]={...C[S],hidden:!0};return w},T=e.computed(()=>{const l=["id","name","tags","type","updated_at","created_at"];switch(p.value){case b.HOST_PORT_CE:return y([...l,"host","port","timeout","database","username","password","ssl","ssl_verify","server_name"]);case b.HOST_PORT_EE:return y([...l,"host","port","connection_is_proxied","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case b.CLUSTER:return y([...l,"cluster_nodes","cluster_max_redirections","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);case b.SENTINEL:return y([...l,"sentinel_master","sentinel_role","sentinel_nodes","sentinel_username","sentinel_password","database","username","password","ssl","ssl_verify","server_name","keepalive_backlog","keepalive_pool_size","read_timeout","send_timeout","connect_timeout"]);default:throw new Error("Invalid Redis type")}});return(l,w)=>(e.openBlock(),e.createElementBlock("div",Ei,[e.createVNode(e.unref(u.EntityBaseConfigCard),{"code-block-record-formatter":_,config:t.config,"config-card-doc":t.configCardDoc,"config-schema":T.value,"entity-type":e.unref(u.SupportedEntityType).RedisConfiguration,"fetch-url":a.value,"hide-title":t.hideTitle,"record-resolver":f,"onFetch:error":w[0]||(w[0]=k=>l.$emit("fetch:error",k)),"onFetch:success":g,onLoading:w[1]||(w[1]=k=>l.$emit("loading",k))},{type:e.withCtx(()=>[e.createElementVNode("div",null,e.toDisplayString(s.value),1)]),_:1},8,["config","config-card-doc","config-schema","entity-type","fetch-url","hide-title"])]))}}),Si={useLinkedPlugins:Ht,useLinkedPluginsFetcher:Ce};x.DeleteWarningModal=qt,x.LinkedPlugins=Kt,x.PartialType=U,x.RedisConfigurationConfigCard=ki,x.RedisConfigurationForm=ci,x.RedisConfigurationList=wi,x.RedisType=b,x.composables=Si,x.constants=jo,x.helpers=Fo,Object.defineProperty(x,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .array-card-container-wrapper{width:100%}.array-card-container[data-v-a2c96337]{align-items:center;display:flex}.array-card-container .card[data-v-a2c96337]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-a2c96337]{margin-left:12px}.cluster-node-items[data-v-7c2d61b0],.sentinel-node-items[data-v-c7c67147]{display:flex;flex-direction:column;gap:24px}.warning-alert[data-v-50ae1abf]{margin-bottom:32px}.kong-ui-entities-redis-configurations-form[data-v-50ae1abf]{width:100%}.secret-picker-provider[data-v-50ae1abf]{margin-top:8px!important}.linked-plugins[data-v-6fbbce03]{display:flex;gap:8px}.plugin-item[data-v-d3c7b010]{align-items:center;display:flex;gap:8px}.toolbar-container[data-v-d6a2e2f4]{align-items:center;display:flex;width:100%}.linked-plugins-modal[data-v-6148b8bd] .k-table-view{background-color:transparent}.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:640px}@media (max-width: 640px){.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:100%}}.kong-ui-entities-partials-list[data-v-cc7bdee7]{width:100%}
1
+ .array-card-container-wrapper{width:100%}.array-card-container[data-v-a2c96337]{align-items:center;display:flex}.array-card-container .card[data-v-a2c96337]{margin-bottom:8px}.array-card-container .array-card-remove-button[data-v-a2c96337]{margin-left:12px}.cluster-node-items[data-v-7c2d61b0],.sentinel-node-items[data-v-c7c67147]{display:flex;flex-direction:column;gap:24px}.warning-alert[data-v-2b122b08]{margin-bottom:32px}.kong-ui-entities-redis-configurations-form[data-v-2b122b08]{width:100%}.secret-picker-provider[data-v-2b122b08]{margin-top:8px!important}.linked-plugins[data-v-6fbbce03]{display:flex;gap:8px}.plugin-item[data-v-d3c7b010]{align-items:center;display:flex;gap:8px}.toolbar-container[data-v-d6a2e2f4]{align-items:center;display:flex;width:100%}.linked-plugins-modal[data-v-6148b8bd] .k-table-view{background-color:transparent}.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:640px}@media (max-width: 640px){.linked-plugins-modal[data-v-6148b8bd] .modal-container{min-width:100%}}.kong-ui-entities-partials-list[data-v-5063721d]{width:100%}
@@ -1 +1 @@
1
- {"version":3,"file":"RedisConfigurationConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationConfigCard.vue"],"names":[],"mappings":"AAmZA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAQvC,OAAO,KAAK,EACV,qCAAqC,EACrC,yCAAyC,EACzC,0BAA0B,EAE3B,MAAM,UAAU,CAAA;AAGjB,OAAO,gDAAgD,CAAA;;IAiiBrD,oHAAoH;;cAElG,QAAQ,CAAC,qCAAqC,GAAG,yCAAyC,CAAC;;4BAEvF,qCAAqC,GAAG,yCAAyC,KAAG,OAAO;;IAQjH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;IAtBH,oHAAoH;;cAElG,QAAQ,CAAC,qCAAqC,GAAG,yCAAyC,CAAC;;4BAEvF,qCAAqC,GAAG,yCAAyC,KAAG,OAAO;;IAQjH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;;;;AAjCL,wBAuCG"}
1
+ {"version":3,"file":"RedisConfigurationConfigCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationConfigCard.vue"],"names":[],"mappings":"AA2ZA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAQvC,OAAO,KAAK,EACV,qCAAqC,EACrC,yCAAyC,EACzC,0BAA0B,EAE3B,MAAM,UAAU,CAAA;AAGjB,OAAO,gDAAgD,CAAA;;IAyiBrD,oHAAoH;;cAElG,QAAQ,CAAC,qCAAqC,GAAG,yCAAyC,CAAC;;4BAEvF,qCAAqC,GAAG,yCAAyC,KAAG,OAAO;;IAQjH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;IAtBH,oHAAoH;;cAElG,QAAQ,CAAC,qCAAqC,GAAG,yCAAyC,CAAC;;4BAEvF,qCAAqC,GAAG,yCAAyC,KAAG,OAAO;;IAQjH;;OAEG;;;;;;IAMH;;OAEG;;;;;;;;;;;;;AAjCL,wBAuCG"}
@@ -1 +1 @@
1
- {"version":3,"file":"RedisConfigurationForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationForm.vue"],"names":[],"mappings":"AA8nBA,OAAO,gDAAgD,CAAA;AACvD,OAAO,gDAAgD,CAAA;AAMvD,OAAO,EAAa,WAAW,EAAE,MAAM,UAAU,CAAA;AAOjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EACV,uCAAuC,EACvC,mCAAmC,EACnC,0BAA0B,EAC3B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;;;cAs7BnB,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC;;IAOnG,4FAA4F;;;;;;IAM5F;;OAEG;;;;IAIH;;OAEG;;;;;IAKH;;OAEG;;cAEe,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;cAhCrB,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC;;IAOnG,4FAA4F;;;;;;IAM5F;;OAEG;;;;IAIH;;OAEG;;;;;IAKH;;OAEG;;cAEe,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;;;AA7CzC,wBAiDG"}
1
+ {"version":3,"file":"RedisConfigurationForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationForm.vue"],"names":[],"mappings":"AA0oBA,OAAO,gDAAgD,CAAA;AACvD,OAAO,gDAAgD,CAAA;AAMvD,OAAO,EAAa,WAAW,EAAE,MAAM,UAAU,CAAA;AAOjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EACV,uCAAuC,EACvC,mCAAmC,EACnC,0BAA0B,EAC3B,MAAM,UAAU,CAAA;AACjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;;;cAi8BnB,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC;;IAOnG,4FAA4F;;;;;;IAM5F;;OAEG;;;;IAIH;;OAEG;;;;;IAKH;;OAEG;;cAEe,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;cAhCrB,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC;;IAOnG,4FAA4F;;;;;;IAM5F;;OAEG;;;;IAIH;;OAEG;;;;;IAKH;;OAEG;;cAEe,QAAQ,CAAC,WAAW,CAAC;;;;;;;;;;;;;AA7CzC,wBAiDG"}
@@ -1 +1 @@
1
- {"version":3,"file":"RedisConfigurationList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationList.vue"],"names":[],"mappings":"AA2hBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EACV,mCAAmC,EACnC,uCAAuC,EACvC,SAAS,EAET,gBAAgB,EACjB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;;IAm7BrC,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E;;;OAGG;;;;;;;;;YAjD8B,MAAM;gBAAU,MAAM;;;;;;IAOvD,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E;;;OAGG;;;;;;;;;YAjD8B,MAAM;gBAAU,MAAM;;;;;;;qBAwBpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAjD7E,wBA8DG"}
1
+ {"version":3,"file":"RedisConfigurationList.vue.d.ts","sourceRoot":"","sources":["../../../src/components/RedisConfigurationList.vue"],"names":[],"mappings":"AAiiBA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAA;AACnC,OAAO,KAAK,EACV,mCAAmC,EACnC,uCAAuC,EACvC,SAAS,EAET,gBAAgB,EACjB,MAAM,UAAU,CAAA;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;;IAg8BrC,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E;;;OAGG;;;;;;;;;YAjD8B,MAAM;gBAAU,MAAM;;;;;;IAOvD,oHAAoH;;cAElG,QAAQ,CAAC,mCAAmC,GAAG,uCAAuC,CAAC;;4BAEnF,mCAAmC,GAAG,uCAAuC,KAAG,OAAO;;;;;;IAW7G,yHAAyH;;cAErG,QAAQ,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI9D,2HAA2H;;cAEvG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,yHAAyH;;cAErG,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E,4IAA4I;;cAExH,QAAQ,CAAC,CAAC,GAAG,EAAE,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;;;;IAI5E;;;OAGG;;;;;;;;;YAjD8B,MAAM;gBAAU,MAAM;;;;;;;qBAwBpB,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;qBAM1B,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;mBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;uBAMxC,SAAS,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;;;AAjD7E,wBA8DG"}
@@ -11,6 +11,7 @@ export declare const useRedisConfigurationForm: (options: Options) => {
11
11
  fields: {
12
12
  name: string;
13
13
  type: import("../types").PartialType;
14
+ tags: string;
14
15
  config: {
15
16
  cluster_max_redirections: number;
16
17
  cluster_nodes: {
@@ -51,6 +52,7 @@ export declare const useRedisConfigurationForm: (options: Options) => {
51
52
  payload: import("vue").ComputedRef<{
52
53
  name: string;
53
54
  type: import("../types").PartialType;
55
+ tags: string[];
54
56
  config: {
55
57
  host: string | undefined;
56
58
  port: unknown;
@@ -78,6 +80,7 @@ export declare const useRedisConfigurationForm: (options: Options) => {
78
80
  } | {
79
81
  name: string;
80
82
  type: import("../types").PartialType;
83
+ tags: string[];
81
84
  config: {
82
85
  connect_timeout: unknown;
83
86
  connection_is_proxied: boolean;
@@ -105,6 +108,7 @@ export declare const useRedisConfigurationForm: (options: Options) => {
105
108
  } | {
106
109
  name: string;
107
110
  type: import("../types").PartialType;
111
+ tags: string[];
108
112
  config: {
109
113
  cluster_nodes: import("../types").ClusterNode[];
110
114
  cluster_max_redirections: unknown;
@@ -132,6 +136,7 @@ export declare const useRedisConfigurationForm: (options: Options) => {
132
136
  } | {
133
137
  name: string;
134
138
  type: import("../types").PartialType;
139
+ tags: string[];
135
140
  config: {
136
141
  sentinel_master: string | null;
137
142
  sentinel_nodes: import("../types").SentinelNode[];
@@ -1 +1 @@
1
- {"version":3,"file":"useRedisConfigurationForm.d.ts","sourceRoot":"","sources":["../../../src/composables/useRedisConfigurationForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,iCAAiC,CAAA;AAIzF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAIpC,OAAO,KAAK,EAAE,uCAAuC,EAAE,mCAAmC,EAAyD,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAE/L,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B,MAAM,EAAE,mCAAmC,GAAG,uCAAuC,CAAA;CACtF,CAAA;AAED,eAAO,MAAM,yBAAyB,YAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA4MpB,0BAA0B;CA2B/D,CAAA"}
1
+ {"version":3,"file":"useRedisConfigurationForm.d.ts","sourceRoot":"","sources":["../../../src/composables/useRedisConfigurationForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAuB,MAAM,iCAAiC,CAAA;AAIzF,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAIpC,OAAO,KAAK,EAAE,uCAAuC,EAAE,mCAAmC,EAAyD,0BAA0B,EAAE,MAAM,UAAU,CAAA;AAE/L,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,SAAS,CAAA;IAC5B,MAAM,EAAE,mCAAmC,GAAG,uCAAuC,CAAA;CACtF,CAAA;AAED,eAAO,MAAM,yBAAyB,YAAa,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAiNpB,0BAA0B;CA4B/D,CAAA"}
@@ -16,5 +16,7 @@ export declare const standardize: {
16
16
  addIdToClusterNodes(nodes: ClusterNode[]): Identifiable<ClusterNode>[];
17
17
  addIdToSentinelNodes(nodes: SentinelNode[]): Identifiable<SentinelNode>[];
18
18
  removeNullValues(obj: Record<string, any>): Record<string, any>;
19
+ stringToArray(value: string | null | undefined, separator?: string): string[];
20
+ arrayToString(value: string[] | null | undefined, separator?: string): string;
19
21
  };
20
22
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,wBAAwB,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AACxJ,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAG,YAAY,CAAC,CAAC,CAErF,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,QAAQ,CAAC,KAAG,IAAI,CAAC,CAAC,EAAE,IAAI,CAGpF,CAAA;AAED,eAAO,MAAM,sBAAsB,4CAAiD,CAAA;AAEpF,eAAO,MAAM,qBAAqB,2CAAgD,CAAA;AAElF,eAAO,MAAM,YAAY,WAAY,wBAAwB,GAAG,qBAAqB,KAAG,SAcvF,CAAA;AAED,eAAO,MAAM,yBAAyB,SAAU,SAAS,KAAG,WAE3D,CAAA;AAED,eAAO,MAAM,WAAW;QAClB,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,iBAAiB,CAAC,GAAG,MAAM,GAAG,CAAC;QAO3E,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,iBAAiB,CAAC,GAAG,MAAM,GAAG,CAAC;gCAOnD,YAAY,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,EAAE;qCAOtC,YAAY,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,EAAE;+BAOnD,WAAW,EAAE,GAAG,YAAY,CAAC,WAAW,CAAC,EAAE;gCAI1C,YAAY,EAAE,GAAG,YAAY,CAAC,YAAY,CAAC,EAAE;0BAInD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAShE,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,KAAK,qBAAqB,EAAE,KAAK,wBAAwB,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAA;AACxJ,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AAEnC,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAG,YAAY,CAAC,CAAC,CAErF,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,QAAQ,CAAC,KAAG,IAAI,CAAC,CAAC,EAAE,IAAI,CAGpF,CAAA;AAED,eAAO,MAAM,sBAAsB,4CAAiD,CAAA;AAEpF,eAAO,MAAM,qBAAqB,2CAAgD,CAAA;AAElF,eAAO,MAAM,YAAY,WAAY,wBAAwB,GAAG,qBAAqB,KAAG,SAcvF,CAAA;AAED,eAAO,MAAM,yBAAyB,SAAU,SAAS,KAAG,WAE3D,CAAA;AAED,eAAO,MAAM,WAAW;QAClB,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,iBAAiB,CAAC,GAAG,MAAM,GAAG,CAAC;QAO3E,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,iBAAiB,CAAC,GAAG,MAAM,GAAG,CAAC;gCAOnD,YAAY,CAAC,WAAW,CAAC,EAAE,GAAG,WAAW,EAAE;qCAOtC,YAAY,CAAC,YAAY,CAAC,EAAE,GAAG,YAAY,EAAE;+BAOnD,WAAW,EAAE,GAAG,YAAY,CAAC,WAAW,CAAC,EAAE;gCAI1C,YAAY,EAAE,GAAG,YAAY,CAAC,YAAY,CAAC,EAAE;0BAInD,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;yBAU1C,MAAM,GAAG,IAAI,GAAG,SAAS,uBAAoB,MAAM,EAAE;yBAKrD,MAAM,EAAE,GAAG,IAAI,GAAG,SAAS,uBAAqB,MAAM;CAI5E,CAAA"}
@@ -7,6 +7,7 @@ export interface KongManagerRedisConfigurationFormConfig extends KongManagerBase
7
7
  export interface RedisConfigurationFields {
8
8
  name: string;
9
9
  type: PartialType;
10
+ tags: string;
10
11
  config: {
11
12
  cluster_max_redirections: number;
12
13
  cluster_nodes: Identifiable<ClusterNode>[];
@@ -1 +1 @@
1
- {"version":3,"file":"redis-configuration-form.d.ts","sourceRoot":"","sources":["../../../src/types/redis-configuration-form.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AACvG,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEjG,MAAM,WAAW,mCAAoC,SAAQ,qBAAqB;CAAI;AACtF,MAAM,WAAW,uCAAwC,SAAQ,yBAAyB;CAAI;AAG9F,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,WAAW,CAAA;IACjB,MAAM,EAAE;QACN,wBAAwB,EAAE,MAAM,CAAA;QAChC,aAAa,EAAE,YAAY,CAAC,WAAW,CAAC,EAAE,CAAA;QAC1C,eAAe,EAAE,MAAM,CAAA;QACvB,qBAAqB,EAAE,OAAO,CAAA;QAC9B,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,iBAAiB,EAAE,MAAM,CAAA;QACzB,mBAAmB,EAAE,MAAM,CAAA;QAC3B,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,MAAM,CAAA;QACpB,YAAY,EAAE,MAAM,CAAA;QACpB,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,cAAc,EAAE,YAAY,CAAC,YAAY,CAAC,EAAE,CAAA;QAC5C,iBAAiB,EAAE,MAAM,CAAA;QACzB,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;QAC1C,iBAAiB,EAAE,MAAM,CAAA;QACzB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,UAAU,EAAE,OAAO,CAAA;QACnB,GAAG,EAAE,OAAO,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,wBAAwB,CAAA;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB"}
1
+ {"version":3,"file":"redis-configuration-form.d.ts","sourceRoot":"","sources":["../../../src/types/redis-configuration-form.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AACvG,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAEjG,MAAM,WAAW,mCAAoC,SAAQ,qBAAqB;CAAI;AACtF,MAAM,WAAW,uCAAwC,SAAQ,yBAAyB;CAAI;AAG9F,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,WAAW,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE;QACN,wBAAwB,EAAE,MAAM,CAAA;QAChC,aAAa,EAAE,YAAY,CAAC,WAAW,CAAC,EAAE,CAAA;QAC1C,eAAe,EAAE,MAAM,CAAA;QACvB,qBAAqB,EAAE,OAAO,CAAA;QAC9B,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,iBAAiB,EAAE,MAAM,CAAA;QACzB,mBAAmB,EAAE,MAAM,CAAA;QAC3B,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,YAAY,EAAE,MAAM,CAAA;QACpB,YAAY,EAAE,MAAM,CAAA;QACpB,eAAe,CAAC,EAAE,MAAM,CAAA;QACxB,cAAc,EAAE,YAAY,CAAC,YAAY,CAAC,EAAE,CAAA;QAC5C,iBAAiB,EAAE,MAAM,CAAA;QACzB,aAAa,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,KAAK,CAAA;QAC1C,iBAAiB,EAAE,MAAM,CAAA;QACzB,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,UAAU,EAAE,OAAO,CAAA;QACnB,GAAG,EAAE,OAAO,CAAA;QACZ,OAAO,CAAC,EAAE,MAAM,CAAA;QAChB,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,wBAAwB,CAAA;IAChC,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;CACrB"}
@@ -19,6 +19,7 @@ export type ClusterNode = {
19
19
  export type RedisConfigurationDTO = {
20
20
  name: string;
21
21
  type: PartialType;
22
+ tags: string[];
22
23
  config: RedisConfigurationConfigDTO;
23
24
  };
24
25
  export type RedisConfigurationConfigDTO = {