1import {V}from'./chunk-Dle8uB9o.js';import {j as j$1}from'./chunk--IHjoyxS.js';import {U}from'./chunk-CkXQK5jV.js';import'./chunk-CVofoBtB.js';import {j}from'./chunk-DXqlAPw9.js';import {a as _t,C as Ct,j as jn,F as Fo}from'./chunk-CyAKiVDT.js';import {l as le}from'./chunk-CT5B6WFo.js';import'./chunk-BQdR0LzE.js';import'./chunk-Cda7MQxf.js';import {x as xB,ce as she,b as h,a7 as dn,ab as VTe,cf as N1e,af as Ke,ak as k,ad as ft,z as zo,_ as _t$1,d as It,aS as Se$1,aT as Pn,aF as N,a$ as jTe,b0 as PTe,bn as FTe,bo as BTe,bp as NL,b2 as RTe,b3 as ATe,b6 as M,b9 as HTe,br as OZ,bs as NZ,E as Ee,m as mt,$ as $c,i as bt,l as gt,B as Bn,bf as Z2,r as _i,t as Ut,v as xn,bg as Q2,C as bi,A as wt,eb as At,cg as LR,bm as Yz,N as vd,M as Mn,T as _d,U as Uc,bc as bm,p as ks,O as Os}from'./main-NEVA7CKN.js';import'./chunk-DmzMd4Hd.js';import'./chunk-B6tlgJu0.js';import'./chunk-BT5uL7hS.js';import'./chunk-C6YWspNr.js';import'./chunk-B0p1Hu9z.js';import'./chunk-OxaTH9Ok.js';import'./chunk-ET3xikx3.js';import'./chunk-D29tK9MF.js';import'./chunk-DBDEZsmK.js';import'./chunk-CCqaRlsj.js';import'./chunk-atB_X3Ql.js';import'./chunk-D05Wzdcq.js';import'./chunk-B690l_vK.js';import'./chunk-B6E74XFF.js';import'./chunk-Bm6gXIli.js';import'./chunk-4Z5ece65.js';import'./chunk-DhSouhSP.js';import'./chunk-CQSLm-IF.js';import'./chunk-C1eorquW.js';import'./chunk-DSWH1hlZ.js';import'./chunk-Cp-N16IV.js';import'./chunk-Buq0aFpy.js';import'./chunk-Dnp0tsjP.js';import'./chunk-DMGLGWwG.js';import'./chunk-Cq46ixID.js';import'./chunk-BLQ_S_os.js';import'./chunk-3VsIYLU3.js';var de=(i,e)=>e.key,ue=(i,e)=>e.orgId,pe=(i,e)=>e.propertyId;function he(i,e){if(i&1&&(mt(0,"option",27),$c(1),bt()),i&2){let n=e.$implicit;xn("value",n.key),Ut(),bm(n.value);}}function ge(i,e){if(i&1&&(mt(0,"select",8),vd(1,he,2,2,"option",27,de),bt(),Z2()),i&2){let n=Mn();Q2(),Ut(),_d(n.sections);}}function fe(i,e){if(i&1&&(mt(0,"option",27),$c(1),bt()),i&2){let n=e.$implicit;xn("value",n.orgId),Ut(),bm(n.name);}}function Ce(i,e){if(i&1&&(mt(0,"div",4)(1,"label"),$c(2,"Organization"),bt(),mt(3,"div",5)(4,"div",10)(5,"select",28)(6,"option",29),$c(7,"All Organizations"),bt(),vd(8,fe,2,2,"option",27,ue),bt(),Z2(),bt()()()),i&2){let n=Mn();Ut(5),Q2(),Ut(3),_d(n.orgs);}}function ve(i,e){if(i&1&&Bn(0,"rpr-property-row-view",30),i&2){let n=e.$implicit;xn("isCommercial",n.isCommercial)("searchResult",n)("showCheckbox",false)("showOwnerNameColumn",false)("showOfficeColumn",false)("showApnTaxIdColumn",false)("showListingIdColumn",false)("showYearBuiltColumn",true)("showLotSizeColumn",false)("showLivingAreaPerUnitColumn",false)("showPriceToEstimatedValue",false)("hideBedsBathsLivingArea",false);}}function Se(i,e){if(i&1&&(mt(0,"div",24),vd(1,ve,1,12,"rpr-property-row-view",30,pe),bt()),i&2){let n=Mn();Ut(),_d(n.searchResults);}}function _e(i,e){if(i&1){let n=Uc();mt(0,"div",25)(1,"button",31),gt("click",function(){ks(n);let l=Mn();return Os(l.cancelSearch())}),$c(2," Cancel Search "),bt()();}}function ye(i,e){i&1&&(mt(0,"div",26)(1,"h2"),$c(2,"No results!"),bt(),mt(3,"p"),$c(4,"No properties were found."),bt()());}var m=class i extends xB{constructor(){super(...arguments),this.searchResults=[],this.searched=false,this.LocationSuggestionsCategory=le,this.$locationInput=she(_t),this.adminDevApi=h(V),this.propertySearchesApi=h(Ct),this.cd=h(dn),this.fb=h(VTe);}ngOnInit(){this.initForm(),this.getSections(),this.getOrgs();}onLocationSelected(e){this.search(e.placeId);}search(e){if(!this.$loading()){if((this.locationControl.value?.length||0)===1){this.$locationInput()?.showLocationError(N1e);return}this.$loading.set(true),this.searchResults=[],this.saveForm(),this.searchObservable=this.adminDevApi.findPropertySearchResultsBySection({section:this.section,propertyMode:this.propertyMode,location:this.location,placeId:e,orgId:this.orgId,maxResults:this.maxResults}).pipe(Ke(n=>{this.searchResults=n,this.$loading.set(false),this.searched=true,this.cd.markForCheck();}),k(()=>(this.$loading.set(false),N(null))),ft(this.unsubscribe$)).subscribe();}}cancelSearch(){this.searchObservable&&(this.searchObservable.unsubscribe(),this.$loading.set(false));}initForm(){this.form=this.fb.group({section:this.section,isCommercial:this.propertyMode===zo.Commercial,location:this.location,orgId:this.orgId,maxResults:this.maxResults});}saveForm(){this.section=this.sectionControl.value?this.sectionControl.value:null,this.propertyMode=this.isCommercialControl.value===true?zo.Commercial:zo.Residential,this.location=this.unknownLocation=this.locationControl.value,this.orgId=this.orgIdControl.value,this.maxResults=this.maxResultsControl.value;}
1getSections(){this.adminDevApi.getSections().pipe(Ke(e=>{this.sections=e,this.cd.markForCheck();}),k(()=>N(null)),ft(this.unsubscribe$)).subscribe();}getOrgs(){this.propertySearchesApi.getSearchFormLookups().pipe(Ke(e=>{this.orgs=e.orgs,this.cd.markForCheck();}),k(()=>N(null)),ft(this.unsubscribe$)).subscribe();}get sectionControl(){return this.form.get("section")}get isCommercialControl(){return this.form.get("isCommercial")}get locationControl(){return this.form.get("location")}get orgIdControl(){return this.form.get("orgId")}get maxResultsControl(){return this.form.get("maxResults")}static{this.\u0275fac=(()=>{let e;return function(r){return (e||(e=_t$1(i)))(r||i)}})();}static{this.\u0275cmp=It({type:i,selectors:[["rpr-admin-reli-search-listings"]],viewQuery:function(n,r){n&1&&LR(r.$locationInput,_t,5),n&2&&Yz();},hostAttrs:[1,"admin-search"],features:[At([U()]),Ee],decls:52,vars:16,consts:[[1,"container"],["autocomplete","off",1,"padding-top-10","padding-bottom-10","padding-left-10","padding-right-10","margin-bottom-20",3,"ngSubmit","formGroup"],[1,"filters","column-content","columns","is-vcentered"],[1,"column","is-2"],[1,"field"],[1,"control","flex-item-extended"],["formControlName","isCommercial","offText","Residential","onText","Commercial",3,"isVertical"],[1,"select","flex-item-extended"],["formControlName","section"],[1,"column","is-1"],[1,"select"],["formControlName","maxResults"],["value","1"],["value","2"],["value","3"],["value","5"],["value","10"],[1,"column","is-5"],[1,"field","has-addons"],["placeholder","Enter a County, City, ZIP Code or Neighborhood",3,"locationSelected","locationControl","suggestionsCategory","findResult","unknownLocation","submitting"],[1,"control"],["type","submit","aria-label","Search",1,"button","is-info","search-button"],[1,"fa-regular","fa-magnifying-glass"],[3,"enabled","isInline"],[1,"search-results"],[1,"cancel-search"],[1,"no-results"],[3,"value"],["formControlName","orgId"],["value",""],[3,"isCommercial","searchResult","showCheckbox","showOwnerNameColumn","showOfficeColumn","showApnTaxIdColumn","showListingIdColumn","showYearBuiltColumn","showLotSizeColumn","showLivingAreaPerUnitColumn","showPriceToEstimatedValue","hideBedsBathsLivingArea"],["type","button",1,"button","is-primary","is-outlined",3,"click"]],template:function(n,r){if(n&1&&(mt(0,"div",0)(1,"rpr-admin-page-header")(2,"h1"),$c(3,"Search for Listings"),bt(),mt(4,"p"),$c(5,"Search for listings that have data populated in specific sections of the Property Details page."),bt()(),mt(6,"form",1),gt("ngSubmit",function(){return r.search()}),mt(7,"div",2)(8,"div",3)(9,"div",4)(10,"div",5),Bn(11,"rpr-custom-switch",6),Z2(),bt()()(),mt(12,"div",3)(13,"div",4)(14,"label"),$c(15,"Property Details Section"),bt(),mt(16,"div",5)(17,"div",7),_i(18,ge,3,0,"select",8),bt()()()(),mt(19,"div",3),_i(20,Ce,10,0,"div",4),bt(),mt(21,"div",9)(22,"div",4)(23,"label"),$c(24,"Max Results"),bt(),mt(25,"div",5)(26,"div",10)(27,"select",11)(28,"option",12),$c(29,"1"),bt(),mt(30,"option",13),$c(31,"2"),bt(),mt(32,"option",14),$c(33,"3"),bt(),mt(34,"option",15),$c(35,"5"),bt(),mt(36,"option",16),$c(37,"10"),bt()(),Z2(),bt()()()(),mt(38,"div",17)(39,"div",4)(40,"label"),$c(41,"Location"),bt(),mt(42,"div",18)(43,"div",5)(44,"rpr-location-input",19),gt("locationSelected",function(me){return r.onLocationSelected(me)}),bt()(),mt(45,"div",20)(46,"button",21),Bn(47,"i",22),bt()()()()()()(),Bn(48,"rpr-loading-indicator",23),_i(49,Se,3,0,"div",24),_i(50,_e,3,0,"div",25),_i(51,ye,5,0,"div",26),bt()),n&2){let l=r.$loading();Ut(6),xn("formGroup",r.form),Ut(5),xn("isVertical",true),Q2(),Ut(7),bi(r.sections?.length?18:-1),Ut(2),bi(r.orgs?.length?20:-1),Ut(7),Q2(),Ut(17),xn("locationControl",r.locationControl)("suggestionsCategory",r.LocationSuggestionsCategory.NeighborhoodsSearch)("findResult",r.findResult)("unknownLocation",r.unknownLocation)("submitting",l),Ut(2),wt("is-loading",l),Ut(2),xn("enabled",l)("isInline",true),Ut(),bi(r.searchResults?.length&&!l?49:-1),Ut(),bi(l?50:-1),Ut(),bi(!r.searchResults?.length&&!l&&r.searched?51:-1);}},dependencies:[j,j$1,jTe,PTe,FTe,BTe,NL,RTe,ATe,M,_t,Fo,HTe,OZ,NZ],styles:[".filters[_ngcontent-%COMP%] .field[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:block;color:#4f6278;font-size:.8em;margin-bottom:2px}.search-results[_ngcontent-%COMP%]{margin-left:20px}.cancel-search[_ngcontent-%COMP%]{text-align:center;margin-top:20px}.no-results[_ngcontent-%COMP%]{text-align:center}.no-results[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#4f6278;font-weight:700;font-size:1.5em}.no-results[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#97a7ba}"]}
1);}};Se$1([Pn({storageKey:"adminSearchListingsSection",defaultValue:jn.BasicFacts})],m.prototype,"section",void 0);Se$1([Pn({storageKey:"adminSearchListingsPropertyMode",defaultValue:zo.Residential})],m.prototype,"propertyMode",void 0);Se$1([Pn({storageKey:"adminSearchListingsLocation",defaultValue:""})],m.prototype,"location",void 0);Se$1([Pn({storageKey:"adminSearchListingsOrgId",defaultValue:""})],m.prototype,"orgId",void 0);Se$1([Pn({storageKey:"adminSearchListingsMaxResults",defaultValue:1})],m.prototype,"maxResults",void 0);export{m as AdminReliSearchListings};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.