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
2 lines • 19.6 kB
JavaScript
import{d as L}from"./main-OCJB5534.js";import{Bi as ym,Br as nT,Di as wf,Dn as _y,Dr as lo,Dt as Qe,F as HY,Gn as dT,Gt as UY,In as by,It as Sn,Kr as oT,Lt as Sy,P as HT,Pn as bm,Pr as mc,Qr as qC,Rn as co,T as Ee$1,Xt as Uy,ei as qT,er as gT,gt as O,h as By,ii as rT,in as Wa,ln as XN,mn as YQ,pi as tN,pt as Nf,q as JT,rn as WC,s as $y,t as $Y,ur as iT,vr as jy,w as Eb,zn as cp}from"./chunk-CHqDEyfr.js";import{n as u,t as f}from"./chunk-DolM25Wu.js";import"./chunk-CPClUPec.js";import"./chunk-BRxf0Wo1.js";import{t as Q}from"./chunk-CyniViPG.js";import{n as bi,t as _t}from"./chunk-DjVJBOYc.js";import"./chunk-CWEwaFv9.js";import"./chunk-CyaMV1f5.js";import{t as It}from"./chunk-BM0xjj91.js";import{C as xn,a as He$1,f as an,i as Gn,y as on}from"./chunk-B_FU7ynV.js";import{r as gt,t as Qt}from"./chunk-CNSP-oVC.js";import{n as wt,r as yt}from"./chunk-CGgWGJ3E.js";import"./chunk-CFyh5uM7.js";import{d as qe$1,i as Qt$1,o as U}from"./chunk-CLjqwtZV.js";import{i as ze$1,t as Oe$1}from"./chunk-BYtjyP-K.js";import"./chunk-DxgAwx0L.js";import{t as lt}from"./chunk-Cc4dc3EH2.js";import{t as X}from"./chunk-BfFSlGI12.js";import"./chunk-CaLi_qYn2.js";import{n as Yt,r as Zt,t as Xt}from"./chunk-C73tB7I62.js";import{l as q}from"./chunk-CMQBeVtl.js";import{n as Nt,r as Pt}from"./chunk-BGkKuku6.js";import{n as we,t as te}from"./chunk-C3kuP7Oy.js";var Ie=(i,d)=>d._key;function ke(i,d){if(i&1&&(Wa(0,`div`,3),HT(1),wf()),i&2){let e=gT();Sn(),jy(e.strings().page?.search?.noIndex)}}function Me(i,d){if(i&1&&(Wa(0,`mat-option`,7),HT(1),wf()),i&2){let e=d.$implicit;by(`value`,e),Sn(),jy(e)}}function Ee(i,d){if(i&1){let e=dT();Wa(0,`button`,14),Sy(`click`,function(){ym(e);return bm(gT(2).dropIndex())}),Wa(1,`mat-icon`),HT(2,`delete`),wf()()}if(i&2)by(`matTooltip`,gT(2).strings().page?.search?.dropIndex)}function Te(i,d){if(i&1){let e=dT();Wa(0,`div`,17)(1,`mat-form-field`,18)(2,`mat-label`),HT(3),wf(),Wa(4,`input`,19),$y(`ngModelChange`,function(t){ym(e);let s=gT(3);return qT(s.vectorField,t)||(s.vectorField=t),bm(t)}),wf(),WC(),wf(),Wa(5,`mat-form-field`,20)(6,`mat-label`),HT(7),wf(),Wa(8,`input`,21),$y(`ngModelChange`,function(t){ym(e);let s=gT(3);return qT(s.vectorValues,t)||(s.vectorValues=t),bm(t)}),wf(),WC(),wf(),Wa(9,`mat-form-field`,22)(10,`mat-label`),HT(11,`Count`),wf(),Wa(12,`input`,23),$y(`ngModelChange`,function(t){ym(e);let s=gT(3);return qT(s.vectorCount,t)||(s.vectorCount=t),bm(t)}),wf(),WC(),wf()()}if(i&2){let e=gT(3);Sn(3),jy(e.strings().page?.search?.vectorField),Sn(),Uy(`ngModel`,e.vectorField),qC(),Sn(3),jy(e.strings().page?.search?.vectorValues),Sn(),Uy(`ngModel`,e.vectorValues),qC(),Sn(4),Uy(`ngModel`,e.vectorCount),qC()}}function Ve(i,d){if(i&1){let e=dT();Wa(0,`div`,15)(1,`mat-slide-toggle`,16),$y(`ngModelChange`,function(t){ym(e);let s=gT(2);return qT(s.hybridMode,t)||(s.hybridMode=t),bm(t)}),HT(2),wf(),WC(),wf(),co(3,Te,13,5,`div`,17)}if(i&2){let e=gT(2);Sn(),Uy(`ngModel`,e.hybridMode),qC(),Sn(),Nf(` `,e.strings().page?.search?.hybridMode,` `),Sn(),lo(e.hybridMode?3:-1)}}function Fe(i,d){if(i&1){let e=dT();Wa(0,`button`,24),Sy(`click`,function(){ym(e);return bm(gT(2).handleSearchEnter())}),Wa(1,`mat-icon`),HT(2,`search`),wf(),Wa(3,`span`),HT(4),wf()()}if(i&2){let e=gT(2);by(`disabled`,e.aiLoading),Sn(4),jy(e.aiLoading?e.strings().label?.aiTranslating:e.strings().page?.search?.title)}}function Pe(i,d){if(i&1){let e=dT();Wa(0,`button`,25),Sy(`click`,function(){ym(e);return bm(gT(2).handleSearchEnter())}),Wa(1,`mat-icon`),HT(2,`search`),wf()()}if(i&2){let e=gT(2);by(`disabled`,e.aiLoading)(`matTooltip`,e.strings().page?.search?.title)}}function We(i,d){if(i&1){let e=dT();Wa(0,`div`,4)(1,`mat-form-field`,5)(2,`mat-label`),HT(3),wf(),Wa(4,`mat-select`,6),$y(`valueChange`,function(t){ym(e);let s=gT();return qT(s.selectedIndex,t)||(s.selectedIndex=t),bm(t)}),Sy(`selectionChange`,function(){ym(e);let t=gT();return t.offset=0,t.indexInfo=null,bm(t.loadIndexInfo())}),oT(5,Me,2,2,`mat-option`,7,rT),wf()(),co(7,Ee,3,1,`button`,8),wf(),Wa(8,`mat-form-field`,9)(9,`mat-label`),HT(10),wf(),Wa(11,`input`,10),$y(`ngModelChange`,function(t){ym(e);let s=gT();return qT(s.query,t)||(s.query=t),bm(t)}),Sy(`keydown.enter`,function(){ym(e);let t=gT();return t.offset=0,bm(t.handleSearchEnter())}),wf(),WC(),wf(),co(12,Ve,4,3),Wa(13,`div`,11),co(14,Fe,5,2,`button`,12)(15,Pe,3,2,`button`,13),wf()}if(i&2){let e=gT();Sn(3),jy(e.strings().page?.search?.index),Sn(),Uy(`value`,e.selectedIndex),Sn(),iT(e.indexes),Sn(2),lo(!e.isReadonly&&e.selectedIndex?7:-1),Sn(3),jy(e.strings().page?.search?.query),Sn(),Uy(`ngModel`,e.query),by(`disabled`,e.aiLoading),qC(),Sn(),lo(e.state.redisVersion().isAtLeast(8,4)?12:-1),Sn(2),lo(e.isGtSm?14:15)}}function qe(i,d){if(i&1&&(_y(0,`br`),Wa(1,`p3xr-ng-accordion`,26)(2,`div`,1)(3,`div`,27),HT(4),wf()()()),i&2){let e=gT();Sn(),by(`title`,e.strings().page?.search?.results+` (0)`),Sn(3),jy(e.strings().label?.noResults)}}function Le(i,d){if(i&1){let e=dT();Wa(0,`p3xr-ng-button`,29),Sy(`click`,function(t){return ym(e),gT(2).pageAction(`first`),bm(t.stopPropagation())}),wf(),Wa(1,`p3xr-ng-button`,30),Sy(`click`,function(t){return ym(e),gT(2).pageAction(`prev`),bm(t.stopPropagation())}),wf(),Wa(2,`span`,31),HT(3),wf(),Wa(4,`p3xr-ng-button`,32),Sy(`click`,function(t){return ym(e),gT(2).pageAction(`next`),bm(t.stopPropagation())}),wf(),Wa(5,`p3xr-ng-button`,33),Sy(`click`,function(t){return ym(e),gT(2).pageAction(`last`),bm(t.stopPropagation())}),wf()}if(i&2){let e=gT(2);Sn(3),By(``,e.currentPage,` / `,e.pages)}}function Be(i,d){i&1&&(Wa(0,`span`),HT(1,` · `),wf())}function Ne(i,d){if(i&1&&(Wa(0,`span`),HT(1),wf(),co(2,Be,2,0,`span`)),i&2){let e=d.$implicit,a=d.$index,t=d.$count,s=gT().$implicit;Sn(),By(``,e,`: `,s[e]),Sn(),lo(a!==t-1?2:-1)}}function Re(i,d){if(i&1&&(Wa(0,`mat-list-item`)(1,`div`,34)(2,`div`,35)(3,`kbd`,36),HT(4),wf()(),Wa(5,`div`,37),oT(6,Ne,3,3,null,null,rT),wf()()(),_y(8,`mat-divider`)),i&2){let e=d.$implicit,a=gT(2);Sn(4),jy(e._key),Sn(2),iT(a.getDocKeys(e))}}function Ae(i,d){if(i&1&&(_y(0,`br`),Wa(1,`p3xr-ng-accordion`,26)(2,`div`,28),co(3,Le,6,2),wf(),Wa(4,`div`,1)(5,`mat-list`),oT(6,Re,9,1,null,null,Ie),wf()()()),i&2){let e=gT();Sn(),by(`title`,e.strings().page?.search?.results+` (`+e.total+`)`),Sn(2),lo(e.pages>1?3:-1),Sn(3),iT(e.results)}}function De(i,d){if(i&1){let e=dT();Wa(0,`p3xr-ng-button`,40),Sy(`click`,function(t){return ym(e),gT(2).dropIndex(),bm(t.stopPropagation())}),wf()}if(i&2)by(`label`,gT(2).strings().page?.search?.dropIndex)}function Oe(i,d){if(i&1&&(Wa(0,`mat-list-item`)(1,`div`,34)(2,`div`,35),HT(3),wf(),Wa(4,`div`,37),HT(5),JT(6,`json`),wf()()(),_y(7,`mat-divider`)),i&2){let e=d.$implicit,a=gT(3);Sn(3),jy(e),Sn(2),jy(tN(6,2,a.indexInfo[e]))}}function je(i,d){if(i&1&&(Wa(0,`mat-list`),oT(1,Oe,8,4,null,null,rT),wf()),i&2){let e=gT(2);Sn(),iT(e.getDocKeys(e.indexInfo))}}function Ge(i,d){if(i&1&&(_y(0,`br`),Wa(1,`p3xr-ng-accordion`,38)(2,`div`,28),co(3,De,1,1,`p3xr-ng-button`,39),wf(),Wa(4,`div`,1),co(5,je,3,0,`mat-list`),wf()()),i&2){let e=gT();Sn(),by(`title`,e.strings().page?.search?.indexInfo+`: `+e.selectedIndex),Sn(2),lo(e.isReadonly?-1:3),Sn(2),lo(e.indexInfo?5:-1)}}function Ke(i,d){if(i&1){let e=dT();Wa(0,`div`,46)(1,`mat-form-field`,49)(2,`mat-label`),HT(3),wf(),Wa(4,`input`,42),$y(`ngModelChange`,function(t){let s=ym(e).$implicit;return qT(s.name,t)||(s.name=t),bm(t)}),wf(),WC(),wf(),Wa(5,`div`,50)(6,`mat-form-field`,51)(7,`mat-label`),HT(8),wf(),Wa(9,`mat-select`,52),$y(`valueChange`,function(t){let s=ym(e).$implicit;return qT(s.type,t)||(s.type=t),bm(t)}),Wa(10,`mat-option`,53),HT(11,`TEXT`),wf(),Wa(12,`mat-option`,54),HT(13,`NUMERIC`),wf(),Wa(14,`mat-option`,55),HT(15,`TAG`),wf(),Wa(16,`mat-option`,56),HT(17,`GEO`),wf(),Wa(18,`mat-option`,57),HT(19,`VECTOR`),wf()()(),Wa(20,`button`,58),Sy(`click`,function(){let t=ym(e).$index;return bm(gT(2).confirmRemoveField(t))}),Wa(21,`mat-icon`),HT(22,`remove`),wf()()()()}if(i&2){let e=d.$implicit,a=gT(2);Sn(3),jy(a.strings().page?.search?.fieldName),Sn(),Uy(`ngModel`,e.name),qC(),Sn(4),jy(a.strings().label?.type),Sn(),Uy(`value`,e.type),Sn(11),by(`disabled`,a.newIndexFields.length<=1)}}function He(i,d){if(i&1){let e=dT();Wa(0,`button`,59),Sy(`click`,function(){ym(e);return bm(gT(2).createIndex())}),Wa(1,`mat-icon`),HT(2,`add`),wf(),Wa(3,`span`),HT(4),wf()()}if(i&2){let e=gT(2);by(`disabled`,!e.newIndexName.trim()),Sn(4),jy(e.strings().page?.search?.createIndex)}}function Xe(i,d){if(i&1){let e=dT();Wa(0,`button`,60),Sy(`click`,function(){ym(e);return bm(gT(2).createIndex())}),Wa(1,`mat-icon`),HT(2,`add`),wf()()}if(i&2){let e=gT(2);by(`disabled`,!e.newIndexName.trim())(`matTooltip`,e.strings().page?.search?.createIndex)}}function ze(i,d){if(i&1){let e=dT();_y(0,`br`),Wa(1,`p3xr-ng-accordion`,41)(2,`div`,1)(3,`div`,2)(4,`mat-form-field`,9)(5,`mat-label`),HT(6),wf(),Wa(7,`input`,42),$y(`ngModelChange`,function(t){ym(e);let s=gT();return qT(s.newIndexName,t)||(s.newIndexName=t),bm(t)}),wf(),WC(),wf(),Wa(8,`mat-form-field`,9)(9,`mat-label`),HT(10),wf(),Wa(11,`input`,43),$y(`ngModelChange`,function(t){ym(e);let s=gT();return qT(s.newIndexPrefix,t)||(s.newIndexPrefix=t),bm(t)}),wf(),WC(),wf(),Wa(12,`div`,44)(13,`strong`),HT(14,`Schema`),wf(),Wa(15,`button`,45),Sy(`click`,function(){ym(e);return bm(gT().addField())}),Wa(16,`mat-icon`),HT(17,`add`),wf()()(),oT(18,Ke,23,5,`div`,46,nT),Wa(20,`div`,11),co(21,He,5,2,`button`,47)(22,Xe,3,2,`button`,48),wf()()()()}if(i&2){let e=gT();Sn(),by(`title`,e.strings().page?.search?.createIndex),Sn(5),jy(e.strings().page?.search?.indexName),Sn(),Uy(`ngModel`,e.newIndexName),qC(),Sn(3),jy(e.strings().page?.search?.prefix),Sn(),Uy(`ngModel`,e.newIndexPrefix),qC(),Sn(7),iT(e.newIndexFields),Sn(3),lo(e.isGtSm?21:22)}}var Vt=(()=>{class i{i18n;socket;common;cdr;ngZone;breakpointObserver;state;overlay;strings;indexes=[];selectedIndex=``;query=`*`;offset=0;limit=20;total=0;results=[];indexInfo=null;searching=!1;searchDone=!1;isReadonly=!1;isGtSm=!0;aiLoading=!1;hybridMode=!1;vectorField=``;vectorValues=``;vectorCount=10;newIndexName=``;newIndexPrefix=``;newIndexFields=[{name:``,type:`TEXT`,sortable:!1}];unsubs=[];constructor(e,a,t,s,be,we,ve,Se){this.i18n=e,this.socket=a,this.common=t,this.cdr=s,this.ngZone=be,this.breakpointObserver=we,this.state=ve,this.overlay=Se,this.strings=this.i18n.strings}ngOnInit(){this.isReadonly=this.state.connection()?.readonly===!0;let e=this.breakpointObserver.observe(`(min-width: 960px)`).subscribe(t=>{this.isGtSm=t.matches,this.cdr.markForCheck()});this.unsubs.push(()=>e.unsubscribe()),this.loadIndexes();let a=this.socket.stateChanged$.subscribe(()=>{this.isReadonly=this.state.connection()?.readonly===!0,this.loadIndexes()});this.unsubs.push(()=>a.unsubscribe())}searchAndRefreshInfo(){return L(this,null,function*(){yield Promise.all([this.search(),this.loadIndexInfo()])})}ngOnDestroy(){this.unsubs.forEach(e=>e())}get pages(){return Math.ceil(this.total/this.limit)}get currentPage(){return Math.floor(this.offset/this.limit)+1}loadIndexes(){return L(this,null,function*(){try{let e=yield this.socket.request({action:`search/list`,payload:{}});this.indexes=e.data,this.indexes.length>0&&!this.selectedIndex&&(this.selectedIndex=this.indexes[0],this.loadIndexInfo()),this.cdr.markForCheck()}catch(e){}})}search(){return L(this,null,function*(){if(!(!this.selectedIndex||!this.query)){this.searching=!0,this.cdr.markForCheck();try{let e;if(this.hybridMode&&this.vectorField&&this.vectorValues){let a=this.vectorValues.split(`,`).map(t=>parseFloat(t.trim())).filter(t=>!isNaN(t));e=yield this.socket.request({action:`search/hybrid`,payload:{index:this.selectedIndex,query:this.query,vectorField:this.vectorField,vectorValues:a,count:this.vectorCount,offset:this.offset,limit:this.limit}})}else e=yield this.socket.request({action:`search/query`,payload:{index:this.selectedIndex,query:this.query,offset:this.offset,limit:this.limit}});this.total=e.data.total,this.results=e.data.docs}catch(e){this.common.generalHandleError(e),this.results=[],this.total=0}finally{this.searching=!1,this.searchDone=!0,this.cdr.markForCheck()}}})}pageAction(e){switch(e){case`first`:this.offset=0;break;case`prev`:this.offset=Math.max(0,this.offset-this.limit);break;case`next`:this.offset=Math.min((this.pages-1)*this.limit,this.offset+this.limit);break;case`last`:this.offset=(this.pages-1)*this.limit;break}this.search()}loadIndexInfo(){return L(this,null,function*(){if(this.selectedIndex)try{let e=yield this.socket.request({action:`search/index-info`,payload:{index:this.selectedIndex}});this.indexInfo=e.data,this.cdr.markForCheck()}catch(e){this.common.generalHandleError(e)}})}dropIndex(){return L(this,null,function*(){if(this.selectedIndex)try{yield this.common.confirm({message:this.strings().confirm?.dropIndex}),yield this.socket.request({action:`search/index-drop`,payload:{index:this.selectedIndex}}),this.common.toast({message:this.strings().status?.indexDropped}),this.selectedIndex=``,this.results=[],this.total=0,this.searchDone=!1,this.indexInfo=null,yield this.loadIndexes()}catch(e){e!==void 0&&this.common.generalHandleError(e)}})}addField(){this.newIndexFields.push({name:``,type:`TEXT`,sortable:!1})}confirmRemoveField(e){return L(this,null,function*(){try{let a=this.strings().intention?.delete;yield this.common.confirm({message:a+`?`}),this.newIndexFields.splice(e,1),this.newIndexFields=[...this.newIndexFields],this.cdr.markForCheck()}catch(a){a!==void 0&&this.common.generalHandleError(a)}})}createIndex(){return L(this,null,function*(){if(!this.newIndexName.trim())return;let e=this.newIndexFields.filter(a=>a.name.trim());if(e.length!==0)try{yield this.socket.request({action:`search/index-create`,payload:{name:this.newIndexName.trim(),prefix:this.newIndexPrefix.trim()||void 0,schema:e}}),this.common.toast({message:this.strings().status?.indexCreated}),this.newIndexName=``,this.newIndexPrefix=``,this.newIndexFields=[{name:``,type:`TEXT`,sortable:!1}],yield this.loadIndexes()}catch(a){this.common.generalHandleError(a)}})}handleSearchEnter(){return L(this,null,function*(){let e=(this.query||``).trim();if(/^ai:\s*/i.test(e)){yield this.handleAiQuery(e.replace(/^ai:\s*/i,``).trim());return}try{yield this.searchAndRefreshInfo()}catch(a){if(e.length>2&&e!==`*`&&/\s/.test(e)){this.overlay.show();try{yield this.handleAiQuery(e)}finally{this.overlay.hide()}}}})}handleAiQuery(e){return L(this,null,function*(){if(e){this.aiLoading=!0,this.cdr.markForCheck();try{let a;this.selectedIndex&&this.indexInfo&&(a=this.indexInfo);let t=yield this.socket.request({action:`ai/redis-query`,payload:{prompt:e,context:{indexes:this.indexes,schema:a}}});this.query=t.command||`*`,t.explanation&&this.common.toast({message:t.explanation}),this.offset=0,yield this.searchAndRefreshInfo()}catch(a){this.common.generalHandleError(a)}finally{this.aiLoading=!1,this.cdr.markForCheck()}}})}getDocKeys(e){return Object.keys(e).filter(a=>a!==`_key`)}static ɵfac=function(a){return new(a||i)(Qe(YQ),Qe(bi),Qe(It),Qe(mc),Qe(O),Qe(cp),Qe(Q),Qe(_t))};static ɵcmp=Ee$1({type:i,selectors:[[`p3xr-search`]],decls:9,vars:7,consts:[[`accordionKey`,`search-query`,3,`title`],[`content`,``],[1,`p3xr-padding`],[2,`opacity`,`0.5`],[2,`display`,`flex`,`align-items`,`center`,`gap`,`8px`],[1,`md-block`,2,`flex`,`1`],[3,`valueChange`,`selectionChange`,`value`],[3,`value`],[`mat-mini-fab`,``,`matTooltipPosition`,`above`,1,`btn-warn`,3,`matTooltip`],[1,`md-block`],[`matInput`,``,3,`ngModelChange`,`keydown.enter`,`ngModel`,`disabled`],[2,`margin-top`,`8px`,`text-align`,`right`],[`mat-raised-button`,``,`type`,`button`,1,`btn-primary`,`p3xr-action-btn`,3,`disabled`],[`mat-mini-fab`,``,`type`,`button`,`matTooltipPosition`,`above`,1,`btn-primary`,3,`disabled`,`matTooltip`],[`mat-mini-fab`,``,`matTooltipPosition`,`above`,1,`btn-warn`,3,`click`,`matTooltip`],[2,`display`,`flex`,`align-items`,`center`,`gap`,`8px`,`margin-bottom`,`8px`],[`color`,`primary`,3,`ngModelChange`,`ngModel`],[2,`display`,`flex`,`gap`,`8px`,`flex-wrap`,`wrap`],[2,`flex`,`1`,`min-width`,`150px`],[`matInput`,``,`placeholder`,`embedding`,3,`ngModelChange`,`ngModel`],[2,`flex`,`2`,`min-width`,`200px`],[`matInput`,``,`placeholder`,`0.1, 0.2, 0.3, ...`,3,`ngModelChange`,`ngModel`],[2,`width`,`80px`],[`matInput`,``,`type`,`number`,3,`ngModelChange`,`ngModel`],[`mat-raised-button`,``,`type`,`button`,1,`btn-primary`,`p3xr-action-btn`,3,`click`,`disabled`],[`mat-mini-fab`,``,`type`,`button`,`matTooltipPosition`,`above`,1,`btn-primary`,3,`click`,`disabled`,`matTooltip`],[`accordionKey`,`search-results`,3,`title`],[2,`padding`,`16px`,`opacity`,`0.5`],[`actions`,``],[`label`,``,`mdIcon`,`skip_previous`,3,`click`],[`label`,``,`mdIcon`,`keyboard_arrow_left`,3,`click`],[2,`font-size`,`12px`,`opacity`,`0.7`],[`label`,``,`mdIcon`,`keyboard_arrow_right`,3,`click`],[`label`,``,`mdIcon`,`skip_next`,3,`click`],[1,`p3xr-settings-pair-row`],[1,`p3xr-settings-row-label`],[1,`p3xr-kbd`,`p3xr-kbd-small`],[1,`p3xr-settings-row-value`,`p3xr-mono`,2,`font-size`,`12px`],[`accordionKey`,`search-index-info`,3,`title`],[`mdIcon`,`delete`,3,`label`],[`mdIcon`,`delete`,3,`click`,`label`],[`accordionKey`,`search-create-index`,3,`title`],[`matInput`,``,3,`ngModelChange`,`ngModel`],[`matInput`,``,`placeholder`,`e.g. doc:`,3,`ngModelChange`,`ngModel`],[2,`display`,`flex`,`align-items`,`center`,`gap`,`8px`,`margin`,`8px 0`],[`mat-mini-fab`,``,`type`,`button`,1,`btn-primary`,3,`click`],[1,`p3xr-search-schema-row`],[`mat-raised-button`,``,`type`,`button`,1,`btn-accent`,`p3xr-action-btn`,3,`disabled`],[`mat-mini-fab`,``,`type`,`button`,`matTooltipPosition`,`above`,1,`btn-accent`,3,`disabled`,`matTooltip`],[2,`flex`,`1`],[1,`p3xr-search-schema-type-row`],[2,`width`,`130px`],[3,`valueChange`,`value`],[`value`,`TEXT`],[`value`,`NUMERIC`],[`value`,`TAG`],[`value`,`GEO`],[`value`,`VECTOR`],[`mat-mini-fab`,``,`type`,`button`,1,`btn-warn`,3,`click`,`disabled`],[`mat-raised-button`,``,`type`,`button`,1,`btn-accent`,`p3xr-action-btn`,3,`click`,`disabled`],[`mat-mini-fab`,``,`type`,`button`,`matTooltipPosition`,`above`,1,`btn-accent`,3,`click`,`disabled`,`matTooltip`]],template:function(a,t){a&1&&(Wa(0,`p3xr-ng-accordion`,0)(1,`div`,1)(2,`div`,2),co(3,ke,2,1,`div`,3),co(4,We,16,8),wf()()(),co(5,qe,5,2),co(6,Ae,8,2),co(7,Ge,6,3),co(8,ze,23,6)),a&2&&(by(`title`,t.strings().page?.search?.title),Sn(3),lo(t.indexes.length===0?3:-1),Sn(),lo(t.indexes.length>0?4:-1),Sn(),lo(t.searchDone&&t.total===0?5:-1),Sn(),lo(t.results.length>0||t.total>0?6:-1),Sn(),lo(t.selectedIndex&&t.indexInfo?7:-1),Sn(),lo(t.isReadonly?-1:8))},dependencies:[Eb,Gn,He$1,an,xn,on,yt,wt,$Y,HY,UY,Qt,gt,f,u,Yt,Xt,Zt,Pt,qe$1,U,Nt,q,Qt$1,Oe$1,ze$1,we,te,X,lt,XN],styles:[`:host{display:block;color:var(--%NS%mat-app-text-color, inherit)}.md-block{width:100%}.p3xr-search-result-item{width:100%;padding:4px 0}.p3xr-search-result-key{margin-bottom:4px}.p3xr-search-result-fields{display:flex;flex-wrap:wrap;gap:4px 16px}.p3xr-search-result-field{font-size:13px}.p3xr-search-field-name{font-weight:600;opacity:.6;margin-right:4px}.p3xr-search-field-value{font-family:Roboto Mono,monospace;font-size:12px}.p3xr-search-schema-row{display:flex;align-items:center;gap:8px;margin-bottom:4px}.p3xr-search-schema-type-row{display:flex;align-items:center;gap:8px;flex-shrink:0}.p3xr-search-schema-type-row .mat-mdc-fab-base{margin-bottom:20px}@media(max-width:599px){.p3xr-search-schema-row{flex-wrap:wrap}.p3xr-search-schema-row>mat-form-field{width:100%!important;flex:1 1 100%!important}.p3xr-search-schema-type-row{flex:1}.p3xr-search-schema-type-row mat-form-field{flex:1;width:auto!important}}
`],encapsulation:2})}return i})();export{Vt as SearchComponent};