p3x-redis-ui-material
Version:
💿 P3X Redis UI triple frontend — Angular + React/MUI + Vue/Vuetify with 54 languages, 7 themes, Socket.IO, desktop notifications, and full feature parity
6 lines • 92.4 kB
JavaScript
import{a as w1,b as y1,c as T1,d as B1}from"./chunk-Q44CHE3X.js";import{a as U2}from"./chunk-AEOUXU3Y.js";import{a as Q2}from"./chunk-IZOMIYRD.js";import{a as G2}from"./chunk-5MKOZDXN.js";import{a as R2}from"./chunk-GSHPYIFH.js";import"./chunk-G3XOKGOC.js";import{a as k2,b as b2}from"./chunk-2IWVZCK2.js";import{a as z2}from"./chunk-PWJ42NN2.js";import"./chunk-NBRXTOBF.js";import{c as E2,d as D2,h as I2,i as W2,j as N2}from"./chunk-6XGY3Q2Y.js";import"./chunk-HWCHBMC4.js";import"./chunk-CVKYB7DC.js";import{a as T2,b as b1}from"./chunk-UYYXUKSC.js";import{a as t2,c as i2,d as o2,e as x1}from"./chunk-DET2MY23.js";import{a as B2,c as g1}from"./chunk-VQTCYUQY.js";import{a as A2,b as n2,c as _2,e as k1}from"./chunk-TKRAWHQA.js";import{a as O1,b as K}from"./chunk-W32HPWBA.js";import{c as F2,d as f1}from"./chunk-MDGU2XDP.js";import{a as p2,d as l2,e as x2,h as v2,i as Z2,j as Z1}from"./chunk-JCH63A4N.js";import"./chunk-NZJKKTDQ.js";import{b as c1,f as S1,g as s2,h as c2,i as S2,j as h2,k as O2,m as g2,v as h1,w as f2}from"./chunk-5LJPHUK2.js";import{a as P2}from"./chunk-YA4NX3C4.js";import{a as u2,b as u1,c as s1,d as r1,e as t1}from"./chunk-53CQV6LZ.js";import{a as w2,b as M1,c as e1}from"./chunk-4GIODJCK.js";import{c as d2,g as m2}from"./chunk-PFG3GPGC.js";import{$a as z,Bb as n,Cb as f,Da as c,Db as B,Hb as I1,Ia as N,Ib as W1,Jb as N1,Jc as a2,Ld as V1,Nd as v1,Pd as L1,Qd as y2,Rd as U,Tb as n1,U as C1,Wa as A1,Xa as p,Y as a1,Ya as l,Zb as H1,_ as J1,_a as R1,ab as G,ba as x,bb as u,ca as v,cb as e,db as i,eb as g,ja as Y1,jb as h,ka as l1,lb as d,na as X,nb as a,oa as C2,oc as Q,qc as e2,ra as H2,rb as L2,sb as E1,tb as D1,tc as r2,wa as V2,x as X1,xa as o,xb as T,yb as M2,zb as O}from"./chunk-MHKTEXY5.js";import{a as o3}from"./chunk-SJB4WMV2.js";import"./chunk-ENGD2CVB.js";import{g as i3,h as y}from"./chunk-O7S4L63H.js";var K2=[{path:"info",loadComponent:()=>import("./chunk-R3JTLCYK.js").then(L=>L.InfoComponent)},{path:"settings",loadComponent:()=>import("./chunk-4ZUW2UYO.js").then(L=>L.SettingsComponent)},{path:"database",loadComponent:()=>import("./chunk-EWBQKHIO.js").then(L=>L.DatabaseComponent),children:[{path:"statistics",loadComponent:()=>import("./chunk-4R5YXSMH.js").then(L=>L.StatisticsComponent)},{path:"key/:key",loadComponent:()=>import("./chunk-4K3SG6XM.js").then(L=>L.DatabaseKeyComponent)},{path:"",redirectTo:"statistics",pathMatch:"full"}]},{path:"search",loadComponent:()=>import("./chunk-7HAR5JLO.js").then(L=>L.SearchComponent)},{path:"monitoring",loadComponent:()=>import("./chunk-2KJS2WAG.js").then(L=>L.MonitoringShellComponent),children:[{path:"",loadComponent:()=>import("./chunk-UROIPNVE.js").then(L=>L.MonitoringComponent)},{path:"profiler",loadComponent:()=>import("./chunk-XNT5UG5S.js").then(L=>L.ProfilerComponent)},{path:"pubsub",loadComponent:()=>import("./chunk-WJ54ZK5I.js").then(L=>L.PubsubComponent)},{path:"analysis",loadComponent:()=>import("./chunk-2KA5EQKM.js").then(L=>L.MemoryAnalysisComponent)}]},{path:"",redirectTo:"settings",pathMatch:"full"},{path:"**",redirectTo:"settings"}];var P1="p3xr-auth-token";function a3(){return""}var _1=(()=>{class L{authRequired=X(!1);isAuthenticated=X(!1);authChecked=X(!1);loginError=X("");apiBase=a3();checkAuthStatus(){return y(this,null,function*(){try{let H=yield(yield fetch(`${this.apiBase}/api/auth-status`)).json();if(this.authRequired.set(H.enabled),!H.enabled)this.isAuthenticated.set(!0);else{let V=this.getToken();if(V){let r=yield(yield fetch(`${this.apiBase}/api/verify-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:V})})).json();this.isAuthenticated.set(r.valid),r.valid||localStorage.removeItem(P1)}}}catch(C){this.isAuthenticated.set(!0)}this.authChecked.set(!0)})}login(C,H){return y(this,null,function*(){this.loginError.set("");try{let M=yield(yield fetch(`${this.apiBase}/api/login`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:C,password:H})})).json();return M.status==="ok"&&M.token?(localStorage.setItem(P1,M.token),this.isAuthenticated.set(!0),!0):(this.loginError.set(M.error||"login_failed"),!1)}catch(V){return this.loginError.set("network_error"),!1}})}getToken(){try{return localStorage.getItem(P1)}catch(C){return null}}logout(){try{localStorage.removeItem(P1)}catch(C){}location.reload()}static \u0275fac=function(H){return new(H||L)};static \u0275prov=C1({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();var q2="M12,4A4,4 0 0,1 16,8A4,4 0 0,1 12,12A4,4 0 0,1 8,8A4,4 0 0,1 12,4M12,14C16.42,14 20,15.79 20,18V20H4V18C4,15.79 7.58,14 12,14Z";var j2="M3,3H21V7H3V3M4,8H20V21H4V8M9.5,11A0.5,0.5 0 0,0 9,11.5V13H15V11.5A0.5,0.5 0 0,0 14.5,11H9.5Z";var $2="M22,3H7C6.31,3 5.77,3.35 5.41,3.88L0,12L5.41,20.11C5.77,20.64 6.31,21 7,21H22A2,2 0 0,0 24,19V5A2,2 0 0,0 22,3M19,15.59L17.59,17L14,13.41L10.41,17L9,15.59L12.59,12L9,8.41L10.41,7L14,10.59L17.59,7L19,8.41L15.41,12";var X2="M19 2L14 6.5V17.5L19 13V2M6.5 5C4.55 5 2.45 5.4 1 6.5V21.16C1 21.41 1.25 21.66 1.5 21.66C1.6 21.66 1.65 21.59 1.75 21.59C3.1 20.94 5.05 20.5 6.5 20.5C8.45 20.5 10.55 20.9 12 22C13.35 21.15 15.8 20.5 17.5 20.5C19.15 20.5 20.85 20.81 22.25 21.56C22.35 21.61 22.4 21.59 22.5 21.59C22.75 21.59 23 21.34 23 21.09V6.5C22.4 6.05 21.75 5.75 21 5.5V19C19.9 18.65 18.7 18.5 17.5 18.5C15.8 18.5 13.35 19.15 12 20V6.5C10.55 5.4 8.45 5 6.5 5Z";var J2="M12 2C17.5 2 22 6.5 22 12S17.5 22 12 22 2 17.5 2 12 6.5 2 12 2M12 4C10.1 4 8.4 4.6 7.1 5.7L18.3 16.9C19.3 15.5 20 13.8 20 12C20 7.6 16.4 4 12 4M16.9 18.3L5.7 7.1C4.6 8.4 4 10.1 4 12C4 16.4 7.6 20 12 20C13.9 20 15.6 19.4 16.9 18.3Z";var z1="M22,21H2V3H4V19H6V10H10V19H12V6H16V19H18V14H22V21Z";var Y2="M16,11.78L20.24,4.45L21.97,5.45L16.74,14.5L10.23,10.75L5.46,19H22V21H2V3H4V17.54L9.5,8L16,11.78Z";var C5="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z";var H5="M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z";var V5="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";var G1="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z";var L5="M15.41,16.58L10.83,12L15.41,7.41L14,6L8,12L14,18L15.41,16.58Z";var Q1="M8.59,16.58L13.17,12L8.59,7.41L10,6L16,12L10,18L8.59,16.58Z";var M5="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z";var e5="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z";var r5="M3,5A2,2 0 0,1 5,3H19A2,2 0 0,1 21,5V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5M6,6V18H10V16H8V8H10V6H6M16,16H14V18H18V6H14V8H16V16Z";var t5="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z";var i5="M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M5,5V7H19V5H5M5,9V11H13V9H5M5,13V15H15V13H5Z";var o5="M20,19V7H4V19H20M20,3A2,2 0 0,1 22,5V19A2,2 0 0,1 20,21H4A2,2 0 0,1 2,19V5C2,3.89 2.9,3 4,3H20M13,17V15H18V17H13M9.58,13L5.57,9H8.4L11.7,12.3C12.09,12.69 12.09,13.33 11.7,13.72L8.42,17H5.59L9.58,13Z";var a5="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z";var A5="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z";var n5="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z";var d5="M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19M8.46,11.88L9.87,10.47L12,12.59L14.12,10.47L15.53,11.88L13.41,14L15.53,16.12L14.12,17.53L12,15.41L9.88,17.53L8.47,16.12L10.59,14L8.46,11.88M15.5,4L14.5,3H9.5L8.5,4H5V6H19V4H15.5Z";var m5="M15,16H19V18H15V16M15,8H22V10H15V8M15,12H21V14H15V12M3,18A2,2 0 0,0 5,20H11A2,2 0 0,0 13,18V8H3V18M14,5H11L10,4H6L5,5H2V7H14V5Z";var p5="M7,9A2,2 0 0,1 5,7A2,2 0 0,1 7,5A2,2 0 0,1 9,7A2,2 0 0,1 7,9M20,3H4A1,1 0 0,0 3,4V10A1,1 0 0,0 4,11H20A1,1 0 0,0 21,10V4A1,1 0 0,0 20,3M7,19A2,2 0 0,1 5,17A2,2 0 0,1 7,15A2,2 0 0,1 9,17A2,2 0 0,1 7,19M20,13H4A1,1 0 0,0 3,14V20A1,1 0 0,0 4,21H20A1,1 0 0,0 21,20V14A1,1 0 0,0 20,13Z";var U1="M5,20H19V18H5M19,9H15V3H9V9H5L12,16L19,9Z";var l5="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z";var x5="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z";var v5="M6,2A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2H6M6,4H13V9H18V20H6V4M8,12V14H16V12H8M8,16V18H13V16H8Z";var Z5="M3,3H9V7H3V3M15,10H21V14H15V10M15,17H21V21H15V17M13,13H7V18H13V20H7L5,20V9H7V11H13V13Z";var u5="M17.81,4.47C17.73,4.47 17.65,4.45 17.58,4.41C15.66,3.42 14,3 12,3C10.03,3 8.15,3.47 6.44,4.41C6.2,4.54 5.9,4.45 5.76,4.21C5.63,3.97 5.72,3.66 5.96,3.53C7.82,2.5 9.86,2 12,2C14.14,2 16,2.47 18.04,3.5C18.29,3.65 18.38,3.95 18.25,4.19C18.16,4.37 18,4.47 17.81,4.47M3.5,9.72C3.4,9.72 3.3,9.69 3.21,9.63C3,9.47 2.93,9.16 3.09,8.93C4.08,7.53 5.34,6.43 6.84,5.66C10,4.04 14,4.03 17.15,5.65C18.65,6.42 19.91,7.5 20.9,8.9C21.06,9.12 21,9.44 20.78,9.6C20.55,9.76 20.24,9.71 20.08,9.5C19.18,8.22 18.04,7.23 16.69,6.54C13.82,5.07 10.15,5.07 7.29,6.55C5.93,7.25 4.79,8.25 3.89,9.5C3.81,9.65 3.66,9.72 3.5,9.72M9.75,21.79C9.62,21.79 9.5,21.74 9.4,21.64C8.53,20.77 8.06,20.21 7.39,19C6.7,17.77 6.34,16.27 6.34,14.66C6.34,11.69 8.88,9.27 12,9.27C15.12,9.27 17.66,11.69 17.66,14.66A0.5,0.5 0 0,1 17.16,15.16A0.5,0.5 0 0,1 16.66,14.66C16.66,12.24 14.57,10.27 12,10.27C9.43,10.27 7.34,12.24 7.34,14.66C7.34,16.1 7.66,17.43 8.27,18.5C8.91,19.66 9.35,20.15 10.12,20.93C10.31,21.13 10.31,21.44 10.12,21.64C10,21.74 9.88,21.79 9.75,21.79M16.92,19.94C15.73,19.94 14.68,19.64 13.82,19.05C12.33,18.04 11.44,16.4 11.44,14.66A0.5,0.5 0 0,1 11.94,14.16A0.5,0.5 0 0,1 12.44,14.66C12.44,16.07 13.16,17.4 14.38,18.22C15.09,18.7 15.92,18.93 16.92,18.93C17.16,18.93 17.56,18.9 17.96,18.83C18.23,18.78 18.5,18.96 18.54,19.24C18.59,19.5 18.41,19.77 18.13,19.82C17.56,19.93 17.06,19.94 16.92,19.94M14.91,22C14.87,22 14.82,22 14.78,22C13.19,21.54 12.15,20.95 11.06,19.88C9.66,18.5 8.89,16.64 8.89,14.66C8.89,13.04 10.27,11.72 11.97,11.72C13.67,11.72 15.05,13.04 15.05,14.66C15.05,15.73 16,16.6 17.13,16.6C18.28,16.6 19.21,15.73 19.21,14.66C19.21,10.89 15.96,7.83 11.96,7.83C9.12,7.83 6.5,9.41 5.35,11.86C4.96,12.67 4.76,13.62 4.76,14.66C4.76,15.44 4.83,16.67 5.43,18.27C5.53,18.53 5.4,18.82 5.14,18.91C4.88,19 4.59,18.87 4.5,18.62C4,17.31 3.77,16 3.77,14.66C3.77,13.46 4,12.37 4.45,11.42C5.78,8.63 8.73,6.82 11.96,6.82C16.5,6.82 20.21,10.33 20.21,14.65C20.21,16.27 18.83,17.59 17.13,17.59C15.43,17.59 14.05,16.27 14.05,14.65C14.05,13.58 13.12,12.71 11.97,12.71C10.82,12.71 9.89,13.58 9.89,14.65C9.89,16.36 10.55,17.96 11.76,19.16C12.71,20.1 13.62,20.62 15.03,21C15.3,21.08 15.45,21.36 15.38,21.62C15.33,21.85 15.12,22 14.91,22Z";var s5="M10,13H22V11H10M10,19H22V17H10M10,7H22V5H10M6,7H8.5L5,3.5L1.5,7H4V17H1.5L5,20.5L8.5,17H6V7Z";var c5="M19.5 17C19.37 17 19.24 17 19.11 17.04L17.5 13.79C17.95 13.34 18.25 12.71 18.25 12C18.25 10.62 17.13 9.5 15.75 9.5C15.62 9.5 15.5 9.5 15.36 9.54L13.73 6.29C14.21 5.84 14.5 5.21 14.5 4.5C14.5 3.12 13.38 2 12 2S9.5 3.12 9.5 4.5C9.5 5.21 9.79 5.84 10.26 6.29L8.64 9.54C8.5 9.5 8.38 9.5 8.25 9.5C6.87 9.5 5.75 10.62 5.75 12C5.75 12.71 6.05 13.34 6.5 13.79L4.89 17.04C4.76 17 4.63 17 4.5 17C3.12 17 2 18.12 2 19.5C2 20.88 3.12 22 4.5 22S7 20.88 7 19.5C7 18.8 6.71 18.16 6.24 17.71L7.86 14.46C8 14.5 8.12 14.5 8.25 14.5C8.38 14.5 8.5 14.5 8.64 14.46L10.27 17.71C9.8 18.16 9.5 18.8 9.5 19.5C9.5 20.88 10.62 22 12 22S14.5 20.88 14.5 19.5C14.5 18.12 13.38 17 12 17C11.87 17 11.74 17 11.61 17.04L10 13.79C10.46 13.34 10.75 12.71 10.75 12S10.46 10.66 10 10.21L11.61 6.96C11.74 7 11.87 7 12 7S12.26 7 12.39 6.96L14 10.21C13.55 10.66 13.25 11.3 13.25 12C13.25 13.38 14.37 14.5 15.75 14.5C15.88 14.5 16 14.5 16.14 14.46L17.77 17.71C17.3 18.16 17 18.8 17 19.5C17 20.88 18.12 22 19.5 22S22 20.88 22 19.5C22 18.12 20.88 17 19.5 17Z";var S5="M12,21.35L10.55,20.03C5.4,15.36 2,12.27 2,8.5C2,5.41 4.42,3 7.5,3C9.24,3 10.91,3.81 12,5.08C13.09,3.81 14.76,3 16.5,3C19.58,3 22,5.41 22,8.5C22,12.27 18.6,15.36 13.45,20.03L12,21.35Z";var h5="M7.5,4A5.5,5.5 0 0,0 2,9.5C2,10 2.09,10.5 2.22,11H6.3L7.57,7.63C7.87,6.83 9.05,6.75 9.43,7.63L11.5,13L12.09,11.58C12.22,11.25 12.57,11 13,11H21.78C21.91,10.5 22,10 22,9.5A5.5,5.5 0 0,0 16.5,4C14.64,4 13,4.93 12,6.34C11,4.93 9.36,4 7.5,4V4M3,12.5A1,1 0 0,0 2,13.5A1,1 0 0,0 3,14.5H5.44L11,20C12,20.9 12,20.9 13,20L18.56,14.5H21A1,1 0 0,0 22,13.5A1,1 0 0,0 21,12.5H13.4L12.47,14.8C12.07,15.81 10.92,15.67 10.55,14.83L8.5,9.5L7.54,11.83C7.39,12.21 7.05,12.5 6.6,12.5H3Z";var O5="M8.5,13.5L11,16.5L14.5,12L19,18H5M21,19V5C21,3.89 20.1,3 19,3H5A2,2 0 0,0 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19Z";var g5="M13,9H11V7H13M13,17H11V11H13M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z";var f5="M11 7L9.6 8.4L12.2 11H2V13H12.2L9.6 15.6L11 17L16 12L11 7M20 19H12V21H20C21.1 21 22 20.1 22 19V5C22 3.9 21.1 3 20 3H12V5H20V19Z";var k5="M17 7L15.59 8.41L18.17 11H8V13H18.17L15.59 15.58L17 17L22 12M4 5H12V3H4C2.9 3 2 3.9 2 5V19C2 20.1 2.9 21 4 21H12V19H4V5Z";var b5="M9.5,3A6.5,6.5 0 0,1 16,9.5C16,11.11 15.41,12.59 14.44,13.73L14.71,14H15.5L20.5,19L19,20.5L14,15.5V14.71L13.73,14.44C12.59,15.41 11.11,16 9.5,16A6.5,6.5 0 0,1 3,9.5A6.5,6.5 0 0,1 9.5,3M9.5,5C7,5 5,7 5,9.5C5,12 7,14 9.5,14C12,14 14,12 14,9.5C14,7 12,5 9.5,5Z";var w5="M19,13H5V11H19V13Z";var y5="M14,10H19.5L14,4.5V10M5,3H15L21,9V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3M5,12V14H19V12H5M5,16V18H14V16H5Z";var T5="M17.5,12A1.5,1.5 0 0,1 16,10.5A1.5,1.5 0 0,1 17.5,9A1.5,1.5 0 0,1 19,10.5A1.5,1.5 0 0,1 17.5,12M14.5,8A1.5,1.5 0 0,1 13,6.5A1.5,1.5 0 0,1 14.5,5A1.5,1.5 0 0,1 16,6.5A1.5,1.5 0 0,1 14.5,8M9.5,8A1.5,1.5 0 0,1 8,6.5A1.5,1.5 0 0,1 9.5,5A1.5,1.5 0 0,1 11,6.5A1.5,1.5 0 0,1 9.5,8M6.5,12A1.5,1.5 0 0,1 5,10.5A1.5,1.5 0 0,1 6.5,9A1.5,1.5 0 0,1 8,10.5A1.5,1.5 0 0,1 6.5,12M12,3A9,9 0 0,0 3,12A9,9 0 0,0 12,21A1.5,1.5 0 0,0 13.5,19.5C13.5,19.11 13.35,18.76 13.11,18.5C12.88,18.23 12.73,17.88 12.73,17.5A1.5,1.5 0 0,1 14.23,16H16A5,5 0 0,0 21,11C21,6.58 16.97,3 12,3Z";var B5="M20.71,7.04C21.1,6.65 21.1,6 20.71,5.63L18.37,3.29C18,2.9 17.35,2.9 16.96,3.29L15.12,5.12L18.87,8.87M3,17.25V21H6.75L17.81,9.93L14.06,6.18L3,17.25Z";var P5="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z",_5="M17,13H13V17H11V13H7V11H11V7H13V11H17M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z";var F5="M5.41,21L6.12,17H2.12L2.47,15H6.47L7.53,9H3.53L3.88,7H7.88L8.59,3H10.59L9.88,7H15.88L16.59,3H18.59L17.88,7H21.88L21.53,9H17.53L16.47,15H20.47L20.12,17H16.12L15.41,21H13.41L14.12,17H8.12L7.41,21H5.41M9.53,9L8.47,15H14.47L15.53,9H9.53Z";var R5="M16.56,5.44L15.11,6.89C16.84,7.94 18,9.83 18,12A6,6 0 0,1 12,18A6,6 0 0,1 6,12C6,9.83 7.16,7.94 8.88,6.88L7.44,5.44C5.36,6.88 4,9.28 4,12A8,8 0 0,0 12,20A8,8 0 0,0 20,12C20,9.28 18.64,6.88 16.56,5.44M13,3H11V13H13";var E5="M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";var D5="M16,18H18V6H16M6,18L14.5,12L6,6V18Z";var I5="M6,18V6H8V18H6M9.5,12L18,6V18L9.5,12Z";var W5="M9,3L5,7H8V14H10V7H13M16,17V10H14V17H11L15,21L19,17H16Z";var N5="M19.03 7.39L20.45 5.97C20 5.46 19.55 5 19.04 4.56L17.62 6C16.07 4.74 14.12 4 12 4C7.03 4 3 8.03 3 13S7.03 22 12 22C17 22 21 17.97 21 13C21 10.88 20.26 8.93 19.03 7.39M13 14H11V7H13V14M15 1H9V3H15V1Z";var z5="M6,2H18V8H18V8L14,12L18,16V16H18V22H6V16H6V16L10,12L6,8V8H6V2M16,16.5L12,12.5L8,16.5V20H16V16.5M12,11.5L16,7.5V4H8V7.5L12,11.5M10,6H14V6.75L12,8.75L10,6.75V6Z";var G5="M12.5,8C9.85,8 7.45,9 5.6,10.6L2,7V16H11L7.38,12.38C8.77,11.22 10.54,10.5 12.5,10.5C16.04,10.5 19.05,12.81 20.1,16L22.47,15.22C21.08,11.03 17.15,8 12.5,8Z";var Q5="M16.59,5.41L15.17,4L12,7.17L8.83,4L7.41,5.41L12,10M7.41,18.59L8.83,20L12,16.83L15.17,20L16.58,18.59L12,14L7.41,18.59Z";var U5="M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z";var K1="M9,16V10H5L12,3L19,10H15V16H9M5,20V18H19V20H5Z";var K5="M21,5H3V7H21V5M3,19H10V17H3V19M3,13H18C19,13 20,13.43 20,15C20,16.57 19,17 18,17H16V15L12,18L16,21V19H18C20.95,19 22,17.73 22,15C22,12.28 21,11 18,11H3V13Z";var A3={account_tree:Z5,add:P5,add_box:_5,analytics:z1,archive:j2,auto_graph:c5,backspace:$2,bar_chart:z1,cancel:J2,check_box:V5,check_box_outline_blank:H5,chevron_right:Q1,close:e5,color_lens:T5,content_copy:a5,data_array:r5,delete:n5,delete_forever:d5,delete_sweep:m5,description:v5,difference:W5,done:C5,download:U1,edit:B5,expand_more:G1,favorite:S5,file_download:U1,file_upload:K1,fingerprint:u5,format_line_spacing:s5,hourglass_empty:z5,image:O5,info:g5,keyboard_arrow_down:G1,keyboard_arrow_left:L5,keyboard_arrow_right:Q1,keyboard_arrow_up:M5,login:f5,logout:k5,menu_book:X2,mode_comment:i5,monitor_heart:h5,notes:y5,numbers:F5,person:q2,power:R5,refresh:E5,remove:w5,save:A5,search:b5,settings:t5,show_chart:Y2,skip_next:D5,skip_previous:I5,storage:p5,terminal:o5,timer:N5,undo:G5,unfold_less:Q5,unfold_more:U5,upload:K1,visibility:l5,visibility_off:x5,wrap_text:K5},q5=(()=>{class L{iconRegistry;sanitizer;constructor(C,H){this.iconRegistry=C,this.sanitizer=H}registerAll(){for(let[C,H]of Object.entries(A3)){let V=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="${H}" fill="currentColor"/></svg>`;this.iconRegistry.addSvgIconLiteral(C,this.sanitizer.bypassSecurityTrustHtml(V))}}static \u0275fac=function(H){return new(H||L)(a1(w2),a1(r2))};static \u0275prov=C1({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();function m3(L,t){if(L&1&&(e(0,"div",18),n(1),i()),L&2){let C=a();o(),B(" ",C.getErrorMessage(C.auth.loginError())," ")}}var X5=(()=>{class L{i18n;auth;username="";password="";loading=!1;hidePassword=!0;currentGui="ng";constructor(C,H){this.i18n=C,this.auth=H;try{this.currentGui=localStorage.getItem("p3xr-frontend")||"ng"}catch(V){}}onLogin(){return y(this,null,function*(){if(this.loading||!this.username||!this.password)return;this.loading=!0,(yield this.auth.login(this.username,this.password))&&location.reload(),this.loading=!1})}switchGui(C){this.currentGui=C,Q2(C)}getErrorMessage(C){return this.i18n.strings()?.confirm?.invalidCredentials}static \u0275fac=function(H){return new(H||L)(c(U),c(_1))};static \u0275cmp=N({type:L,selectors:[["p3xr-login"]],decls:42,vars:16,consts:[["guiMenu",""],[1,"p3xr-login-dialog-wrapper"],[1,"p3xr-login-dialog"],["novalidate","",3,"ngSubmit"],[1,"p3xr-dialog-toolbar","p3xr-mat-layout-strong"],[1,"p3xr-layout-spacer"],["mat-button","","type","button",2,"color","rgba(255,255,255,0.87)",3,"matMenuTriggerFor"],[2,"margin-right","4px"],["mat-menu-item","",3,"click"],[1,"fab","fa-angular",2,"font-size","18px","width","24px","text-align","center","margin-right","8px","color","#dd0031"],[1,"fab","fa-react",2,"font-size","18px","width","24px","text-align","center","margin-right","8px","color","#61dafb"],[1,"fab","fa-vuejs",2,"font-size","18px","width","24px","text-align","center","margin-right","8px","color","#42b883"],[1,"p3xr-dialog-content"],[1,"full-width"],["matPrefix",""],["matInput","","name","username","type","text","autocomplete","username",3,"ngModelChange","ngModel"],["matInput","","name","password","autocomplete","current-password",3,"ngModelChange","keydown.enter","type","ngModel"],["mat-icon-button","","matSuffix","","type","button",3,"click"],[1,"p3xr-login-error"],[1,"p3xr-dialog-actions",2,"display","flex","justify-content","flex-end","padding","8px","gap","8px"],["mat-raised-button","","type","submit",1,"btn-primary",3,"disabled"]],template:function(H,V){if(H&1){let M=h();e(0,"div",1)(1,"div",2)(2,"form",3),d("ngSubmit",function(){return V.onLogin()}),e(3,"mat-toolbar",4),g(4,"span",5),e(5,"button",6)(6,"mat-icon",7),n(7,"desktop_windows"),i(),n(8," GUI "),i(),e(9,"mat-menu",null,0)(11,"button",8),d("click",function(){return V.switchGui("ng")}),g(12,"i",9),n(13," Angular "),i(),e(14,"button",8),d("click",function(){return V.switchGui("react")}),g(15,"i",10),n(16," React "),i(),e(17,"button",8),d("click",function(){return V.switchGui("vue")}),g(18,"i",11),n(19," Vue "),i()()(),e(20,"div",12)(21,"mat-form-field",13)(22,"mat-label"),n(23),i(),e(24,"mat-icon",14),n(25,"person"),i(),e(26,"input",15),N1("ngModelChange",function(A){return x(M),W1(V.username,A)||(V.username=A),v(A)}),i()(),e(27,"mat-form-field",13)(28,"mat-label"),n(29),i(),e(30,"mat-icon",14),n(31,"lock"),i(),e(32,"input",16),N1("ngModelChange",function(A){return x(M),W1(V.password,A)||(V.password=A),v(A)}),d("keydown.enter",function(){return V.onLogin()}),i(),e(33,"button",17),d("click",function(){return V.hidePassword=!V.hidePassword}),e(34,"mat-icon"),n(35),i()()(),p(36,m3,2,1,"div",18),i(),e(37,"div",19)(38,"button",20)(39,"mat-icon"),n(40,"login"),i(),n(41),i()()()()()}if(H&2){let M,r,A,Z=T(10);o(5),u("matMenuTriggerFor",Z),o(6),O("p3xr-mat-menu-item-selected",V.currentGui==="ng"),o(3),O("p3xr-mat-menu-item-selected",V.currentGui==="react"),o(3),O("p3xr-mat-menu-item-selected",V.currentGui==="vue"),o(6),f((M=V.i18n.strings().form)==null||M.connection==null||M.connection.label==null?null:M.connection.label.username),o(3),I1("ngModel",V.username),o(3),f((r=V.i18n.strings().form)==null||r.connection==null||r.connection.label==null?null:r.connection.label.password),o(3),u("type",V.hidePassword?"password":"text"),I1("ngModel",V.password),o(3),f(V.hidePassword?"visibility_off":"visibility"),o(),l(V.auth.loginError()?36:-1),o(2),u("disabled",V.loading||!V.username||!V.password),o(3),B(" ",(A=V.i18n.strings().intention)==null?null:A.ok," ")}},dependencies:[Q,h1,O2,c1,S1,s2,h2,c2,Z1,Z2,p2,l2,x2,f1,F2,L1,v1,V1,e1,M1,t1,r1,B1,y1,w1,T1],styles:[".p3xr-login-dialog-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 96px)}.p3xr-login-dialog[_ngcontent-%COMP%]{width:400px;max-width:calc(100vw - 32px);border-radius:4px;overflow:hidden;box-shadow:0 11px 15px -7px #0003,0 24px 38px 3px #00000024,0 9px 46px 8px #0000001f}.full-width[_ngcontent-%COMP%]{width:100%}.p3xr-login-error[_ngcontent-%COMP%]{color:#f44336;font-size:13px;margin:4px 0 8px}.p3xr-layout-spacer[_ngcontent-%COMP%]{flex:1 1 auto}"],changeDetection:0})}return L})();var J5=(()=>{class L{dialog;constructor(C){this.dialog=C}show(){return y(this,null,function*(){let{AiCheatsheetDialogComponent:C}=yield import("./chunk-6LXPL45E.js"),H=this.dialog.open(C,P2({width:"720px",maxWidth:"95vw",maxHeight:"90vh"}));return new Promise(V=>{H.afterClosed().subscribe(M=>V(M))})})}static \u0275fac=function(H){return new(H||L)(a1(d2))};static \u0275prov=C1({token:L,factory:L.\u0275fac,providedIn:"root"})}return L})();var P=i3(o3());var l3=(L,t)=>t.group,x3=(L,t)=>t.name;function v3(L,t){if(L&1){let C=h();e(0,"span",22),d("click",function(){x(C);let V=a(2);return v(V.aiAutoDetect=!V.aiAutoDetect)}),e(1,"span",23),n(2),i(),e(3,"span"),n(4,"Auto AI"),i()()}if(L&2){let C=a(2);o(2),f(C.aiAutoDetect?"check_box":"check_box_outline_blank")}}function Z3(L,t){if(L&1){let C=h();e(0,"span",15),n(1,"terminal"),i(),e(2,"span",16),n(3),i(),g(4,"span",17),e(5,"span",18),p(6,v3,5,1,"span",19),e(7,"p3xr-ng-button",20),d("click",function(V){x(C);let M=a();return v(M.openCommands(V))}),i(),e(8,"p3xr-ng-button",21),d("click",function(){x(C);let V=a();return v(V.clearConsole())}),i()()}if(L&2){let C,H,V,M=a();o(3),f((C=M.strings().label)==null?null:C.console),o(3),l(M.isAiGloballyEnabled()?6:-1),o(),u("label",(H=M.strings().label)==null?null:H.redisCommandsReference),o(),u("label",(V=M.strings().intention)==null?null:V.clear)}}function u3(L,t){if(L&1){let C=h();e(0,"span",22),d("click",function(){x(C);let V=a(2);return v(V.aiAutoDetect=!V.aiAutoDetect)}),e(1,"span",23),n(2),i(),e(3,"span"),n(4,"Auto AI"),i()()}if(L&2){let C=a(2);o(2),f(C.aiAutoDetect?"check_box":"check_box_outline_blank")}}function s3(L,t){if(L&1){let C=h();e(0,"p3xr-ng-button",26),d("click",function(){x(C);let V=a(2);return v(V.closeConsole())}),i()}if(L&2){let C,H=a(2);u("label",(C=H.strings().intention)==null?null:C.close)}}function c3(L,t){if(L&1){let C=h();e(0,"button",27),d("click",function(){x(C);let V=a(2);return v(V.requestClose())}),e(1,"mat-icon"),n(2,"keyboard_arrow_down"),i()()}if(L&2){let C,H,V=a(2);u("matTooltip",((C=V.strings().label)==null||C.consoleDrawer==null?null:C.consoleDrawer.closeTooltip)??((C=V.strings().intention)==null?null:C.close)??""),A1("aria-label",((H=V.strings().label)==null||H.consoleDrawer==null?null:H.consoleDrawer.closeTooltip)??((H=V.strings().intention)==null?null:H.close)??"")}}function S3(L,t){if(L&1){let C=h();e(0,"span",15),n(1,"terminal"),i(),e(2,"span",16),n(3),i(),g(4,"span",17),e(5,"span",18),p(6,u3,5,1,"span",19),e(7,"p3xr-ng-button",20),d("click",function(V){x(C);let M=a();return v(M.openCommands(V))}),i(),e(8,"p3xr-ng-button",21),d("click",function(){x(C);let V=a();return v(V.clearConsole())}),i(),p(9,s3,1,1,"p3xr-ng-button",24),p(10,c3,3,2,"button",25),i()}if(L&2){let C,H,V,M=a();o(3),f(M.embedded?(C=M.strings().label)==null?null:C.console:(C=M.strings().intention)==null?null:C.quickConsole),o(3),l(M.isAiGloballyEnabled()?6:-1),o(),u("label",(H=M.strings().label)==null?null:H.redisCommandsReference),o(),u("label",(V=M.strings().intention)==null?null:V.clear),o(),l(M.embedded?-1:9),o(),l(M.showCloseButton?10:-1)}}function h3(L,t){if(L&1){let C=h();e(0,"div",28),d("mousedown",function(){x(C);let V=a();return v(V.dragStart())})("mouseup",function(){x(C);let V=a();return v(V.dragEnd())}),i()}}function O3(L,t){L&1&&g(0,"div",8)}function g3(L,t){if(L&1&&(e(0,"div",10),n(1),i()),L&2){let C=a();o(),f(C.currentHint)}}function f3(L,t){if(L&1){let C=h();e(0,"button",29),d("click",function(){x(C);let V=a();return v(V.stopAi())}),e(1,"mat-icon"),n(2,"stop_circle"),i()()}if(L&2){let C,H=a();u("matTooltip",(C=H.strings().intention)==null?null:C.cancel)}}function k3(L,t){if(L&1&&(e(0,"span",32),n(1),i()),L&2){let C=a().$implicit;o(),f(C.syntax)}}function b3(L,t){if(L&1&&(e(0,"mat-option",30)(1,"span",31),n(2),i(),p(3,k3,2,1,"span",32),i()),L&2){let C=t.$implicit;u("value",C.name),o(2),f(C.name),o(),l(C.syntax?3:-1)}}function w3(L,t){if(L&1&&(e(0,"mat-optgroup",14),z(1,b3,4,3,"mat-option",30,x3),i()),L&2){let C=t.$implicit;u("label",C.group),o(),G(C.commands)}}var j1="p3xr-console-output-v1",$1=10*1024*1024,_=-1,Y5=(()=>{class L{ngZone;elementRef;i18n;common;socket;redisParser;cmd;state;cheatsheet;cdr;type="";embedded=!1;showCloseButton=!1;closeRequest=new Y1;requestClose(){this.closeRequest.emit()}searchText="";searchControl=new S2("");filteredCommands=[];currentHint="";aiLoading=!1;aiRequestSeq=0;get aiAutoDetect(){try{return localStorage.getItem("p3xr-ai-auto-detect")!=="false"}catch(C){return!0}}set aiAutoDetect(C){try{localStorage.setItem("p3xr-ai-auto-detect",String(C))}catch(H){}}strings;contentClicked=!1;unsubs=[];index=0;singleLineHeight=0;aiCommandPending=!1;containerEl=null;headerEl=null;footerEl=null;consoleHeaderEl=null;outputEl=null;autocompleteEl=null;inputEl=null;scrollers=null;persistOutputDebounced;inputFocusHandler;inputResizeHandler;inputBlurHandler;resizeFn;constructor(C,H,V,M,r,A,Z,S,s,m){this.ngZone=C,this.elementRef=H,this.i18n=V,this.common=M,this.socket=r,this.redisParser=A,this.cmd=Z,this.state=S,this.cheatsheet=s,this.cdr=m,this.strings=this.i18n.strings}ngOnInit(){this.searchControl.valueChanges.subscribe(C=>{this.searchText=C||"",this.autoResizeTextarea();let H=this.state.commands(),V=this.state.commandsMeta(),M=(C||"").trim().split(/\s+/)[0]?.toUpperCase();if(M&&V[M]?.syntax?this.currentHint=M+" "+V[M].syntax:this.currentHint="",C&&C.length>0&&H?.length>0){let r=C.toUpperCase(),A=H.filter(S=>S.toUpperCase().includes(r)).slice(0,20),Z=new Map;for(let S of A){let s=V[S.toUpperCase()],m=s?.group||"Other",b=s?.syntax||"";Z.has(m)||Z.set(m,[]),Z.get(m).push({name:S,syntax:b})}this.filteredCommands=Array.from(Z.entries()).map(([S,s])=>({group:S,commands:s}))}else this.filteredCommands=[]})}ngAfterViewInit(){this.ngZone.runOutsideAngular(()=>this.initJQuery())}ngOnDestroy(){this.elementRef.nativeElement.classList.remove("p3xr-console-embedded-collapsed"),this.persistOutputDebounced?.flush?this.persistOutputDebounced.flush():this.persistConsoleOutputNow(),this.inputEl&&(this.inputFocusHandler&&this.inputEl.removeEventListener("focus",this.inputFocusHandler),this.inputBlurHandler&&this.inputEl.removeEventListener("blur",this.inputBlurHandler),this.inputResizeHandler&&(this.inputEl.removeEventListener("focus",this.inputResizeHandler),this.inputEl.removeEventListener("blur",this.inputResizeHandler))),window.removeEventListener("resize",this.resizeFn),this.unsubs.forEach(C=>C())}emitToAngularJS(C,H){switch(C){case"p3xr-console-activate":this.cmd.consoleActivate$.next();break;case"p3xr-console-deactivate":this.cmd.consoleDeactivate$.next();break;case"p3xr-console-embedded-resize":this.cmd.consoleEmbeddedResize$.next();break;default:break}}isAiGloballyEnabled(){return this.state.cfg()?.aiEnabled!==!1}activate(){this.embedded&&(this.emitToAngularJS("p3xr-console-activate"),this.forceScrollToBottom())}onContentMouseDown(C){this.contentClicked=!0,setTimeout(()=>{this.contentClicked=!1},500)}aiExecuting=!1;actionEnter(){return y(this,null,function*(){let C=(this.searchText||"").trim();if(C&&!this.aiLoading)try{let H=C.split(`
`).map(r=>r.trim()).filter(r=>r.length>0);if(H.length===0)return;let V=H[0].split(/\s+/)[0].toUpperCase();if(H.length===1||V==="EVAL"||V==="EVALSHA")yield this.executeSingleLine(C);else for(let r of H)yield this.executeSingleLine(r)}finally{this.updateCommandHistory(C),this.currentHint="",this.aiCommandPending?this.aiCommandPending=!1:(this.searchText="",this.searchControl.setValue(""),setTimeout(()=>this.autoResizeTextarea(),0)),this.forceScrollToBottom(),(this.type==="quick"||this.embedded)&&this.cmd.refresh({withoutParent:!0}),this.inputEl?.focus()}})}executeSingleLine(C){return y(this,null,function*(){let H=C.trim();if(H){if(this.state.cfg()?.aiEnabled!==!1&&/^ai:\s*/i.test(H)){let V=H.replace(/^ai:\s*/i,"").trim();V&&(yield this.handleAiQuery(V,H));return}try{let V=yield this.socket.request({action:"redis/console",payload:{command:H}}),M=(0,P.htmlEncode)(String(this.redisParser.consoleParse(V.result)));this.aiExecuting?M.replace(/ /g,"").trim().length>0&&this.outputEl&&(this.outputEl.insertAdjacentHTML("beforeend",`<span data-index="${this.index++}" class="p3xr-console-ai-result"><pre>${M}</pre><br/></span>`),this.persistOutputDebounced?.()):this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong><br/><pre>${M}</pre>`),V.hasOwnProperty("database")&&(this.state.currentDatabase.set(V.database),this.state.redisChanged.set(!0),this.socket.stateChanged$.next())}catch(V){console.error(V);let M=V.message||"";if(this.state.cfg()?.aiEnabled!==!1&&this.aiAutoDetect&&this.looksLikeNaturalLanguage(H,M)){if(yield this.handleAiQuery(H,H))return;this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong><br/><pre style="color: var(--p3xr-btn-warn-bg);">${this.i18n.strings().code?.[M]||M}</pre>`);return}this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong><br/><pre style="color: var(--p3xr-btn-warn-bg);">${this.i18n.strings().code?.[M]||M}</pre>`)}}})}looksLikeNaturalLanguage(C,H){if(!/unknown command|wrong number of arguments|ERR unknown|not_connected/i.test(H))return!1;let M=C.trim().split(/\s+/)[0].toUpperCase();return!this.state.commands()?.includes(M)}handleAiQuery(C,H){return y(this,null,function*(){if(C.length>4096)return this.common.toast(this.i18n.strings()?.error?.aiPromptTooLong),!1;let V=++this.aiRequestSeq;this.aiLoading=!0,this.cdr.markForCheck(),this.inputEl?.focus();try{let M=[];try{M=(yield this.socket.request({action:"search/list",payload:{}})).data||[]}catch(k){}let r=this.state.info()||{},A=r.server||{},Z=r.clients||{},S=r.memory||{},s=r.keyspace||{},m={indexes:M};A.redis_version&&(m.redisVersion=A.redis_version),A.redis_mode&&(m.redisMode=A.redis_mode),A.os&&(m.os=A.os),Z.connected_clients&&(m.connectedClients=Z.connected_clients),S.used_memory_human&&(m.usedMemory=S.used_memory_human);let b=Object.keys(s).filter(k=>/^db\d+$/.test(k));b.length>0&&(m.databases=b.map(k=>`${k}: ${s[k]}`)),this.state.modules()?.length>0&&(m.modules=this.state.modules()),m.uiLanguage=this.i18n.currentLang(),m.connectionState=this.state.connectionState(),m.currentPage=this.state.currentPage();let q=this.state.connection();q?.name&&(m.connectionName=q.name);let j=this.state.currentDatabase();j!==void 0&&(m.currentDatabase=j);let E=yield this.socket.request({action:"ai/redis-query",payload:{prompt:C,context:m}});if(V!==this.aiRequestSeq)return!1;let F=E.command||"",R=E.explanation||"",D=Array.isArray(E.toolTrail)?E.toolTrail:[];this.outputAppend(`<strong>${(0,P.htmlEncode)(H)}</strong>`),this.updateCommandHistory(H);for(let k of D){let m1=k.args&&Object.keys(k.args).length?"("+Object.entries(k.args).map(([Y,w])=>`${Y}=${JSON.stringify(w)}`).join(", ")+")":"()",p1=`<span style="opacity: 0.85;"><strong>tool:</strong> <code>${(0,P.htmlEncode)(k.name+m1)}</code> <span style="opacity: 0.6;">${k.ms??0}ms</span></span>`;if(k.ok){let Y=String(k.result??"").split(`
`).slice(0,12).join(`
`);this.outputAppend(`${p1}<br/><pre style="opacity: 0.85; margin: 2px 0 6px 0;">${(0,P.htmlEncode)(Y)}</pre>`)}else this.outputAppend(`${p1}<br/><span style="color: var(--p3xr-btn-warn-bg);">${(0,P.htmlEncode)(k.error||"tool error")}</span>`)}let J=D.length>0;if(F){let k=`<strong style="color: var(--p3xr-btn-primary-bg);">AI →</strong> <code>${(0,P.htmlEncode)(F)}</code>`;R&&(k+=`<pre>${(0,P.htmlEncode)(R)}</pre>`),this.outputAppend(k),J||(this.searchText=F,this.searchControl.setValue(F,{emitEvent:!1}),this.filteredCommands=[],this.aiCommandPending=!0,setTimeout(()=>this.autoResizeTextarea(),0))}else R&&this.outputAppend(`<pre>${(0,P.htmlEncode)(R)}</pre>`);return!0}catch(M){if(V!==this.aiRequestSeq)return!1;console.error("ai-redis-query failed",M);let r=M.message||String(M);return this.outputAppend(`<span style="color: var(--p3xr-btn-warn-bg);">AI error: ${(0,P.htmlEncode)(r)}</span>`),r.includes("429")||r.includes("rate_limit")||r.includes("Rate limit")?this.common.toast(this.i18n.strings().page?.key?.label?.aiRateLimited):this.common.toast(this.i18n.strings().page?.key?.label?.aiError+": "+r),!1}finally{V===this.aiRequestSeq&&(this.aiLoading=!1,this.cdr.markForCheck(),this.forceScrollToBottom(),this.inputEl?.focus())}})}stopAi(){this.aiRequestSeq++,this.aiLoading=!1,this.searchText="",this.searchControl.setValue("",{emitEvent:!1}),this.filteredCommands=[],this.cdr.markForCheck(),setTimeout(()=>{this.autoResizeTextarea(),this.inputEl?.focus()},0)}onKeyDown(C){if(C.key==="Enter"){if(C.shiftKey){setTimeout(()=>this.autoResizeTextarea(),0);return}C.preventDefault(),this.actionEnter();return}if(this.filteredCommands.length>0&&(C.key==="ArrowDown"||C.key==="ArrowUp"))return;if(C.key!=="ArrowUp"&&C.key!=="ArrowDown"){_=-1;return}if(!C.shiftKey)return;let H=this.getActionHistory();if(H.length<1)return;C.preventDefault(),C.stopPropagation(),C.key==="ArrowDown"?(_===-1&&(_=H.length),_--,_<0&&(_=H.length-1)):(_++,_>=H.length&&(_=0));let V=H[_]??"";this.searchText=V,this.searchControl.setValue(V,{emitEvent:!1}),setTimeout(()=>{let M=this.inputEl;M&&(M.blur(),M.focus()),this.autoResizeTextarea()},0)}onAutocompleteSelected(C){this.searchText=C.option.value}clearConsole(){if(!this.outputEl)return;this.outputEl.innerHTML="";let C=this.i18n.strings();this.outputAppend("<strong>"+(C?.label?.welcomeConsole??"Welcome to the Redis Console")+"</strong>"),this.outputAppend((C?.label?.welcomeConsoleInfo??"SHIFT + Cursor UP or DOWN history is enabled")+"<br/>"),this.persistConsoleOutputNow(),this.forceScrollToBottom(),this.inputEl?.focus()}openCommands(C){return y(this,null,function*(){let H=yield this.cheatsheet.show();H&&(this.searchText=H,this.searchControl.setValue(H,{emitEvent:!1}),setTimeout(()=>{this.inputEl?.focus(),this.autoResizeTextarea()},0))})}closeConsole(){this.emitToAngularJS("p3xr-quick-console-quit")}dragStart(){this.embedded||this.emitToAngularJS("p3xr-quick-console",{start:!0})}dragEnd(){this.embedded||this.emitToAngularJS("p3xr-quick-console",{start:!1})}initJQuery(){let C=this.elementRef.nativeElement;this.containerEl=C.querySelector("#p3xr-console-content"),this.headerEl=document.getElementById("p3xr-layout-header-container"),this.footerEl=document.getElementById("p3xr-layout-footer-container"),this.consoleHeaderEl=C.querySelector("#p3xr-console-header"),this.outputEl=C.querySelector("#p3xr-console-content-output"),this.autocompleteEl=C.querySelector("#p3xr-console-autocomplete"),this.scrollers=this.containerEl,this.resizeFn=()=>this.rawResize(),window.addEventListener("resize",this.resizeFn),this.rawResize(),this.persistOutputDebounced=y2(()=>this.persistConsoleOutputNow(),100);let H=this.cmd.consoleEmbeddedResize$.subscribe(()=>{this.embedded&&this.rawResize()});this.unsubs.push(()=>H.unsubscribe()),setTimeout(()=>{this.inputEl=C.querySelector("#p3xr-console-input"),this.setInputTheme(),this.restoreConsoleOutput()?this.forceScrollToBottom():this.clearConsole(),this.rawResize(),this.inputEl?.addEventListener("paste",()=>{setTimeout(()=>this.autoResizeTextarea(),0)}),this.inputResizeHandler=()=>setTimeout(()=>this.autoResizeTextarea(),0),this.inputEl?.addEventListener("focus",this.inputResizeHandler),this.inputEl?.addEventListener("blur",this.inputResizeHandler),this.embedded&&(this.inputFocusHandler=()=>{this.emitToAngularJS("p3xr-console-activate")},this.inputBlurHandler=()=>{setTimeout(()=>{if(this.contentClicked)return;let V=document.activeElement;if(V?.id==="p3xr-console-input")return;let M=this.elementRef.nativeElement;if(M&&V&&M.contains(V))return;let r=window.getSelection();if(r&&r.toString().length>0){let A=r.getRangeAt?.(0);if(A&&M?.contains(A.commonAncestorContainer))return}this.emitToAngularJS("p3xr-console-deactivate")},0)},this.inputEl?.addEventListener("focus",this.inputFocusHandler),this.inputEl?.addEventListener("blur",this.inputBlurHandler))})}setInputTheme(){this.inputEl&&(this.inputEl.style.borderColor="var(--p3xr-input-border-color, var(--p3xr-border-color))",this.inputEl.style.backgroundColor="var(--p3xr-input-bg)",this.inputEl.style.color="var(--p3xr-input-color)")}rawResize(){if(!this.containerEl)return;if(this.embedded){let r=this.elementRef.nativeElement,Z=r?.getBoundingClientRect()?.height||Math.floor(window.innerHeight*.33),S=this.consoleHeaderEl?.offsetHeight||0,s=this.autocompleteEl?.offsetHeight||44,m=Z<=120;r.classList.toggle("p3xr-console-embedded-collapsed",m);let b=m?0:Math.max(Z-S-s,0);this.containerEl.style.height=b+"px",this.containerEl.style.maxHeight=b+"px",this.containerEl.style.overflow=m?"hidden":"auto",this.containerEl.style.display=m?"none":"block",this.outputEl&&(this.outputEl.style.display=m?"none":"block");return}let C=this.containerEl.getBoundingClientRect().top,H=this.footerEl?.getBoundingClientRect().top??window.innerHeight,V=this.autocompleteEl?.offsetHeight||28,M=Math.max(H-C-V,0);this.containerEl.style.height=M+"px",this.containerEl.style.maxHeight=M+"px"}autoResizeTextarea(){let C=this.inputEl;if(!C)return;if(this.singleLineHeight||(this.singleLineHeight=C.offsetHeight),!(document.activeElement===C)&&(C.value||"").includes(`
`)){C.style.height=this.singleLineHeight+"px",C.style.overflowY="hidden",this.rawResize();return}if(C.style.height=this.singleLineHeight+"px",C.style.overflowY="hidden",(C.value||"").includes(`
`)&&C.scrollHeight>C.clientHeight){let V=this.singleLineHeight*3,M=C.offsetHeight-C.clientHeight,r=C.scrollHeight+M;r>V?(C.style.height=V+"px",C.style.overflowY="auto"):C.style.height=r+"px"}this.rawResize()}outputAppend(C){!this.outputEl||!(C||"").replace(/<[^>]*>/g,"").replace(/&[a-z]+;/g,"").trim()||(this.outputEl.insertAdjacentHTML("beforeend",`<span data-index="${this.index++}" class="p3xr-console-content-output-item">${C}<br/></span>`),this.trimOutputToLimit($1),this.persistOutputDebounced?.(),this.scrollOutputToBottom())}scrollOutputToBottom(){setTimeout(()=>{if(!this.scrollers)return;this.scrollers.scrollHeight-this.scrollers.scrollTop-this.scrollers.clientHeight<100&&(this.scrollers.scrollTop=this.scrollers.scrollHeight,this.outputEl&&(this.outputEl.scrollTop=this.outputEl.scrollHeight))},0)}forceScrollToBottom(){let C=()=>{this.scrollers&&(this.scrollers.scrollTop=this.scrollers.scrollHeight,this.outputEl&&(this.outputEl.scrollTop=this.outputEl.scrollHeight))};requestAnimationFrame(()=>{requestAnimationFrame(C)}),setTimeout(C,120)}trimOutputToLimit(C){if(!this.outputEl)return;let H=this.outputEl.innerHTML||"";for(;this.getByteSize(H)>C&&this.dropOldestOutputChunk();)H=this.outputEl.innerHTML||""}dropOldestOutputChunk(){if(!this.outputEl)return!1;let C=this.outputEl.querySelectorAll(".p3xr-console-content-output-item");if(C.length<1)return!1;let H=Math.max(Math.floor(C.length*.1),1);for(let V=0;V<H;V++)C[V].remove();return!0}getByteSize(C){try{return new Blob([C||""]).size}catch(H){return(C||"").length}}persistConsoleOutputNow(){if(this.outputEl)for(this.trimOutputToLimit($1);;){let C=this.outputEl.innerHTML||"";try{localStorage.setItem(j1,C);return}catch(H){if(!this.dropOldestOutputChunk()){try{localStorage.removeItem(j1)}catch(V){}return}}}}restoreConsoleOutput(){if(!this.outputEl)return!1;let C="";try{C=localStorage.getItem(j1)||""}catch(M){C=""}if(!C)return!1;this.outputEl.innerHTML=C,this.trimOutputToLimit($1),this.persistConsoleOutputNow();let H=this.outputEl.querySelectorAll(".p3xr-console-content-output-item"),V=H.length>0?H[H.length-1]:null;if(V){let M=Number(V.getAttribute("data-index"));Number.isFinite(M)&&(this.index=M+1)}return!0}getActionHistory(){try{return JSON.parse(localStorage.getItem("console-history")||"[]")}catch(C){return[]}}updateCommandHistory(C){let H=this.getActionHistory(),V=H.indexOf(C);V>-1&&H.splice(V,1),H.unshift(C),H.length>20&&(H=H.slice(0,20)),localStorage.setItem("console-history",JSON.stringify(H)),_=-1}static \u0275fac=function(H){return new(H||L)(c(l1),c(H2),c(U),c(k1),c(g1),c(_2),c(b1),c(K),c(J5),c(H1))};static \u0275cmp=N({type:L,selectors:[["p3xr-console"]],inputs:{type:"type",embedded:"embedded",showCloseButton:"showCloseButton"},outputs:{closeRequest:"closeRequest"},decls:18,vars:29,consts:[["auto","matAutocomplete"],[1,"p3xr-console-root",3,"click"],["id","p3xr-console-header",1,"p3xr-console-toolbar","p3xr-accordion-toolbar"],[1,"p3xr-console-toolbar-tools"],["id","p3xr-console-content",3,"click","mousedown"],[2,"display","flex","flex-direction","row","align-items","stretch","min-height","100%"],["id","p3xr-console-content-resizer"],["id","p3xr-console-content-output",2,"flex-grow","1"],["id","p3xr-console-content-output"],["id","p3xr-console-autocomplete"],[1,"p3xr-console-hint"],["id","p3xr-console-input","rows","1","autocomplete","off",1,"p3xr-input",3,"keydown","formControl","matAutocomplete","readonly","placeholder"],["type","button",1,"p3xr-console-stop",3,"matTooltip"],["position","above",1,"p3xr-console-autocomplete-panel",3,"optionSelected"],[3,"label"],[1,"material-icons",2,"margin-right","6px"],[1,"p3xr-console-title"],[1,"p3xr-toolbar-spacer"],[1,"p3xr-console-toolbar-actions"],[1,"p3xr-console-ai-toggle"],["mdIcon","menu_book",3,"click","label"],["mdIcon","backspace",3,"click","label"],[1,"p3xr-console-ai-toggle",3,"click"],[1,"material-icons"],["mdIcon","close",3,"label"],["mat-icon-button","","matTooltipPosition","above",1,"p3xr-console-drawer-close",3,"matTooltip"],["mdIcon","close",3,"click","label"],["mat-icon-button","","matTooltipPosition","above",1,"p3xr-console-drawer-close",3,"click","matTooltip"],["id","p3xr-console-content-resizer",3,"mousedown","mouseup"],["type","button",1,"p3xr-console-stop",3,"click","matTooltip"],[3,"value"],[1,"p3xr-autocomplete-cmd"],[1,"p3xr-autocomplete-syntax"]],template:function(H,V){if(H&1&&(e(0,"div",1),d("click",function(){return V.activate()}),e(1,"mat-toolbar",2)(2,"div",3),p(3,Z3,9,4)(4,S3,11,6),i()(),e(5,"div",4),d("click",function(r){return r.stopPropagation()})("mousedown",function(r){return V.onContentMouseDown(r)}),e(6,"div",5),p(7,h3,1,0,"div",6),g(8,"div",7),i(),p(9,O3,1,0,"div",8),i(),e(10,"div",9),p(11,g3,2,1,"div",10),e(12,"textarea",11),d("keydown",function(r){return V.onKeyDown(r)}),i(),p(13,f3,3,1,"button",12),e(14,"mat-autocomplete",13,0),d("optionSelected",function(r){return V.onAutocompleteSelected(r)}),z(16,w3,3,1,"mat-optgroup",14,l3),i()()()),H&2){let M,r=T(15);O("p3xr-console-root-embedded",V.embedded),o(3),l(V.type!=="quick"?3:4),o(2),O("p3xr-content-border-fixed",V.type!=="quick")("layout-padding",V.type!=="quick"),o(2),l(V.type==="quick"&&!V.embedded?7:-1),o(2),l(V.type!=="quick"?9:-1),o(),O("p3xr-console-autocomplete-quick",V.type==="quick")("p3xr-console-autocomplete-embedded",V.embedded),o(),l(V.currentHint?11:-1),o(),M2("background","var(--p3xr-input-bg)")("color","var(--p3xr-input-color)")("border-color",V.aiLoading?"var(--mat-sys-primary, var(--p3xr-input-border-color))":"var(--p3xr-input-border-color, var(--p3xr-border-color))")("padding-right",V.aiLoading?"40px":null),O("p3xr-input-ai-loading",V.aiLoading),u("formControl",V.searchControl)("matAutocomplete",r)("readonly",V.aiLoading)("placeholder",V.aiLoading?(M=V.strings().label)==null?null:M.aiTranslating:""),o(),l(V.aiLoading?13:-1),o(3),G(V.filteredCommands)}},dependencies:[Q,h1,c1,S1,f2,g2,t1,r1,s1,u1,N2,I2,D2,E2,W2,f1,Z1,L1,V1,e1,M1,G2],styles:[`p3xr-console{display:block;width:100%;height:100%}.p3xr-console-root{display:flex;flex-direction:column;width:100%;height:100%}.p3xr-console-root-embedded{overflow:hidden}.p3xr-console-root-embedded #p3xr-console-content{flex:1 1 auto;min-height:0}p3xr-console .mat-toolbar{min-height:48px;height:48px;position:relative;z-index:2;padding:0}p3xr-console .mat-toolbar *{color:inherit}p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base){color:inherit!important;letter-spacing:.1px!important;text-transform:uppercase!important;height:36px!important;min-height:36px!important;min-width:auto!important;padding:0 8px!important;margin:0 8px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important}p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base):hover{background-color:#00000014!important}p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base) *,p3xr-console .mat-toolbar .mat-mdc-button-base:not(.mat-mdc-fab-base) .mdc-button__label{color:inherit!important;letter-spacing:.1px!important}p3xr-console .mat-toolbar mat-icon,p3xr-console .mat-toolbar .material-icons{font-size:24px;width:24px;height:24px}.p3xr-console-toolbar-tools{display:flex;align-items:center;width:100%;height:100%;padding:0 3px}.p3xr-console-toolbar-actions{display:inline-flex;align-items:center}p3xr-console .mat-toolbar .p3xr-console-ai-toggle{display:inline-flex;align-items:center;gap:2px;margin:0 8px;padding:0 8px;height:36px;cursor:pointer;color:inherit!important;font-size:13px;letter-spacing:.1px;text-transform:uppercase;border-radius:4px;-webkit-user-select:none;user-select:none}p3xr-console .mat-toolbar .p3xr-console-ai-toggle:hover{background-color:#00000014}p3xr-console .mat-toolbar .p3xr-console-ai-toggle .material-icons{font-size:20px;width:20px;height:20px}.p3xr-console-title{font-size:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.p3xr-toolbar-spacer{flex:1 1 auto}#p3xr-console-content{font-family:Roboto Mono,monospace;font-size:13px;text-align:center;padding-left:4px}#p3xr-console-content #p3xr-console-content-resizer{cursor:ew-resize;position:relative;left:-10px;width:20px!important}#p3xr-console-content #p3xr-console-content-output{min-width:calc(100% - 20px);text-align:left;overflow:auto}#p3xr-console-content #p3xr-console-content-output pre{font-family:Roboto Mono,monospace;white-space:pre-wrap;word-break:break-word;overflow-wrap:anywhere}.p3xr-console-content-output-item:before{content:"> ";opacity:.5}.p3xr-console-ai-result{display:block}#p3xr-console-autocomplete{position:relative;overflow:hidden;width:100%}.p3xr-input-ai-loading{opacity:.55;cursor:not-allowed!important}.p3xr-console-stop{position:absolute;top:50%;right:6px;transform:translateY(-50%);background:transparent;border:none;padding:2px;margin:0;cursor:pointer;color:var(--p3xr-btn-primary-bg);display:flex;align-items:center;justify-content:center;z-index:3;line-height:1}.p3xr-console-stop:hover{opacity:.8}.p3xr-console-stop m