@maplander/components 0.21.16 → 0.21.19

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,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@maplander/types"),require("@angular/forms"),require("rxjs"),require("@angular/material/dialog"),require("@angular/material/button"),require("@angular/material/icon"),require("@maplander/shared"),require("@maplander/static"),require("@angular/material/chips"),require("@angular/material/button-toggle"),require("@angular/material/form-field"),require("@angular/material/select"),require("@angular/material/divider"),require("@angular/material/core"),require("@angular/material"),require("rxjs/internal-compatibility"),require("rxjs/operators"),require("@maplander/core"),require("@angular/cdk/layout"),require("@angular/material-moment-adapter"),require("moment"),require("@angular/common/http"),require("@angular/platform-browser"),require("@angular/material/datepicker"),require("@angular/material/input"),require("@angular/material/checkbox"),require("@angular/material/radio"),require("@angular/material/sidenav"),require("@angular/material/tabs"),require("@angular/material/toolbar"),require("@angular/material/tooltip"),require("@ecodev/fab-speed-dial"),require("@angular/cdk/drag-drop"),require("@angular/cdk/overlay"),require("@angular/router")):"function"==typeof define&&define.amd?define("@maplander/components",["exports","@angular/core","@angular/common","@maplander/types","@angular/forms","rxjs","@angular/material/dialog","@angular/material/button","@angular/material/icon","@maplander/shared","@maplander/static","@angular/material/chips","@angular/material/button-toggle","@angular/material/form-field","@angular/material/select","@angular/material/divider","@angular/material/core","@angular/material","rxjs/internal-compatibility","rxjs/operators","@maplander/core","@angular/cdk/layout","@angular/material-moment-adapter","moment","@angular/common/http","@angular/platform-browser","@angular/material/datepicker","@angular/material/input","@angular/material/checkbox","@angular/material/radio","@angular/material/sidenav","@angular/material/tabs","@angular/material/toolbar","@angular/material/tooltip","@ecodev/fab-speed-dial","@angular/cdk/drag-drop","@angular/cdk/overlay","@angular/router"],t):t(((e=e||self).maplander=e.maplander||{},e.maplander.components={}),e.ng.core,e.ng.common,e["@maplander/types"],e["@angular/forms"],e.rxjs,e.ng.material.dialog,e.ng.material.button,e.ng.material.icon,e["@maplander/shared"],e["@maplander/static"],e.ng.material.chips,e.ng.material["button-toggle"],e.ng.material["form-field"],e.ng.material.select,e.ng.material.divider,e.ng.material.core,e["@angular/material"],e.rxjs["internal-compatibility"],e.rxjs.operators,e["@maplander/core"],e.ng.cdk.layout,e[8][2][3],e.moment,e.ng.common.http,e.ng.platformBrowser,e.ng.material.datepicker,e.ng.material.input,e.ng.material.checkbox,e.ng.material.radio,e.ng.material.sidenav,e.ng.material.tabs,e.ng.material.toolbar,e.ng.material.tooltip,e["@ecodev/fab-speed-dial"],e.ng.cdk["drag-drop"],e.ng.cdk.overlay,e.ng.router)}(this,(function(e,t,r,n,i,o,a,s,l,p,c,u,d,m,f,g,y,h,b,_,v,E,x,I,w,C,A,F,T,P,S,M,N,k,D,O,R,L){"use strict";
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/common"),require("@maplander/types"),require("@angular/forms"),require("rxjs"),require("@angular/material/dialog"),require("@angular/material/button"),require("@angular/material/icon"),require("@maplander/shared"),require("@maplander/static"),require("@angular/material/chips"),require("@angular/material/button-toggle"),require("@angular/material/form-field"),require("@angular/material/select"),require("@angular/material/divider"),require("@angular/material/core"),require("@angular/material"),require("rxjs/internal-compatibility"),require("rxjs/operators"),require("@maplander/core"),require("@angular/cdk/layout"),require("@angular/material-moment-adapter"),require("moment"),require("@angular/common/http"),require("@angular/platform-browser"),require("@angular/material/datepicker"),require("@angular/material/input"),require("@angular/material/checkbox"),require("@angular/material/radio"),require("@angular/material/sidenav"),require("@angular/material/tabs"),require("@angular/material/toolbar"),require("@angular/material/tooltip"),require("@ecodev/fab-speed-dial"),require("@angular/cdk/drag-drop"),require("@angular/cdk/overlay"),require("@angular/router")):"function"==typeof define&&define.amd?define("@maplander/components",["exports","@angular/core","@angular/common","@maplander/types","@angular/forms","rxjs","@angular/material/dialog","@angular/material/button","@angular/material/icon","@maplander/shared","@maplander/static","@angular/material/chips","@angular/material/button-toggle","@angular/material/form-field","@angular/material/select","@angular/material/divider","@angular/material/core","@angular/material","rxjs/internal-compatibility","rxjs/operators","@maplander/core","@angular/cdk/layout","@angular/material-moment-adapter","moment","@angular/common/http","@angular/platform-browser","@angular/material/datepicker","@angular/material/input","@angular/material/checkbox","@angular/material/radio","@angular/material/sidenav","@angular/material/tabs","@angular/material/toolbar","@angular/material/tooltip","@ecodev/fab-speed-dial","@angular/cdk/drag-drop","@angular/cdk/overlay","@angular/router"],t):t(((e=e||self).maplander=e.maplander||{},e.maplander.components={}),e.ng.core,e.ng.common,e["@maplander/types"],e["@angular/forms"],e.rxjs,e.ng.material.dialog,e.ng.material.button,e.ng.material.icon,e["@maplander/shared"],e["@maplander/static"],e.ng.material.chips,e.ng.material["button-toggle"],e.ng.material["form-field"],e.ng.material.select,e.ng.material.divider,e.ng.material.core,e["@angular/material"],e.rxjs["internal-compatibility"],e.rxjs.operators,e["@maplander/core"],e.ng.cdk.layout,e[8][2][3],e.moment,e.ng.common.http,e.ng.platformBrowser,e.ng.material.datepicker,e.ng.material.input,e.ng.material.checkbox,e.ng.material.radio,e.ng.material.sidenav,e.ng.material.tabs,e.ng.material.toolbar,e.ng.material.tooltip,e["@ecodev/fab-speed-dial"],e.ng.cdk["drag-drop"],e.ng.cdk.overlay,e.ng.router)}(this,(function(e,t,r,n,i,o,a,s,l,p,c,u,d,m,f,g,y,h,b,_,v,E,x,I,w,A,C,F,T,P,S,M,N,k,D,O,R,L){"use strict";
2
2
  /*! *****************************************************************************
3
3
  Copyright (c) Microsoft Corporation. All rights reserved.
4
4
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use
@@ -12,5 +12,5 @@
12
12
 
13
13
  See the Apache Version 2.0 License for specific language governing permissions
14
14
  and limitations under the License.
15
- ***************************************************************************** */var B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};var z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};var V=function(){function e(){}return e.prototype.transform=function(e,t,r){var n="",i=r||"mx";switch(n+=e.street,i){case"mx":t?(n+=", "+(e.colony||""),n+=", "+(e.postalCode||""),n+=", "+(e.city||""),n+=", "+(e.state||""),n+=", "+(e.country||"")):n+=", "+(e.colony||"");break;case"usa":t?(n+=", "+(e.city||""),n+=", "+(e.state||""),n+=", "+(e.postalCode||""),n+=", "+(e.country||"")):(n+=", "+(e.city||""),n+=", "+(e.state||""))}return n},e.decorators=[{type:t.Pipe,args:[{name:"addressFormat"}]}],e}(),U=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[V]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[V],exports:[V]}]}],e}(),H=function(){function e(e){this._component=e}return e.prototype.open=function(){this._component.open()},e.prototype.close=function(){this._component.close()},e}(),j=function(){function e(e){this._timestamp=e.toString()}return e.getTimestamp=function(e,t){var r="";return t?(r+=""+e.getHours(),r+=e.getMinutes()<10?"0"+e.getMinutes():""+e.getMinutes(),r+=e.getSeconds()<10?"0"+e.getSeconds():""+e.getSeconds(),Number(r)):(r+=""+e.getFullYear().toString(),r+=e.getMonth()+1<10?"0"+(e.getMonth()+1):""+(e.getMonth()+1),r+=e.getDate()<10?"0"+e.getDate():""+e.getDate().toString(),Number(r))},e.getHours=function(e){return e.slice(0,2)},e.getMinutes=function(e){return e.slice(2,4)},e.getSeconds=function(e){return e.slice(4,e.length)},e.getWeekDayName=function(e,t){switch(e){case 0:return t?"lunes":"Lunes";case 1:return t?"martes":"Martes";case 2:return t?"miercoles":"Miercoles";case 3:return t?"jueves":"Jueves";case 4:return t?"viernes":"Viernes";case 5:return t?"sabado":"Sabado";case 6:return t?"domingo":"Domingo"}},e.getMonthName=function(e,t){switch(e){case"01":return t?"ene.":"Ene.";case"02":return t?"feb.":"Feb.";case"03":return t?"mar.":"Mar.";case"04":return t?"abr.":"Abr.";case"05":return t?"may.":"May.";case"06":return t?"jun.":"Jun.";case"07":return t?"jul.":"Jul.";case"08":return t?"ago.":"Ago.";case"09":return t?"sep.":"Sep.";case"10":return t?"oct.":"Oct.";case"11":return t?"nov.":"Nov.";case"12":return t?"dic.":"Dic."}},e.prototype.toDate=function(t){if(t){var r=this.getYear()+"-"+this.getMoth()+"-"+this.getDay(),n=e.getHours(t.toString())+":"+e.getMinutes(t.toString())+":"+e.getSeconds(t.toString());return new Date(r+"T"+n+"Z")}return new Date(Number(this.getYear()),Number(this.getMoth())-1,Number(this.getDay()))},e.prototype.getFormat=function(t,r){var n=void 0===r?{}:r,i=n.time,o=void 0===i?null:i,a=n.toLowerCase,s=void 0!==a&&a,l=n.format12Hours,p=void 0!==l&&l,c="",u=null;switch(t){case"dd/MM/yyyy":c=this.getDay()+"/"+this.getMoth()+"/"+this.getYear();break;case"dd MMMMM yyyy":c=this.getDay()+" "+e.getMonthName(this.getMoth(),s)+" "+this.getYear();break;case"dd MMMMM":c=this.getDay()+" "+e.getMonthName(this.getMoth(),s);break;case"EEEEE HH:mm":c+=""+e.getWeekDayName(this.toDate(o).getDay()-1,s),u=this.toDate(o),p?(c+=13===u.getHours()?" a la ":" a las ",c+=u.getHours()<12?u.getHours():u.getHours()-12,c+=":"+u.getMinutes(),c+=u.getHours()<12?" AM":" PM"):(c+=" a las ",c+=u.getHours()+":"+u.getMinutes());break;case"dd MMMMM HH:mm":c+=""+this.getDay(),c+=" de "+e.getMonthName(this.getMoth(),s),u=this.toDate(o),p?(c+=13===u.getHours()?" a la ":" a las ",c+=u.getHours()<12?u.getHours():u.getHours()-12,c+=":"+u.getMinutes(),c+=u.getHours()<12?" AM":" PM"):(c+=" a las ",c+=u.getHours()+":"+u.getMinutes());break;case"dd MMMMM yyyy HH:mm":c+=""+this.getDay(),c+=" de "+e.getMonthName(this.getMoth(),s)+" "+this.getYear(),u=this.toDate(o),p?(c+=13===u.getHours()?" a la ":" a las ",c+=u.getHours()<12?u.getHours():u.getHours()-12,c+=":"+u.getMinutes(),c+=u.getHours()<12?" AM":" PM"):(c+=" a las ",c+=u.getHours()+":"+u.getMinutes())}return c},e.prototype.getYear=function(){return this._timestamp.slice(0,4)},e.prototype.getMoth=function(){return this._timestamp.slice(4,6)},e.prototype.getDay=function(){return this._timestamp.slice(6,this._timestamp.length)},e}(),G=function(){function e(){}return e.prototype.transform=function(e,t,r){if(t)return new j(e).getFormat(r,{toLowerCase:!0});var n=new Date(Number(e));return(n.getDate()<10?"0"+n.getDate():n.getDate())+"/"+(n.getMonth()<10?"0"+n.getMonth():n.getMonth())+"/"+n.getFullYear()},e.decorators=[{type:t.Pipe,args:[{name:"libFormatDate"}]}],e}(),q=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[G]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[G],exports:[G]}]}],e}(),Y={AdjacentCommerce:"adjacentCommerce",AdjacentGym:"gym",AdjacentPicnic:"adjacentPicnic",AirConditioner:"airConditioner",Balcony:"balcony",CustomerParking:"customerParking",DiningRoom:"diningRoom",DoubleHeight:"doubleHeight",DressingRooms:"dressingRooms",FacingStreet:"facingStreet",Finishings:"finishings",Furnished:"furnished",Garden:"garden",Gym:"gym",HighResistanceFloors:"highResistanceFloors",HighSpeedInternet:"highSpeedInternet",InCommercialArea:"inCommercialArea",InIndustrialPark:"inIndustrialPark",InShoppingCenter:"inShoppingCenter",Jacuzzi:"jacuzzi",KitchenServices:"kitchenServices",MaidsBathroom:"maidsBathroom",ManeuverArea:"maneuverArea",MeetingRoom:"meetingRoom",Mezzanine:"mezzanine",MixedBuilding:"mixedBuilding",NaturalLighting:"naturalLighting",Offices:"offices",OpenSpace:"openSpace",Platforms:"platforms",Playground:"playground",Playroom:"playroom",Pool:"pool",RailSpur:"railSpur",RailYard:"maneuverArea",Reception:"reception",SecurityGuard:"securityGuard",Storage:"storage",VisitorParking:"visitorParking",NearPublicTransportation:"nearPublicTransportation",NearShops:"nearShops",OnBusyRoad:"onBusyRoad",CountrySide:"countrySide",Downtown:"downtown",GoodReachableTraffic:"goodReachableTraffic",NearFitnessCentre:"nearFitnessCentre",NearHighway:"nearHighway",NearHospital:"nearHospital",NearPark:"nearPark",NearSchools:"nearSchools",OnQuietRoad:"onQuietRoad",RoofGarden:"roofGarden",PetFriendly:"petFriendly",DifferentAbilities:"differentAbilities"},W=function(){function e(){}return e.Amenities={roofGarden:{checked:!1,iconName:Y.RoofGarden,value:Y.RoofGarden,name:"Terraza"},petFriendly:{checked:!1,iconName:Y.PetFriendly,value:Y.PetFriendly,name:"Acepta Mascotas"},differentAbilities:{checked:!1,iconName:Y.DifferentAbilities,value:Y.DifferentAbilities,name:"Con capacidades diferentes"},adjacentCommerce:{checked:!1,iconName:Y.AdjacentCommerce,value:Y.AdjacentCommerce,name:"Comercio adyacente"},adjacentGym:{checked:!1,iconName:Y.Gym,value:Y.AdjacentGym,name:"Gym adyacente"},adjacentPicnic:{checked:!1,iconName:Y.AdjacentPicnic,value:Y.AdjacentPicnic,name:"Merendero adyacente"},airConditioner:{checked:!1,iconName:Y.AirConditioner,value:Y.AirConditioner,name:"Aire acondicionado"},balcony:{checked:!1,iconName:Y.Balcony,value:Y.Balcony,name:"Balcón"},customerParking:{checked:!1,iconName:Y.CustomerParking,value:Y.CustomerParking,name:"Estacionamiento para clientes"},diningRoom:{checked:!1,iconName:Y.DiningRoom,value:Y.DiningRoom,name:"Comedor"},doubleHeight:{checked:!1,iconName:Y.DoubleHeight,value:Y.DoubleHeight,name:"Doble altura"},dressingRooms:{checked:!1,iconName:Y.DressingRooms,value:Y.DressingRooms,name:"Con vestidores"},facingStreet:{checked:!1,iconName:Y.FacingStreet,value:Y.FacingStreet,name:"Frente a calle"},finishings:{checked:!1,iconName:Y.Finishings,value:Y.Finishings,name:"Con acabados"},furnished:{checked:!1,iconName:Y.Furnished,value:Y.Furnished,name:"Amueblada"},garden:{checked:!1,iconName:Y.Garden,value:Y.Garden,name:"Jardín"},gym:{checked:!1,iconName:Y.Gym,value:Y.Gym,name:"Gym"},highResistanceFloors:{checked:!1,iconName:Y.HighResistanceFloors,value:Y.HighResistanceFloors,name:"Pisos de alta resistencia"},highSpeedInternet:{checked:!1,iconName:Y.HighSpeedInternet,value:Y.HighSpeedInternet,name:"Internet de alta velocidad"},inCommercialArea:{checked:!1,iconName:Y.InCommercialArea,value:Y.InCommercialArea,name:"En zona comercial"},inIndustrialPark:{checked:!1,iconName:Y.InIndustrialPark,value:Y.InIndustrialPark,name:"En parque industrial"},inShoppingCenter:{checked:!1,iconName:Y.InShoppingCenter,value:Y.InShoppingCenter,name:"En centro comercial"},jacuzzi:{checked:!1,iconName:Y.Jacuzzi,value:Y.Jacuzzi,name:"Jacuzzi"},kitchenServices:{checked:!1,iconName:Y.KitchenServices,value:Y.KitchenServices,name:"Servicios para cocina"},maidsBathroom:{checked:!1,iconName:Y.MaidsBathroom,value:Y.MaidsBathroom,name:"Cuarto de Servicio"},maneuverArea:{checked:!1,iconName:Y.ManeuverArea,value:Y.ManeuverArea,name:"Área de maniobras"},meetingRoom:{checked:!1,iconName:Y.MeetingRoom,value:Y.MeetingRoom,name:"Sala de conferencias"},mezzanine:{checked:!1,iconName:Y.Mezzanine,value:Y.Mezzanine,name:"Con entrepiso"},mixedBuilding:{checked:!1,iconName:Y.MixedBuilding,value:Y.MixedBuilding,name:"En edificio mixto"},naturalLighting:{checked:!1,iconName:Y.NaturalLighting,value:Y.NaturalLighting,name:"Iluminacion natural"},offices:{checked:!1,iconName:Y.Offices,value:Y.Offices,name:"Con oficinas"},openSpace:{checked:!1,iconName:Y.OpenSpace,value:Y.OpenSpace,name:"Espacio abierto"},platforms:{checked:!1,iconName:Y.Platforms,value:Y.Platforms,name:"Andenes"},playground:{checked:!1,iconName:Y.Playground,value:Y.Playground,name:"Juegos infantiles"},playroom:{checked:!1,iconName:Y.Playroom,value:Y.Playroom,name:"Salón de juegos"},pool:{checked:!1,iconName:Y.Pool,value:Y.Pool,name:"Alberca"},railSpur:{checked:!1,iconName:Y.RailSpur,value:Y.RailSpur,name:"Espuela de FF.CC"},railyard:{checked:!1,iconName:Y.RailYard,value:Y.RailYard,name:"Patio de maniobras"},reception:{checked:!1,iconName:Y.Reception,value:Y.Reception,name:"Recepción"},securityGuard:{checked:!1,iconName:Y.SecurityGuard,value:Y.SecurityGuard,name:"Con vigilancia"},storage:{checked:!1,iconName:Y.Storage,value:Y.Storage,name:"Bodega"},visitorParking:{checked:!1,iconName:Y.VisitorParking,value:Y.VisitorParking,name:"Estacionamiento para visitas"},features:[{checked:!1,iconName:Y.NearPublicTransportation,value:Y.NearPublicTransportation,name:"Cerca de estaciones de transporte"},{checked:!1,iconName:Y.AdjacentCommerce,value:Y.NearShops,name:"Cerca de comercios"},{checked:!1,iconName:Y.OnBusyRoad,value:Y.OnBusyRoad,name:"Avenida principal"},{checked:!1,iconName:Y.CountrySide,value:Y.CountrySide,name:"Suburbio"},{checked:!1,iconName:Y.Downtown,value:Y.Downtown,name:"Céntrico"},{checked:!1,iconName:Y.GoodReachableTraffic,value:Y.GoodReachableTraffic,name:"Se llega sin trafico"},{checked:!1,iconName:Y.NearFitnessCentre,value:Y.NearFitnessCentre,name:"Cerca de centro deportivo"},{checked:!1,iconName:Y.NearHighway,value:Y.NearHighway,name:"Cerca de autopista"},{checked:!1,iconName:Y.NearHospital,value:Y.NearHospital,name:"Cerca de centros de salud"},{checked:!1,iconName:Y.NearPark,value:Y.NearPark,name:"Cerca de parque"},{checked:!1,iconName:Y.NearSchools,value:Y.NearSchools,name:"Cerca de escuelas"},{checked:!1,iconName:Y.OnQuietRoad,value:Y.OnQuietRoad,name:"En calle tranquila"}]},e.DurationList=[30,60,90,180,365],e.CommissionList={SALE:[.06,.055,.05,.045,.04,.035,.03,.025,.02,.015,.01],RENT:[2,1.5,1,.5]},e.SharedCommissionList=[.5,.4,.3,.2,.1],e.LandUseList=[{name:"Habitacional unifamiliar",value:n.LandUseEnum.SINGLE_FAMILY_HOUSING},{name:"Habitacional plurifamiliar",value:n.LandUseEnum.MULTI_FAMILY_HOUSING},{name:"Habitacional con comercio",value:n.LandUseEnum.HOUSING_WITH_COMMERCE},{name:"Habitacional con oficina",value:n.LandUseEnum.HOUSING_WITH_OFFICE},{name:"Habitacional mixto",value:n.LandUseEnum.MIXED_HOUSING},{name:"Comercio",value:n.LandUseEnum.COMMERCE},{name:"Oficina",value:n.LandUseEnum.OFFICE},{name:"Servicios",value:n.LandUseEnum.SERVICES},{name:"Industria",value:n.LandUseEnum.INDUSTRY},{name:"Agrícola",value:n.LandUseEnum.AGRICULTURAL},{name:"No especificado",value:n.LandUseEnum.OTHER}],e.AnnounceCheckList=[{name:"Las fotos y videos son los correctos",value:0,checked:!1},{name:"La ortografía y gramática es correcta",value:1,checked:!1},{name:"Los datos de contacto son correctos",value:2,checked:!1},{name:"La dirección, email y web están correctos",value:3,checked:!1},{name:"Todo está correcto y apruebo mi anuncio",value:4,checked:!1}],e.DocumentsList=[{name:"Escritura",value:n.PFileTypeEnum.DEED,loaded:!1},{name:"Identificación Propietario",value:n.PFileTypeEnum.OWNER_ID,loaded:!1},{name:"Recibo de agua",value:n.PFileTypeEnum.WATER_BILL,loaded:!1},{name:"Recibo de luz",value:n.PFileTypeEnum.ELECTRICITY_BILL,loaded:!1},{name:"Recibo predial",value:n.PFileTypeEnum.PROPERTY_BILL,loaded:!1},{name:"Constancia de no adeudo",value:n.PFileTypeEnum.CONSTANCY_OF_NO_DEBT,loaded:!1},{name:"Libertad de Gravamen",value:n.PFileTypeEnum.EXEMPTION_TAX,loaded:!1},{name:"Licencia de construcción",value:n.PFileTypeEnum.BUILDING_LICENSE,loaded:!1},{name:"Terminación de obra",value:n.PFileTypeEnum.COMPLETION_OF_CONSTRUCTION,loaded:!1},{name:"Alineación y número oficial",value:n.PFileTypeEnum.ALIGNMENT_AND_OFFICIAL_NUMBER,loaded:!1},{name:"Hipoteca",value:n.PFileTypeEnum.MORTGAGE,loaded:!1},{name:"Otros",value:n.PFileTypeEnum.OTHER,loaded:!1}],e.BedroomList=[0,1,2,3,4],e.BathroomList=[0,1,2,3,4],e.ParkingSpacesList=[0,1,2,3,4],e.SurfaceList=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],e.ROIList=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20],e.PropertyTypeList=[{value:n.PropertyTypeEnum.HOUSE,iconName:"house",name:"Casa",shortName:"Casa",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.RESIDENTIAL,iconName:"residential",name:"Vivienda",shortName:"Vivienda",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.APARTMENT,iconName:"apartment",name:"Departamento",shortName:"Depto",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.ROOM,iconName:"room",name:"Habitación",shortName:"Habitación",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.highSpeedInternet,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.OFFICE,iconName:"office",name:"Oficina",shortName:"Oficina",features:e.Amenities.features,amenities:[e.Amenities.visitorParking,e.Amenities.furnished,e.Amenities.highSpeedInternet,e.Amenities.reception,e.Amenities.adjacentPicnic,e.Amenities.meetingRoom,e.Amenities.adjacentGym,e.Amenities.openSpace,e.Amenities.airConditioner,e.Amenities.adjacentCommerce,e.Amenities.mixedBuilding,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.RETAIL,iconName:"retail",name:"Comercio",shortName:"Comercio",features:e.Amenities.features,amenities:[e.Amenities.mixedBuilding,e.Amenities.facingStreet,e.Amenities.maneuverArea,e.Amenities.kitchenServices,e.Amenities.finishings,e.Amenities.mezzanine,e.Amenities.inShoppingCenter,e.Amenities.inCommercialArea,e.Amenities.customerParking,e.Amenities.doubleHeight,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.WAREHOUSE,iconName:"warehouse",name:"Bodega",shortName:"Bodega",features:e.Amenities.features,amenities:[e.Amenities.securityGuard,e.Amenities.customerParking,e.Amenities.doubleHeight,e.Amenities.railyard,e.Amenities.platforms,e.Amenities.highResistanceFloors,e.Amenities.offices,e.Amenities.dressingRooms,e.Amenities.diningRoom,e.Amenities.inIndustrialPark,e.Amenities.naturalLighting,e.Amenities.railSpur,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.LAND,iconName:"land",name:"Terreno",shortName:"Terreno",features:e.Amenities.features,amenities:[e.Amenities.securityGuard]},{value:n.PropertyTypeEnum.INVESTMENT,iconName:"investment",name:"Inversión",shortName:"Inversión",features:e.Amenities.features,amenities:[]},{value:n.PropertyTypeEnum.NONE,name:"Todo",shortName:"Todo",iconName:"all",features:[],amenities:[]}],e.OfferingTypeList=[{value:n.OfferingTypeEnum.SALE,name:"Venta"},{value:n.OfferingTypeEnum.RENT,name:"Renta"}],e.LocateList={USD:{locate:"en-US",currency:"USD"},MXN:{locate:"es-MX",currency:"MXN"},GBP:{locate:"en-GB",currency:"GBP"},EUR:{locate:"de-DE",currency:"EUR"},BRL:{locate:"pt-BR",currency:"BRL"},CNY:{locate:"zh-CH",currency:"CNY"}},e.PropertyStatusList=[{icon:"announce",name:"Anunciadas",value:n.StatusTypeEnum.ANNOUNCED},{icon:"expired",name:"Expiradas",value:n.StatusTypeEnum.EXPIRED},{icon:"hidden",name:"Ocultas",value:n.StatusTypeEnum.HIDDEN},{icon:"ready",name:"Listas para anunciar",value:n.StatusTypeEnum.READY},{icon:"draft",name:"Borrador",value:n.StatusTypeEnum.DRAFT}],e}(),X=function(){function e(){}return e.round=function(e,t){var r=Math.pow(10,t||0);return Math.round(e*r)/r},e.getFilterByPropertyType=function(e){return{type:e.type,offering:e.offering,distance:e.distance,location:{latitude:e.location.latitude,longitude:e.location.longitude},currency:e.currency,upLimitPrice:0,downLimitPrice:0,bathrooms:0,exclusivity:e.exclusivity,bedrooms:0,parkingPlaces:0,extras:[],mainArea:0,roi:0,mls:e.mls}},e.getInitialFilter=function(e,t){return void 0===t&&(t=null),{type:e?n.PropertyTypeEnum.NONE:n.PropertyTypeEnum.RESIDENTIAL,offering:n.OfferingTypeEnum.RENT,distance:t?t.distance:0,location:{latitude:t?t.location.latitude:0,longitude:t?t.location.longitude:0},currency:t?t.currency:"MXN",upLimitPrice:0,downLimitPrice:0,bathrooms:0,exclusivity:!!t&&t.exclusivity,bedrooms:0,parkingPlaces:0,extras:[],mainArea:0,roi:0,mls:!t||t.mls}},e.listErrorsByPropertyTypeForPublish=function(e){var t=["price","currency","description","image"];switch(e){case n.PropertyTypeEnum.HOUSE:case n.PropertyTypeEnum.APARTMENT:t=t.concat(["mainArea","bedrooms","bathrooms"]);break;case n.PropertyTypeEnum.ROOM:case n.PropertyTypeEnum.OFFICE:case n.PropertyTypeEnum.RETAIL:case n.PropertyTypeEnum.LAND:t=t.concat(["mainArea"]);break;case n.PropertyTypeEnum.WAREHOUSE:t=t.concat(["mainArea","secondaryArea"]);break;case n.PropertyTypeEnum.INVESTMENT:t=t.concat(["roi"])}return t},e.getErrorsForPublish=function(e){var t=[];switch(t=(t=(t=(t=t.concat(e.price&&0!==e.price?[]:["price"])).concat(e.currency&&""!==e.currency?[]:["currency"])).concat(e.description&&""!==e.description?[]:["description"])).concat(e.image&&""!==e.image?[]:["image"]),e.type){case n.PropertyTypeEnum.HOUSE:case n.PropertyTypeEnum.APARTMENT:t=(t=(t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"])).concat(!e.features||e.features.bedrooms&&0!==e.features.bedrooms?[]:["bedrooms"])).concat(!e.features||e.features.bathrooms&&0!==e.features.bathrooms?[]:["bathrooms"]);break;case n.PropertyTypeEnum.OFFICE:case n.PropertyTypeEnum.RETAIL:case n.PropertyTypeEnum.LAND:t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"]);break;case n.PropertyTypeEnum.WAREHOUSE:t=(t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"])).concat(!e.features||e.features.secondaryArea&&0!==e.features.secondaryArea?[]:["secondaryArea"]);break;case n.PropertyTypeEnum.INVESTMENT:t=t.concat(!e.features||e.features.roi&&0!==e.features.roi?[]:["roi"]);break;case n.PropertyTypeEnum.ROOM:t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"])}return t},e.removeDiacritics=function(e){var t,r,n={A:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g,AA:/[\uA732]/g,AE:/[\u00C6\u01FC\u01E2]/g,AO:/[\uA734]/g,AU:/[\uA736]/g,AV:/[\uA738\uA73A]/g,AY:/[\uA73C]/g,B:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g,C:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g,D:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g,DZ:/[\u01F1\u01C4]/g,Dz:/[\u01F2\u01C5]/g,E:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g,F:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g,G:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g,H:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g,I:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g,J:/[\u004A\u24BF\uFF2A\u0134\u0248]/g,K:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g,L:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g,LJ:/[\u01C7]/g,Lj:/[\u01C8]/g,M:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g,N:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g,NJ:/[\u01CA]/g,Nj:/[\u01CB]/g,O:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g,OI:/[\u01A2]/g,OO:/[\uA74E]/g,OU:/[\u0222]/g,P:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g,Q:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g,R:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g,S:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g,T:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g,TZ:/[\uA728]/g,U:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g,V:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g,VY:/[\uA760]/g,W:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g,X:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g,Y:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g,Z:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g,a:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g,aa:/[\uA733]/g,ae:/[\u00E6\u01FD\u01E3]/g,ao:/[\uA735]/g,au:/[\uA737]/g,av:/[\uA739\uA73B]/g,ay:/[\uA73D]/g,b:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g,c:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g,d:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g,dz:/[\u01F3\u01C6]/g,e:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g,f:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g,g:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g,h:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g,hv:/[\u0195]/g,i:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g,j:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g,k:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g,l:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g,lj:/[\u01C9]/g,m:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g,n:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g,nj:/[\u01CC]/g,o:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g,oi:/[\u01A3]/g,ou:/[\u0223]/g,oo:/[\uA74F]/g,p:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g,q:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g,r:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g,s:/[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g,ss:/[\u00DF]/g,t:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g,tz:/[\uA729]/g,u:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g,v:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g,vy:/[\uA761]/g,w:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g,x:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g,y:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g,z:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g};try{for(var i=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(Object.keys(n)),o=i.next();!o.done;o=i.next()){var a=o.value;e=e.replace(n[a],a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return e},e}(),K=function(){function e(){}return e.prototype.transform=function(e,t){var r,n=W.LocateList[t||"MXN"];return e/1e5/10>=1?(r=X.round(Number(e/1e5/10),2),r=Number(r).toLocaleString(n.locate,{style:"currency",currency:n.currency}).toString(),r+="M"):e/100/10>=1?(r=X.round(Number(e/100/10),2),r=Number(r).toLocaleString(n.locate,{style:"currency",currency:n.currency}).toString(),r+="K"):(r=Number(e).toFixed(2),r=Number(r).toLocaleString(n.locate,{style:"currency",currency:n.currency}).toString()),""+r},e.decorators=[{type:t.Pipe,args:[{name:"markerPrice"}]}],e}(),$=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[K]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[K],exports:[K]}]}],e}(),Q=function(){function e(){}return e.prototype.transform=function(e,t){var r=t||"en";return W.OfferingTypeList.forEach((function(t){t.value===e&&(r+=" "+t.name.toLowerCase())})),r},e.decorators=[{type:t.Pipe,args:[{name:"offeringType"}]}],e}(),J=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[Q]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Q],exports:[Q]}]}],e}(),Z=function(){function e(){}return e.prototype.transform=function(e,t){var r="";return W.PropertyTypeList.forEach((function(t){t.value===e&&(r=t.name)})),t?r.toLowerCase():r},e.decorators=[{type:t.Pipe,args:[{name:"propertyType"}]}],e}(),ee=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[Z]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Z],exports:[Z]}]}],e}(),te=function(){function e(e,t){this._elRef=e,this._currency=t,this._subscription=new o.Subscription,this._el=this._elRef.nativeElement}return e.removeError=function(e,t){var r=e.errors;r&&(delete r[t],Object.keys(r).length?e.setErrors(r):e.setErrors(null))},e.prototype.ngOnChanges=function(e){var t=this;e.currency&&e.currency.currentValue&&this._value&&this.validateFormatPrice(this._value),e.control&&e.control.currentValue&&this._subscription.add(this.control.valueChanges.subscribe((function(e){t._value=e})))},e.prototype.ngAfterViewInit=function(){this._el.addEventListener("focus",this.onFocus.bind(this)),this._el.addEventListener("blur",this.onBlur.bind(this)),this._value=this._el.value,this._el.value=this.formatPrice(this._el.value)},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe(),this._el.removeEventListener("focus",this.onFocus.bind(this)),this._el.removeEventListener("blur",this.onBlur.bind(this))},e.prototype.formatPrice=function(e){return this._currency.transform(e,this.currency&&"MXN"!==this.currency?this.currency:null,"symbol","1.0-0")},e.prototype.onFocus=function(){this._el.value=this._value},e.prototype.onBlur=function(e){this.validateFormatPrice(e.target.value)},e.prototype.validateFormatPrice=function(t){Number.isNaN(Number(t))?this.control.setErrors({format:!0}):(e.removeError(this.control,"format"),this._value=t,this._el.value=this.formatPrice(t))},e.decorators=[{type:t.Directive,args:[{selector:"[libFormatPrice]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:r.CurrencyPipe}]},e.propDecorators={control:[{type:t.Input}],currency:[{type:t.Input}]},e}(),re=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[r.CurrencyPipe,te]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[te],exports:[te]}]}],e}(),ne=function(){function e(e){if(this._ref=e,this.CDN_URL="https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/images-stock",this._el=this._ref.nativeElement,this._el.constructor!==HTMLImageElement)throw new Error("libImageError directive works only image element")}return e.prototype.ngAfterViewInit=function(){var e=this;this._onError=function(){e.updateUrl()},this._el.addEventListener("error",this._onError)},e.prototype.ngOnDestroy=function(){this._el.removeEventListener("error",this._onError)},e.prototype.updateUrl=function(){switch(this.typeImage){case n.PropertyTypeEnum.HOUSE:this._el.src=this.CDN_URL+"/Stock-House.jpg";break;case n.PropertyTypeEnum.OFFICE:this._el.src=this.CDN_URL+"/Stock-Office.jpg";break;case n.PropertyTypeEnum.RETAIL:this._el.src=this.CDN_URL+"/Stock-Retail.jpg";break;case n.PropertyTypeEnum.LAND:this._el.src=this.CDN_URL+"/Stock-Land.jpg";break;case n.PropertyTypeEnum.WAREHOUSE:this._el.src=this.CDN_URL+"/Stock-Warehouse.jpg";break;case n.PropertyTypeEnum.APARTMENT:case n.PropertyTypeEnum.ROOM:this._el.src=this.CDN_URL+"/Stock-Apartment.jpg";break;case n.PropertyTypeEnum.INVESTMENT:this._el.src=this.CDN_URL+"/Stock-Investment.jpg";break;case n.PropertyTypeEnum.RESIDENTIAL:default:this._el.src=this.CDN_URL+"/Stock-House.jpg"}},e.decorators=[{type:t.Directive,args:[{selector:"[libImageError]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={typeImage:[{type:t.Input}]},e}(),ie=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[ne],exports:[ne]}]}],e}(),oe=function(){function e(e,t){this._data=e,this._dialog=t}return e.isBase64=function(e){try{return btoa(atob(e))===e}catch(e){return!1}},e.isURL=function(e){return new RegExp("^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z¡-￿0-9]-*)*[a-z¡-￿0-9]+)(?:\\.(?:[a-z¡-￿0-9]-*)*[a-z¡-￿0-9]+)*(?:\\.(?:[a-z¡-￿]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$","i").test(e)},e.prototype.ngOnInit=function(){this.url=this._data},e.prototype.close=function(){e.isBase64(this.url)||e.isURL(this.url)||URL.revokeObjectURL(this.url),this._dialog.close()},e.decorators=[{type:t.Component,args:[{selector:"lib-document-visor",template:'<div id="document-visor">\r\n <button mat-mini-fab="" class="close" (click)="close()"><mat-icon>close</mat-icon></button>\r\n <ng-template [ngIf]="url">\r\n <object\r\n [data]="url | safeUrl"\r\n type="application/pdf"\r\n width="100%"\r\n height="100%">\r\n <iframe\r\n [src]="url | safeUrl"\r\n width="100%"\r\n height="100%"\r\n style="border: none;">\r\n </iframe>\r\n <p>Tu navegador no soporta PDFs. <br>\r\n <a [href]="url | safeUrl" download="file.pdf">Descargar PDF</a>\r\n </p>\r\n </object>\r\n </ng-template>\r\n</div>\r\n',styles:["::ng-deep .document_visor_dialog{width:70%;height:90%}@media screen and (max-width:600px){::ng-deep .document_visor_dialog{width:100%!important;max-width:100%!important;height:100%!important}}:host{display:block;width:100%;height:100%}#document-visor{width:100%;height:100%;padding:16px;position:relative;display:flex;box-sizing:border-box}#document-visor .close{position:absolute;top:16px;right:16px}#document-visor iframe{border:0;width:100%;height:100%;border-radius:4px}"]}]}],e.ctorParameters=function(){return[{type:String,decorators:[{type:t.Inject,args:[a.MAT_DIALOG_DATA]}]},{type:a.MatDialogRef}]},e}(),ae=function(){function e(e){this._dialog=e}return e.prototype.open=function(e){return this._dialog.open(oe,{data:e,disableClose:!0,panelClass:"document_visor_dialog"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),se=[s.MatButtonModule,a.MatDialogModule,l.MatIconModule],le=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[ae]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.SafeUrlModule.forChild(),se],declarations:[oe],exports:[oe],entryComponents:[oe]}]}],e}(),pe={OFFERING:"OFFERING",PROPERTY_TYPE:"PROPERTY_TYPE",PRICE:"PRICE",BEDROOMS:"BEDROOMS",BATHROOMS:"BATHROOMS",PARKING_PLACES:"PARKING_PLACES",SURFACE:"SURFACE",AMENITIES:"AMENITIES",LISTING:"LISTING"},ce={APPLY:0,INIT:1,AREA:2,SAVE:3,LIST_TYPE:4};ce[ce.APPLY]="APPLY",ce[ce.INIT]="INIT",ce[ce.AREA]="AREA",ce[ce.SAVE]="SAVE",ce[ce.LIST_TYPE]="LIST_TYPE";var ue=new t.InjectionToken("FILTERS MODULE CONFIG"),de=function(){function e(e){this._config=e,this._startComponent=new o.Subject,this._notifier=new o.BehaviorSubject({filter:X.getInitialFilter(this._config||!1),type:ce.INIT,ft:!1})}return e.removeFiltersSaved=function(){c.LocalStorageService.removeItem(e.FILTERS_SAVED_KEY)},e.getFiltersSaved=function(){return c.LocalStorageService.getItem(e.FILTERS_SAVED_KEY)},e.saveFilters=function(t){c.LocalStorageService.setItem(e.FILTERS_SAVED_KEY,{filters:t.filters,ft:t.ft||!1,isSharedProperties:t.isSharedProperties||!1})},e.prototype.setChange=function(e){this._notifier.next(e)},e.prototype.getChanges=function(){return this._notifier.asObservable()},e.prototype.startComponent=function(e){this._startComponent.next(e)},e.prototype.onStartComponent=function(){return this._startComponent.asObservable()},e.FILTERS_SAVED_KEY="FILTERS",e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[ue]}]}]},e}(),me=function(){function e(e,t,r){this._currency=e,this._offeringPipe=t,this._filtersService=r,this.METERS_TO_SQ=10.76391042,this.chips=[],this._subscription=new o.Subscription}return e.prototype.ngOnInit=function(){var e=this;this._subscription.add(this._filtersService.onStartComponent().subscribe((function(t){e._wrapper=t}))),this._subscription.add(this._filtersService.getChanges().subscribe((function(t){e.init(t.filter,t.ft,t.isSharedProperties)})))},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.openFilters=function(){this._wrapper?this._wrapper.open():console.warn("[FabFiltersComponent] waiting onStartComponent")},e.prototype.onClickChip=function(e){e!==pe.PROPERTY_TYPE&&e!==pe.OFFERING||this.openFilters()},e.prototype.init=function(e,t,r){this.chips=[],this._filter=e,this.listingType(r),this.offeringType(),this.propertyType(),this.price(),this.surface(t),this.bedrooms(),this.bathrooms(),this.parkingPlaces(),this.amenities()},e.prototype.listingType=function(e){this.isOPI&&this.chips.push({type:pe.LISTING,text:e?"Compartidas":this._filter.mls?this.mlsLabel||"MLS":"Mi lista",icon:[this._filter.mls?"mlm":"list"]})},e.prototype.offeringType=function(){if(this._filter.offering&&this._filter.type!==n.PropertyTypeEnum.NONE){var e=this._offeringPipe.transform(this._filter.offering," ").replace(/ /g,""),t=e.substr(0,1);e=e.replace(t,""),e=""+t.toLocaleUpperCase()+e,this.chips.push({type:pe.OFFERING,text:e,icon:null})}},e.prototype.propertyType=function(){var e=this;this._filter.type&&this._filter.type!==n.PropertyTypeEnum.NONE&&W.PropertyTypeList.forEach((function(t){t.value===e._filter.type&&e.chips.push({type:pe.PROPERTY_TYPE,text:t.name,icon:[t.iconName]})}))},e.prototype.price=function(){var e,t="",r="";0!==this._filter.downLimitPrice&&(t+=this._currency.transform(this._filter.downLimitPrice)),0!==this._filter.upLimitPrice&&(r+=this._currency.transform(this._filter.upLimitPrice)),""===t&&""===r||(e=this._filter.currency?this._filter.currency:"",this.chips.push({type:pe.PRICE,text:t+(""!==t&&""!==r?" - ":"")+r+" "+e,icon:["price"]}))},e.prototype.surface=function(e){0!==this._filter.mainArea&&this.chips.push({type:pe.SURFACE,text:(e?(this._filter.mainArea/this.METERS_TO_SQ).toFixed(0).toString():this._filter.mainArea.toString())+(e?" sq ft":" m2"),icon:["surface"]})},e.prototype.bedrooms=function(){0!==this._filter.bedrooms&&this.chips.push({type:pe.BEDROOMS,text:this._filter.bedrooms.toString(),icon:["bedroom"]})},e.prototype.bathrooms=function(){0!==this._filter.bathrooms&&this.chips.push({type:pe.BATHROOMS,text:this._filter.bathrooms.toString(),icon:["bathroom"]})},e.prototype.parkingPlaces=function(){0!==this._filter.parkingPlaces&&this.chips.push({type:pe.PARKING_PLACES,text:this._filter.parkingPlaces.toString(),icon:["parking"]})},e.prototype.amenities=function(){this._filter.extras&&this._filter.extras.length>0&&this.chips.push({type:pe.AMENITIES,text:this._filter.extras.length.toString(),icon:[this._filter.extras[0]]})},e.decorators=[{type:t.Component,args:[{selector:"lib-fab-filters",template:'<div class="fab-filters">\r\n <button mat-flat-button="" color="primary" class="btn_filters" (click)="openFilters()">\r\n Filtros\r\n </button>\r\n <div class="filters-container">\r\n <ng-template [ngIf]="chips.length > 0">\r\n <mat-chip-list aria-orientation="horizontal">\r\n <ng-container *ngFor="let chip of chips">\r\n <mat-chip (click)="onClickChip(chip.type)">\r\n <ng-container [ngSwitch]="chip.type">\r\n <ng-container *ngSwitchCase="\'PROPERTY_TYPE\'">\r\n <span class="icon property-icon ic-property-{{chip.icon}}"\r\n [ngStyle]="{\'background\': \'var(--\' + chip.icon + \')\'}"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'LISTING\'">\r\n <ng-template [ngIf]="chip.icon[0] !== \'mlm\'" [ngIfElse]="mlm">\r\n <mat-icon class="listing-icon">\r\n list\r\n </mat-icon>\r\n </ng-template>\r\n <ng-template #mlm>\r\n <mat-icon class="listing-icon" svgIcon="opi:mlm"></mat-icon>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'AMENITIES\'">\r\n <span class="icon ic-amenities-{{chip.icon[0]}}"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngFor="let i of chip.icon">\r\n <span class="icon ic-features-{{i}}"></span>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n {{chip.text}}\r\n </mat-chip>\r\n </ng-container>\r\n </mat-chip-list>\r\n </ng-template>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block;position:inherit;top:inherit;bottom:inherit;left:inherit;right:inherit;z-index:inherit;width:inherit}.fab-filters{display:flex;width:100%;border-radius:8px 0 0 8px}.fab-filters .filters-container{width:calc(100% - 64px);height:40px;padding-right:8px;box-sizing:border-box;border-radius:4px 4px 4px 0;display:flex;align-items:center;transition:150ms}.fab-filters .filters-container mat-chip-list{width:100%;height:100%;overflow:hidden}.fab-filters .filters-container mat-chip-list mat-chip{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.fab-filters ::ng-deep .filters-container mat-chip-list .mat-chip-list-wrapper{width:100%;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:16px;margin:0}.fab-filters .filters-container mat-chip-list mat-chip .icon{width:24px;height:24px;font-size:16px;border-radius:50%;margin-right:8px;display:flex;align-items:center;justify-content:center}"]}]}],e.ctorParameters=function(){return[{type:K},{type:Q},{type:de}]},e.propDecorators={isOPI:[{type:t.Input}],mlsLabel:[{type:t.Input}]},e}(),fe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,u.MatChipsModule,l.MatIconModule,s.MatButtonModule,J.forChild(),$.forChild()],declarations:[me],exports:[me]}]}],e}(),ge=function(){function e(){}return e.prototype.list=function(e,t,r,n){var i=this.getValueByCurrency(t,r),o=this.getValueByCurrency(t,n);return e=e.map((function(e){return r===n?e:o*(e/i)}))},e.prototype.number=function(e,t,r,n){var i=this.getValueByCurrency(t,r);return this.getValueByCurrency(t,n)*(e/i)},e.prototype.getValueByCurrency=function(e,t){var r=0;return e.forEach((function(e){e.type===t.toString()&&(r=e.value)})),r},e.decorators=[{type:t.Injectable}],e}(),ye=function(){function e(){}return e.linSpaceExp=function(e,t,r){for(var n=[],i=1.618033988749895,o=Math.log(t/e)/((r-1)*Math.log(i)),a=0;a<r;a++){n[a]=e*Math.pow(i,o*a);var s=Math.log10(n[a])+1;s>2&&(n[a]=Math.round(n[a]/Math.pow(10,s-2))*Math.pow(10,s-2))}return n},e}();function he(e,t){var r=e.errors;r&&(delete r[t],Object.keys(r).length?e.setErrors(r):e.setErrors(null))}var be=function(){function e(e,r,n,i,a,s){this._config=e,this._render=r,this._ref=n,this._service=i,this._formBuilder=a,this._converter=s,this.METERS_TO_SQ=10.76391042,this.changeFilter=new t.EventEmitter,this.isOPI=this._config||!1,this._subscription=new o.Subscription,this.propertyTypeList=W.PropertyTypeList.map((function(e){return z({},e)})),this.bedroomsList=Object.assign([],W.BedroomList),this.bathroomsList=Object.assign([],W.BathroomList),this.parkingPlacesList=Object.assign([],W.ParkingSpacesList),this.surfaceList=Object.assign([],W.SurfaceList),this.roiList=Object.assign([],W.ROIList),this.surfaceUnitSelected=0,this.buildForm(),this.initComponentByPropertyType(),this.restoreLastFiltersSaved(!0),this.listenChangesOnForm()}return e.prototype.ngOnInit=function(){this.openComponent(!1)},e.prototype.ngAfterViewInit=function(){if(!this.utils)return console.warn("[FiltersComponent] utils param is required");this.initComponent()},e.prototype.ngOnChanges=function(e){e.utils&&e.utils.currentValue&&(console.log("[FiltersComponent] utils ready"),this.initComponent())},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.open=function(){this.restoreLastFiltersSaved(),this.openComponent(!0)},e.prototype.close=function(){this.openComponent(!1)},e.prototype.changePropertyType=function(e){switch(this.resetFilters(e),this.filter.locationType="STATE",this.filter.state=null,this.filter.municipality=null,this.filter.colony=null,this.applyAmenities(),this.filter.type=this.propertyTypeSelected.value,this.propertyTypeSelected.value){case n.PropertyTypeEnum.ROOM:this.filtersForm.controls.offering.setValue(n.OfferingTypeEnum.RENT);break;case n.PropertyTypeEnum.INVESTMENT:this.filtersForm.controls.offering.setValue(n.OfferingTypeEnum.SALE)}this.changeFilter.emit({type:"propertyType",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.changeOffering=function(e){this.filter.locationType="STATE",this.filter.state=null,this.filter.municipality=null,this.filter.colony=null,this.filtersForm.get("state").setValue(""),this.filtersForm.get("state").markAsTouched(),this.filter.offering=e,this.changeFilter.emit({type:"offer",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.changeCurrency=function(e){this.filter.currency=e,this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.changeState=function(e){this.filter.state=e,this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.updateAmenity=function(e){if(e.checked){var t=this.filter.extras.indexOf(e.value);t>-1&&this.filter.extras.splice(t,1)}else this.filter.extras.push(e.value);e.checked=!e.checked,this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.saveSearchByFilters=function(){this.applyFilters(ce.SAVE)},e.prototype.applyFilters=function(e){this.getFilterByForm();var t=Object.assign({},this.filter);1===this.surfaceUnitSelected&&(t.mainArea=t.mainArea*this.METERS_TO_SQ),this.updateFiltersSaved(t),this._service.setChange({type:e||ce.APPLY,filter:t,ft:1===this.surfaceUnitSelected,isSharedProperties:this._isSharedProperties}),this.openComponent(!1)},e.prototype.resetFilters=function(e){this.filter.currency=e?this.filter.currency:"MXN",this.initComponentByPropertyType(e),this.surfaceUnitSelected=0,this.filter=e?X.getFilterByPropertyType(this.filter):X.getInitialFilter(this.isOPI,this.filter),this.updateFormByFilters(),this.setPrices(),this.propertyTotal=0},e.prototype.buildForm=function(){var e,t;this.filtersForm=this._formBuilder.group({state:["",[i.Validators.required]],offering:[],currency:[],minPrice:["",[i.Validators.required,i.Validators.pattern(new RegExp("(^[0-9]+)"))]],maxPrice:["",[i.Validators.required,i.Validators.pattern(new RegExp("(^[0-9]+)"))]],bedrooms:[],bathrooms:[],parkingPlaces:[],surface:[],surfaceUnit:[],roi:[]},{validator:(e="minPrice",t="maxPrice",function(r){if(r){var n=r.controls[e],i=r.controls[t];i.value&&(n.value>=i.value&&i.setErrors({currency:!0}),n.value<i.value&&he(i,"currency"))}return null})})},e.prototype.changeFilterStatus=function(){this.getFilterByForm();var e=Object.assign({},this.filter);1===this.surfaceUnitSelected&&(e.mainArea=e.mainArea*this.METERS_TO_SQ),this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:e}})},e.prototype.updateFormByFilters=function(){this.filtersForm.patchValue({state:this.filter.state,offering:this.filter.offering,currency:this.filter.currency,minPrice:this.filter.downLimitPrice,maxPrice:this.filter.upLimitPrice,bedrooms:this.filter.bedrooms,bathrooms:this.filter.bathrooms,parkingPlaces:this.filter.parkingPlaces,surface:this.filter.mainArea,surfaceUnit:this.surfaceUnitSelected,roi:this.filter.roi})},e.prototype.getFilterByForm=function(){var e=this.filtersForm.value;this.filter.state=e.state,this.filter.offering=e.offering,this.filter.currency=e.currency,this.filter.downLimitPrice=Number(e.minPrice),this.filter.upLimitPrice=Number(e.maxPrice),this.filter.bedrooms=Number(e.bedrooms),this.filter.bathrooms=Number(e.bathrooms),this.filter.parkingPlaces=Number(e.parkingPlaces),this.filter.mainArea=Number(e.surface),this.surfaceUnitSelected=Number(e.surfaceUnit),this.filter.roi=Number(e.roi)},e.prototype.initComponent=function(){var e=this;this.initUtils(),this._subscription.add(this._service.getChanges().subscribe((function(t){switch(t.type){case ce.LIST_TYPE:e._isSharedProperties=t.isSharedProperties,e.updateFiltersSaved(t.filter);break;case ce.AREA:e.updateFiltersSaved(t.filter)}}))),this._service.startComponent(new H(this))},e.prototype.initUtils=function(){this.currencyList=this.utils.cers,this.setPrices()},e.prototype.setPrices=function(e){this.filtersForm.controls.minPrice.reset(0),this.filtersForm.controls.maxPrice.reset(0);var t=this.filtersForm.controls.offering.value;this.minPriceList=this.createPrices(this.utils.limitPrice,this.propertyTypeSelected.value,t),this.minPriceList=this._converter.list(this.minPriceList,this.utils.cers,n.Currency.USD,e||this.filter.currency),this.maxPriceList=Object.assign([],this.minPriceList),this._tmpMinPriceList=Object.assign([],this.minPriceList),this._tmpMaxPriceList=Object.assign([],this.maxPriceList)},e.prototype.applyAmenities=function(){var e=this;this.propertyTypeSelected.amenities=this.propertyTypeSelected.amenities.map((function(t){var r=e.filter.extras.indexOf(t.value);return t.checked=r>-1,t})),this.propertyTypeSelected.features=this.propertyTypeSelected.features.map((function(t){var r=e.filter.extras.indexOf(t.value);return t.checked=r>-1,t}))},e.prototype.createPrices=function(e,t,r){var n=[];return e.propertyRanges.forEach((function(e){e.offering===r&&e.type===t&&(n=ye.linSpaceExp(e.min,e.max,20))})),n},e.prototype.initComponentByPropertyType=function(e){void 0===e&&(e=null),this.propertyTypeSelected=JSON.parse(JSON.stringify(W.PropertyTypeList[null!==e?e:9]))},e.prototype.updateFiltersSaved=function(e){this.filter=e,de.saveFilters({filters:e,ft:1===this.surfaceUnitSelected,isSharedProperties:this._isSharedProperties||!1})},e.prototype.restoreLastFiltersSaved=function(e){var t=this,r=de.getFiltersSaved()||null;this.filter=r?r.filters:X.getInitialFilter(this.isOPI),r&&(r.ft&&(this.filter.mainArea=Number((this.filter.mainArea/this.METERS_TO_SQ).toFixed(0)),this.surfaceUnitSelected=r.ft?1:0),this._isSharedProperties=r.isSharedProperties||!1),this.propertyTypeSelected=W.PropertyTypeList.find((function(e){return e.value===t.filter.type})),this.applyAmenities(),this.updateFormByFilters(),e&&this.applyFilters(ce.INIT)},e.prototype.openComponent=function(e){e?(this._render.setStyle(this._ref.nativeElement,"visibility","visible"),this._render.setStyle(this._ref.nativeElement,"opacity","1")):(this._render.setStyle(this._ref.nativeElement,"opacity","0"),this._render.setStyle(this._ref.nativeElement,"visibility","collapse"))},e.prototype.listenChangesOnForm=function(){var e=this;this._subscription.add(this.filtersForm.controls.offering.valueChanges.subscribe((function(){e.setPrices()}))),this._subscription.add(this.filtersForm.controls.currency.valueChanges.subscribe((function(t){t&&e.setPrices(t.toString())}))),this._subscription.add(this.filtersForm.controls.minPrice.valueChanges.subscribe((function(t){if(t){e.maxPriceList=Object.assign([],e._tmpMaxPriceList);var r=e.minPriceList.indexOf(t);r>-1&&e.maxPriceList.splice(0,r+1),e.changeFilter.emit({type:"filter",payload:{filter:e.filter,value:e.filtersForm.value}})}}))),this._subscription.add(this.filtersForm.controls.maxPrice.valueChanges.subscribe((function(t){if(t){e.minPriceList=Object.assign([],e._tmpMinPriceList);var r=e.maxPriceList.indexOf(t);if(r>-1){var n=e.minPriceList.length-e.maxPriceList.length;e.minPriceList.splice(r+n,e.minPriceList.length-1)}e.changeFilter.emit({type:"filter",payload:{filter:e.filter,value:e.filtersForm.value}})}})))},e.decorators=[{type:t.Component,args:[{selector:"lib-filters",template:'\x3c!-- Todo: [FiltersComponent] Refactor code --\x3e\r\n<form class="filters" [formGroup]="filtersForm" [ngClass]="{\'filters--opened\': propertyTypeSelected.value !== \'NONE\'}">\r\n <ng-template [ngIf]="!isOPI">\r\n <div class="float-button-close">\r\n <button mat-icon-button type="button" class="float-button-close__button" (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <div class="body">\r\n <div class="--padding">\r\n <div class="header">\r\n <mat-form-field class="currency" appearance="outline">\r\n <mat-label>Divisa</mat-label>\r\n <mat-select formControlName="currency">\r\n <ng-container *ngFor="let currency of currencyList">\r\n <mat-option [value]="currency.type" (click)="changeCurrency(currency.type)">\r\n {{currency.type}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-button-toggle-group class="offering-type-list" name="offering-type" formControlName="offering"\r\n aria-label="Offering type">\r\n <mat-button-toggle (click)="changeOffering(\'SALE\')" [value]="\'SALE\'"\r\n [disabled]="propertyTypeSelected.value === \'NONE\' || propertyTypeSelected.value === \'ROOM\'">\r\n Venta\r\n </mat-button-toggle>\r\n <mat-button-toggle (click)="changeOffering(\'RENT\')" [value]="\'RENT\'"\r\n [disabled]="propertyTypeSelected.value === \'NONE\' || propertyTypeSelected.value === \'INVESTMENT\'">\r\n Renta\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class="mat-elevation-z2" [ngClass]="{\'property-type-list\': !newFilters, \'new-property-type-list\': newFilters}">\r\n <ng-container *ngFor="let type of propertyTypeList; let i = index">\r\n <ng-template [ngIf]="type.value !== \'NONE\' || (type.value !== \'ROOM\' && newFilters)">\r\n <div class="property-type-list__button">\r\n <div\r\n class="property-type-list__border"\r\n [ngClass]="{\'property-type-list__border--active\': (type.value === propertyTypeSelected.value) || (propertyTypeSelected.value === \'NONE\') || ((type.value === \'HOUSE\' || type.value === \'APARTMENT\') && propertyTypeSelected.value === \'RESIDENTIAL\')}"\r\n [ngStyle]="{\'border-color\': \'var(--\' + type.iconName + \')\'}">\r\n <button mat-mini-fab="" type="button" (click)="changePropertyType(i)"\r\n [ngStyle]="{\'background-color\': \'var(--\' + type.iconName + \')\'}">\r\n <span class="property-type-list__icon ic-property-{{type.iconName}}"></span>\r\n </button>\r\n </div>\r\n <span class="property-type-list__label">{{type.shortName}}</span>\r\n <ng-template [ngIf]="type.value === \'RESIDENTIAL\' && propertyTypeSelected.value === \'RESIDENTIAL\'">\r\n <div class="property-type-list__divider property-type-list__divider--left"></div>\r\n <div class="property-type-list__divider property-type-list__divider--right"></div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n <ng-template [ngIf]="isOPI">\r\n <div class="all">\r\n <button mat-raised-button="" type="button" class="all__button"\r\n [ngClass]="{\'all__button--active\': propertyTypeSelected.value === \'NONE\'}"\r\n (click)="changePropertyType(9)">Todo\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <ng-template [ngIf]="newFilters && propertyTypeSelected.value !== \'NONE\'">\r\n <div class="--padding">\r\n <h4 class="--title">\r\n Estado\r\n </h4>\r\n <div class="budget">\r\n <mat-form-field appearance="outline">\r\n <mat-label>Estado</mat-label>\r\n <mat-select formControlName="state">\r\n <ng-container *ngFor="let state of stateOptions">\r\n <mat-option [value]="state.name" (click)="changeState(state.name)">{{state.name}}</mat-option>\r\n <mat-error *ngIf="filtersForm.controls[\'state\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value !== \'NONE\'">\r\n <mat-divider></mat-divider>\r\n <div class="--padding">\r\n <h4 class="--title">\r\n <span class="ic-features-price"></span>\r\n Presupuesto\r\n </h4>\r\n <div class="budget">\r\n \x3c!-- Min price [START] --\x3e\r\n <mat-form-field appearance="outline">\r\n <mat-label>Mínimo</mat-label>\r\n <input autocomplete="off" matInput="" type="number" title="Min price" formControlName="minPrice" min="1" >\r\n <mat-error *ngIf="filtersForm.controls[\'minPrice\'].hasError(\'pattern\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="filtersForm.controls[\'minPrice\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Min price [END] --\x3e\r\n \x3c!-- Max price [START] --\x3e\r\n <mat-form-field appearance="outline">\r\n <mat-label>Máximo</mat-label>\r\n <input autocomplete="off" matInput="" type="number" title="max price" formControlName="maxPrice">\r\n <mat-error *ngIf="filtersForm.controls[\'maxPrice\'].hasError(\'pattern\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="filtersForm.controls[\'maxPrice\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="filtersForm.controls[\'maxPrice\'].hasError(\'currency\')">\r\n Valor minimo excedido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Max price [END] --\x3e\r\n </div>\r\n <div class="features">\r\n <ng-template\r\n [ngIf]="propertyTypeSelected.value === \'RESIDENTIAL\' || propertyTypeSelected.value === \'HOUSE\' || propertyTypeSelected.value === \'APARTMENT\'">\r\n <div class="features__bedrooms">\r\n <h4 class="--title">\r\n <span class="ic-features-bedroom"></span>\r\n Habitaciones\r\n </h4>\r\n <mat-button-toggle-group name="bedrooms" aria-label="Bedrooms" formControlName="bedrooms" (valueChange)="changeFilterStatus()">\r\n <ng-container *ngFor="let bedroom of bedroomsList">\r\n <ng-template [ngIf]="bedroom === 0" [ngIfElse]="bedroomNumber">\r\n <mat-button-toggle [value]="bedroom" class="features__bedrooms--unlimited">\r\n Sin <br> límite\r\n </mat-button-toggle>\r\n </ng-template>\r\n <ng-template #bedroomNumber>\r\n <mat-button-toggle [value]="bedroom">{{bedroom}}+\r\n </mat-button-toggle>\r\n </ng-template>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class="features__bathrooms">\r\n <h4 class="--title">\r\n <span class="ic-features-bathroom"></span>\r\n Baños\r\n </h4>\r\n <mat-button-toggle-group name="bathrooms" aria-label="Bathrooms" formControlName="bathrooms" (valueChange)="changeFilterStatus()">\r\n <ng-container *ngFor="let bathroom of bathroomsList">\r\n <ng-template [ngIf]="bathroom === 0" [ngIfElse]="bathroomNumber">\r\n <mat-button-toggle [value]="bathroom"\r\n class="features__bathrooms--unlimited">\r\n Sin <br> límite\r\n </mat-button-toggle>\r\n </ng-template>\r\n <ng-template #bathroomNumber>\r\n <mat-button-toggle [value]="bathroom">{{bathroom}}+\r\n </mat-button-toggle>\r\n </ng-template>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value !== \'LAND\' && propertyTypeSelected.value !== \'INVESTMENT\'">\r\n <div class="features__parking-places">\r\n <h4 class="--title">\r\n <span class="ic-features-parking"></span>\r\n Estacionamientos\r\n </h4>\r\n <mat-button-toggle-group name="parking_places" aria-label="Parking Places"\r\n formControlName="parkingPlaces" (valueChange)="changeFilterStatus()">\r\n <ng-container *ngFor="let parking of parkingPlacesList">\r\n <ng-template [ngIf]="parking === 0" [ngIfElse]="parkingNumber">\r\n <mat-button-toggle [value]="parking"\r\n class="features__parking-places--unlimited">\r\n Sin <br> límite\r\n </mat-button-toggle>\r\n </ng-template>\r\n <ng-template #parkingNumber>\r\n <mat-button-toggle [value]="parking">{{parking}}+\r\n </mat-button-toggle>\r\n </ng-template>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value !== \'INVESTMENT\'">\r\n <div class="features__surface">\r\n <h4 class="--title">\r\n <span class="ic-features-surface"></span>\r\n Superficie\r\n </h4>\r\n <div class="--row">\r\n <mat-form-field appearance="outline" class="--col">\r\n <mat-label>Área</mat-label>\r\n <mat-select formControlName="surface" (selectionChange)="changeFilterStatus()">\r\n <mat-option [value]="0">\r\n Sin límite\r\n </mat-option>\r\n <ng-container *ngFor="let surface of surfaceList">\r\n <mat-option [value]="surface">\r\n {{surface}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-button-toggle-group name="unit_surface" aria-label="Unit surface" formControlName="surfaceUnit" (valueChange)="changeFilterStatus()">\r\n <mat-button-toggle [value]="0">m2</mat-button-toggle>\r\n <mat-button-toggle [value]="1">sq ft</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value === \'INVESTMENT\'">\r\n <div class="feature investment">\r\n <h4 class="--title">Retorno de inversión</h4>\r\n <mat-form-field appearance="outline" class="--col">\r\n <mat-label>Porcentaje</mat-label>\r\n <mat-select formControlName="roi" (selectionChange)="changeFilterStatus()">\r\n <mat-option [value]="0">\r\n Sin límite\r\n </mat-option>\r\n <ng-container *ngFor="let roi of roiList">\r\n <mat-option [value]="roi">\r\n {{roi}}%\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </ng-template>\r\n <div class="amenities-container">\r\n <ng-template [ngIf]="propertyTypeSelected.amenities.length > 0">\r\n <div class="amenities">\r\n <h4 class="--title">\r\n Amenidades\r\n </h4>\r\n <div class="amenities__list">\r\n <ng-container *ngFor="let amenity of propertyTypeSelected.amenities">\r\n <div class="amenities__amenity" matRipple (click)="updateAmenity(amenity)">\r\n <span class="amenity__icon ic-amenities-{{amenity.iconName}}"\r\n [ngClass]="{\'amenity--active\': amenity.checked}"></span>\r\n <span class="amenity__label">{{amenity.name}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.features.length > 0">\r\n <div class="amenities">\r\n <h4 class="--title">\r\n Caracteristicas de la ubicación\r\n </h4>\r\n <div class="amenities__list">\r\n <ng-container *ngFor="let feature of propertyTypeSelected.features">\r\n <div class="amenities__amenity" matRipple (click)="updateAmenity(feature)">\r\n <span class="amenity__icon ic-amenities-{{feature.iconName}}"\r\n [ngClass]="{\'amenity--active\': feature.checked}"></span>\r\n <span class="amenity__label">{{feature.name}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class="actions">\r\n \x3c!--ng-template [ngIf]="!isOPI" [ngIfElse]="closeButtonTemplate">\r\n <button mat-flat-button="" type="button" class="action__button" color="primary" (click)="saveSearchByFilters()">\r\n GUARDAR\r\n </button>\r\n </ng-template--\x3e\r\n <ng-template #closeButtonTemplate>\r\n <button mat-flat-button="" type="button" class="action__button" color="primary" (click)="close()">CERRAR</button>\r\n </ng-template>\r\n <button mat-flat-button="" type="button" class="action__button" color="primary"\r\n (click)="resetFilters()">LIMPIAR\r\n </button>\r\n <button mat-flat-button="" type="submit" class="action__button" color="primary" [disabled]="(propertyTotal === 0 || filtersForm.invalid) && newFilters"\r\n (click)="applyFilters()">APLICAR <span *ngIf="propertyTotal > 0 && newFilters">({{propertyTotal}})</span>\r\n </button>\r\n </div>\r\n</form>\r\n',styles:[":host{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;display:flex;background:var(--overlay);transition:250ms}.filters--opened{height:90%!important}@media screen and (max-width:600px){.filters--opened{width:100%!important;height:100%!important;top:0!important}}.filters{width:700px;height:auto;margin:auto;border-radius:16px;position:relative;overflow:hidden;transition:150ms}.filters .--padding{padding:16px 48px;box-sizing:border-box}.filters .--row{display:flex;justify-content:space-between;align-items:flex-start}.filters .--col{width:45%}.filters .--title{margin:16px 0;color:#707070}.filters .float-button-close{position:absolute;top:16px;right:16px;height:16px;border-radius:50%}.filters .body{height:calc(100% - 36px);overflow-x:hidden;overflow-y:auto}.filters .header{display:flex;align-items:center;justify-content:space-around;margin-bottom:8px}.filters .listing-types{width:100%;border-radius:16px}.filters .listing-types mat-button-toggle{width:50%;height:36px}.filters ::ng-deep .listing-types mat-button-toggle button{height:36px}.filters ::ng-deep .listing-types mat-button-toggle button .mat-button-toggle-label-content{line-height:36px}.filters .currency ::ng-deep .mat-form-field-wrapper{padding:0}@media screen and (max-width:600px){.filters{width:100%;position:absolute;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:initial;bottom:0;left:0}.filters .--padding{padding:16px 24px}.filters .header{flex-direction:column}.filters .currency{width:70%;margin-bottom:8px}}.filters .offering-type-list{width:40%;border-radius:16px}.filters .offering-type-list mat-button-toggle{width:50%;height:36px}.filters ::ng-deep .offering-type-list mat-button-toggle button{height:36px}.filters ::ng-deep .offering-type-list mat-button-toggle button .mat-button-toggle-label-content{line-height:36px}.filters .property-type-list{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 9))[9];grid-template-columns:repeat(9,calc(100% / 9));-ms-grid-rows:(80px)[1];grid-template-rows:repeat(1,80px);border-radius:40px;padding:8px;box-sizing:border-box}@media screen and (max-width:600px){.filters .offering-type-list{width:70%}.filters .property-type-list{-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3));-ms-grid-rows:(80px)[3];grid-template-rows:repeat(3,80px)}}.filters .new-property-type-list{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 8))[8];grid-template-columns:repeat(8,calc(100% / 8));-ms-grid-rows:(80px)[1];grid-template-rows:repeat(1,80px);border-radius:40px;padding:8px;box-sizing:border-box}.filters .property-type-list .property-type-list__button{margin:auto;position:relative}.filters .property-type-list .property-type-list__button button{box-shadow:none}.filters .property-type-list .property-type-list__icon{width:24px;height:24px;font-size:24px}.filters .property-type-list .property-type-list__border{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto;opacity:.7;border-radius:50%;box-sizing:border-box}.filters .property-type-list .property-type-list__border--active{padding:4px;border:2px solid;opacity:1!important}.filters .property-type-list .property-type-list__label{font-size:12px;display:block;margin:8px 0;text-align:center}.filters .property-type-list .property-type-list__divider{width:14%;height:2px;background:#707070;top:30%;position:absolute}.filters .property-type-list .property-type-list__divider--left{left:-9px}.filters .property-type-list .property-type-list__divider--right{right:-9px}@media screen and (max-width:600px){.filters .new-property-type-list{-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3));-ms-grid-rows:(80px)[3];grid-template-rows:repeat(3,80px)}.filters .property-type-list .property-type-list__divider{width:60%}.filters .property-type-list .property-type-list__divider--left{left:-38px}.filters .property-type-list .property-type-list__divider--right{right:-38px}}.filters .new-property-type-list .property-type-list__button{margin:auto;position:relative}.filters .new-property-type-list .property-type-list__button button{box-shadow:none}.filters .new-property-type-list .property-type-list__icon{width:24px;height:24px;font-size:24px}.filters .new-property-type-list .property-type-list__border{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto;opacity:.7;border-radius:50%;box-sizing:border-box}.filters .new-property-type-list .property-type-list__border--active{padding:4px;border:2px solid;opacity:1!important}.filters .new-property-type-list .property-type-list__label{font-size:12px;display:block;margin:8px 0;text-align:center}.filters .new-property-type-list .property-type-list__divider{width:14%;height:2px;background:#707070;top:30%;position:absolute}.filters .new-property-type-list .property-type-list__divider--left{left:-9px}.filters .new-property-type-list .property-type-list__divider--right{right:-9px}@media screen and (max-width:600px){.filters .new-property-type-list .property-type-list__divider{width:60%}.filters .new-property-type-list .property-type-list__divider--left{left:-38px}.filters .new-property-type-list .property-type-list__divider--right{right:-38px}}.filters .all{width:100%;margin:8px 0}.filters .all .all__button{margin:0 40%;width:20%;border-radius:16px;background:0 0}.filters .budget{display:flex}.filters .budget mat-form-field{margin-right:8px;width:calc(100% / 2 - 8px)}.filters .features{display:-ms-grid;display:grid;-ms-grid-columns:(50%)[2];grid-template-columns:repeat(2,50%);-ms-grid-rows:(auto)[2];grid-template-rows:repeat(2,auto)}@media screen and (max-width:600px){.filters .all .all__button{width:50%;margin:0 25%}.filters .features{display:block}.filters .amenities-container{flex-direction:column}}.filters .features .features__bathrooms mat-button-toggle-group,.filters .features .features__bedrooms mat-button-toggle-group,.filters .features .features__parking-places mat-button-toggle-group{width:calc(100% - 16px)}.filters .features .features__bathrooms mat-button-toggle-group mat-button-toggle,.filters .features .features__bedrooms mat-button-toggle-group mat-button-toggle,.filters .features .features__parking-places mat-button-toggle-group mat-button-toggle{width:calc(100% / 5)}.filters .features .features__bedrooms--unlimited ::ng-deep .mat-button-toggle-label-content{line-height:16px;padding:8px;font-size:12px}.filters .features .features__bathrooms--unlimited ::ng-deep .mat-button-toggle-label-content{line-height:16px;padding:8px;font-size:12px}.filters .features .features__parking-places--unlimited ::ng-deep .mat-button-toggle-label-content{line-height:16px;padding:8px;font-size:12px}.filters .features .features__surface mat-button-toggle-group{margin-top:6px;margin-right:16px}.filters .amenities-container{width:100%;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3;display:flex}.filters .amenities{width:50%}@media screen and (max-width:600px){.filters .amenities{width:100%}}.filters .amenities__amenity{width:calc(100% / 3 - 24px);height:120px;border-radius:8px;padding:8px;display:inline-flex;flex-direction:column;align-items:center;box-sizing:border-box;margin:0 8px 8px 0;cursor:pointer}.filters .amenity__icon{display:block;width:24px;height:24px;margin:8px auto;font-size:24px;padding:8px;border-radius:50%}.filters .amenity__label{width:100%;display:block;text-align:center;font-size:12px;margin:auto}.filters .actions{display:flex}.filters .actions .action__button{width:50%;border-radius:0}"]}]}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[ue]}]},{type:t.Renderer2},{type:t.ElementRef},{type:de},{type:i.FormBuilder},{type:ge}]},e.propDecorators={utils:[{type:t.Input}],newFilters:[{type:t.Input}],stateOptions:[{type:t.Input}],propertyTotal:[{type:t.Input}],changeFilter:[{type:t.Output}]},e}(),_e=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[ge]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule]}]}],e}(),ve=function(){function e(){}return e.forChild=function(t){return{ngModule:e,providers:[de,{provide:ue,useValue:t||!1}]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,i.ReactiveFormsModule,i.FormsModule,y.MatRippleModule,m.MatFormFieldModule,f.MatSelectModule,d.MatButtonToggleModule,l.MatIconModule,s.MatButtonModule,g.MatDividerModule,h.MatInputModule,$.forChild(),_e.forChild()],declarations:[be],exports:[be],providers:[de]}]}],e}(),Ee=function(){function e(e){this._lazy=e}return e.checkTouchSupported=function(){return!!window&&(null!==window.navigator.msMaxTouchPoints&&void 0!==window.navigator.msMaxTouchPoints||"ontouchstart"in window)},e.prototype.ngAfterViewInit=function(){var e=this;this.url&&""!==this.url&&this._lazy.load("https://pchen66.github.io/js/three/three.min.js").then((function(){return e._lazy.load("https://rawgit.com/pchen66/panolens.js/dev/build/panolens.min.js")})).then((function(){setTimeout((function(){e.showPanorama=!0,e.init()}),500)})).catch((function(e){console.log("Failed",e)}))},e.prototype.ngOnDestroy=function(){this._panorama&&this._panorama.dispose(),this._viewer&&(this._viewer.dispose(),this._viewer.destroy())},e.prototype.fullscreen=function(){this.toggleFullscreen()},e.prototype.changeControl=function(e){var t=this;if(this._viewer)switch(e){case"MOUSE":case"TOUCH":this._viewer.enableControl(PANOLENS.CONTROLS.ORBIT);break;case"SENSOR":this.requestPermissions().subscribe((function(e){e?t._viewer.enableControl(PANOLENS.CONTROLS.DEVICEORIENTATION):confirm("No se otorgarón los permisos de movimiento y orientación, ¿desea ir a ajustes?")?window.location.href="prefs:root=Safari":alert("Permisos de movimiento y orientación no otorgados")}))}},e.prototype.changeMode=function(e){if(this._viewer)switch(e){case"NORMAL":this._viewer.disableEffect();break;case"CARDBOARD":this._viewer.enableEffect(PANOLENS.MODES.CARDBOARD);break;case"STEREOSCOPIC":this._viewer.enableEffect(PANOLENS.MODES.STEREO)}},e.prototype.init=function(){try{this.isTouch=e.checkTouchSupported(),this._panorama=new PANOLENS.ImagePanorama(this.url),this._viewer=new PANOLENS.Viewer({container:this._container.nativeElement,controlBar:!0,controlButtons:[]}),this._viewer.onWindowResize(this._container.nativeElement.offsetWidth,this._container.nativeElement.offsetHeight),this._viewer.add(this._panorama)}catch(e){console.log("Failed",e)}},e.prototype.toggleFullscreen=function(){var e=window.document,t=this._container.nativeElement,r=t.requestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullScreen||t.msRequestFullscreen,n=e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen;e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement?(n.call(e),this.isFullScreen=!1):(r.call(t),this.isFullScreen=!0)},e.prototype.requestPermissions=function(){var e=o.of(!0),t=o.of(!1);return"function"==typeof DeviceMotionEvent.requestPermission?b.fromPromise(DeviceOrientationEvent.requestPermission()).pipe(_.mergeMap((function(e){return"granted"===e?b.fromPromise(DeviceMotionEvent.requestPermission()).pipe(_.map((function(e){return"granted"===e}))):t}))):e},e.decorators=[{type:t.Component,args:[{selector:"lib-panorama-visor",template:'<div class="panorama-visor">\r\n <ng-template [ngIf]="!showPanorama">\r\n <div class="panorama-visor__loading">\r\n <img class="loading__image" src="https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/360-animation.gif" alt="360 icon">\r\n <p class="loading__label">Cargando...</p>\r\n </div>\r\n </ng-template>\r\n <div #container class="panorama-visor__container" [ngStyle]="{\'opacity\': showPanorama ? \'1\' : \'0\'}">\r\n <div class="panorama-visor__actions">\r\n <a mat-icon-button class="actions__menu-item">\r\n <mat-icon>settings</mat-icon>\r\n <ul class="menu-item__hidden-list mat-elevation-z2">\r\n <li mat-menu-item class="hidden-list__item">\r\n Control\r\n <ul class="hidden-list__nested-list mat-elevation-z2">\r\n <li mat-menu-item class="nested-list__item" *ngIf="!isTouch" (click)="changeControl(\'MOUSE\')">\r\n Mouse\r\n </li>\r\n <li mat-menu-item class="nested-list__item" *ngIf="isTouch" (click)="changeControl(\'TOUCH\')">\r\n Touch\r\n </li>\r\n <li mat-menu-item class="nested-list__item" (click)="changeControl(\'SENSOR\')">\r\n Sensor\r\n </li>\r\n </ul>\r\n </li>\r\n <li mat-menu-item class="hidden-list__item">\r\n Mode\r\n <ul class="hidden-list__nested-list mat-elevation-z2">\r\n <li mat-menu-item class="nested-list__item" (click)="changeMode(\'NORMAL\')">\r\n Normal\r\n </li>\r\n <li mat-menu-item class="nested-list__item" (click)="changeMode(\'CARDBOARD\')">\r\n Cardboard\r\n </li>\r\n <li mat-menu-item class="nested-list__item" (click)="changeMode(\'STEREOSCOPIC\')">\r\n Stereoscopic\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n </a>\r\n <button mat-icon-button (click)="fullscreen()">\r\n <mat-icon *ngIf="!isFullScreen">fullscreen</mat-icon>\r\n <mat-icon *ngIf="isFullScreen">fullscreen_exit</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block;width:inherit;height:inherit}.panorama-visor{width:100%;padding-bottom:calc(100% / 4 * 3);position:relative;border-radius:8px;transition:.2s;cursor:move}.panorama-visor__loading{position:absolute;width:100%;height:100%;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading__image{width:200px}.loading__label{color:#fff;font-weight:700}.panorama-visor__actions{position:absolute;border-radius:0 8px 8px 0;background:rgba(0,0,0,.4);z-index:100;color:#fff}.panorama-visor__actions button{display:block}.actions__menu-item{position:relative}.actions__menu-item:hover .menu-item__hidden-list,.hidden-list__item:hover .hidden-list__nested-list{display:block}.hidden-list__nested-list,.menu-item__hidden-list{display:none;list-style:none;position:absolute;background:#fff;margin:0;padding:0;left:calc(100% - 8px);top:0;z-index:1;border-radius:4px}.hidden-list__item,.nested-list__item{min-width:80px;padding:0 16px;text-align:left;cursor:pointer}.panorama-visor__container{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:8px;transition:250ms}::ng-deep .panorama-visor__container canvas{width:100%!important;height:100%!important}"]}]}],e.ctorParameters=function(){return[{type:p.LazyLoadService}]},e.propDecorators={url:[{type:t.Input}],_container:[{type:t.ViewChild,args:["container",{static:!0}]}]},e}(),xe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.MatMenuModule,h.MatButtonModule,h.MatIconModule,p.LazyLoaderModule.forChild()],declarations:[Ee],exports:[Ee]}]}],e}(),Ie=function(){function e(e,t){switch(this._data=e,this._dialog=t,this._data.currentType){case n.PFileTypeEnum.IMAGE:this.fileType="image",this.currentIndex=0;break;case n.PFileTypeEnum.SPHERIC:this.fileType="image360",this.currentIndex=1;break;case n.PFileTypeEnum.VIDEO:this.fileType="document",this.currentIndex=2}this.images=[],this.images360=[],this.videos=[],this._newMedia=[]}return e.getYouTubeID=function(e){if(-1!==e.indexOf("https://youtu.be/"))return e=e.replace("https://youtu.be/","");if(-1===e.indexOf("https://www.youtube.com/"))return null;if(-1===(e=e.replace("https://www.youtube.com/","")).indexOf("watch?v="))return null;if((e=e.replace("watch?v=","")).indexOf("&")){var t=e.split("&");e=t[0]}return e},e.prototype.ngOnInit=function(){this.parseMultimedia()},e.prototype.onUploadImage=function(e){var t=this;if(e)switch(this.fileType){case"image":Array.isArray(e)?e.forEach((function(e){t.createImagePFile(e)})):this.createImagePFile(e);break;case"image360":Array.isArray(e)?e.forEach((function(e){t.createImage360PFile(e)})):this.createImage360PFile(e)}},e.prototype.onTabChanged=function(e){switch(this.currentIndex=e,e){case 0:this.fileType="image";break;case 1:this.fileType="image360"}},e.prototype.onListChanged=function(e){switch(this.currentIndex){case 0:Array.isArray(e)&&e.length>0&&(e=e.map((function(e,t){return e.position=t,e})),this.images=e);break;case 1:Array.isArray(e)&&e.length>0&&(e=e.map((function(e,t){return e.position=t,e})),this.images360=e);break;case 2:Array.isArray(e)&&e.length>0&&(e=e.map((function(e,t){return e.position=t,e})),this.videos=e)}},e.prototype.removeMedia=function(e){var t=-1;if(e.id)switch(e.type){case n.PFileTypeEnum.IMAGE:this.images.splice(this.images.indexOf(e),1);break;case n.PFileTypeEnum.SPHERIC:this.images360.splice(this.images360.indexOf(e),1);break;case n.PFileTypeEnum.VIDEO:this.videos.splice(this.videos.indexOf(e),1)}else{switch(e.type){case n.PFileTypeEnum.IMAGE:this.images.splice(this.images.indexOf(e),1);break;case n.PFileTypeEnum.SPHERIC:this.images360.splice(this.images360.indexOf(e),1);break;case n.PFileTypeEnum.VIDEO:this.videos.splice(this.videos.indexOf(e),1)}this._newMedia.forEach((function(r,n){r.url===e.fileCS.thumbnail&&(t=n)})),t>-1&&this._newMedia.splice(t,1)}},e.prototype.onYouTubeInputTextChanged=function(t){if(""!==t.value){var r=e.getYouTubeID(t.value);if(r&&r.length>=11){var i=new n.PFile;i.type=n.PFileTypeEnum.VIDEO,i.media=!0,i.name="video_"+(new Date).getTime(),i.fileCS={thumbnail:r,blobName:null},i.position=0===this.videos.length?0:this.videos.length,this.videos.push(i),t.value=""}}},e.prototype.accept=function(){this._dialog.close({multimedia:this.joinMultimediaTypes(),newMedia:this._newMedia})},e.prototype.close=function(){this._dialog.close(null)},e.prototype.createImagePFile=function(e){var t=new n.PFile;t.type=n.PFileTypeEnum.IMAGE,e.type=n.PFileTypeEnum.IMAGE,t.media=!0,t.fileCS={thumbnail:e.url,blobName:null};var r="image_"+Date.now()+"_"+Math.round(1e6*Math.random())+"."+e.blob.type.replace("image/","");t.name=r,e.name=r,t.position=0===this.images.length?0:this.images.length,this._newMedia.push(e),this.images.push(t)},e.prototype.createImage360PFile=function(e){var t=new n.PFile;t.type=n.PFileTypeEnum.SPHERIC,e.type=n.PFileTypeEnum.SPHERIC,t.media=!0;var r="spheric_"+Date.now()+"_"+Math.round(1e6*Math.random())+"."+e.blob.type.replace("image/","");t.name=r,e.name=r,t.fileCS={thumbnail:e.url,blobName:null},t.position=0===this.images360.length?0:this.images360.length,this._newMedia.push(e),this.images360.push(t)},e.prototype.parseMultimedia=function(){var e=this;this._data&&(this._data.multimedia.forEach((function(t){switch(t.type){case n.PFileTypeEnum.IMAGE:e.images.push(t);break;case n.PFileTypeEnum.SPHERIC:e.images360.push(t);break;case n.PFileTypeEnum.VIDEO:e.videos.push(t)}})),this._newMedia=this._data.newMedia||[])},e.prototype.joinMultimediaTypes=function(){var e=[];return e=(e=(e=e.concat(this.images)).concat(this.images360)).concat(this.videos)},e.decorators=[{type:t.Component,args:[{selector:"lib-property-multimedia-uploader",template:'<div class="multimedia-uploader">\r\n <p class="title">\r\n Multimedia\r\n <ng-template [ngIf]="currentIndex !== 2">\r\n <lib-upload-file [content]="buttonUploadTemplate" [noCrop]="true" [fab]="true" [fileType]="fileType" [aspectRatio]="4 / 3"\r\n [multiple]="true"\r\n (loadImage)="onUploadImage($event)">\r\n <ng-template #buttonUploadTemplate>\r\n <button mat-icon-button color="primary">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </ng-template>\r\n </lib-upload-file>\r\n </ng-template>\r\n </p>\r\n <mat-tab-group class="multimedia-uploader__tab-group" [selectedIndex]="currentIndex"\r\n (selectedIndexChange)="onTabChanged($event)">\r\n <mat-tab label="Fotografias">\r\n <lib-custom-drag-and-drop [items]="images" [content]="imageTemplate" (itemsChanged)="onListChanged($event)">\r\n <ng-template #imageTemplate let-image="image" let-index="index">\r\n <div class="list__item" [ngClass]="{\'first-photo\': index === 0}">\r\n <img alt="Property image" [src]="image.fileCS.thumbnail" class="list__item-img">\r\n <button mat-icon-button class="list__item-button mat-elevation-z2" (click)="removeMedia(image)">\r\n <mat-icon class="list__item-icon">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </lib-custom-drag-and-drop>\r\n </mat-tab>\r\n <mat-tab label="Esfericas">\r\n <lib-custom-drag-and-drop [items]="images360" [content]="image360Template" (itemsChanged)="onListChanged($event)">\r\n <ng-template #image360Template let-image="image">\r\n <div class="list__item">\r\n <img alt="Property image" [src]="image.fileCS.thumbnail" class="list__item-img">\r\n <button mat-icon-button class="list__item-button mat-elevation-z2" (click)="removeMedia(image)">\r\n <mat-icon class="list__item-icon">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </lib-custom-drag-and-drop>\r\n </mat-tab>\r\n <mat-tab label="Videos">\r\n <div class="you-tube-container">\r\n <span class="you-tube-container__searchbox">\r\n <button *ngIf="inputYouTube.value !== \'\'" mat-icon-button class="you-tube-container__close-btn"\r\n (click)="inputYouTube.value = \'\'"><mat-icon>close</mat-icon></button>\r\n <input class="you-tube-container__input" #inputYouTube (input)="onYouTubeInputTextChanged(inputYouTube)"\r\n title="YouTube URL" placeholder="YouTube URL o YouTube Video ID">\r\n </span>\r\n <a href="https://www.youtube.com" target="_blank" mat-button color="primary">\r\n Ir a Youtube\r\n </a>\r\n </div>\r\n <lib-custom-drag-and-drop [items]="videos" [content]="videosTemplate" (itemsChanged)="onListChanged($event)">\r\n <ng-template #videosTemplate let-image="image">\r\n <div class="list__item">\r\n <img alt="Property image" [src]="\'https://i3.ytimg.com/vi/\'+image.fileCS.thumbnail+\'/hqdefault.jpg\'"\r\n class="list__item-img">\r\n <button mat-icon-button class="list__item-button mat-elevation-z2" (click)="removeMedia(image)">\r\n <mat-icon class="list__item-icon">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </lib-custom-drag-and-drop>\r\n </mat-tab>\r\n </mat-tab-group>\r\n <div class="multimedia-uploader__actions">\r\n <button mat-flat-button color="primary" class="actions__button" (click)="close()">\r\n CERRAR\r\n </button>\r\n <button mat-flat-button color="primary" class="actions__button" (click)="accept()">\r\n ACEPTAR\r\n </button>\r\n </div>\r\n</div>\r\n',styles:[':host{display:block;width:100%;height:100%}::ng-deep .multimedia-uploader-panel-class{width:50%;height:70%}::ng-deep .multimedia-uploader-panel-class mat-dialog-container{width:100%;height:100%;padding:16px;overflow:hidden;position:relative}.multimedia-uploader{width:100%;height:100%}.multimedia-uploader__actions{position:absolute;left:0;bottom:0;width:100%;background:#fff;z-index:1}.actions__button{width:50%}.actions__button:first-child{border-radius:8px 0 0}.actions__button:last-child{border-radius:0 8px 0 0}.title{font-weight:700;display:flex;align-items:center;justify-content:space-between;padding:0 16px;margin:0}.multimedia-uploader__tab-group{width:100%;height:calc(100% - 36px)}.multimedia-uploader__list{width:100%;height:100%;overflow-x:hidden;overflow-y:auto;display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3))}@media screen and (max-width:600px){::ng-deep .multimedia-uploader-panel-class{width:100%!important;max-width:100%!important;height:100%!important}.multimedia-uploader__list{-ms-grid-columns:100%;grid-template-columns:100%}}.list__item{width:200px;height:150px;border-radius:8px;margin:16px auto;position:relative}.first-photo:after{content:"Imagen principal del anuncio";position:absolute;top:0;padding:8px;box-sizing:border-box;font-size:12px;width:100%;color:#fff;background:rgba(0,0,0,.3)}.list__item-img{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:8px}.list__item-button{position:absolute;width:24px;height:24px;top:-12px;right:-12px;background:#000;color:#fff}.list__item-icon{width:24px;height:24px;font-size:16px;line-height:8px}.you-tube-container{display:flex;padding:8px 0;box-sizing:border-box;justify-content:space-between;position:-webkit-sticky;position:sticky;top:0;z-index:5;background:#fff}.you-tube-container__searchbox{position:relative;width:calc(100% - 120px);box-sizing:border-box;display:flex;align-items:center}.you-tube-container__close-btn{position:absolute;right:0}.you-tube-container__input{width:100%;border:1px solid #d3d3d3;padding:8px 32px 8px 8px;border-radius:8px;outline:0}']}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[a.MAT_DIALOG_DATA]}]},{type:a.MatDialogRef}]},e}(),we=function(){function e(e){this._dialog=e}return e.prototype.open=function(e,t,r){return this._dialog.open(Ie,{data:{currentType:e||n.PFileTypeEnum.IMAGE,multimedia:t||[],newMedia:r||[]},panelClass:"multimedia-uploader-panel-class",disableClose:!0})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),Ce=function(){function e(e){this._dialogRef=e,this.list=W.AnnounceCheckList.map((function(e){return z({},e)}))}return e.prototype.close=function(){this._dialogRef.close({code:n.DialogResponseType.CANCEL})},e.prototype.accept=function(){var e=this;this.errorField=!1,this.list.forEach((function(t){t.checked||(e.errorField=!0)})),this.errorField||this._dialogRef.close({code:n.DialogResponseType.ACCEPT})},e.decorators=[{type:t.Component,args:[{selector:"lib-property-announce-confirm",template:'<div class="announce-confirm">\r\n <div class="body">\r\n <h2 class="body__title">\r\n Para anunciar es necesario confirmar lo siguiente\r\n </h2>\r\n <mat-checkbox class="body__check-box" *ngFor="let item of list" [(ngModel)]="item.checked">\r\n {{item.name}}\r\n </mat-checkbox>\r\n <ng-template [ngIf]="errorField">\r\n <p class="body__error-field">\r\n Para anunciar es necesario confirmar todas las casillas.\r\n </p>\r\n </ng-template>\r\n </div>\r\n <div class="body__actions">\r\n <button mat-button color="primary" (click)="close()">CANCELAR</button>\r\n <button mat-button color="primary" (click)="accept()">ANUNCIAR</button>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block}::ng-deep .confirm-announce-panel-class{width:30%}::ng-deep .confirm-announce-panel-class mat-dialog-container{padding:0;overflow:hidden}@media screen and (max-width:600px){::ng-deep .confirm-announce-panel-class{min-width:90%!important}}.announce-confirm .body{width:100%;padding:24px;box-sizing:border-box}.announce-confirm .body__title{font-size:18px;margin:0 0 16px}.announce-confirm .body__check-box{display:block}.announce-confirm .body__error-field{color:red;font-size:12px}.announce-confirm .body__actions{padding:16px;box-sizing:border-box;display:flex;justify-content:flex-end}.announce-confirm .body__actions button:first-child{margin-right:16px}"]}]}],e.ctorParameters=function(){return[{type:a.MatDialogRef}]},e}(),Ae=function(){function e(e){this._dialog=e}return e.prototype.open=function(){return this._dialog.open(Ce,{disableClose:!0,panelClass:"confirm-announce-panel-class"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),Fe=function(){function e(e,t,r){this._data=e,this._ref=t,this._breakpointObserver=r,this._subscription=new o.Subscription,this.multimedia=this.getPFilesByType(n.PFileTypeEnum.IMAGE,this._data.multimedia||[]),this.sideOpened=!0,this.indexSelected=this._data.indexSelected,this.typeSelected="IMAGE",this.count={image:0,sphere:0,video:0}}return e.prototype.ngOnInit=function(){var e=this;this._subscription.add(this._breakpointObserver.observe(["(max-width: 1024px)"]).subscribe((function(t){e._mobileVersion=t.matches}))),this.assignCountByType(),this.assignMultimediaByType()},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.close=function(){this._ref.close()},e.prototype.updateSideNav=function(){this.sideOpened=!this.sideOpened},e.prototype.selectPFile=function(e){this.indexSelected=e,this._mobileVersion&&this.updateSideNav()},e.prototype.onIndexSelectedChange=function(e){this.indexSelected=e},e.prototype.changePFileType=function(e){this.indexSelected=0,this.typeSelected=e;var t=e;this.multimedia=this.getPFilesByType(t,this._data.multimedia)},e.prototype.assignCountByType=function(){this.count.image=this.getPFilesByType(n.PFileTypeEnum.IMAGE,this._data.multimedia).length,this.count.video=this.getPFilesByType(n.PFileTypeEnum.VIDEO,this._data.multimedia).length,this.count.sphere=this.getPFilesByType(n.PFileTypeEnum.SPHERIC,this._data.multimedia).length},e.prototype.assignMultimediaByType=function(){this._data.type&&(this.typeSelected=this._data.type,this.multimedia=this.getPFilesByType(this.typeSelected,this._data.multimedia))},e.prototype.getPFilesByType=function(e,t){return t.filter((function(t){return t.type===e}))||[]},e.decorators=[{type:t.Component,args:[{selector:"lib-gallery",template:'<div class="gallery">\r\n <mat-sidenav-container class="gallery__sidenav-container">\r\n <mat-sidenav mode="side" [opened]="sideOpened" class="sidenav-container__sidenav">\r\n <mat-toolbar class="sidenav__toolbar" color="primary">\r\n <span>Galeria</span>\r\n <button mat-icon-button (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-toolbar class="sidenav__thumbnails-types">\r\n <button class="thumbnails-types__item-type" mat-button\r\n [ngClass]="{\'item-type--selected\': typeSelected === \'IMAGE\'}" (click)="changePFileType(\'IMAGE\')">\r\n <span class="item-type__icon ic-component-property-file-image"></span>\r\n <span class="item-type__label">{{count.image}}</span>\r\n </button>\r\n <button class="thumbnails-types__item-type" mat-button\r\n [ngClass]="{\'item-type--selected\': typeSelected === \'SPHERIC\'}" (click)="changePFileType(\'SPHERIC\')">\r\n <span class="item-type__icon ic-component-property-sphere"></span>\r\n <span class="item-type__label">{{count.sphere}}</span>\r\n </button>\r\n <button class="thumbnails-types__item-type" mat-button\r\n [ngClass]="{\'item-type--selected\': typeSelected === \'VIDEO\'}" (click)="changePFileType(\'VIDEO\')">\r\n <span class="item-type__icon ic-component-property-video"></span>\r\n <span class="item-type__label">{{count.video}}</span>\r\n </button>\r\n </mat-toolbar>\r\n <div class="sidenav__thumbnail-list">\r\n <ng-container *ngFor="let image of multimedia; let i = index">\r\n <div class="thumbnail-list__item" (click)="selectPFile(i)"\r\n [ngClass]="{\'thumbnail-list__item--selected\': indexSelected === i}">\r\n <ng-template [ngIf]="image.type !== \'VIDEO\'" [ngIfElse]="youTubeVideo">\r\n <img class="item__img" [src]="image.fileCS.thumbnail" alt="Property image">\r\n </ng-template>\r\n <ng-template #youTubeVideo>\r\n <img class="item__img" [src]="\'https://i3.ytimg.com/vi/\'+image.fileCS.thumbnail+\'/hqdefault.jpg\'"\r\n alt="Property image">\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <ng-template [ngIf]="multimedia.length === 0">\r\n <div class="thumbnail-list__empty-list">\r\n <p class="empty-list__label">\r\n Por el momento no hay\r\n <span *ngIf="typeSelected === \'IMAGE\'">fotos</span>\r\n <span *ngIf="typeSelected === \'VIDEO\'">videos</span>\r\n <span *ngIf="typeSelected === \'SPHERIC\'">fotos esféricas</span>\r\n </p>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mat-sidenav>\r\n <mat-sidenav-content class="sidenav-container__content" [ngStyle]="{\'width\': sideOpened ? \'80%\' : \'100%\'}">\r\n <button class="sidenav-container__button-sidenav" mat-flat-button color="primary" (click)="updateSideNav()">\r\n <mat-icon *ngIf="sideOpened">chevron_left</mat-icon>\r\n <mat-icon *ngIf="!sideOpened">chevron_right</mat-icon>\r\n </button>\r\n <button class="sidenav-container__button-close" mat-mini-fab color="primary" (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <div class="content__list-container">\r\n <lib-property-slide-show class="list-container__slide-show" [multimedia]="multimedia" [selectIndex]="indexSelected"\r\n [initialIndex]="indexSelected"\r\n (currentIndex)="onIndexSelectedChange($event)"></lib-property-slide-show>\r\n </div>\r\n </mat-sidenav-content>\r\n </mat-sidenav-container>\r\n</div>\r\n',styles:["::ng-deep .gallery_dialog{max-width:100%!important;width:100%;height:100%}::ng-deep .gallery_dialog mat-dialog-container{width:100%;height:100%;padding:0}:host{display:block;width:100%;height:100%}.gallery,.gallery__sidenav-container{width:100%;height:100%}.sidenav__toolbar{display:flex;justify-content:space-between}.sidenav__thumbnail-list{width:100%;height:calc(100% - 128px);padding:16px;box-sizing:border-box;overflow-x:hidden;overflow-y:auto}.thumbnail-list__empty-list{width:100%;height:100%;display:flex}.empty-list__label{margin:auto;text-align:center}.thumbnail-list__item{width:100%;cursor:pointer;padding-bottom:calc(100% / 4 * 3);border-radius:8px;margin-bottom:16px;position:relative}.item__img{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:8px}.sidenav-container__sidenav{width:20%}@media screen and (max-width:1024px){.sidenav-container__sidenav{width:100%}}.sidenav__thumbnails-types{display:flex;align-items:center;justify-content:space-around}.item-type{padding:0}.item-type__label{padding:0 4px;display:inline-block}.item-type__icon{display:inline-block;width:24px;height:24px;font-size:24px;margin:auto}.sidenav-container__content{width:80%;display:flex;position:relative}@media screen and (max-width:1024px){.sidenav-container__content{width:100%}}.sidenav-container__button-sidenav{position:absolute;top:0;left:0;height:64px;padding:0;min-width:36px;border-radius:0 8px 8px 0;z-index:1}.sidenav-container__button-close{position:absolute;top:16px;right:16px;z-index:1}.content__list-container{width:100%;height:100%;margin:auto;overflow:hidden;position:relative;border-radius:8px}.list-container__slide-show{width:100%;height:100%;padding:initial}::ng-deep .list-container__slide-show .panorama-visor{height:100%!important;padding:initial!important}::ng-deep .list-container__slide-show lib-panorama-visor .panorama-visor__actions{top:72px!important}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[a.MAT_DIALOG_DATA]}]},{type:a.MatDialogRef},{type:E.BreakpointObserver}]},e}(),Te=function(){function e(e){this._dialog=e}return e.prototype.open=function(e,t,r){return this._dialog.open(Fe,{data:{multimedia:e||[],indexSelected:t||0,type:r||null},disableClose:!0,panelClass:"gallery_dialog"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),Pe=new t.InjectionToken("PROPERTY MODULE CONFIG"),Se=function(){function e(e,t){this.data=e,this._dialogRef=t,this.data=new n.LeadInfo(this.data||null)}return e.prototype.ngOnInit=function(){},e.prototype.close=function(){this._dialogRef.close()},e.decorators=[{type:t.Component,args:[{selector:"lib-stats",template:'<div class="stats">\r\n <mat-toolbar class="stats__toolbar" color="primary">\r\n Estadísticas\r\n <button mat-icon-button (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <div class="stats__content">\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>visibility</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.views ? data.views[\'RV\'] || 0 : 0}}\r\n </p>\r\n <p class="stat__label">\r\n Vistas en Renta o Venta\r\n </p>\r\n <div class="stat__app-icon">\r\n <img alt="Renta o Venta logo" class="app-icon__img" src="https://storage.googleapis.com/maplander-develop/public/file/front-end/email/rentaoventa.png">\r\n </div>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>visibility</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.views ? data.views[\'FIABCI\'] || 0 : 0}}\r\n </p>\r\n <p class="stat__label">\r\n Vistas en GlobalMLS\r\n </p>\r\n <div class="stat__app-icon">\r\n <img alt="GlobalMLS logo" class="app-icon__img" src="https://storage.googleapis.com/maplander-develop/public/file/front-end/email/globalmls.png">\r\n </div>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>favorite</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.favorites || 0}}\r\n </p>\r\n <p class="stat__label">\r\n Veces añadida a favoritos\r\n </p>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>share</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.shared || 0}}\r\n </p>\r\n <p class="stat__label">\r\n Veces compartida\r\n </p>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>assignment</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.requests || 0}}\r\n </p>\r\n <p class="stat__label">\r\n Solicitudes de información\r\n </p>\r\n </div>\r\n </div>\r\n</div>\r\n',styles:["::ng-deep .stats-panel-class{width:30%;height:80%}::ng-deep .stats-panel-class mat-dialog-container{padding:0;overflow:hidden}@media screen and (max-width:600px){::ng-deep .stats-panel-class{min-width:90%!important}}:host{display:block;width:100%;height:100%}.stats{width:100%;height:100%;overflow:auto}.stats__toolbar{width:100%;height:64px;display:flex;position:-webkit-sticky;position:sticky;top:0;z-index:2;justify-content:space-between}.stats__content{padding:16px;box-sizing:content-box;display:-ms-grid;display:grid;-ms-grid-columns:(calc(50%))[2];grid-template-columns:repeat(2,calc(50%))}.content__stat{border:1px solid #000;border-radius:8px;padding:16px;box-sizing:content-box;position:relative;margin:0 16px 16px 0}.stat__icon-container{position:absolute;top:16px;right:16px}.stat__app-icon{position:absolute;bottom:16px;right:16px}.app-icon__img{width:24px;height:24px;border-radius:4px}.stat__count{font-size:32px;font-weight:700;margin:0 0 16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stat__label{width:80%;margin:0}"]}]}],e.ctorParameters=function(){return[{type:n.LeadInfo,decorators:[{type:t.Inject,args:[h.MAT_DIALOG_DATA]}]},{type:h.MatDialogRef}]},e}(),Me=function(){function e(e){this._dialog=e}return e.prototype.open=function(e){this._dialog.open(Se,{data:e||null,panelClass:"stats-panel-class"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:h.MatDialog}]},e}(),Ne={CREATE:"CREATE",UPDATE:"UPDATE",ANNOUNCE:"ANNOUNCE",HIDE:"HIDE",SHOW:"SHOW",ADDRESS:"ADDRESS",OFFER:"OFFER",FAVORITE:"FAVORITE",REQUEST_INFO:"REQUEST_INFO",SHARE:"SHARE",ARCHIVE:"ARCHIVE",REAL_ESTATE_EXCHANGE:"REAL_ESTATE_EXCHANGE",SHARE_COMMISSION:"SHARE_COMMISSION",BROCHURE:"BROCHURE",POSTER:"POSTER",CLIENTS:"CLIENTS",BACK:"BACK",SHOW_AGENTS:"SHOW_AGENTS",TARPS:"TARPS"},ke=function(){function e(e,r,i,o,a,s,l,p){this._config=e,this._uploaderService=r,this._announceService=i,this._snackBar=o,this._share=a,this._gallery=s,this._documentService=l,this._statsService=p,this.sharedProperty={isShared:!1,ownerAvailable:!0},this.initCompleteProperty(),this.change=new t.EventEmitter,this.modeChange=new t.EventEmitter,this.disableShareCommission=!1,this.disableConfirmAnnounce=!1,this.currentIndex=0,this.multimedia=[],this._allMultimedia=[],this._newMedia=[],this.multimediaCount={images:0,images360:0,videos:0},this.isOPI=this._config||!1,this.currentType=n.PFileTypeEnum.IMAGE}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.property&&e.property.currentValue&&(this.completeProperty=new n.NewCompleteProperty(e.property.currentValue||null),this.parseMultimedia(),this.assignMultimediaByType(),this.validateMultimediaTypeCount())},e.prototype.saveData=function(){this.restoreFrontImageError(),this._editorInstance.validateFormInvalid()?this._snackBar.setMessage("Verifique todos los campos obligatorios","OK",5e3,"left","bottom"):(this.parseDataByComponents(),this.change.emit({type:this.completeProperty.property.id?Ne.UPDATE:Ne.CREATE,payload:{property:this.completeProperty,newMedia:this._newMedia}}))},e.prototype.agentActions=function(e){this.change.emit({type:e,payload:{property:this.completeProperty,newMedia:this._newMedia}})},e.prototype.shareProperty=function(){this.agentActions("SHARE"),this._share.open({url:this.completeProperty.property.url,urlUser:this.userUrl})},e.prototype.openGallery=function(){if(0!==this._allMultimedia.length){var e=null;this.multimedia.length>0&&(e=this.multimedia[0].type),this._gallery.open(this._allMultimedia,this.currentIndex,e)}},e.prototype.goToStats=function(){this._statsService.open(this.completeProperty.leadInfo||null)},e.prototype.goToEditProperty=function(){this.mode="add",this.modeChange.emit(this.mode)},e.prototype.goToBack=function(){this.restoreFrontImageError(),this.change.emit({type:Ne.BACK})},e.prototype.goToClients=function(){this.change.emit({type:Ne.CLIENTS})},e.prototype.goToUpdateVisibility=function(){this.change.emit({type:this.completeProperty.property.status===n.StatusTypeEnum.ANNOUNCED?Ne.HIDE:Ne.SHOW,payload:{property:this.completeProperty,newMedia:this._newMedia}})},e.prototype.goToPublish=function(){var e=this;"add"===this.mode&&this.parseDataByComponents();var t=X.getErrorsForPublish(this.completeProperty.property);if(t.length>0)this.mode="add",this.modeChange.emit(this.mode),setTimeout((function(){e.validateFrontImageOnErrors(t),e._editorInstance.setErrorsOnFields(t)}),200),this._snackBar.setMessage("Complete los campos faltantes para poder publicar","OK",5e3,"left","bottom");else{if(this.disableConfirmAnnounce)return void this.change.emit({type:Ne.ANNOUNCE,payload:{property:this.completeProperty,newMedia:this._newMedia}});this._announceService.open().afterClosed().subscribe((function(t){t.code===n.DialogResponseType.ACCEPT&&e.change.emit({type:Ne.ANNOUNCE,payload:{property:e.completeProperty,newMedia:e._newMedia}})}))}},e.prototype.onMultimediaIndexChanged=function(e){this.currentIndex=e},e.prototype.changeMultimediaType=function(e){this.currentType=e,this.assignMultimediaByType()},e.prototype.openUploaderMultimedia=function(){var e=this;this._uploaderService.open(this.currentType,this._allMultimedia,this._newMedia).afterClosed().subscribe((function(t){t&&(e._newMedia=t.newMedia||[],e._allMultimedia=Object.assign([],t.multimedia||[]),e.assignFrontImage(),e.assignMultimediaByType(),e.validateMultimediaTypeCount())}))},e.prototype.onEditorInstance=function(e){this._editorInstance=e},e.prototype.onOwnerInstance=function(e){this._ownerInstance=e},e.prototype.onDocumentsInstance=function(e){this._documentsInstance=e},e.prototype.onSelectAddress=function(){this.change.emit({type:Ne.ADDRESS})},e.prototype.restoreFrontImageError=function(){this.frontImageError=!1},e.prototype.parseMultimedia=function(){this._allMultimedia=[],this._allMultimedia=this._allMultimedia.concat(this.completeProperty.images||[]),this._allMultimedia=this._allMultimedia.concat(this.completeProperty.videos||[]),this._allMultimedia=this._allMultimedia.concat(this.completeProperty.spherics||[])},e.prototype.getMultimediaByType=function(e){var t=[];return this._allMultimedia.forEach((function(r){r.type===e&&t.push(r)})),t},e.prototype.assignFrontImage=function(){var e=[];this._allMultimedia.forEach((function(t){t.type===n.PFileTypeEnum.IMAGE&&e.push(t)})),e.length>0?(this.completeProperty.property.image=e[0].fileCS.thumbnail,this.frontImageError=!1):this.completeProperty.property.image=null,this.completeProperty=new n.NewCompleteProperty(this.completeProperty)},e.prototype.assignMultimediaByType=function(){var e=this,t=[];this._allMultimedia.forEach((function(r){r.type===e.currentType&&t.push(r)})),this.multimedia=Object.assign([],t)},e.prototype.validateFrontImageOnErrors=function(e){var t=this;e.forEach((function(e){"image"===e&&(t.frontImageError=!0)}))},e.prototype.validateMultimediaTypeCount=function(){var e=this;this.multimediaCount.images=0,this.multimediaCount.images360=0,this.multimediaCount.videos=0,this._allMultimedia.forEach((function(t){switch(t.type){case n.PFileTypeEnum.IMAGE:e.multimediaCount.images++;break;case n.PFileTypeEnum.SPHERIC:e.multimediaCount.images360++;break;case n.PFileTypeEnum.VIDEO:e.multimediaCount.videos++}}))},e.prototype.parseDataByComponents=function(){this.completeProperty.property=this._editorInstance.getProperty(),this.completeProperty.property.propertyInfo.owner=this._ownerInstance.getOwner();var e=this._documentsInstance.getDocuments();this.completeProperty.files=e.documents,this._newMedia=this._newMedia.concat(e.newMedia),this.completeProperty.images=this.getMultimediaByType(n.PFileTypeEnum.IMAGE),this.completeProperty.spherics=this.getMultimediaByType(n.PFileTypeEnum.SPHERIC),this.completeProperty.videos=this.getMultimediaByType(n.PFileTypeEnum.VIDEO)},e.prototype.initCompleteProperty=function(){var e=new n.NewCompleteProperty;e.property=new n.NewProperty,e.property.propertyInfo=new n.PropertyInfo,this.completeProperty=e},e.decorators=[{type:t.Component,args:[{selector:"lib-property",template:'<div class="property">\r\n <div class="header">\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <h1 class="title">\r\n <span *ngIf="!completeProperty.property.id">Cargar </span>\r\n <span *ngIf="completeProperty.property.id">Editar </span>\r\n expediente de {{ propertyType | propertyType }}\r\n </h1>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <h1 class="title">Expediente de {{propertyType | propertyType}}</h1>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <div class="breadcrumb-list">\r\n <p class="breadcrumb-content">\r\n <span class="breadcrumb-item">\r\n {{completeProperty.property.type | propertyType}}\r\n </span>\r\n <span class="breadcrumb-item">\r\n {{completeProperty.property.offering | offeringType : \' \' | stringManipulation : \'capitalize\'}}\r\n </span>\r\n <span *ngIf="completeProperty.property.address.city" class="breadcrumb-item">\r\n {{completeProperty.property.address.city}}\r\n </span>\r\n <span *ngIf="completeProperty.property.address.postalCode" class="breadcrumb-item">\r\n {{completeProperty.property.address.postalCode}}\r\n </span>\r\n <span *ngIf="completeProperty.property.address.colony" class="breadcrumb-item">\r\n {{completeProperty.property.address.colony}}\r\n </span>\r\n </p>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class="header__actions">\r\n \x3c!-- Button Publish [START] --\x3e\r\n <ng-template\r\n [ngIf]="(mode === \'record\' || mode === \'add\') && (completeProperty.property.status !== \'ANNOUNCED\' && completeProperty.property.status !== \'HIDDEN\')">\r\n <button mat-icon-button color="primary" matTooltip="Publicar" matTooltipPosition="left"\r\n class="header__actions-button-publish" (click)="goToPublish()">\r\n <span class="header__actions-button-publish-icon ic-property-status-announce"></span>\r\n </button>\r\n </ng-template>\r\n \x3c!-- Button Publish [END] --\x3e\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <ng-template [ngIf]="multimedia.length > 0">\r\n <button mat-icon-button color="primary" (click)="openUploaderMultimedia()">\r\n <mat-icon>photo_library</mat-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template [ngIf]="completeProperty?.property?.id">\r\n <button mat-icon-button color="primary" matTooltip="Guardar" matTooltipPosition="left" (click)="saveData()">\r\n <mat-icon>save</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <ng-template\r\n [ngIf]="!sharedProperty.isShared && (completeProperty.property.status !== \'DRAFT\' && completeProperty.property.status !== \'NONE\')">\r\n <button mat-icon-button color="primary" matTooltip="Estadísticas" matTooltipPosition="left"\r\n (click)="goToStats()">\r\n <mat-icon>bar_chart</mat-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template\r\n [ngIf]="(completeProperty.property.status === \'ANNOUNCED\' || completeProperty.property.status === \'HIDDEN\') && !sharedProperty.isShared">\r\n <button mat-icon-button color="primary"\r\n matTooltip="{{completeProperty.property.status === \'ANNOUNCED\' ? \'Ocultar\' : \'Mostrar\'}}"\r\n matTooltipPosition="left" (click)="goToUpdateVisibility()">\r\n <mat-icon *ngIf="completeProperty.property.status === \'HIDDEN\'">visibility</mat-icon>\r\n <mat-icon *ngIf="completeProperty.property.status === \'ANNOUNCED\'">visibility_off</mat-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template [ngIf]="!sharedProperty.isShared">\r\n <button mat-icon-button color="primary" matTooltip="Editar" matTooltipPosition="left"\r\n (click)="goToEditProperty()">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <ng-template [ngIf]="isOPI" [ngIfElse]="maplanderActions">\r\n <button mat-flat-button color="primary" class="header__actions-button-commission"\r\n [disabled]="disableShareCommission"\r\n (click)="agentActions(\'SHARE_COMMISSION\')">\r\n <span *ngIf="!disableShareCommission">Solicitar comisión compartida</span>\r\n <span *ngIf="disableShareCommission">Solicitud pendiente</span>\r\n </button>\r\n </ng-template>\r\n <ng-template #maplanderActions>\r\n <button mat-flat-button color="primary" class="header__actions-button-commission"\r\n (click)="agentActions(\'SHOW_AGENTS\')">\r\n Mostrar Asesor\r\n </button>\r\n <button mat-icon-button color="primary" class="header__actions-button-commission"\r\n (click)="agentActions(\'FAVORITE\')">\r\n <mat-icon *ngIf="isFavorite">favorite</mat-icon>\r\n <mat-icon *ngIf="!isFavorite">favorite_border</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n \x3c!-- Button Share [START] --\x3e\r\n <ng-template\r\n [ngIf]="mode === \'detail\' || (mode === \'record\' && (completeProperty.property.status === \'READY\' || completeProperty.property.status === \'ANNOUNCED\'))" [ngIfElse]="noShare">\r\n <button mat-icon-button color="primary" (click)="shareProperty()">\r\n <mat-icon>share</mat-icon>\r\n </button>\r\n </ng-template>\r\n \x3c!-- Button Share [END] --\x3e\r\n <ng-template #noShare>\r\n <ng-template [ngIf]="sharedProperty.isShared">\r\n <h1 class="title">\r\n Propiedad oculta</h1>\r\n </ng-template>\r\n </ng-template>\r\n \x3c!-- Button Back [START] --\x3e\r\n <button mat-icon-button color="primary" (click)="goToBack()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n \x3c!-- Button Back [END] --\x3e\r\n </div>\r\n </div>\r\n <div class="body">\r\n <div class="body__multimedia-wrapper">\r\n <div class="multimedia-wrapper__list-thumbnails">\r\n <div class="list-thumbnails__wrapper-thumbnails">\r\n <div class="wrapper-thumbnails__header-types">\r\n <button mat-button class="header-types__button-type"\r\n [ngClass]="{\'header-types__button-type--active\': currentType === \'IMAGE\'}"\r\n (click)="changeMultimediaType(\'IMAGE\')">\r\n <span class="button-type__icon ic-component-property-file-image"></span>\r\n <span class="button-type__label">{{multimediaCount.images}}</span>\r\n </button>\r\n <button mat-button class="header-types__button-type"\r\n [ngClass]="{\'header-types__button-type--active\': currentType === \'SPHERIC\'}"\r\n (click)="changeMultimediaType(\'SPHERIC\')">\r\n <span class="button-type__icon ic-component-property-sphere"></span>\r\n <span class="button-type__label">{{multimediaCount.images360}}</span>\r\n </button>\r\n <button mat-button class="header-types__button-type"\r\n [ngClass]="{\'header-types__button-type--active\': currentType === \'VIDEO\'}"\r\n (click)="changeMultimediaType(\'VIDEO\')">\r\n <span class="button-type__icon ic-component-property-video"></span>\r\n <span class="button-type__label">{{multimediaCount.videos}}</span>\r\n </button>\r\n </div>\r\n <ng-template [ngIf]="multimedia && multimedia.length === 0">\r\n <div class="wrapper-thumbnails__item-thumbnail"></div>\r\n <div class="wrapper-thumbnails__item-thumbnail"></div>\r\n <div class="wrapper-thumbnails__item-thumbnail"></div>\r\n </ng-template>\r\n <ng-container *ngFor="let image of multimedia; let i = index;">\r\n <div class="wrapper-thumbnails__item-thumbnail"\r\n [ngClass]="{\'wrapper-thumbnails__item-thumbnail--selected\': i === currentIndex}"\r\n (click)="onMultimediaIndexChanged(i)">\r\n <ng-container [ngSwitch]="image.type">\r\n <ng-container *ngSwitchCase="\'VIDEO\'">\r\n <img class="item-thumbnail__img" alt="Property image"\r\n [src]="\'https://i3.ytimg.com/vi/\'+image.fileCS.thumbnail+\'/hqdefault.jpg\'">\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <img class="item-thumbnail__img" alt="Property image" [src]="image.fileCS.thumbnail">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class="multimedia-wrapper__front-image">\r\n <lib-property-slide-show [multimedia]="multimedia"\r\n [selectIndex]="currentIndex"\r\n (currentIndex)="onMultimediaIndexChanged($event)"\r\n [customActions]="customSlideShowActions"\r\n ></lib-property-slide-show>\r\n <ng-template [ngIf]="mode === \'add\' && multimedia.length === 0">\r\n <div class="front-image__upload-multimedia">\r\n <div class="upload-multimedia__container-add-multimedia">\r\n <button class="container-add-multimedia__button" mat-button color="primary"\r\n (click)="openUploaderMultimedia()">\r\n AGREGAR\r\n </button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #customSlideShowActions>\r\n <button *ngIf="multimedia.length > 0" mat-icon-button (click)="openGallery()" matTooltip="Fullscreen">\r\n <mat-icon>fullscreen</mat-icon>\r\n </button>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class="body__additional-content">\r\n <ng-template\r\n [ngIf]="mode === \'record\' && property.property.status === \'ANNOUNCED\' && property.property.propertyInfo.mls">\r\n <div class="additional-content__mls">\r\n <p class="mls__title">\r\n Bolsa inmobiliaria\r\n </p>\r\n <button mat-flat-button color="primary" class="mls__button"\r\n (click)="agentActions(\'REAL_ESTATE_EXCHANGE\')">\r\n Mesa de comercialización\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class="body__content">\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <lib-property-details [property]="completeProperty.property" [mlsLabel]="mlsLabel"\r\n [currencyConverted]="currencyConverted" [visibleTour]="!isOPI"></lib-property-details>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <lib-property-details [property]="completeProperty.property" [mlsLabel]="mlsLabel"\r\n [record]="true"></lib-property-details>\r\n <ng-template [ngIf]="sharedProperty.ownerAvailable">\r\n <div class="content__private-info">\r\n <p class="private-info__title">INFORMACIÓN PRIVADA</p>\r\n <lib-property-owner-info [owner]="completeProperty.property.propertyInfo.owner"\r\n [disabled]="true"></lib-property-owner-info>\r\n <ng-template [ngIf]="!sharedProperty.isShared">\r\n <lib-property-documents [files]="completeProperty.files" [disabled]="true"></lib-property-documents>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <ng-template [ngIf]="frontImageError">\r\n <p class="content__error-front-image">\r\n * Debe subir al menos una imagen\r\n </p>\r\n </ng-template>\r\n <lib-property-editor [utils]="utils" [propertyType]="propertyType" [address]="address"\r\n [mlsLabel]="mlsLabel"\r\n [property]="completeProperty.property"\r\n (editorInstance)="onEditorInstance($event)"\r\n (selectAddress)="onSelectAddress()"></lib-property-editor>\r\n <div class="content__private-info">\r\n <p class="private-info__title">INFORMACIÓN PRIVADA</p>\r\n <lib-property-owner-info (ownerInstance)="onOwnerInstance($event)"\r\n [owner]="completeProperty.property.propertyInfo.owner"></lib-property-owner-info>\r\n <lib-property-documents (documentsInstance)="onDocumentsInstance($event)"\r\n [files]="completeProperty.files"></lib-property-documents>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class="footer mat-elevation-z2" [ngClass]="{\'footer--primary\': mode === \'record\'}"\r\n [ngStyle]="{\'display\': (mode === \'detail\' && isOPI) ? \'none\' : \'block\'}">\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <div class="footer__footer-content">\r\n <ng-template [ngIf]="!isOPI">\r\n <button mat-raised-button color="primary" class="footer-content__button-request-info mat-elevation-z2"\r\n (click)="agentActions(\'REQUEST_INFO\')">\r\n Solicitar información\r\n </button>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <div class="footer__footer-content">\r\n <p class="footer-content__status-label">\r\n <ng-container [ngSwitch]="completeProperty.property.status">\r\n <ng-container *ngSwitchCase="\'HIDDEN\'">\r\n Propiedad oculta\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'READY\'">\r\n Propiedad lista <br> para publicar\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'EXPIRED\'">\r\n Propiedad expirada desde el <br>\r\n {{completeProperty.property.propertyInfo.endPublishDate | libFormatDate : true : \'dd MMMMM yyyy\'}}\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'ANNOUNCED\'">\r\n Anunciada\r\n <br> Anuncio valido hasta el\r\n {{completeProperty.property.propertyInfo.endPublishDate | libFormatDate : true : \'dd MMMMM yyyy\'}}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n Propiedad en borrador\r\n </ng-container>\r\n </ng-container>\r\n </p>\r\n <div class="footer-content__fab">\r\n <eco-fab-speed-dial>\r\n <eco-fab-speed-dial-trigger>\r\n <button mat-fab color="primary">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </eco-fab-speed-dial-trigger>\r\n <eco-fab-speed-dial-actions>\r\n <button *ngIf="completeProperty.property.status !== \'NONE\' && completeProperty.property.status !== \'DRAFT\'"\r\n mat-mini-fab color="primary" matTooltip="Clientes" matTooltipPosition="left" (click)="goToClients()">\r\n <mat-icon class="fab-button__icon">people</mat-icon>\r\n </button>\r\n <button *ngIf="!sharedProperty.isShared" mat-mini-fab color="primary" matTooltip="Archivar propiedad"\r\n matTooltipPosition="left"\r\n (click)="agentActions(\'ARCHIVE\')">\r\n <mat-icon class="fab-button__icon">archive</mat-icon>\r\n </button>\r\n <button mat-mini-fab color="primary" matTooltip="Generar letrero" matTooltipPosition="left"\r\n (click)="agentActions(\'POSTER\')">\r\n <span class="fab-button__icon ic-component-property-poster"></span>\r\n </button>\r\n <button mat-mini-fab color="primary" matTooltip="Generar folleto" matTooltipPosition="left"\r\n (click)="agentActions(\'BROCHURE\')">\r\n <span class="fab-button__icon ic-component-property-brochure"></span>\r\n </button>\r\n <button mat-mini-fab color="primary" matTooltip="Generar lona" matTooltipPosition="left"\r\n (click)="agentActions(\'TARPS\')">\r\n <span class="fab-button__icon ic-component-property-canvas"></span>\r\n </button>\r\n </eco-fab-speed-dial-actions>\r\n </eco-fab-speed-dial>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <div class="footer__footer-content">\r\n <button class="footer-content__button-save" mat-flat-button color="primary" (click)="saveData()">Guardar\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n',styles:[":host{width:100%;height:100%;display:block}.property{position:relative;width:100%;height:100%;z-index:5;border-radius:4px}.title{margin:0 16px;font-size:24px}.breadcrumb-list{width:50%;padding:4px 16px;box-sizing:border-box;border-radius:0 24px 24px 0}.breadcrumb-content{color:#fff;margin:4px 0;width:100%;line-height:21px}.breadcrumb-item{position:relative;display:inline-flex;padding:0 18px 0 4px}.breadcrumb-item:last-child:before{content:none}.divider{border-width:1px}.divider-vertical{display:block;border:.5px inset}.header{width:100%;position:-webkit-sticky;position:sticky;top:0;z-index:10;padding:8px 0;display:flex;align-items:center;justify-content:space-between}@media screen and (max-width:600px){.breadcrumb-list{width:100%;order:1}.header{flex-direction:column}}.header__actions{padding:8px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}@media screen and (max-width:600px){.header__actions{order:0;width:100%;padding:4px 8px;justify-content:flex-end}}.header__actions button{margin-right:8px}.header__actions-button-commission{border-radius:16px}.actions-button-commission__icon{display:inline-block;width:24px;height:24px;font-size:24px;margin-left:8px}.header__actions-button-publish-icon{font-size:24px;width:24px;height:24px}.body{width:100%;height:calc(100% - 80px);overflow-x:hidden;overflow-y:auto;background:0 0;box-sizing:border-box;padding-bottom:56px}@media screen and (max-width:600px){.body{display:flex;flex-direction:column;padding:0 8px 56px}}.body__additional-content{width:25%;display:inline-block;padding:16px;box-sizing:border-box;background:#fff}@media screen and (max-width:600px){.body__additional-content{width:100%;order:2}}.mls__title{font-size:12px}.mls__button{width:100%;display:block;margin-bottom:8px;border-radius:16px}.body__content{width:75%;display:inline-block;padding:16px;box-sizing:border-box;float:right;background:#fff}.body__multimedia-wrapper{width:100%;background:#fff;display:flex}@media screen and (max-width:600px){.body__content{width:100%;order:1}.body__multimedia-wrapper{width:100%;order:0;flex-direction:column}}.multimedia-wrapper__list-thumbnails{width:25%;height:0;padding-bottom:calc((100% - 25%)/ 4 * 3);overflow:hidden;position:relative}@media screen and (max-width:600px){.multimedia-wrapper__list-thumbnails{width:100%;height:56px;padding:0}}.list-thumbnails__wrapper-thumbnails{position:absolute;width:100%;height:100%;background:#fff;overflow-x:hidden;overflow-y:scroll;padding:0 18px 8px;box-sizing:border-box}.wrapper-thumbnails__header-types{width:100%;height:40px;background:#fff;padding-top:8px;position:-webkit-sticky;position:sticky;top:0;z-index:1}.header-types__button-type{min-width:calc(100% / 3);width:calc(100% / 3);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0;height:100%;font-size:12px;line-height:16px}.button-type__icon{font-size:24px;width:24px;height:24px;display:inline-block}.button-type__label{display:inline-block;margin:0 4px}.wrapper-thumbnails__item-thumbnail{width:100%;padding-bottom:calc(100% / 4 * 3);margin-top:8px;border-radius:8px;position:relative;cursor:pointer}.item-thumbnail__img{position:absolute;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:inherit}.multimedia-wrapper__front-image{width:calc(75% - 16px);height:0;padding-bottom:calc((75% - 16px)/ 4 * 3);margin:auto;border-radius:8px;position:relative}@media screen and (max-width:600px){.wrapper-thumbnails__item-thumbnail{display:none}.multimedia-wrapper__front-image{width:100%;padding-bottom:calc(100% / 4 * 3)}}.front-image__upload-multimedia{position:absolute;top:0;left:25%;width:50%;height:100%;z-index:1;display:flex}@media screen{.front-image__upload-multimedia{width:80%;left:10%}}.upload-multimedia__container-add-multimedia{margin:auto;width:200px;height:200px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;background:url(https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/360-image.svg) center/80% no-repeat}.container-add-multimedia__button{position:absolute;bottom:8px}.content__error-front-image{font-size:12px;margin:8px 0 8px 8px}.content__private-info{border-radius:8px}.private-info__title{font-weight:700;margin:0;padding:16px;border-radius:8px 8px 0 0}.footer{width:100%;height:43px;border-radius:16px 16px 0 0;padding:8px 16px;box-sizing:border-box;background:#fff;position:-webkit-sticky;position:sticky;z-index:2;bottom:0}.footer__footer-content{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.footer-content__status-label{margin:6px 0;font-size:14px;text-align:center}.footer-content__button-request-info{width:30%;border-radius:16px}@media screen and (max-width:600px){.footer-content__button-request-info{width:90%}}.footer-content__button-save{width:120px;border-radius:16px}.footer-content__fab{position:absolute;right:0;bottom:12px;padding:8px;border-radius:50%;background:linear-gradient(transparent 50%,#fff 50%)}.fab-button__icon{width:24px;height:24px;font-size:24px}"]}]}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[Pe]}]},{type:we},{type:Ae},{type:v.SnackBarService},{type:p.ShareService},{type:Te},{type:ae},{type:Me}]},e.propDecorators={property:[{type:t.Input}],utils:[{type:t.Input}],propertyType:[{type:t.Input}],mode:[{type:t.Input}],sharedProperty:[{type:t.Input}],address:[{type:t.Input}],mlsLabel:[{type:t.Input}],disableShareCommission:[{type:t.Input}],isFavorite:[{type:t.Input}],disableConfirmAnnounce:[{type:t.Input}],currencyConverted:[{type:t.Input}],userUrl:[{type:t.Input}],change:[{type:t.Output}],modeChange:[{type:t.Output}]},e}(),De=function(){function e(){}return e.validator=function(e){var t=e.get("minPrice"),r=Number(t.value)>Number(e.get("price").value);r?(t.setErrors({minPriceInvalid:!0}),t.markAsTouched()):he(t,"minPriceInvalid"),(r=(t=e.get("commission")).value&&(!e.get("price").value||0===Number(e.get("price").value)))?(t.setErrors({commissionInvalid:!0}),t.markAsTouched()):he(t,"commissionInvalid"),t=e.get("consumerReportingOption"),(r=e.get("consumerReporting").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),t=e.get("transferPrice"),(r=e.get("transfer").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),t=e.get("maintenancePrice"),(r=e.get("maintenance").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),t=e.get("sharedCommission"),(r=e.get("mlm").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),r=e.get("mlm").value&&!e.get("commission").value,t=e.get("sharedCommission"),r?(t.setErrors({sharedCommissionInvalid:!0}),t.markAsTouched()):he(t,"sharedCommissionInvalid")},e}(),Oe=I,Re={parse:{dateInput:"L"},display:{dateInput:"L",monthYearLabel:"MMM YYYY",dateA11yLabel:"L",monthYearA11yLabel:"MMMM YYYY"}},Le=function(){function e(e,r,a){this._formBuilder=e,this._dialog=r,this._adapter=a,this.REGEX_ONLY_INTEGERS=new RegExp(/^[0-9]\d*$/),this.REGEX_MIDDLE_NUMBER=new RegExp(/^[0-9]*(\.[5])?$/),this.REGEX_WEBSITE=new RegExp(/(http|https):\/\/(\w+:?\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@\-\/]))?/),this.REGEX_ALPHA_NUMBER=new RegExp(/[A-Za-z0-9_]/),this.editorInstance=new t.EventEmitter,this.selectAddress=new t.EventEmitter,this._subscription=new o.Subscription,this.offeringTypeList=W.OfferingTypeList.map((function(e){return z({},e)})),this.landUseList=W.LandUseList.map((function(e){return z({},e)})),this.commissionList=W.CommissionList[n.OfferingTypeEnum.SALE],this.roiList=Object.assign([],W.ROIList),this.durationList=Object.assign([],W.DurationList),this.sharedCommissionList=Object.assign([],W.SharedCommissionList),this._adapter.setLocale("es"),this._errorFields=[],this._validators={bedrooms:[i.Validators.pattern(this.REGEX_ONLY_INTEGERS)],bathrooms:[i.Validators.pattern(this.REGEX_MIDDLE_NUMBER)],parkingSpaces:[i.Validators.pattern(this.REGEX_ONLY_INTEGERS)],mainArea:[],secondaryArea:[],externalLink:[i.Validators.pattern(this.REGEX_WEBSITE)],sku:[i.Validators.pattern(this.REGEX_ALPHA_NUMBER)]},this.propertyForm=this._formBuilder.group({offering:[n.OfferingTypeEnum.SALE],sku:[null,this._validators.sku],consumerReporting:[],consumerReportingOption:[1],currency:["MXN"],minPrice:[],price:[],maintenance:[],maintenancePrice:[],transfer:[],transferPrice:[],bedrooms:[null,this._validators.bedrooms],bathrooms:[null,this._validators.bathrooms],parkingSpaces:[null,this._validators.parkingSpaces],mainArea:[null,this._validators.mainArea],secondaryArea:[null,this._validators.secondaryArea],unit:[n.AreaUnitEnum.M2],buildIn:[],landUse:[],exclusivity:[],mlm:[],sharedCommission:[],agreementDate:[{value:null,disabled:!0}],duration:[],commission:[],roi:[],description:[],externalLink:[null,this._validators.externalLink],notes:[],address:this._formBuilder.group({country:[],postalCode:[],state:[],city:[],township:[],colony:[],street:[],extNumber:[],intNumber:[],mz:[],lt:[],visible:[!0]})},{validators:De.validator})}return e.geoPtGenerator=function(e,t,r){var n=Math.random()*(r-t)+t,i=Math.random()*Math.PI/2,o=Math.random()<.5?n*Math.cos(i):-n*Math.cos(i),a=(Math.random()<.5?n*Math.sin(i):-n*Math.sin(i))/6371010*180/Math.PI,s=e.latitude+a,l=o/6371010/Math.cos(s*Math.PI/180)*180/Math.PI;return{latitude:s,longitude:e.longitude+l}},e.prototype.ngOnInit=function(){this.listenChangesOnForm()},e.prototype.ngOnChanges=function(e){e.utils&&e.utils.currentValue&&(this.currencyList=e.utils.currentValue.cers),e.propertyType&&e.propertyType.currentValue&&(this.propertyType=e.propertyType.currentValue,this.searchAmenitiesByPropertyType()),e.property&&e.property.currentValue&&this.createProperty(e.property.currentValue),e.address&&e.address.currentValue&&this.updateAddressForm(e.address.currentValue)},e.prototype.ngAfterViewInit=function(){this.editorInstance.emit(this)},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.getProperty=function(){return this.setValidatorOnFields(this._errorFields,!0),this.updatePropertyByForm(this.propertyForm.getRawValue()),this._property},e.prototype.validateFormInvalid=function(){return this.setValidatorOnFields(this._errorFields,!0),this.propertyForm.invalid},e.prototype.updateAmenity=function(e){e.checked=!e.checked,this._property.amenities[e.value]=e.checked},e.prototype.goToSelectAddress=function(){this.selectAddress.emit()},e.prototype.setErrorsOnFields=function(e){this._errorFields=e,this.setValidatorOnFields(this._errorFields),this._btnSubmitRef.nativeElement.click()},e.prototype.updateAddressForm=function(e){this.propertyForm.patchValue({address:{country:e.country,state:e.state,city:e.city,township:e.township,colony:e.colony,street:e.street,postalCode:e.postalCode,extNumber:e.outdoorNumber}})},e.prototype.assignAmenities=function(){var e=this;this.amenitiesList.forEach((function(t){t.checked=e._property.amenities[t.value]}))},e.prototype.assignLocationFeatures=function(){var e=this;this.featuresList.forEach((function(t){t.checked=e._property.amenities[t.value]}))},e.prototype.assignCommission=function(){this.commissionList=W.CommissionList[this._property.offering]},e.prototype.assignBusinessRules=function(){switch(this.propertyType){case n.PropertyTypeEnum.ROOM:this.propertyForm.patchValue({offering:n.OfferingTypeEnum.RENT});break;case n.PropertyTypeEnum.INVESTMENT:this.propertyForm.patchValue({offering:n.OfferingTypeEnum.SALE})}if(this._property.status===n.StatusTypeEnum.ANNOUNCED){var e=X.listErrorsByPropertyTypeForPublish(this._property.type);this.setValidatorOnFields(e)}},e.prototype.updateFormByProperty=function(){this.propertyForm.patchValue({offering:this._property.offering,sku:this._property.sku,consumerReporting:this._property.propertyInfo.consumerReporting&&0!==this._property.propertyInfo.consumerReporting,consumerReportingOption:this._property.propertyInfo.consumerReporting,currency:this._property.currency,minPrice:this._property.propertyInfo.lowestPrice,price:this._property.price,maintenance:this._property.features.condominiumFeePrice&&0!==this._property.features.condominiumFeePrice,maintenancePrice:this._property.features.condominiumFeePrice,transfer:this._property.propertyInfo.leaseTransferPrice&&0!==this._property.propertyInfo.leaseTransferPrice,transferPrice:this._property.propertyInfo.leaseTransferPrice,bedrooms:this._property.features.bedrooms,bathrooms:this._property.features.bathrooms,parkingSpaces:this._property.features.parkingSpaces,mainArea:this._property.features.mainArea,secondaryArea:this._property.features.secondaryArea,unit:this._property.features.areaUnit,buildIn:this._property.features.builtIn?new Date(this._property.features.builtIn,1,1):null,landUse:this._property.features.landUse,exclusivity:this._property.propertyInfo.exclusivity,mlm:this._property.propertyInfo.mls,sharedCommission:this._property.propertyInfo.sharedCommission,agreementDate:this._property.propertyInfo.listingAgreementStartDate?Oe(new j(this._property.propertyInfo.listingAgreementStartDate).toDate()):null,duration:this._property.propertyInfo.listingAgreementTime,commission:this._property.propertyInfo.commission,roi:this._property.features.roi,description:this._property.description,externalLink:this._property.externalLink,notes:this._property.propertyInfo.notes,address:{country:this._property.address.country,state:this._property.address.state,city:this._property.address.city,township:this._property.address.township,colony:this._property.address.colony,postalCode:this._property.address.postalCode,street:this._property.address.street,extNumber:this._property.address.outdoorNumber,intNumber:this._property.address.interiorNumber,mz:this._property.address.mz,lt:this._property.address.lt,visible:this._property.address.visible||!1}})},e.prototype.updatePropertyByForm=function(t){this._property.type=this.propertyType,this._property.offering=t.offering,this._property.sku=t.sku,this._property.propertyInfo.consumerReporting=t.consumerReporting?t.consumerReportingOption:null,this._property.currency=t.currency,this._property.propertyInfo.lowestPrice=t.minPrice?Number(t.minPrice):null,this._property.price=t.price?Number(t.price):null,this._property.features.condominiumFeePrice=t.maintenance?Number(t.maintenancePrice):null,this._property.propertyInfo.leaseTransferPrice=t.transfer?Number(t.transferPrice):null,this._property.features.bedrooms=t.bedrooms?Number(t.bedrooms):null,this._property.features.bathrooms=t.bathrooms?Number(t.bathrooms):null,this._property.features.parkingSpaces=t.parkingSpaces?Number(t.parkingSpaces):null,this._property.features.mainArea=t.mainArea?Number(t.mainArea):null,this._property.features.secondaryArea=t.secondaryArea?Number(t.secondaryArea):null,this._property.features.areaUnit=t.unit,this._property.features.builtIn=t.buildIn?t.buildIn.getFullYear():null,this._property.features.landUse=t.landUse,this._property.propertyInfo.exclusivity=t.exclusivity,this._property.propertyInfo.mls=t.mlm,this._property.propertyInfo.sharedCommission=t.mlm?Number(t.sharedCommission):null,this._property.propertyInfo.listingAgreementStartDate=t.agreementDate?j.getTimestamp(t.agreementDate.toDate()):null,this._property.propertyInfo.listingAgreementTime=t.duration,this._property.propertyInfo.commission=t.commission,this._property.features.roi=t.roi,this._property.description=t.description,this._property.externalLink=t.externalLink,this._property.propertyInfo.notes=t.notes,this._property.address.country=t.address.country,this._property.address.state=t.address.state,this._property.address.city=t.address.city,this._property.address.township=t.address.township,this._property.address.colony=t.address.colony,this._property.address.postalCode=t.address.postalCode,this._property.address.street=t.address.street,this._property.address.outdoorNumber=t.address.extNumber,this._property.address.interiorNumber=t.address.intNumber,this._property.address.mz=t.address.mz,this._property.address.lt=t.address.lt,this._property.address.location=this.address.location,this._property.address.publicLocation=t.address.visible?this.address.location:e.geoPtGenerator(this.address.location,200,400),this._property.address.visible=t.address.visible},e.prototype.searchAmenitiesByPropertyType=function(){var e=this;W.PropertyTypeList.forEach((function(t){t.value===e.propertyType&&(e._propertyTypeItem=t,e.amenitiesList=t.amenities.map((function(e){return z({},e)})),e.featuresList=t.features.map((function(e){return z({},e)})))}))},e.prototype.listenChangesOnForm=function(){var e=this;this._subscription.add(this.propertyForm.controls.offering.valueChanges.subscribe((function(t){e.commissionList=W.CommissionList[t],e.propertyForm.patchValue({minPrice:null,maxPrice:null})}))),this._subscription.add(this.propertyForm.controls.price.valueChanges.subscribe((function(t){t&&0===Number(t)&&e.propertyForm.patchValue({minPrice:null})}))),this._subscription.add(this.propertyForm.controls.mlm.valueChanges.subscribe((function(){e.propertyForm.controls.sharedCommission.setValue(null)}))),this._subscription.add(this.propertyForm.controls.maintenance.valueChanges.subscribe((function(){e.propertyForm.controls.maintenancePrice.setValue(null)}))),this._subscription.add(this.propertyForm.controls.transfer.valueChanges.subscribe((function(){e.propertyForm.controls.transferPrice.setValue(null)}))),this._subscription.add(this.propertyForm.controls.consumerReporting.valueChanges.subscribe((function(){e.propertyForm.controls.consumerReportingOption.setValue(1)})))},e.prototype.createProperty=function(e){this._property=new n.NewProperty(e||null),this._property.type=this.propertyType,this._property.propertyInfo=new n.PropertyInfo(e?e.propertyInfo:null),this._property.features=new n.Features(e?e.features:null),this._property.address=new n.Address(e?e.address:null),this._property.amenities=new n.Amenities(e?e.amenities:null),this.assignBusinessRules(),e&&e.id&&(this.updateFormByProperty(),this.assignAmenities(),this.assignLocationFeatures(),this.assignCommission())},e.prototype.setValidatorOnFields=function(e,t){var r=this;0!==e.length&&e.forEach((function(e){r.propertyForm.controls[e]&&(t?(r.propertyForm.controls[e].clearValidators(),r.propertyForm.controls[e].setValidators(r._validators[e]?r._validators[e]:[]),r.propertyForm.controls[e].updateValueAndValidity()):(r.propertyForm.controls[e].clearValidators(),r.propertyForm.controls[e].setValidators(r._validators[e]?r._validators[e].concat(i.Validators.required):[i.Validators.required]),r.propertyForm.controls[e].updateValueAndValidity()))}))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-editor",template:'<form class="editor" [formGroup]="propertyForm" autocomplete="off">\r\n <div class="offering">\r\n <p class="section_label"><span>Tipo de oferta</span> <span>Información Pública</span></p>\r\n <mat-button-toggle-group class="offering__toggle" formControlName="offering">\r\n <ng-container *ngFor="let offering of offeringTypeList">\r\n <mat-button-toggle\r\n [disabled]="(propertyType === \'ROOM\' && offering.value === \'SALE\') || (propertyType === \'INVESTMENT\' && offering.value === \'RENT\')"\r\n [value]="offering.value">{{offering.name}}</mat-button-toggle>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n <ng-template [ngIf]="propertyForm.controls[\'offering\'].value === \'RENT\'">\r\n <div class="direct-debit">\r\n <mat-checkbox class="direct-debit__check-box" formControlName="consumerReporting">Domiciliación</mat-checkbox>\r\n <mat-radio-group class="direct-debit__radio-group" aria-label="Select an option"\r\n formControlName="consumerReportingOption"\r\n *ngIf="propertyForm.controls[\'consumerReporting\'].value">\r\n <mat-radio-button class="direct-debit__radio-button" [value]="1">Requerir certificado <br> de fiabilidad\r\n </mat-radio-button>\r\n <mat-radio-button class="direct-debit__radio-button" [value]="2">Requerir poliza <br> de arrendamiento\r\n </mat-radio-button>\r\n <p>\r\n Para mayor información de este servicio visite <br>\r\n <a href="https://www.burorentas.mx">\r\n www.burorentas.mx\r\n </a>\r\n </p>\r\n <mat-error *ngIf="propertyForm.controls[\'consumerReportingOption\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-radio-group>\r\n </div>\r\n </ng-template>\r\n <div class="pricing">\r\n <mat-form-field appearance="outline" class="pricing__form-field">\r\n <mat-label>Moneda</mat-label>\r\n <mat-select formControlName="currency">\r\n <ng-container *ngFor="let currency of currencyList">\r\n <mat-option [value]="currency.type">{{currency.type}}</mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-error *ngIf="propertyForm.controls[\'currency\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="pricing__form-field">\r\n <mat-label>Precio deseado</mat-label>\r\n <input libFormatPrice autocomplete="off" matInput="" type="text" title="Max price" formControlName="price"\r\n [control]="propertyForm.controls[\'price\']" [currency]="propertyForm.get(\'currency\').value">\r\n <mat-error *ngIf="propertyForm.controls[\'price\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'price\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="pricing__form-field">\r\n <mat-label>Precio mínimo</mat-label>\r\n <input libFormatPrice autocomplete="off" matInput="" type="text" title="Min price" formControlName="minPrice"\r\n [control]="propertyForm.controls[\'minPrice\']" [currency]="propertyForm.get(\'currency\').value">\r\n <mat-error *ngIf="propertyForm.controls[\'minPrice\'].hasError(\'minPriceInvalid\')">\r\n Este valor debe ser menor al precio deseado\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'minPrice\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n </mat-form-field>\r\n <div class="pricing__maintenance-fee" *ngIf="propertyType !== \'INVESTMENT\' && propertyType !== \'LAND\'">\r\n <mat-checkbox formControlName="maintenance">Tiene cuota de mantenimiento\r\n </mat-checkbox>\r\n <mat-form-field appearance="outline" class="pricing__form-field"\r\n *ngIf="propertyForm.controls[\'maintenance\'].value">\r\n <mat-label>Cuota de mantenimiento</mat-label>\r\n <input autocomplete="off" matInput type="text" libFormatPrice title="Price"\r\n [control]="propertyForm.controls[\'maintenancePrice\']"\r\n [currency]="propertyForm.get(\'currency\').value"\r\n formControlName="maintenancePrice">\r\n <mat-error *ngIf="propertyForm.controls[\'maintenancePrice\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'maintenancePrice\'].hasError(\'required\')">\r\n Esta campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="sku__maintenance-fee">\r\n <mat-form-field appearance="outline" class="sku__form-field">\r\n <mat-label>SKU</mat-label>\r\n <input matInput="" title="SKU" formControlName="sku">\r\n <mat-error *ngIf="propertyForm.controls[\'sku\'].hasError(\'pattern\')">\r\n SKU invalida\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <ng-template [ngIf]="propertyForm.controls[\'offering\'].value === \'RENT\' && propertyType !== \'INVESTMENT\'">\r\n <div class="pricing__maintenance-fee" *ngIf="propertyType !== \'ROOM\'">\r\n <mat-checkbox formControlName="transfer">Traspaso\r\n </mat-checkbox>\r\n <mat-form-field appearance="outline" class="pricing__form-field"\r\n *ngIf="propertyForm.controls[\'transfer\'].value">\r\n <mat-label>Monto por traspaso</mat-label>\r\n <input autocomplete="off" matInput type="text" libFormatPrice\r\n title="Price" [control]="propertyForm.controls[\'transferPrice\']"\r\n [currency]="propertyForm.get(\'currency\').value"\r\n formControlName="transferPrice">\r\n <mat-error *ngIf="propertyForm.controls[\'transferPrice\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'transferPrice\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <hr>\r\n <div class="address" formGroupName="address">\r\n <p class="section_label">\r\n Dirección\r\n <button mat-flat-button="" type="button" color="primary" (click)="goToSelectAddress()"\r\n class="address__label-button">\r\n COLOCAR UBICACIÓN EN EL MAPA\r\n </button>\r\n </p>\r\n <div class="address__body">\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>País</mat-label>\r\n <input autocomplete="off" matInput="" title="Country" formControlName="country">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Código postal</mat-label>\r\n <input autocomplete="off" matInput="" title="Postal code" formControlName="postalCode" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Entidad Federativa</mat-label>\r\n <input autocomplete="off" matInput="" title="State" formControlName="state">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Ciudad</mat-label>\r\n <input autocomplete="off" matInput="" title="City" formControlName="city">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Alcaldia/Municipio</mat-label>\r\n <input autocomplete="off" matInput="" title="Township" formControlName="township">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Colonia</mat-label>\r\n <input autocomplete="off" matInput="" title="Colony" formControlName="colony">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Vialidad</mat-label>\r\n <input autocomplete="off" matInput="" title="Street" formControlName="street">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Número exterior</mat-label>\r\n <input autocomplete="off" matInput="" title="No exterior" formControlName="extNumber" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Número interior</mat-label>\r\n <input autocomplete="off" matInput="" title="No interior" formControlName="intNumber" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Manzana</mat-label>\r\n <input autocomplete="off" matInput="" title="Mz" formControlName="mz" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Lote</mat-label>\r\n <input autocomplete="off" matInput="" title="Lt" formControlName="lt" type="number">\r\n </mat-form-field>\r\n <div class="address__visibility">\r\n <p class="section_label">\r\n Ubicación en el mapa\r\n </p>\r\n <div class="address__visibility-body">\r\n <mat-radio-group formControlName="visible" class="address__visibility-radio-group">\r\n <mat-radio-button class="visibility-radio-group__button" [value]="true">\r\n Mostrar dirección exacta\r\n </mat-radio-button>\r\n <mat-radio-button class="visibility-radio-group__button" [value]="false">\r\n Mostrar dirección aproximada\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n <p class="visibility__about">\r\n <span class="visibility__about-label" [ngStyle]="{\'font-weight\': propertyForm.get(\'address.visible\').value ? \'bold\' : \'normal\'}">\r\n Mostrar dirección exacta: muestra el <br> lugar preciso en el mapa con un marcador.\r\n </span>\r\n <span class="visibility__about-label" [ngStyle]="{\'font-weight\': !propertyForm.get(\'address.visible\').value ? \'bold\' : \'normal\'}">\r\n Mostrar dirección aproximada: reacomoda la ubicación en un radio de 50 metros, ocultando calle y número.\r\n </span>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <hr>\r\n \x3c!-- Features [START], Only visible for all property types except INVESTMENT --\x3e\r\n <div class="features">\r\n <p class="section_label">Caracteristicas</p>\r\n <div class="features__body">\r\n <div class="features__item" *ngIf="propertyType === \'HOUSE\' || propertyType === \'APARTMENT\'">\r\n <span class="label__icon ic-features-bedroom"></span>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Habitaciones</mat-label>\r\n <input autocomplete="off" matInput title="Bedrooms" formControlName="bedrooms" type="number">\r\n <mat-error *ngIf="propertyForm.controls[\'bedrooms\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'bedrooms\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="features__item features-item-bathrooms"\r\n *ngIf="propertyType === \'HOUSE\' || propertyType === \'APARTMENT\' || propertyType === \'ROOM\'">\r\n <span class="label__icon ic-features-bathroom"></span>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Baños</mat-label>\r\n <input autocomplete="off" title="Bathrooms" matInput formControlName="bathrooms" type="number">\r\n <mat-error *ngIf="propertyForm.controls[\'bathrooms\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'bathrooms\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="features__item features-item-parking-spaces" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <span class="label__icon ic-features-parking"></span>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Estacionamientos</mat-label>\r\n <input autocomplete="off" title="Parking spaces" matInput formControlName="parkingSpaces" type="number">\r\n <mat-error *ngIf="propertyForm.controls[\'parkingSpaces\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n \x3c!-- Surfaces [START] Only visible for property type distinct INVESTMENT--\x3e\r\n <div class="features__item features-item-surface" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <p class="features-item__label">\r\n <span class="label__icon ic-features-surface"></span>\r\n Superficie\r\n </p>\r\n <mat-radio-group class="features-item__radio-group" formControlName="unit">\r\n <mat-radio-button class="features-item__radio-button" [value]="\'M2\'">m<sup>2</sup></mat-radio-button>\r\n <mat-radio-button class="features-item__radio-button" [value]="\'FT2\'">sq ft</mat-radio-button>\r\n </mat-radio-group>\r\n \x3c!--\r\n Build area [START]\r\n Only visible for HOUSE, APARTMENT, ROOM, OFFICE, RETAIL, WAREHOUSE and LAND property types\r\n --\x3e\r\n <mat-form-field appearance="outline"\r\n *ngIf="propertyType !== \'INVESTMENT\'">\r\n <mat-label>\r\n <ng-container [ngSwitch]="propertyType">\r\n <span *ngSwitchDefault>Construida</span>\r\n <span *ngSwitchCase="\'OFFICE\'">De Oficinas</span>\r\n <span *ngSwitchCase="\'LAND\'">De Terreno</span>\r\n </ng-container>\r\n </mat-label>\r\n <input autocomplete="off" matInput="" title="Surface build" formControlName="mainArea" type="number">\r\n <span matSuffix>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'M2\'">m<sup>2</sup></span>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'FT2\'">sq ft</span>\r\n </span>\r\n <mat-error *ngIf="propertyForm.controls[\'mainArea\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'mainArea\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Build area [END] --\x3e\r\n \x3c!--\r\n Secondary build area [START]\r\n Only visible for HOUSE, and WAREHOUSE\r\n --\x3e\r\n <mat-form-field appearance="outline"\r\n *ngIf="propertyType === \'HOUSE\' || propertyType === \'WAREHOUSE\'">\r\n <mat-label>\r\n <ng-container [ngSwitch]="propertyType">\r\n <span *ngSwitchCase="\'HOUSE\'">De terreno</span>\r\n <span *ngSwitchCase="\'WAREHOUSE\'">De oficinas</span>\r\n </ng-container>\r\n </mat-label>\r\n <input autocomplete="off" matInput="" title="Surface land build" formControlName="secondaryArea" type="number">\r\n <span matSuffix>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'M2\'">m<sup>2</sup></span>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'FT2\'">sq ft</span>\r\n </span>\r\n <mat-error *ngIf="propertyForm.controls[\'secondaryArea\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Secondary build area [END]--\x3e\r\n </div>\r\n \x3c!-- Surfaces [END]--\x3e\r\n \x3c!-- Year build [START], Only visible for HOUSE, APARTMENT, ROOM, OFFICE, RETAIL and WAREHOUSE property types --\x3e\r\n <div class="features__item"\r\n *ngIf="propertyType === \'HOUSE\' || propertyType === \'APARTMENT\' || propertyType === \'ROOM\' || propertyType === \'OFFICE\' || propertyType === \'RETAIL\' || propertyType === \'WAREHOUSE\'">\r\n <p class="features-item__label">\r\n <span class="label__icon"><mat-icon>event</mat-icon></span>\r\n Año de construcción\r\n </p>\r\n <lib-property-custom-datepicker formControlName="buildIn"></lib-property-custom-datepicker>\r\n </div>\r\n \x3c!-- Year build [END] --\x3e\r\n \x3c!-- Land use [START], Only for LAND property type --\x3e\r\n <div class="features__item" *ngIf="propertyType === \'LAND\'">\r\n <p class="features-item__label">\r\n <span class="label__icon ic-features-land-use"></span>\r\n Uso de suelo\r\n </p>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Tipo</mat-label>\r\n <mat-select formControlName="landUse">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let use of landUseList">\r\n <mat-option [value]="use.value">\r\n {{use.name}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n \x3c!-- Land use [END] --\x3e\r\n </div>\r\n </div>\r\n \x3c!-- Features [END] --\x3e\r\n <hr>\r\n <div class="agreement">\r\n <p class="section_label">Contrato</p>\r\n <div class="agreement__body">\r\n <mat-form-field appearance="outline" class="agreement__form-field">\r\n <mat-label>Fecha de inicio</mat-label>\r\n <input autocomplete="off" matInput formControlName="agreementDate" [matDatepicker]="dp2"\r\n placeholder="Seleccione una fecha"\r\n title="Chose a date">\r\n <mat-datepicker-toggle matSuffix [for]="dp2"></mat-datepicker-toggle>\r\n <mat-datepicker #dp2 [disabled]="false"></mat-datepicker>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="agreement__form-field">\r\n <mat-label>Duración</mat-label>\r\n <mat-select formControlName="duration">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let time of durationList">\r\n <mat-option [value]="time">\r\n <ng-container [ngSwitch]="time">\r\n <span *ngSwitchCase="365">1 año</span>\r\n <span *ngSwitchCase="180">6 meses</span>\r\n <span *ngSwitchDefault>{{time}} días</span>\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="agreement__form-field">\r\n <mat-label>Comisión</mat-label>\r\n <mat-select formControlName="commission">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let commission of commissionList">\r\n <mat-option [value]="commission">\r\n <span *ngIf="propertyForm.controls[\'offering\'].value === \'RENT\'">\r\n <ng-container [ngSwitch]="commission">\r\n <span *ngSwitchCase="1">1 mes = {{propertyForm.controls[\'price\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}</span>\r\n <span *ngSwitchDefault>\r\n {{commission}} meses = {{propertyForm.controls[\'price\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </ng-container>\r\n </span>\r\n <span *ngIf="propertyForm.controls[\'offering\'].value === \'SALE\'">\r\n <span>{{commission * 100 | currency: \'\' : \'\': \'1.1-1\'}}\r\n % = {{propertyForm.controls[\'price\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}</span>\r\n </span>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-error *ngIf="propertyForm.controls[\'commission\'].hasError(\'commissionInvalid\')">\r\n Es necesario ingresar el precio deseado\r\n </mat-error>\r\n </mat-form-field>\r\n <ng-template [ngIf]="propertyType === \'INVESTMENT\'">\r\n <mat-form-field appearance="outline" class="investment-return__form-field">\r\n <mat-label>Retorno de Inversión</mat-label>\r\n <input autocomplete="off" matInput title="Investment return" formControlName="roi" type="number">\r\n <span matSuffix>%</span>\r\n </mat-form-field>\r\n </ng-template>\r\n <mat-checkbox class="agreement__body-check-box" formControlName="exclusivity">Contrato con exclusividad\r\n </mat-checkbox>\r\n <mat-checkbox class="agreement__body-check-box" formControlName="mlm">Quiero compartir en el {{mlsLabel || \'MLS\'}}</mat-checkbox>\r\n <mat-form-field appearance="outline" class="agreement__form-field" *ngIf="propertyForm.controls[\'mlm\'].value">\r\n <mat-label>Monto de comisión compartida</mat-label>\r\n <mat-select formControlName="sharedCommission">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let commission of sharedCommissionList">\r\n <mat-option [value]="commission">\r\n {{commission * 100}}% de mi comisión\r\n = {{propertyForm.controls[\'price\'].value * propertyForm.controls[\'commission\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-error *ngIf="propertyForm.controls[\'sharedCommission\'].hasError(\'sharedCommissionInvalid\')">\r\n Debe seleccionar su comisión\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'sharedCommission\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <hr>\r\n <div class="description">\r\n <p class="section_label">Descripción</p>\r\n <mat-form-field appearance="outline" class="description__form-field">\r\n <textarea matInput="" cdkTextareaAutosize title="Description" formControlName="description"></textarea>\r\n <mat-hint align="end"><span>Número de caracteres ideal: 3500</span>\r\n Actuales: {{propertyForm.controls[\'description\'].value ? propertyForm.controls[\'description\'].value.length : 0}}\r\n </mat-hint>\r\n <mat-error *ngIf="propertyForm.controls[\'description\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="external-link">\r\n <p class="section_label">Tour virtual</p>\r\n <mat-form-field appearance="outline" class="external-link__form-field">\r\n <input matInput="" title="externalLink" formControlName="externalLink">\r\n <mat-error *ngIf="propertyForm.controls[\'externalLink\'].hasError(\'pattern\')">\r\n Url invalida\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="notes">\r\n <p class="section_label">Notas</p>\r\n <mat-form-field appearance="outline" class="notes__form-field">\r\n <textarea matInput="" cdkTextareaAutosize title="Notes" formControlName="notes"></textarea>\r\n </mat-form-field>\r\n </div>\r\n <hr *ngIf="propertyType !== \'INVESTMENT\'">\r\n <div class="amenities" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <p class="section_label">Amenidades</p>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let amenity of amenitiesList">\r\n <span matRipple class="list-amenities__amenity" (click)="updateAmenity(amenity)">\r\n <span class="amenity__icon ic-amenities-{{amenity.iconName}}"\r\n [ngClass]="{\'amenity__icon-active\': amenity.checked}"></span>\r\n <span class="amenity__text">{{amenity.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n <div class="attributes" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <p class="section_label">Caracteristicas de ubicación</p>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let feature of featuresList">\r\n <span matRipple class="list-amenities__amenity" (click)="updateAmenity(feature)">\r\n <span class="amenity__icon ic-amenities-{{feature.iconName}}"\r\n [ngClass]="{\'amenity__icon-active\': feature.checked}"></span>\r\n <span class="amenity__text">{{feature.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n <button type="submit" class="button-submit" mat-button #btnSubmit>Enviar</button>\r\n</form>\r\n',providers:[{provide:y.MAT_DATE_LOCALE,useValue:"es-MX"},{provide:y.DateAdapter,useClass:x.MomentDateAdapter,deps:[y.MAT_DATE_LOCALE,x.MAT_MOMENT_DATE_ADAPTER_OPTIONS]},{provide:y.MAT_DATE_FORMATS,useValue:Re}],styles:[":host{display:block;width:100%}.section_label{font-weight:700;display:flex;justify-content:space-between}.address__label-button{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.offering{margin-bottom:8px}.direct-debit{margin:16px 0;display:flex}.direct-debit__check-box{margin-top:4px}.direct-debit__radio-group{display:inline-block;margin:0 0 0 32px}@media screen and (max-width:600px){.section_label{flex-direction:column}.section_label :last-child{margin-top:16px}.direct-debit{flex-direction:column;align-items:flex-start}.direct-debit__radio-group{margin:16px 0 0}}.direct-debit__radio-button{margin-right:16px}.pricing{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3))}@media screen and (max-width:600px){.pricing{-ms-grid-columns:100%;grid-template-columns:100%}}@media screen and (min-width:1800px){.pricing{-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}}.agreement__body{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[2];grid-template-columns:repeat(2,calc(100% / 3))}@media screen and (max-width:600px){.agreement__body{-ms-grid-columns:100%;grid-template-columns:100%}}@media screen and (min-width:1800px){.agreement__body{-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}}.agreement__body-check-box{margin-bottom:16px;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3}.address__body{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}@media screen and (max-width:600px){.agreement__body-check-box{-ms-grid-column-span:auto;grid-column-end:auto}.address__body{-ms-grid-columns:100%;grid-template-columns:100%}}@media screen and (min-width:1800px){.address__body{-ms-grid-columns:(calc(100% / 5))[4];grid-template-columns:repeat(4,calc(100% / 5))}}.features__body{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 2))[2];grid-template-columns:repeat(2,calc(100% / 2))}.features-item__label{display:flex;align-items:center;margin:0;padding:8px 0}.features-item__radio-group{display:block;margin:8px 0}.features-item__radio-button{margin-right:16px}.features-item-bathrooms,.features-item-parking-spaces{-ms-grid-column:1;grid-column-start:1}.features-item-surface{-ms-grid-column:2;grid-column-start:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:2;grid-row-end:3}.address__form-field,.agreement__form-field,.description__form-field,.external-link__form-field,.notes__form-field,.pricing__form-field{width:95%;margin:0 auto 0 0}@media screen and (max-width:600px){.features__body{-ms-grid-columns:100%;grid-template-columns:100%}.features-item-surface{-ms-grid-column:auto;grid-column-start:auto;-ms-grid-row:auto;grid-row-start:auto;-ms-grid-row-span:NaN;grid-row-end:auto}.address__form-field,.agreement__form-field,.description__form-field,.external-link__form-field,.notes__form-field,.pricing__form-field{width:100%;margin:0}}.pricing__maintenance-fee{display:flex;align-items:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3}.pricing__maintenance-fee :first-child{margin:0 16px 0 0}@media screen and (max-width:600px){.pricing__maintenance-fee{flex-direction:column;align-items:start;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:NaN;grid-column-end:auto}.pricing__maintenance-fee :first-child{margin:0 0 16px}}.address__visibility{-ms-grid-row:4;grid-row-start:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:4;grid-column-end:5}.address__visibility-body{display:flex}.address__visibility-radio-group{display:block;margin-right:16px}.visibility-radio-group__button{margin-bottom:16px;display:block}.visibility__about{margin:0}.visibility__about-label{display:block;padding:0 8px 8px;font-size:14px}.label__icon{width:24px;height:24px;font-size:24px;color:#707070;margin-right:8px}.amenities,.attributes{width:50%;display:inline-block}@media screen and (max-width:600px){.address__visibility{-ms-grid-row:auto;grid-row-start:auto;-ms-grid-column:auto;grid-column-start:auto;-ms-grid-column-span:NaN;grid-column-end:auto}.address__visibility-body{flex-direction:column}.amenities,.attributes{width:100%;display:block}}.amenities__list-amenities{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3))}.list-amenities__amenity{display:flex;flex-direction:column;justify-content:space-between;align-items:center;cursor:pointer;width:100px;padding:4px;box-sizing:border-box;border-radius:8px;margin:8px auto 0;text-align:center}.amenity__icon{width:24px;height:24px;font-size:24px;background:#707070;border-radius:50%;padding:8px;color:#fff;display:block;margin:0 auto}.amenity__text{padding:8px;box-sizing:border-box;display:block;font-size:12px}.button-submit{display:none}"]}]}],e.ctorParameters=function(){return[{type:i.FormBuilder},{type:p.DialogService},{type:y.DateAdapter}]},e.propDecorators={_btnSubmitRef:[{type:t.ViewChild,args:["btnSubmit",{static:!0,read:t.ElementRef}]}],utils:[{type:t.Input}],address:[{type:t.Input}],propertyType:[{type:t.Input}],property:[{type:t.Input}],mlsLabel:[{type:t.Input}],editorInstance:[{type:t.Output}],selectAddress:[{type:t.Output}]},e}();function Be(e){return function(t){if(t.parent){var r=t.parent.controls[e];if(!t.value&&!r.value)return he(r,"phoneFieldsError"),null;if(""===t.value||r.value&&""!==r.value||r.setErrors({phoneFieldsError:!0}),r.value&&""!==r.value&&(!t.value||""===t.value))return{phoneFieldsError:!0}}return null}}var ze=function(){function e(e){this._formBuilder=e,this.ownerInstance=new t.EventEmitter,this.ownerForm=this._formBuilder.group({name:[],lastName:[],email:["",[i.Validators.email]],code:["",[Be("phone")]],phone:["",[Be("code"),i.Validators.maxLength(13),i.Validators.minLength(8),i.Validators.pattern(new RegExp(/^[0-9]\d*$/))]],address:[]}),this.createOwner()}return e.prototype.ngOnChanges=function(e){e.disabled&&this.ownerForm.disable(),e.owner&&e.owner.currentValue&&this.createOwner(e.owner.currentValue)},e.prototype.ngAfterViewInit=function(){this.ownerInstance.emit(this)},e.prototype.onCodePhoneChanged=function(e){this.ownerForm.controls.code.setValue(e?e.code:"")},e.prototype.getOwner=function(){return this.updateOwnerByForm(this.ownerForm.value),this._owner},e.prototype.updateOwnerByForm=function(e){this._owner.name=e.name,this._owner.lastName=e.lastName,this._owner.email=e.email,this._owner.phone=e.phone,this._owner.codePhone=e.code?e.code.replace("+",""):"",this._owner.address=e.address},e.prototype.updateFormByOwner=function(){this.ownerForm.patchValue({name:this._owner.name,lastName:this._owner.lastName,email:this._owner.email,phone:this._owner.phone,code:this._owner.codePhone?"+"+this._owner.codePhone:"",address:this._owner.address})},e.prototype.createOwner=function(e){this._owner=new n.Owner(e||null),e&&this.updateFormByOwner()},e.decorators=[{type:t.Component,args:[{selector:"lib-property-owner-info",template:'<div class="owner-info">\r\n <p class="title">Propietario</p>\r\n <form class="owner-info__form" [formGroup]="ownerForm" autocomplete="off">\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Nombre(s)</mat-label>\r\n <input autocomplete="off" title="Name" type="text" matInput formControlName="name">\r\n </mat-form-field>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Apellido(s)</mat-label>\r\n <input autocomplete="off" title="Last name" type="text" matInput formControlName="lastName">\r\n </mat-form-field>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Email</mat-label>\r\n <input autocomplete="off" title="Email" type="email" matInput formControlName="email">\r\n <mat-error *ngIf="ownerForm.controls[\'email\'].hasError(\'email\')">\r\n Dirección de correo no válida\r\n </mat-error>\r\n </mat-form-field>\r\n <div class="field-phone">\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Código</mat-label>\r\n <input autocomplete="off" libCountryCode formControlName="code" (countrySelected)="onCodePhoneChanged($event)" title="Code number"\r\n type="text" matInput>\r\n <mat-error *ngIf="ownerForm.controls[\'code\'].hasError(\'phoneFieldsError\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Teléfono</mat-label>\r\n <input autocomplete="off" title="Phone" type="text" matInput formControlName="phone">\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'phoneFieldsError\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'maxlength\')">\r\n El número de teléfono no debe tener menos de 8 ni más de 13 números\r\n </mat-error>\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'minlength\')">\r\n El número de teléfono no debe tener menos de 8 ni más de 13 números\r\n </mat-error>\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'pattern\')">\r\n Este campo solo admite números\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Dirección</mat-label>\r\n <textarea title="Address" cdkTextareaAutosize type="text" matInput\r\n formControlName="address"></textarea>\r\n </mat-form-field>\r\n </form>\r\n</div>\r\n',styles:[":host{display:block;width:100%;padding:16px;box-sizing:border-box}.title{padding:8px;margin:0;font-weight:700}.owner-info__form{width:100%;display:-ms-grid;display:grid;-ms-grid-columns:(50%)[2];grid-template-columns:repeat(2,50%)}@media screen and (max-width:600px){.owner-info__form{-ms-grid-columns:(100%)[1];grid-template-columns:repeat(1,100%)}}.form__field{padding:8px;box-sizing:border-box}.field-phone{display:flex;justify-content:space-between}.field-phone .form__field:first-child{width:30%}.field-phone .form__field:last-child{width:70%}"]}]}],e.ctorParameters=function(){return[{type:i.FormBuilder}]},e.propDecorators={owner:[{type:t.Input}],disabled:[{type:t.Input}],ownerInstance:[{type:t.Output}]},e}(),Ve=function(){function e(e,r,n){this._visor=e,this._snackBar=r,this._http=n,this.documentsInstance=new t.EventEmitter,this.documents=W.DocumentsList.map((function(e){return z({},e)})),this._newMedia=[],this._files=[]}return e.prototype.ngAfterViewInit=function(){this.documentsInstance.emit(this)},e.prototype.ngOnChanges=function(e){e.files&&e.files.currentValue&&(this._files=e.files.currentValue||[],this.validateDocumentsLoaded())},e.prototype.getDocuments=function(){return{documents:this._files,newMedia:this._newMedia}},e.prototype.openFile=function(e){var t=this.getPFileByType(e),r=this.getUserMediaByType(e);r?this._visor.open(r.url):t?this.openBlobFile(t.fileCS.thumbnail):t||r||this._snackBar.setMessage("Este documento no ha sido añadido","OK",2500,"left")},e.prototype.onUploadFile=function(e,t){var r=t.value.toString().toLowerCase();t.loaded&&this.updateDocument(r),t.loaded=!0;var i=new n.PFile;i.type=t.value,e.type=t.value,i.media=!1;var o=r+"_"+(new Date).getTime()+".pdf";i.name=o,e.name=o,i.fileCS={thumbnail:e.url,blobName:null},this._files.push(i),this._newMedia.push(e)},e.prototype.openBlobFile=function(e){var t=this;this.downloadFile(e).subscribe((function(e){t._visor.open(e)}))},e.prototype.updateDocument=function(e){var t=-1,r=null;this._files.forEach((function(n,i){n.name===e&&(r=n,t=i)})),t>-1&&this._files.splice(t,1),r&&(t=-1,this._newMedia.forEach((function(e,n){e.name===r.name&&(t=n)})),t>-1&&this._newMedia.splice(t,1))},e.prototype.validateDocumentsLoaded=function(){var e=this;this._files&&0!==this._files.length&&this._files.forEach((function(t){return e.documents.forEach((function(e){e.value===t.type&&(e.loaded=!0)}))}))},e.prototype.getPFileByType=function(e){var t=null;return this.files&&0!==this.files.length?(this.files.forEach((function(r){r.type===e&&(t=r)})),t):t},e.prototype.getUserMediaByType=function(e){var t=null;return this._newMedia&&0!==this._newMedia.length?(this._newMedia.forEach((function(r){r.type===e&&(t=r)})),t):t},e.prototype.downloadFile=function(e){return this._http.get(e,{responseType:"arraybuffer"}).pipe(_.map((function(e){var t=new Blob([e],{type:"application/pdf"});return URL.createObjectURL(t)})))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-documents",template:'<div class="documents">\r\n <p class="title">Documentación</p>\r\n <div class="documents__body">\r\n <ng-container *ngFor="let doc of documents">\r\n <div class="body__document-item">\r\n <lib-upload-file [content]="buttonTemplate" [fab]="true" [fileType]="\'document\'"\r\n [disabled]="disabled"\r\n (loadImage)="onUploadFile($event, doc)">\r\n <ng-template #buttonTemplate>\r\n <button mat-icon-button color="primary" class="document-item__button" [disabled]="disabled">\r\n \x3c!-- Document not uploaded on create/edit property --\x3e\r\n <ng-template [ngIf]="!doc.loaded && !disabled">\r\n <mat-icon>cloud_upload</mat-icon>\r\n </ng-template>\r\n \x3c!-- Document not uploaded on property record --\x3e\r\n <ng-template [ngIf]="!doc.loaded && disabled">\r\n <span class="button__icon ic-component-property-unloaded-file"></span>\r\n </ng-template>\r\n \x3c!-- Document uploaded on property record --\x3e\r\n <ng-template [ngIf]="doc.loaded && disabled">\r\n <mat-icon [ngClass]="{\'document-item__icon--loaded\': doc.loaded && disabled}">description\r\n </mat-icon>\r\n </ng-template>\r\n \x3c!-- Document uploaded on property --\x3e\r\n <ng-template [ngIf]="doc.loaded && !disabled">\r\n <span class="button__icon ic-component-property-update-file"></span>\r\n </ng-template>\r\n </button>\r\n </ng-template>\r\n </lib-upload-file>\r\n <p class="document-item__label"\r\n [ngClass]="{\'document-item__label--disabled\': !doc.loaded, \'mat-elevation-z2\': doc.loaded}"\r\n matRipple (click)="openFile(doc.value)">\r\n {{doc.name}}\r\n </p>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block;width:100%;padding:0 16px 16px;box-sizing:border-box}.title{margin:0;padding:8px;font-weight:700}.documents__body{display:-ms-grid;display:grid;-ms-grid-columns:(50%)[2];grid-template-columns:repeat(2,50%)}@media screen and (max-width:600px){.documents__body{-ms-grid-columns:100%;grid-template-columns:100%}}.body__document-item{display:flex;padding:8px;box-sizing:border-box}.document-item__button{margin-right:8px}.button__icon{display:inline-block;width:24px;height:24px;font-size:24px}.document-item__label{width:100%;background:#fff;border-radius:8px;padding:8px;margin:0;cursor:pointer}"]}]}],e.ctorParameters=function(){return[{type:ae},{type:v.SnackBarService},{type:w.HttpClient}]},e.propDecorators={files:[{type:t.Input}],disabled:[{type:t.Input}],documentsInstance:[{type:t.Output}]},e}(),Ue=function(){function e(e){this._sanitizer=e,this.amenities=[],this.features=[]}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.property&&e.property.currentValue&&(this.property=e.property.currentValue,this.searchPropertyType(),this.createAmenities(),this.createFeatures(),this.validateAgreement())},e.prototype.getTourUrl=function(){return this._sanitizer.bypassSecurityTrustResourceUrl(this.property.externalLink)},e.prototype.validateAgreement=function(){if(this.property.propertyInfo.listingAgreementStartDate&&this.property.propertyInfo.listingAgreementTime){var e=new j(this.property.propertyInfo.listingAgreementStartDate).toDate();e.setDate(e.getDate()+this.property.propertyInfo.listingAgreementTime),this.agreementEndDate=j.getTimestamp(e)}},e.prototype.searchPropertyType=function(){var e=this;W.PropertyTypeList.forEach((function(t){e.property.type===t.value&&(e.propertyType=t)}))},e.prototype.createAmenities=function(){var e=this;this.amenities=[];var t=[];W.PropertyTypeList.forEach((function(r){r.value===e.property.type&&(t=r.amenities)})),t.length>0&&t.forEach((function(t){e.property.amenities[t.value]&&e.amenities.push(t)}))},e.prototype.createFeatures=function(){var e=this;this.features=[];var t=[];W.PropertyTypeList.forEach((function(r){r.value===e.property.type&&(t=r.features)})),t.length>0&&t.forEach((function(t){e.property.amenities[t.value]&&e.features.push(t)}))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-details",template:'<div class="info" *ngIf="property">\r\n <h1 class="title">\r\n <span class="title__address">\r\n \x3c!--\r\n Address visible\r\n Street #Ext Int. Lt Mz, Colony, PostalCode, Township, City, State, Country\r\n Address hidden\r\n Colony, PostalCode, Township, City, State, Country\r\n --\x3e\r\n <ng-template [ngIf]="property.address.visible">\r\n {{property.address.street}}\r\n <span *ngIf="property.address.outdoorNumber">#{{property.address.outdoorNumber}} </span>\r\n <span *ngIf="property.address.interiorNumber">Int. {{property.address.interiorNumber}} </span>\r\n <span *ngIf="property.address.lt">Lt. {{property.address.lt}} </span>\r\n <span *ngIf="property.address.mz">Mz. {{property.address.mz}} </span>\r\n </ng-template>\r\n <span *ngIf="property.address.colony">{{property.address.colony}}, </span>\r\n <span *ngIf="property.address.postalCode">{{property.address.postalCode}}, </span>\r\n <span *ngIf="property.address.township">{{property.address.township}}, </span>\r\n <span *ngIf="property.address.city">{{property.address.city}}, </span>\r\n <span *ngIf="property.address.state">{{property.address.state}}, </span>\r\n <span *ngIf="property.address.country">{{property.address.country}}</span>\r\n <span *ngIf="!property.address.visible" class="address-street__hidden"><br> Dirección aproximada</span>\r\n </span>\r\n <span class="title__property-offering">\r\n <span class="title__property-offering-price">\r\n <ng-template [ngIf]="currencyConverted" [ngIfElse]="realPrice">\r\n {{currencyConverted.price | currency : \'\' : \'symbol\' : \'1.0-0\'}} {{currencyConverted.currency}}\r\n <br>\r\n <span class="property-offering-price__info-currency"><mat-icon class="info-currency__icon">info</mat-icon> Precio convertido <br> aproximado</span>\r\n </ng-template>\r\n <ng-template #realPrice>\r\n {{property.price | currency : \'\' : \'symbol\' : \'1.0-0\'}} {{property.currency}}\r\n </ng-template>\r\n </span>\r\n <ng-template [ngIf]="currencyConverted">\r\n <br>\r\n <span>{{property.price | currency : \'\' : \'symbol\' : \'1.0-0\'}} {{property.currency}}</span>\r\n <br>\r\n <span class="property-offering-price__info-currency"><mat-icon class="info-currency__icon">info</mat-icon> Precio publicado</span>\r\n </ng-template>\r\n <br>\r\n <div class="div__title-sku">\r\n <div>\r\n <span\r\n class="ic-property-{{propertyType.iconName}}">\r\n </span>{{property.type | propertyType}} {{property.offering | offeringType}}\r\n </div>\r\n <ng-template [ngIf]="property.sku !== \'\' && property.sku">\r\n <span class="title__sku">\r\n SKU: {{property.sku}}\r\n </span>\r\n </ng-template>\r\n </div>\r\n </span>\r\n </h1>\r\n <hr class="divider">\r\n <section class="features">\r\n <ng-template [ngIf]="property.features.bedrooms && property.features.bedrooms > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-bedroom"></span>\r\n <span class="features__item-text">{{property.features.bedrooms}}</span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.bathrooms && property.features.bathrooms > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-bathroom"></span>\r\n <span class="features__item-text">{{property.features.bathrooms}}</span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.mainArea && property.features.mainArea > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-surface"></span>\r\n <span class="features__item-text">\r\n {{property.features.mainArea}}\r\n <span>m<sup>2</sup></span>\r\n </span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.parkingSpaces && property.features.parkingSpaces > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-parking"></span>\r\n <span class="features__item-text">{{property.features.parkingSpaces}}</span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.roi && property.features.roi > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-roi"></span>\r\n <span class="features__item-text">{{property.features.roi}}</span>\r\n </p>\r\n </ng-template>\r\n </section>\r\n <section class="description">\r\n <h2 class="sub-title">\r\n Descripción\r\n </h2>\r\n <p class="description__body">\r\n {{property.description}}\r\n </p>\r\n </section>\r\n <ng-template [ngIf]="property.externalLink && visibleTour">\r\n <hr class="divider">\r\n <section class="external-link">\r\n <h2 class="sub-title">\r\n Tour virtual\r\n </h2>\r\n <iframe class="external-link__body" [src]="getTourUrl()"></iframe>\r\n </section>\r\n </ng-template>\r\n <ng-template [ngIf]="record">\r\n <hr class="divider">\r\n <section class="agreement">\r\n <h2 class="sub-title">\r\n Contrato\r\n </h2>\r\n <p class="agreement__body">\r\n <span class="agreement__body-filed">\r\n <span class="agreement__body-field-title">\r\n Exclusividad de contrato\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{property.propertyInfo.exclusivity ? \'Si\' : \'No\'}}\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed" *ngIf="property.propertyInfo.listingAgreementStartDate">\r\n <span class="agreement__body-field-title">\r\n Fecha de inicio de contrato\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{property.propertyInfo.listingAgreementStartDate | libFormatDate : true : \'dd/MM/yyyy\'}}\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed" *ngIf="agreementEndDate">\r\n <span class="agreement__body-field-title">\r\n Fecha de termino de contrato\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{agreementEndDate | libFormatDate : true : \'dd/MM/yyyy\'}}\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed" *ngIf="property.propertyInfo.commission">\r\n <span class="agreement__body-field-title">\r\n Comisión\r\n </span>\r\n <span class="agreement__body-field-content">\r\n <span *ngIf="property.offering === \'RENT\'">{{property.propertyInfo.commission}} meses</span>\r\n <span *ngIf="property.offering === \'SALE\'">{{property.propertyInfo.commission * 100}}%</span>\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed">\r\n <span class="agreement__body-field-title">\r\n Anunciada en el {{mlsLabel || \'MLS\'}}\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{property.propertyInfo.mls ? \'Si\' : \'No\'}}\r\n </span>\r\n </span>\r\n </p>\r\n </section>\r\n <hr class="divider">\r\n <section class="private-features">\r\n <h2 class="sub-title">\r\n Caracteristicas\r\n </h2>\r\n <p class="private-features__body">\r\n <span class="private-features__body-filed" *ngIf="property.propertyInfo.lowestPrice">\r\n <span class="private-features__body-field-title">\r\n Precio minimo\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.propertyInfo.lowestPrice | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.features.condominiumFeePrice">\r\n <span class="private-features__body-field-title">\r\n Cuota de mantenimiento\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.features.condominiumFeePrice | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.propertyInfo.leaseTransferPrice">\r\n <span class="private-features__body-field-title">\r\n Traspaso\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.propertyInfo.leaseTransferPrice | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.features.builtIn">\r\n <span class="private-features__body-field-title">\r\n Año de construcción\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.features.builtIn}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.features.roi">\r\n <span class="private-features__body-field-title">\r\n Retorno de inversión\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.features.roi}}\r\n </span>\r\n </span>\r\n </p>\r\n </section>\r\n <ng-template [ngIf]="property.propertyInfo.consumerReporting && property.propertyInfo.consumerReporting !== 0">\r\n <hr class="divider">\r\n <section class="buro-rentas">\r\n <h2 class="sub-title">\r\n Buró Rentas\r\n </h2>\r\n <p class="private-features__body" *ngIf="property.propertyInfo.consumerReporting === 1">Requerir certificado de\r\n fiabiidad\r\n </p>\r\n <p class="private-features__body" *ngIf="property.propertyInfo.consumerReporting === 2">Requerir poliza de\r\n arrendamiento\r\n </p>\r\n </section>\r\n </ng-template>\r\n <ng-template [ngIf]="property.propertyInfo.notes">\r\n <hr class="divider">\r\n <section class="notes">\r\n <h2 class="sub-title">\r\n Notas\r\n </h2>\r\n <p class="notes__body">{{property.propertyInfo.notes}}</p>\r\n </section>\r\n </ng-template>\r\n </ng-template>\r\n <hr class="divider">\r\n <section class="indications">\r\n <h2 class="sub-title">\r\n Indicaciones\r\n </h2>\r\n <div class="indications__body">\r\n <a class="indications__body-item-link"\r\n href="https://www.google.com/maps/dir/?api=1&destination={{property.address.location.latitude}},{{property.address.location.longitude}}"\r\n [target]="\'_blank\'">\r\n <p matRipple class="indications__body-item">\r\n <span class="indications__body-item-icon ic-component-property-marker"></span>\r\n <span class="indications__body-item-text">¿COMO LLEGAR?</span>\r\n </p>\r\n </a>\r\n <a class="indications__body-item-link"\r\n href="https://www.google.com/maps/@?api=1&map_action=pano&viewpoint={{property.address.location.latitude}},{{property.address.location.longitude}}"\r\n [target]="\'_blank\'">\r\n <p matRipple class="indications__body-item">\r\n <span class="indications__body-item-icon ic-component-property-streetview"></span>\r\n <span class="indications__body-item-text">VISTA DE LA CALLE</span>\r\n </p>\r\n </a>\r\n </div>\r\n </section>\r\n <hr class="divider">\r\n <ng-template [ngIf]="amenities && amenities.length > 0">\r\n <section class="amenities">\r\n <h2 class="sub-title">Amenidades</h2>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let amenity of amenities">\r\n <span matRipple class="list-amenities__amenity">\r\n <span class="amenity__icon ic-amenities-{{amenity.iconName}}"></span>\r\n <span class="amenity__text">{{amenity.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </section>\r\n </ng-template>\r\n <ng-template [ngIf]="features && features.length > 0">\r\n <section class="amenities">\r\n <h2 class="sub-title">Caracteristicas de la zona</h2>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let feature of features">\r\n <span matRipple class="list-amenities__amenity">\r\n <span class="amenity__icon ic-amenities-{{feature.iconName}}"></span>\r\n <span class="amenity__text">{{feature.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </section>\r\n </ng-template>\r\n</div>\r\n',styles:[":host{display:block;width:100%}.divider{border:none;border-bottom:1px solid}.title{display:flex;font-size:18px;color:#707070;font-weight:400}.sub-title{margin:0;font-size:18px;padding:0 16px 16px 0}.title>span:first-child{width:60%}@media screen and (max-width:600px){.title{flex-direction:column}.title>span:first-child{width:100%}}.title>span:last-child{width:40%}.div__title-sku{display:flex;flex-direction:column}.title__sku{margin-bottom:2%}.address-street__hidden{font-size:12px}.title__property-offering{text-align:right}@media screen and (max-width:600px){.title>span:last-child{width:100%}.title__property-offering{text-align:left;margin:16px 0}}.title__property-offering-price{font-size:26px;font-weight:700}.property-offering-price__info-currency{font-size:12px;display:inline-block;margin:4px 0}.info-currency__icon{width:12px;height:12px;font-size:12px}.features{padding:8px 0;display:flex;align-items:center}.features__item{width:auto;margin:0 24px 0 0;display:flex;justify-content:center;align-items:center;position:relative}.features__item:last-child:after{content:none}.features__item-text{font-size:16px;display:inline-block}.features__item-icon{display:inline-block;font-size:24px;width:24px;height:24px;margin-right:8px}.agreement,.buro-rentas,.description,.external-link,.indications,.notes,.private-features{display:flex;padding:16px 0}.indications__body{display:flex}.indications__body-item-link{color:inherit;text-decoration:none}.indications__body-item{padding:8px;margin:0 16px 0 0;border-radius:8px;cursor:pointer}.indications__body-item-icon{margin:auto;padding:8px;border-radius:8px;display:block;font-size:24px;width:24px;height:24px}.indications__body-item-text{display:block;text-align:center;font-size:12px;margin:6px 0}.agreement__body,.description__body,.notes__body,.private-features__body{width:75%;margin:0 0 0 auto}@media screen and (max-width:600px){.agreement,.buro-rentas,.description,.external-link,.indications,.notes,.private-features{flex-direction:column;align-items:start}.agreement__body,.description__body,.notes__body,.private-features__body{width:100%;margin:0}}.external-link__body{width:75%;height:280px;border-radius:16px;margin-left:20px}@media screen and (max-width:600px){.external-link__body{width:100%;margin:0}}.agreement__body-filed,.private-features__body-filed{display:block;padding:8px 0}.agreement__body-field-content,.agreement__body-field-title,.private-features__body-field-content,.private-features__body-field-title{width:50%;display:inline-block}.amenities__list{width:50%;display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}.amenities,.attributes{width:50%;display:inline-block}@media screen and (max-width:600px){.amenities,.attributes{width:100%;display:block}}.amenities__list-amenities{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}.list-amenities__amenity{display:flex;flex-direction:column;align-items:center;cursor:pointer;padding:4px;box-sizing:border-box;border-radius:8px;text-align:center}.amenity__icon{width:24px;height:24px;font-size:24px;border-radius:50%;padding:8px;display:block;margin:8px}.amenity__text{padding:8px;box-sizing:border-box;display:block;font-size:12px}"]}]}],e.ctorParameters=function(){return[{type:C.DomSanitizer}]},e.propDecorators={record:[{type:t.Input}],currencyConverted:[{type:t.Input}],property:[{type:t.Input}],mlsLabel:[{type:t.Input}],visibleTour:[{type:t.Input}]},e}(),He=function(){function e(e){this._render=e,this.currentIndex=new t.EventEmitter,this.index=this.initialIndex||0,this.multimedia=[]}return e.prototype.ngAfterViewInit=function(){this.currentIndex.emit(this.index)},e.prototype.ngOnChanges=function(e){e.selectIndex&&void 0!==e.selectIndex.currentValue&&null!==e.selectIndex.currentValue&&this.moveImageByIndex(e.selectIndex.currentValue),e.multimedia&&e.multimedia.currentValue&&(this.multimedia=e.multimedia.currentValue||[],this.multimedia.length>0&&(this.count=this.multimedia.length,this.moveImageByIndex(this.initialIndex||0),this.validateHTTPS()))},e.prototype.moveImage=function(e){this.index=e?this.index+1:this.index-1,this.index===this.multimedia.length&&(this.index=0),this.currentIndex.emit(this.index),this._render.setStyle(this._slider.nativeElement,"margin-left","-"+100*this.index+"%")},e.prototype.moveImageByIndex=function(e){this.index=e,this.index===this.multimedia.length&&(this.index=0),this.currentIndex.emit(this.index),this._render.setStyle(this._slider.nativeElement,"margin-left","-"+100*this.index+"%")},e.prototype.validateHTTPS=function(){this.multimedia.forEach((function(e){-1===e.fileCS.thumbnail.indexOf("https")&&(e.fileCS.thumbnail=e.fileCS.thumbnail.replace("http","https"))}))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-slide-show",template:'<div class="slide-show">\r\n <div class="slide-show__actions">\r\n <ng-container [ngTemplateOutlet]="customActions"></ng-container>\r\n <p class="actions__count" *ngIf="multimedia && multimedia.length > 0">\r\n {{index + 1}}/{{count}}\r\n </p>\r\n </div>\r\n <button mat-button="" class="button-previous" [ngClass]="{\'disabled\':index===0}" [disabled]="index===0"\r\n (click)="moveImage()">\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n </button>\r\n <ul class="images-list" #slider [ngStyle]="{\'width\':\'calc(100% *\' + count + \')\'}">\r\n <ng-template [ngIf]="multimedia && multimedia.length > 0">\r\n <ng-container *ngFor="let m of multimedia">\r\n <li class="images-item" [ngStyle]="{\'width\':\'calc(100% /\' + count + \')\'}">\r\n <ng-container [ngSwitch]="m.type">\r\n <ng-container *ngSwitchCase="\'IMAGE\'">\r\n <img class="images-item__img" [src]="m.fileCS.thumbnail" alt="Property image">\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'SPHERIC\'">\r\n <lib-panorama-visor class="images-item__panorama" [url]="m.fileCS.thumbnail"></lib-panorama-visor>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'VIDEO\'">\r\n <iframe class="images-item__video"\r\n [src]="\'https://www.youtube.com/embed/\' + m.fileCS.thumbnail | safeUrl"></iframe>\r\n </ng-container>\r\n </ng-container>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]="multimedia && multimedia.length === 0">\r\n <div class="no-items"></div>\r\n </ng-template>\r\n </ul>\r\n <button mat-button="" class="button-next" [disabled]="multimedia.length === 0" (click)="moveImage(true)">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n</div>\r\n',styles:[":host{display:block;position:relative;width:100%;padding-bottom:calc(100% / 4 * 3)}.slide-show{width:100%;height:100%;overflow:hidden;position:absolute}.slide-show__actions{position:absolute;bottom:0;left:0;right:0;width:100%;color:#fff;padding:8px 24px;z-index:2;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;background:linear-gradient(transparent,rgba(0,0,0,.4))}.actions__count{margin:4px 0 0 8px;font-size:14px}.images-list{width:100%;height:100%;list-style:none;padding:0;margin:0;display:flex;overflow:hidden;transition:250ms}.images-item{width:100%;height:100%}.images-item__img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;border-radius:8px}.images-item__panorama,.images-item__video{width:100%;height:100%;border:0;border-radius:8px}.button-next,.button-previous{position:absolute;min-width:30px;width:30px;height:80px;padding:0;z-index:1;color:#fff;top:calc(50% - 40px);background:rgba(0,0,0,.3)}.button-next mat-icon,.button-previous mat-icon{width:30px;height:30px;font-size:30px}.button-next:hover,.button-previous:hover{color:#000;background:#fff}.disabled{color:#d3d3d3}.button-previous{left:0;border-radius:0 16px 16px 0}.button-next{right:0;border-radius:16px 0 0 16px}.no-items{width:100%;height:100%;border-radius:8px}"]}]}],e.ctorParameters=function(){return[{type:t.Renderer2}]},e.propDecorators={customActions:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]},{type:t.Input}],_slider:[{type:t.ViewChild,args:["slider",{static:!0}]}],multimedia:[{type:t.Input}],selectIndex:[{type:t.Input}],initialIndex:[{type:t.Input}],currentIndex:[{type:t.Output}]},e}(),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function r(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.format=function(e,t){return e.getFullYear().toString()},t}(y.NativeDateAdapter),Ge=function(){function e(e,t,r,n){this._calendar=e,this._dateAdapter=t,this._dateFormats=r,this._destroyed=new o.Subject,e.stateChanges.pipe(_.takeUntil(this._destroyed)).subscribe((function(){return n.markForCheck()}))}return e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},Object.defineProperty(e.prototype,"periodLabel",{get:function(){var e=this._dateAdapter.format(this._calendar.activeDate,"YYYY");return Number(e)-23+" - "+e},enumerable:!0,configurable:!0}),e.prototype.previousClicked=function(){this._calendar.activeDate=this._dateAdapter.addCalendarYears(this._calendar.activeDate,-23)},e.prototype.nextClicked=function(){this._calendar.activeDate=this._dateAdapter.addCalendarYears(this._calendar.activeDate,23)},e.decorators=[{type:t.Component,args:[{selector:"lib-property-custom-datepicker-header",template:'<div class="header">\r\n <span>{{ periodLabel }}</span>\r\n <span>\r\n <button mat-icon-button (click)="previousClicked()">\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n </button>\r\n <button mat-icon-button (click)="nextClicked()">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n </span>\r\n</div>\r\n',styles:[".header{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:flex;justify-content:space-between;align-items:center;padding:8px;box-sizing:border-box}"]}]}],e.ctorParameters=function(){return[{type:A.MatCalendar},{type:y.DateAdapter},{type:void 0,decorators:[{type:t.Inject,args:[y.MAT_DATE_FORMATS]}]},{type:t.ChangeDetectorRef}]},e}(),qe={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"YYYY",monthYearA11yLabel:"YYYY"}},Ye=function(){function e(e){this._injector=e,this.customHeader=Ge,this.currentYear=new Date,this.year=""}return e.prototype.ngAfterViewInit=function(){this._control=this._injector.get(i.NgControl),this._control.valueAccessor=this},e.prototype.onYearSelected=function(e,t){t.close(),this.year=e,this._control.control.patchValue(e)},e.prototype.registerOnChange=function(e){},e.prototype.registerOnTouched=function(e){},e.prototype.writeValue=function(e){void 0!==e&&(this.year=e)},e.decorators=[{type:t.Component,args:[{selector:"lib-property-custom-datepicker",template:'<mat-form-field appearance="outline">\r\n <mat-label>Año</mat-label>\r\n <input matInput="" title="Build in" [matDatepicker]="dt1" [max]="currentYear"\r\n placeholder="Seleccione el año de construcción" [value]="year" disabled>\r\n <mat-datepicker-toggle matSuffix [for]="dt1"></mat-datepicker-toggle>\r\n <mat-datepicker #dt1 startView="multi-year" [disabled]="false" [calendarHeaderComponent]="customHeader"\r\n (yearSelected)="onYearSelected($event, dt1)"></mat-datepicker>\r\n</mat-form-field>\r\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0},{provide:y.MAT_DATE_FORMATS,useValue:qe},{provide:y.DateAdapter,useClass:je}],styles:[""]}]}],e.ctorParameters=function(){return[{type:t.Injector}]},e}(),We=[m.MatFormFieldModule,F.MatInputModule,A.MatDatepickerModule,s.MatButtonModule,l.MatIconModule],Xe=[Ye,Ge],Ke=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,We],declarations:[Xe],entryComponents:[Ge],exports:[Ye]}]}],e}(),$e=function(){function e(e){var r=this;this._viewportRuler=e,this.itemsChanged=new t.EventEmitter,this.target=null,this.source=null,this.dropListEnterPredicate=function(e,t){if(t===r.placeholder)return!0;if(t!==r.activeContainer)return!1;var n=r.placeholder.element.nativeElement,i=e.dropContainer.element.nativeElement,o=t.element.nativeElement,a=Qe(o.parentElement.children,r.source?n:i),s=Qe(o.parentElement.children,o);return r.source||(r.sourceIndex=a,r.source=e.dropContainer,n.style.width=i.clientWidth+"px",n.style.height=i.clientHeight+"px",i.parentElement.removeChild(i)),r.targetIndex=s,r.target=t,n.style.display="",o.parentElement.insertBefore(n,s>a?o.nextSibling:o),r.placeholder.enter(e,e.element.nativeElement.offsetLeft,e.element.nativeElement.offsetTop),!1}}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var e=this.placeholder.element.nativeElement;e.style.display="none",e.parentElement.removeChild(e)},e.prototype.dragMoved=function(e){var t=this,r=this.getPointerPositionOnPage(e.event);this.listGroup._items.forEach((function(e){(function(e,t,r){var n=e.element.nativeElement.getBoundingClientRect(),i=n.top,o=n.bottom,a=n.left,s=n.right;return r>=i&&r<=o&&t>=a&&t<=s})(e,r.x,r.y)&&(t.activeContainer=e)}))},e.prototype.dropListDropped=function(){if(this.target){var e=this.placeholder.element.nativeElement,t=e.parentElement;e.style.display="none",t.removeChild(e),t.appendChild(e),t.insertBefore(this.source.element.nativeElement,t.children[this.sourceIndex]),this.target=null,this.source=null,this.sourceIndex!==this.targetIndex&&(O.moveItemInArray(this.items,this.sourceIndex,this.targetIndex),this.itemsChanged.emit(this.items))}},e.prototype.getPointerPositionOnPage=function(e){var t=function(e){return e.type.startsWith("touch")}(e)?e.touches[0]||e.changedTouches[0]:e,r=this._viewportRuler.getViewportScrollPosition();return{x:t.pageX-r.left,y:t.pageY-r.top}},e.decorators=[{type:t.Component,args:[{selector:"lib-custom-drag-and-drop",template:'<div class="custom-drag-and-drop-container" cdkDropListGroup>\r\n <div cdkDropList [cdkDropListEnterPredicate]="dropListEnterPredicate" (cdkDropListDropped)="dropListDropped()"></div>\r\n <div cdkDropList *ngFor="let item of items; let i = index;"\r\n [cdkDropListEnterPredicate]="dropListEnterPredicate" (cdkDropListDropped)="dropListDropped()">\r\n <div cdkDrag class="custom-drag-and-drop-box" (cdkDragMoved)="dragMoved($event)">\r\n <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{image: item, index: i}"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n',styles:[".custom-drag-and-drop-container{display:flex;flex-wrap:wrap;min-width:600px;max-width:900px}.custom-drag-and-drop-box{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;cursor:move;border-radius:8px;position:relative;z-index:1;transition:box-shadow .2s cubic-bezier(0,0,.2,1)}.custom-drag-and-drop-box:active{opacity:.6}.cdk-drop-list{margin:0 8px 8px 0}.cdk-drag-preview{box-sizing:border-box;border-radius:4px}.cdk-drag-placeholder{opacity:.3}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1)}"]}]}],e.ctorParameters=function(){return[{type:R.ViewportRuler}]},e.propDecorators={listGroup:[{type:t.ViewChild,args:[O.CdkDropListGroup,{static:!0}]}],placeholder:[{type:t.ViewChild,args:[O.CdkDropList,{static:!0}]}],content:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]},{type:t.Input}],items:[{type:t.Input}],itemsChanged:[{type:t.Output}]},e}();function Qe(e,t){return Array.prototype.indexOf.call(e,t)}var Je=[s.MatButtonModule,T.MatCheckboxModule,l.MatIconModule,d.MatButtonToggleModule,P.MatRadioModule,F.MatInputModule,m.MatFormFieldModule,f.MatSelectModule,S.MatSidenavModule,N.MatToolbarModule,M.MatTabsModule,A.MatDatepickerModule,k.MatTooltipModule,y.MatRippleModule,y.MatNativeDateModule,O.DragDropModule],Ze=[ke],et=[Ue,Le,ze,He,Ve,Ie,Ce,$e,Fe,Se],tt=[Ie,Ce,Fe,Se],rt=[we,Ae,r.CurrencyPipe,Te,Me],nt=function(){function e(){}return e.forChild=function(t){return{ngModule:e,providers:[{provide:Pe,useValue:t||!1}]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,Je,D.EcoFabSpeedDialModule,i.ReactiveFormsModule,i.FormsModule,p.UploadFileModule,le.forChild(),J.forChild(),ee.forChild(),p.SafeUrlModule.forChild(),p.StringManipulationModule.forChild(),q.forChild(),re.forChild(),p.ShareModule.forChild(),xe,p.CountryCodeModule,p.LocationModule,p.DialogModule,Ke,v.SnackBarModule.forRoot()],declarations:[Ze,et],entryComponents:[tt],exports:[ke],providers:[rt]}]}],e}(),it=new t.InjectionToken("PROPERTY CARD CONFIG MODULE"),ot=function(){function e(e){this.isOPI=e,this.mode="full",this.currency=null,this.markerChanged=new t.EventEmitter,this.favoriteChanged=new t.EventEmitter,this.propertyDiscarded=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.positionLatLng&&this.latLng(this.positionLatLng.latitude,this.positionLatLng.longitude)},e.prototype.ngOnChanges=function(e){e.currency&&e.currency.currentValue&&(this.currency="MXN"!==e.currency.currentValue?e.currency.currentValue:null),e.marker&&e.marker.currentValue&&(this.info=e.marker.currentValue.info)},e.prototype.onFrontImageOver=function(){this.marker.hover=!0,this.markerChanged.emit(this.marker)},e.prototype.onFrontImageLeave=function(){this.marker.hover=!1,this.markerChanged.emit(this.marker)},e.prototype.favorite=function(){this.favoriteChanged.emit(this.info.propertyId)},e.prototype.discard=function(){this.propertyDiscarded.emit(this.info.propertyId)},e.prototype.deg2rad=function(e){return e*(Math.PI/180)},e.prototype.latLng=function(e,t){var r=e,n=t,i=this.marker.location.latitude,o=this.marker.location.longitude,a=this.deg2rad(i-r),s=this.deg2rad(o-n),l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(this.deg2rad(r))*Math.cos(this.deg2rad(i))*Math.sin(s/2)*Math.sin(s/2),p=6371*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)));Math.trunc(p)<1?(p*=1e3,(p=Math.trunc(p))<10?this.distance="10 m de su búsqueda":(p-=p%10,this.distance=p+" m de su búsqueda")):this.distance=p.toFixed(2)+" km de su búsqueda"},e.decorators=[{type:t.Component,args:[{selector:"lib-property-card",template:'<div class="property-card">\r\n <ng-template [ngIf]="!isOPI">\r\n <div class="property-card__favorite">\r\n <button class="favorite__button" mat-icon-button (click)="favorite()">\r\n <ng-template [ngIf]="isFavorite" [ngIfElse]="noIsFavorite">\r\n <mat-icon>favorite</mat-icon>\r\n </ng-template>\r\n <ng-template #noIsFavorite>\r\n <mat-icon>favorite_border</mat-icon>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="showDiscard">\r\n <div class="property-card__discard">\r\n <button class="discard__button" mat-icon-button (click)="discard()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="isOPI && showAlert">\r\n <div class="expiration-message">\r\n <p>\r\n Aviso\r\n <br>\r\n Este anuncio expira el {{info.endPublishDate | libFormatDate : true : \'dd/MM/yyyy\'}}\r\n </p>\r\n </div>\r\n </ng-template>\r\n <a routerLink="{{href || \'/\'}}" [queryParams]="queryParams || null" [target]="target || null"\r\n [state]="state || null"\r\n class="property-card__image" (mouseover)="onFrontImageOver()"\r\n (mouseleave)="onFrontImageLeave()">\r\n <img [src]="info.image" alt="Property image" libImageError [typeImage]="info.type">\r\n <ng-template [ngIf]="mode === \'summary\'">\r\n <div class="property-card__body-summary">\r\n <h2 class="color--white property-card__price">\r\n {{info.price | currency}} {{info.currency}}\r\n </h2>\r\n <p class="color--white property-card__type">\r\n {{info.type | propertyType}} {{info.offering | offeringType}}\r\n </p>\r\n <p class="color--white property-card__address body-summary__address">\r\n {{info.address.colony}}, {{info.address.city}}\r\n </p>\r\n </div>\r\n </ng-template>\r\n </a>\r\n <ng-template [ngIf]="mode === \'full\'">\r\n <div class="property-card__body">\r\n <div class="property-card__location-title">\r\n <h2 class="property-card__price">\r\n {{info.price | currency : currency : \'symbol\' : \'1.0-0\'}} {{info.currency}}\r\n </h2>\r\n <ng-container *ngIf="distance !== \'\'" >\r\n <h2 class="property-card__location" [hidden]="!distance">\r\n {{distance}}\r\n </h2>\r\n </ng-container>\r\n </div>\r\n <p class="property-card__type">\r\n {{info.type | propertyType}} {{info.offering | offeringType}}\r\n </p>\r\n <p class="property-card__address">\r\n {{info.address.colony}}, {{info.address.city}}\r\n </p>\r\n <ng-template [ngIf]="info.features">\r\n <div class="property-card__features">\r\n <ng-template [ngIf]="info.features && info.features.bedrooms && info.features.bedrooms > 0">\r\n <p class="property-card__feature">\r\n <span class="property-card__icon ic-features-bedroom"></span>\r\n {{info.features.bedrooms}}\r\n </p>\r\n <span class="property-card__divider"></span>\r\n </ng-template>\r\n <ng-template [ngIf]="info.features && info.features.bathrooms && info.features.bathrooms > 0 ">\r\n <p class="property-card__feature">\r\n <span class="property-card__icon ic-features-bathroom"></span>\r\n {{info.features.bathrooms}}\r\n </p>\r\n <span class="property-card__divider"></span>\r\n </ng-template>\r\n <ng-template [ngIf]="info.features && info.features.mainArea && info.features.mainArea > 0">\r\n <p class="property-card__feature">\r\n <span class="property-card__icon ic-features-surface"></span>\r\n {{info.features.mainArea}}\r\n <ng-template [ngIf]="info.features.areaUnit && info.features.areaUnit === \'M2\'"\r\n [ngIfElse]="ftUnit">\r\n m<sup>2</sup>\r\n </ng-template>\r\n <ng-template #ftUnit>\r\n sq ft\r\n </ng-template>\r\n </p>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</div>\r\n',styles:[":host{display:block;width:calc(100% - 16px);margin:16px auto;border-radius:16px}.property-card{width:100%;border-radius:16px;position:relative}.property-card__favorite{position:absolute;top:4px;right:4px;border-radius:50%;z-index:1;width:40px;height:40px;display:flex}.favorite__button{margin:auto}.expiration-message{position:absolute;top:0;background-color:#fff;width:100%;height:80px;z-index:1;text-align:center;color:red;font-size:16px;margin:auto;opacity:.9}.property-card__discard{position:absolute;right:8px;bottom:8px;z-index:1;width:40px;height:40px;border-radius:16px;display:flex}.discard__button{margin:auto}.property-card__image{width:100%;border-radius:16px;padding-bottom:calc(100% / 4 * 3);position:relative;text-decoration:none;display:block}.property-card__image:hover{width:calc(100% - 6px);padding-bottom:calc((100% - 6px)/ 4 * 3)}.property-card__image img{border-radius:16px;position:absolute;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.property-card__body{padding:8px;box-sizing:border-box}.property-card__body-summary{padding:8px;box-sizing:border-box;position:absolute;bottom:0;width:100%;border-radius:16px;background:linear-gradient(transparent,rgba(0,0,0,.8))}.body-summary__address{width:80%!important}.property-card__location-title{display:flex;width:100%;flex-direction:row;flex-wrap:wrap}.property-card__location{font-size:12px;margin:4px;color:#707070}@media (min-width:1200px){.property-card__location{font-size:14px}}.property-card__location:empty{width:60%;height:14px;background:#e0e0e0;border-radius:16px}.property-card__price{margin:3px 0;font-size:16px}.property-card__price:empty{width:60%;height:16px;background:#e0e0e0;border-radius:16px}.property-card__type{margin:3px 0}.property-card__type:empty{width:70%;height:16px;border-radius:16px;background:#e0e0e0}.property-card__address{margin:3px 0;color:#707070;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.property-card__address:empty{width:80%;height:16px;border-radius:16px;background:#e0e0e0}.property-card__features{display:flex;margin:6px 0 0}.property-card__feature{margin:0 8px 0 0;display:flex;align-items:center;font-size:12px;color:#707070}.property-card__divider{display:block;margin:auto 8px;width:1px;height:16px;background:#9e9e9e}.property-card__icon{width:24px;height:24px;font-size:24px;margin:0 4px 0 0;color:#bdbdbd}"]}]}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[it]}]}]},e.propDecorators={marker:[{type:t.Input}],href:[{type:t.Input}],target:[{type:t.Input}],queryParams:[{type:t.Input}],state:[{type:t.Input}],showAlert:[{type:t.Input}],positionLatLng:[{type:t.Input}],isFavorite:[{type:t.Input}],currency:[{type:t.Input}],showDiscard:[{type:t.Input}],mode:[{type:t.Input}],markerChanged:[{type:t.Output}],favoriteChanged:[{type:t.Output}],propertyDiscarded:[{type:t.Output}]},e}(),at=function(){function e(){}return e.forChild=function(t){return{ngModule:e,providers:[{provide:it,useValue:t}]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,L.RouterModule,ee,J,ie,l.MatIconModule,s.MatButtonModule,q],declarations:[ot],exports:[ot]}]}],e}(),st=function(){function e(e,t,r){this._propertyTypePipe=e,this._offeringTypePipe=t,this._converter=r}return e.getPropertyTypeItemByType=function(e){var t=null;return W.PropertyTypeList.forEach((function(r){r.value===e&&(t=r)})),t},e.validatePropertyInFavorites=function(e,t){for(var r=!1,n=0;n<t.length;n++)if(e===t[n].id){r=!0;break}return r},e.calculateLocationFrom=function(e,t,r){var n=e.latitude*Math.PI/180,i=e.longitude*Math.PI/180,o=r/6378100,a=Math.asin(Math.sin(n)*Math.cos(o)+Math.cos(n)*Math.sin(o)*Math.cos(t)),s=i+Math.atan2(Math.sin(t)*Math.sin(o)*Math.cos(n),Math.cos(o)-Math.sin(n)*Math.sin(a)),l={};return l.latitude=180*a/Math.PI,l.longitude=180*s/Math.PI,l},e.prototype.buildURL=function(e){var t="property/";return t+=this._propertyTypePipe.transform(e.propertyType,!0)+"-",t+=this._offeringTypePipe.transform(e.offering," ").replace(/ /g,"")+"-",t+=e.address.colony?e.address.colony+"-":"",t+=e.address.city?e.address.city+"-":"",t+=e.propertyId,t=X.removeDiacritics(t).replace(/ /g,"-").toLowerCase()},e.prototype.validatePropertiesInPoly=function(e,t){var r=new google.maps.Polygon({paths:t});return e&&e.length>0?(e.map((function(e){e.extras.showInPolygon=!1;var t=new google.maps.LatLng(e.location.latitude,e.location.longitude);return google.maps.geometry.poly.containsLocation(t,r)?(e.extras.showInPolygon=!0,e):(e.extras.showInPolygon=!1,e)})),e=e.filter((function(e){if(e.extras.showInPolygon)return e}))):[]},e.prototype.markersToCurrency=function(e,t,r){var i=this;return e=e.map((function(e){return n.Currency[e.info.currency]!==t&&(e.info.price=i._converter.number(e.info.price,r,n.Currency[e.info.currency],t),e.info.currency=t.toString()),e}))},e.prototype.buildMarkers=function(t,r){var i=this,o=[];return t.forEach((function(t){var a={location:t.address.location,hover:!1,visited:!1,type:e.getPropertyTypeItemByType(t.type),info:i.createPropertyInfoCard(t),isFavorite:!1,extras:{}};t instanceof n.NewPropertyLite?a.isFavorite=!!(r&&r.length>0)&&e.validatePropertyInFavorites(t.id,r):a.isFavorite=!!(r&&r.length>0)&&e.validatePropertyInFavorites(t.propertyId,r),o.push(a)})),o},e.prototype.buildSpider=function(t){var r={markers:[],polyLines:[]};return t.map((function(n){n.extras.repeat=!1;var i=t.filter((function(e){return n.location.latitude===e.location.latitude&&n.location.longitude===e.location.longitude})),o=12*i.length/2,a=2*Math.PI/i.length;if(!n.extras.repeat&&i.length>1)for(var s=Object.assign({},n.location),l=0;l<i.length;l++){var p=a*l;i[l].repeat=!0;var c=e.calculateLocationFrom(s,p,o);r.polyLines.push({path:[{latitude:Number(s.latitude),longitude:Number(s.longitude)},{latitude:Number(c.latitude),longitude:Number(c.longitude)}]}),i[l].location=c}return n})),r.markers=t,r},e.prototype.createPropertyInfoCard=function(e){return{address:new n.Address(e.address||null),authUsers:e instanceof n.NewPropertyLite?e.authUsers:"",currency:e.currency,propertyId:e instanceof n.NewPropertyLite?e.id:e.propertyId,image:e.image,offering:e.offering,price:e.price,type:e.type,url:this.buildURL({address:e.address,offering:e.offering,propertyType:e.type,propertyId:e instanceof n.NewPropertyLite?e.id:e.propertyId}),status:e instanceof n.NewPropertyLite?e.status:null,features:e instanceof n.NewPropertyLite?e.features:null}},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:Z},{type:Q},{type:ge}]},e}(),lt=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[st]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,_e.forChild()]}]}],e}();e.AddressFormatModule=U,e.AddressFormatPipe=V,e.AmenityName=Y,e.ConstantsComponents=W,e.CurrencyConverterModule=_e,e.CurrencyConverterService=ge,e.DocumentVisorComponent=oe,e.DocumentVisorModule=le,e.DocumentVisorService=ae,e.FabFiltersComponent=me,e.FabFiltersModule=fe,e.FilterChipType=pe,e.FiltersChangeType=ce,e.FiltersModule=ve,e.FiltersService=de,e.FiltersWrapper=H,e.FormatDateModule=q,e.FormatDatePipe=G,e.FormatPriceDirective=te,e.FormatPriceModule=re,e.ImageErrorDirective=ne,e.ImageErrorModule=ie,e.MDate=j,e.MarkerPriceModule=$,e.MarkerPricePipe=K,e.MarkersModule=lt,e.MarkersService=st,e.OfferingTypeModule=J,e.OfferingTypePipe=Q,e.PanoramaVisorComponent=Ee,e.PanoramaVisorModule=xe,e.PropertyCardComponent=ot,e.PropertyCardModule=at,e.PropertyComponent=ke,e.PropertyEventType=Ne,e.PropertyModule=nt,e.PropertyTypeModule=ee,e.PropertyTypePipe=Z,e.ɵa=ue,e.ɵb=be,e.ɵc=Pe,e.ɵd=we,e.ɵe=Ae,e.ɵg=Te,e.ɵh=Me,e.ɵi=Ke,e.ɵj=Ye,e.ɵk=je,e.ɵl=Ge,e.ɵm=Ue,e.ɵn=Le,e.ɵo=ze,e.ɵp=He,e.ɵq=Ve,e.ɵr=Ie,e.ɵs=Ce,e.ɵt=$e,e.ɵu=Fe,e.ɵv=Se,e.ɵw=it,Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var B=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};var z=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e};var V=function(){function e(){}return e.prototype.transform=function(e,t,r){var n="",i=r||"mx";switch(n+=e.street,i){case"mx":t?(n+=", "+(e.colony||""),n+=", "+(e.postalCode||""),n+=", "+(e.city||""),n+=", "+(e.state||""),n+=", "+(e.country||"")):n+=", "+(e.colony||"");break;case"usa":t?(n+=", "+(e.city||""),n+=", "+(e.state||""),n+=", "+(e.postalCode||""),n+=", "+(e.country||"")):(n+=", "+(e.city||""),n+=", "+(e.state||""))}return n},e.decorators=[{type:t.Pipe,args:[{name:"addressFormat"}]}],e}(),U=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[V]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[V],exports:[V]}]}],e}(),H=function(){function e(e){this._component=e}return e.prototype.open=function(){this._component.open()},e.prototype.close=function(){this._component.close()},e}(),j=function(){function e(e){this._timestamp=e.toString()}return e.getTimestamp=function(e,t){var r="";return t?(r+=""+e.getHours(),r+=e.getMinutes()<10?"0"+e.getMinutes():""+e.getMinutes(),r+=e.getSeconds()<10?"0"+e.getSeconds():""+e.getSeconds(),Number(r)):(r+=""+e.getFullYear().toString(),r+=e.getMonth()+1<10?"0"+(e.getMonth()+1):""+(e.getMonth()+1),r+=e.getDate()<10?"0"+e.getDate():""+e.getDate().toString(),Number(r))},e.getHours=function(e){return e.slice(0,2)},e.getMinutes=function(e){return e.slice(2,4)},e.getSeconds=function(e){return e.slice(4,e.length)},e.getWeekDayName=function(e,t){switch(e){case 0:return t?"lunes":"Lunes";case 1:return t?"martes":"Martes";case 2:return t?"miercoles":"Miercoles";case 3:return t?"jueves":"Jueves";case 4:return t?"viernes":"Viernes";case 5:return t?"sabado":"Sabado";case 6:return t?"domingo":"Domingo"}},e.getMonthName=function(e,t){switch(e){case"01":return t?"ene.":"Ene.";case"02":return t?"feb.":"Feb.";case"03":return t?"mar.":"Mar.";case"04":return t?"abr.":"Abr.";case"05":return t?"may.":"May.";case"06":return t?"jun.":"Jun.";case"07":return t?"jul.":"Jul.";case"08":return t?"ago.":"Ago.";case"09":return t?"sep.":"Sep.";case"10":return t?"oct.":"Oct.";case"11":return t?"nov.":"Nov.";case"12":return t?"dic.":"Dic."}},e.prototype.toDate=function(t){if(t){var r=this.getYear()+"-"+this.getMoth()+"-"+this.getDay(),n=e.getHours(t.toString())+":"+e.getMinutes(t.toString())+":"+e.getSeconds(t.toString());return new Date(r+"T"+n+"Z")}return new Date(Number(this.getYear()),Number(this.getMoth())-1,Number(this.getDay()))},e.prototype.getFormat=function(t,r){var n=void 0===r?{}:r,i=n.time,o=void 0===i?null:i,a=n.toLowerCase,s=void 0!==a&&a,l=n.format12Hours,p=void 0!==l&&l,c="",u=null;switch(t){case"dd/MM/yyyy":c=this.getDay()+"/"+this.getMoth()+"/"+this.getYear();break;case"dd MMMMM yyyy":c=this.getDay()+" "+e.getMonthName(this.getMoth(),s)+" "+this.getYear();break;case"dd MMMMM":c=this.getDay()+" "+e.getMonthName(this.getMoth(),s);break;case"EEEEE HH:mm":c+=""+e.getWeekDayName(this.toDate(o).getDay()-1,s),u=this.toDate(o),p?(c+=13===u.getHours()?" a la ":" a las ",c+=u.getHours()<12?u.getHours():u.getHours()-12,c+=":"+u.getMinutes(),c+=u.getHours()<12?" AM":" PM"):(c+=" a las ",c+=u.getHours()+":"+u.getMinutes());break;case"dd MMMMM HH:mm":c+=""+this.getDay(),c+=" de "+e.getMonthName(this.getMoth(),s),u=this.toDate(o),p?(c+=13===u.getHours()?" a la ":" a las ",c+=u.getHours()<12?u.getHours():u.getHours()-12,c+=":"+u.getMinutes(),c+=u.getHours()<12?" AM":" PM"):(c+=" a las ",c+=u.getHours()+":"+u.getMinutes());break;case"dd MMMMM yyyy HH:mm":c+=""+this.getDay(),c+=" de "+e.getMonthName(this.getMoth(),s)+" "+this.getYear(),u=this.toDate(o),p?(c+=13===u.getHours()?" a la ":" a las ",c+=u.getHours()<12?u.getHours():u.getHours()-12,c+=":"+u.getMinutes(),c+=u.getHours()<12?" AM":" PM"):(c+=" a las ",c+=u.getHours()+":"+u.getMinutes())}return c},e.prototype.getYear=function(){return this._timestamp.slice(0,4)},e.prototype.getMoth=function(){return this._timestamp.slice(4,6)},e.prototype.getDay=function(){return this._timestamp.slice(6,this._timestamp.length)},e}(),G=function(){function e(){}return e.prototype.transform=function(e,t,r){if(t)return new j(e).getFormat(r,{toLowerCase:!0});var n=new Date(Number(e));return(n.getDate()<10?"0"+n.getDate():n.getDate())+"/"+(n.getMonth()<10?"0"+n.getMonth():n.getMonth())+"/"+n.getFullYear()},e.decorators=[{type:t.Pipe,args:[{name:"libFormatDate"}]}],e}(),q=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[G]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[G],exports:[G]}]}],e}(),Y={AdjacentCommerce:"adjacentCommerce",AdjacentGym:"gym",AdjacentPicnic:"adjacentPicnic",AirConditioner:"airConditioner",Balcony:"balcony",CustomerParking:"customerParking",DiningRoom:"diningRoom",DoubleHeight:"doubleHeight",DressingRooms:"dressingRooms",FacingStreet:"facingStreet",Finishings:"finishings",Furnished:"furnished",Garden:"garden",Gym:"gym",HighResistanceFloors:"highResistanceFloors",HighSpeedInternet:"highSpeedInternet",InCommercialArea:"inCommercialArea",InIndustrialPark:"inIndustrialPark",InShoppingCenter:"inShoppingCenter",Jacuzzi:"jacuzzi",KitchenServices:"kitchenServices",MaidsBathroom:"maidsBathroom",ManeuverArea:"maneuverArea",MeetingRoom:"meetingRoom",Mezzanine:"mezzanine",MixedBuilding:"mixedBuilding",NaturalLighting:"naturalLighting",Offices:"offices",OpenSpace:"openSpace",Platforms:"platforms",Playground:"playground",Playroom:"playroom",Pool:"pool",RailSpur:"railSpur",RailYard:"maneuverArea",Reception:"reception",SecurityGuard:"securityGuard",Storage:"storage",VisitorParking:"visitorParking",NearPublicTransportation:"nearPublicTransportation",NearShops:"nearShops",OnBusyRoad:"onBusyRoad",CountrySide:"countrySide",Downtown:"downtown",GoodReachableTraffic:"goodReachableTraffic",NearFitnessCentre:"nearFitnessCentre",NearHighway:"nearHighway",NearHospital:"nearHospital",NearPark:"nearPark",NearSchools:"nearSchools",OnQuietRoad:"onQuietRoad",RoofGarden:"roofGarden",PetFriendly:"petFriendly",DifferentAbilities:"differentAbilities"},W=function(){function e(){}return e.Amenities={roofGarden:{checked:!1,iconName:Y.RoofGarden,value:Y.RoofGarden,name:"Terraza"},petFriendly:{checked:!1,iconName:Y.PetFriendly,value:Y.PetFriendly,name:"Acepta Mascotas"},differentAbilities:{checked:!1,iconName:Y.DifferentAbilities,value:Y.DifferentAbilities,name:"Con capacidades diferentes"},adjacentCommerce:{checked:!1,iconName:Y.AdjacentCommerce,value:Y.AdjacentCommerce,name:"Comercio adyacente"},adjacentGym:{checked:!1,iconName:Y.Gym,value:Y.AdjacentGym,name:"Gym adyacente"},adjacentPicnic:{checked:!1,iconName:Y.AdjacentPicnic,value:Y.AdjacentPicnic,name:"Merendero adyacente"},airConditioner:{checked:!1,iconName:Y.AirConditioner,value:Y.AirConditioner,name:"Aire acondicionado"},balcony:{checked:!1,iconName:Y.Balcony,value:Y.Balcony,name:"Balcón"},customerParking:{checked:!1,iconName:Y.CustomerParking,value:Y.CustomerParking,name:"Estacionamiento para clientes"},diningRoom:{checked:!1,iconName:Y.DiningRoom,value:Y.DiningRoom,name:"Comedor"},doubleHeight:{checked:!1,iconName:Y.DoubleHeight,value:Y.DoubleHeight,name:"Doble altura"},dressingRooms:{checked:!1,iconName:Y.DressingRooms,value:Y.DressingRooms,name:"Con vestidores"},facingStreet:{checked:!1,iconName:Y.FacingStreet,value:Y.FacingStreet,name:"Frente a calle"},finishings:{checked:!1,iconName:Y.Finishings,value:Y.Finishings,name:"Con acabados"},furnished:{checked:!1,iconName:Y.Furnished,value:Y.Furnished,name:"Amueblada"},garden:{checked:!1,iconName:Y.Garden,value:Y.Garden,name:"Jardín"},gym:{checked:!1,iconName:Y.Gym,value:Y.Gym,name:"Gym"},highResistanceFloors:{checked:!1,iconName:Y.HighResistanceFloors,value:Y.HighResistanceFloors,name:"Pisos de alta resistencia"},highSpeedInternet:{checked:!1,iconName:Y.HighSpeedInternet,value:Y.HighSpeedInternet,name:"Internet de alta velocidad"},inCommercialArea:{checked:!1,iconName:Y.InCommercialArea,value:Y.InCommercialArea,name:"En zona comercial"},inIndustrialPark:{checked:!1,iconName:Y.InIndustrialPark,value:Y.InIndustrialPark,name:"En parque industrial"},inShoppingCenter:{checked:!1,iconName:Y.InShoppingCenter,value:Y.InShoppingCenter,name:"En centro comercial"},jacuzzi:{checked:!1,iconName:Y.Jacuzzi,value:Y.Jacuzzi,name:"Jacuzzi"},kitchenServices:{checked:!1,iconName:Y.KitchenServices,value:Y.KitchenServices,name:"Servicios para cocina"},maidsBathroom:{checked:!1,iconName:Y.MaidsBathroom,value:Y.MaidsBathroom,name:"Cuarto de Servicio"},maneuverArea:{checked:!1,iconName:Y.ManeuverArea,value:Y.ManeuverArea,name:"Área de maniobras"},meetingRoom:{checked:!1,iconName:Y.MeetingRoom,value:Y.MeetingRoom,name:"Sala de conferencias"},mezzanine:{checked:!1,iconName:Y.Mezzanine,value:Y.Mezzanine,name:"Con entrepiso"},mixedBuilding:{checked:!1,iconName:Y.MixedBuilding,value:Y.MixedBuilding,name:"En edificio mixto"},naturalLighting:{checked:!1,iconName:Y.NaturalLighting,value:Y.NaturalLighting,name:"Iluminacion natural"},offices:{checked:!1,iconName:Y.Offices,value:Y.Offices,name:"Con oficinas"},openSpace:{checked:!1,iconName:Y.OpenSpace,value:Y.OpenSpace,name:"Espacio abierto"},platforms:{checked:!1,iconName:Y.Platforms,value:Y.Platforms,name:"Andenes"},playground:{checked:!1,iconName:Y.Playground,value:Y.Playground,name:"Juegos infantiles"},playroom:{checked:!1,iconName:Y.Playroom,value:Y.Playroom,name:"Salón de juegos"},pool:{checked:!1,iconName:Y.Pool,value:Y.Pool,name:"Alberca"},railSpur:{checked:!1,iconName:Y.RailSpur,value:Y.RailSpur,name:"Espuela de FF.CC"},railyard:{checked:!1,iconName:Y.RailYard,value:Y.RailYard,name:"Patio de maniobras"},reception:{checked:!1,iconName:Y.Reception,value:Y.Reception,name:"Recepción"},securityGuard:{checked:!1,iconName:Y.SecurityGuard,value:Y.SecurityGuard,name:"Con vigilancia"},storage:{checked:!1,iconName:Y.Storage,value:Y.Storage,name:"Bodega"},visitorParking:{checked:!1,iconName:Y.VisitorParking,value:Y.VisitorParking,name:"Estacionamiento para visitas"},features:[{checked:!1,iconName:Y.NearPublicTransportation,value:Y.NearPublicTransportation,name:"Cerca de estaciones de transporte"},{checked:!1,iconName:Y.AdjacentCommerce,value:Y.NearShops,name:"Cerca de comercios"},{checked:!1,iconName:Y.OnBusyRoad,value:Y.OnBusyRoad,name:"Avenida principal"},{checked:!1,iconName:Y.CountrySide,value:Y.CountrySide,name:"Suburbio"},{checked:!1,iconName:Y.Downtown,value:Y.Downtown,name:"Céntrico"},{checked:!1,iconName:Y.GoodReachableTraffic,value:Y.GoodReachableTraffic,name:"Se llega sin trafico"},{checked:!1,iconName:Y.NearFitnessCentre,value:Y.NearFitnessCentre,name:"Cerca de centro deportivo"},{checked:!1,iconName:Y.NearHighway,value:Y.NearHighway,name:"Cerca de autopista"},{checked:!1,iconName:Y.NearHospital,value:Y.NearHospital,name:"Cerca de centros de salud"},{checked:!1,iconName:Y.NearPark,value:Y.NearPark,name:"Cerca de parque"},{checked:!1,iconName:Y.NearSchools,value:Y.NearSchools,name:"Cerca de escuelas"},{checked:!1,iconName:Y.OnQuietRoad,value:Y.OnQuietRoad,name:"En calle tranquila"}]},e.DurationList=[30,60,90,180,365],e.CommissionList={SALE:[.06,.055,.05,.045,.04,.035,.03,.025,.02,.015,.01],RENT:[2,1.5,1,.5]},e.SharedCommissionList=[.5,.4,.3,.2,.1],e.LandUseList=[{name:"Habitacional unifamiliar",value:n.LandUseEnum.SINGLE_FAMILY_HOUSING},{name:"Habitacional plurifamiliar",value:n.LandUseEnum.MULTI_FAMILY_HOUSING},{name:"Habitacional con comercio",value:n.LandUseEnum.HOUSING_WITH_COMMERCE},{name:"Habitacional con oficina",value:n.LandUseEnum.HOUSING_WITH_OFFICE},{name:"Habitacional mixto",value:n.LandUseEnum.MIXED_HOUSING},{name:"Comercio",value:n.LandUseEnum.COMMERCE},{name:"Oficina",value:n.LandUseEnum.OFFICE},{name:"Servicios",value:n.LandUseEnum.SERVICES},{name:"Industria",value:n.LandUseEnum.INDUSTRY},{name:"Agrícola",value:n.LandUseEnum.AGRICULTURAL},{name:"No especificado",value:n.LandUseEnum.OTHER}],e.AnnounceCheckList=[{name:"Las fotos y videos son los correctos",value:0,checked:!1},{name:"La ortografía y gramática es correcta",value:1,checked:!1},{name:"Los datos de contacto son correctos",value:2,checked:!1},{name:"La dirección, email y web están correctos",value:3,checked:!1},{name:"Todo está correcto y apruebo mi anuncio",value:4,checked:!1}],e.DocumentsList=[{name:"Escritura",value:n.PFileTypeEnum.DEED,loaded:!1},{name:"Identificación Propietario",value:n.PFileTypeEnum.OWNER_ID,loaded:!1},{name:"Recibo de agua",value:n.PFileTypeEnum.WATER_BILL,loaded:!1},{name:"Recibo de luz",value:n.PFileTypeEnum.ELECTRICITY_BILL,loaded:!1},{name:"Recibo predial",value:n.PFileTypeEnum.PROPERTY_BILL,loaded:!1},{name:"Constancia de no adeudo",value:n.PFileTypeEnum.CONSTANCY_OF_NO_DEBT,loaded:!1},{name:"Libertad de Gravamen",value:n.PFileTypeEnum.EXEMPTION_TAX,loaded:!1},{name:"Licencia de construcción",value:n.PFileTypeEnum.BUILDING_LICENSE,loaded:!1},{name:"Terminación de obra",value:n.PFileTypeEnum.COMPLETION_OF_CONSTRUCTION,loaded:!1},{name:"Alineación y número oficial",value:n.PFileTypeEnum.ALIGNMENT_AND_OFFICIAL_NUMBER,loaded:!1},{name:"Hipoteca",value:n.PFileTypeEnum.MORTGAGE,loaded:!1},{name:"Otros",value:n.PFileTypeEnum.OTHER,loaded:!1}],e.BedroomList=[0,1,2,3,4],e.BathroomList=[0,1,2,3,4],e.ParkingSpacesList=[0,1,2,3,4],e.SurfaceList=[50,100,150,200,250,300,350,400,450,500,550,600,650,700,750,800,850,900,950,1e3],e.ROIList=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,19,20],e.PropertyTypeList=[{value:n.PropertyTypeEnum.HOUSE,iconName:"house",name:"Casa",shortName:"Casa",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.RESIDENTIAL,iconName:"residential",name:"Vivienda",shortName:"Vivienda",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.APARTMENT,iconName:"apartment",name:"Departamento",shortName:"Depto",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.ROOM,iconName:"room",name:"Habitación",shortName:"Habitación",features:e.Amenities.features,amenities:[e.Amenities.garden,e.Amenities.pool,e.Amenities.storage,e.Amenities.maidsBathroom,e.Amenities.securityGuard,e.Amenities.playground,e.Amenities.visitorParking,e.Amenities.gym,e.Amenities.balcony,e.Amenities.jacuzzi,e.Amenities.playroom,e.Amenities.furnished,e.Amenities.highSpeedInternet,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.OFFICE,iconName:"office",name:"Oficina",shortName:"Oficina",features:e.Amenities.features,amenities:[e.Amenities.visitorParking,e.Amenities.furnished,e.Amenities.highSpeedInternet,e.Amenities.reception,e.Amenities.adjacentPicnic,e.Amenities.meetingRoom,e.Amenities.adjacentGym,e.Amenities.openSpace,e.Amenities.airConditioner,e.Amenities.adjacentCommerce,e.Amenities.mixedBuilding,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.RETAIL,iconName:"retail",name:"Comercio",shortName:"Comercio",features:e.Amenities.features,amenities:[e.Amenities.mixedBuilding,e.Amenities.facingStreet,e.Amenities.maneuverArea,e.Amenities.kitchenServices,e.Amenities.finishings,e.Amenities.mezzanine,e.Amenities.inShoppingCenter,e.Amenities.inCommercialArea,e.Amenities.customerParking,e.Amenities.doubleHeight,e.Amenities.roofGarden,e.Amenities.petFriendly,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.WAREHOUSE,iconName:"warehouse",name:"Bodega",shortName:"Bodega",features:e.Amenities.features,amenities:[e.Amenities.securityGuard,e.Amenities.customerParking,e.Amenities.doubleHeight,e.Amenities.railyard,e.Amenities.platforms,e.Amenities.highResistanceFloors,e.Amenities.offices,e.Amenities.dressingRooms,e.Amenities.diningRoom,e.Amenities.inIndustrialPark,e.Amenities.naturalLighting,e.Amenities.railSpur,e.Amenities.differentAbilities]},{value:n.PropertyTypeEnum.LAND,iconName:"land",name:"Terreno",shortName:"Terreno",features:e.Amenities.features,amenities:[e.Amenities.securityGuard]},{value:n.PropertyTypeEnum.INVESTMENT,iconName:"investment",name:"Inversión",shortName:"Inversión",features:e.Amenities.features,amenities:[]},{value:n.PropertyTypeEnum.NONE,name:"Todo",shortName:"Todo",iconName:"all",features:[],amenities:[]}],e.OfferingTypeList=[{value:n.OfferingTypeEnum.SALE,name:"Venta"},{value:n.OfferingTypeEnum.RENT,name:"Renta"}],e.LocateList={USD:{locate:"en-US",currency:"USD"},MXN:{locate:"es-MX",currency:"MXN"},GBP:{locate:"en-GB",currency:"GBP"},EUR:{locate:"de-DE",currency:"EUR"},BRL:{locate:"pt-BR",currency:"BRL"},CNY:{locate:"zh-CH",currency:"CNY"}},e.PropertyStatusList=[{icon:"announce",name:"Anunciadas",value:n.StatusTypeEnum.ANNOUNCED},{icon:"expired",name:"Expiradas",value:n.StatusTypeEnum.EXPIRED},{icon:"hidden",name:"Ocultas",value:n.StatusTypeEnum.HIDDEN},{icon:"ready",name:"Listas para anunciar",value:n.StatusTypeEnum.READY},{icon:"draft",name:"Borrador",value:n.StatusTypeEnum.DRAFT}],e}(),X=function(){function e(){}return e.round=function(e,t){var r=Math.pow(10,t||0);return Math.round(e*r)/r},e.getFilterByPropertyType=function(e){return{type:e.type,offering:e.offering,distance:e.distance,location:{latitude:e.location.latitude,longitude:e.location.longitude},currency:e.currency,upLimitPrice:0,downLimitPrice:0,bathrooms:0,exclusivity:e.exclusivity,bedrooms:0,parkingPlaces:0,extras:[],mainArea:0,roi:0,mls:e.mls}},e.getInitialFilter=function(e,t){return void 0===t&&(t=null),{type:e?n.PropertyTypeEnum.NONE:n.PropertyTypeEnum.RESIDENTIAL,offering:n.OfferingTypeEnum.RENT,distance:t?t.distance:0,location:{latitude:t?t.location.latitude:0,longitude:t?t.location.longitude:0},currency:t?t.currency:"MXN",upLimitPrice:0,downLimitPrice:0,bathrooms:0,exclusivity:!!t&&t.exclusivity,bedrooms:0,parkingPlaces:0,extras:[],mainArea:0,roi:0,mls:!t||t.mls}},e.listErrorsByPropertyTypeForPublish=function(e){var t=["price","currency","description","image"];switch(e){case n.PropertyTypeEnum.HOUSE:case n.PropertyTypeEnum.APARTMENT:t=t.concat(["mainArea","bedrooms","bathrooms"]);break;case n.PropertyTypeEnum.ROOM:case n.PropertyTypeEnum.OFFICE:case n.PropertyTypeEnum.RETAIL:case n.PropertyTypeEnum.LAND:t=t.concat(["mainArea"]);break;case n.PropertyTypeEnum.WAREHOUSE:t=t.concat(["mainArea","secondaryArea"]);break;case n.PropertyTypeEnum.INVESTMENT:t=t.concat(["roi"])}return t},e.getErrorsForPublish=function(e){var t=[];switch(t=(t=(t=(t=t.concat(e.price&&0!==e.price?[]:["price"])).concat(e.currency&&""!==e.currency?[]:["currency"])).concat(e.description&&""!==e.description?[]:["description"])).concat(e.image&&""!==e.image?[]:["image"]),e.type){case n.PropertyTypeEnum.HOUSE:case n.PropertyTypeEnum.APARTMENT:t=(t=(t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"])).concat(!e.features||e.features.bedrooms&&0!==e.features.bedrooms?[]:["bedrooms"])).concat(!e.features||e.features.bathrooms&&0!==e.features.bathrooms?[]:["bathrooms"]);break;case n.PropertyTypeEnum.OFFICE:case n.PropertyTypeEnum.RETAIL:case n.PropertyTypeEnum.LAND:t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"]);break;case n.PropertyTypeEnum.WAREHOUSE:t=(t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"])).concat(!e.features||e.features.secondaryArea&&0!==e.features.secondaryArea?[]:["secondaryArea"]);break;case n.PropertyTypeEnum.INVESTMENT:t=t.concat(!e.features||e.features.roi&&0!==e.features.roi?[]:["roi"]);break;case n.PropertyTypeEnum.ROOM:t=t.concat(!e.features||e.features.mainArea&&0!==e.features.mainArea?[]:["mainArea"])}return t},e.removeDiacritics=function(e){var t,r,n={A:/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g,AA:/[\uA732]/g,AE:/[\u00C6\u01FC\u01E2]/g,AO:/[\uA734]/g,AU:/[\uA736]/g,AV:/[\uA738\uA73A]/g,AY:/[\uA73C]/g,B:/[\u0042\u24B7\uFF22\u1E02\u1E04\u1E06\u0243\u0182\u0181]/g,C:/[\u0043\u24B8\uFF23\u0106\u0108\u010A\u010C\u00C7\u1E08\u0187\u023B\uA73E]/g,D:/[\u0044\u24B9\uFF24\u1E0A\u010E\u1E0C\u1E10\u1E12\u1E0E\u0110\u018B\u018A\u0189\uA779]/g,DZ:/[\u01F1\u01C4]/g,Dz:/[\u01F2\u01C5]/g,E:/[\u0045\u24BA\uFF25\u00C8\u00C9\u00CA\u1EC0\u1EBE\u1EC4\u1EC2\u1EBC\u0112\u1E14\u1E16\u0114\u0116\u00CB\u1EBA\u011A\u0204\u0206\u1EB8\u1EC6\u0228\u1E1C\u0118\u1E18\u1E1A\u0190\u018E]/g,F:/[\u0046\u24BB\uFF26\u1E1E\u0191\uA77B]/g,G:/[\u0047\u24BC\uFF27\u01F4\u011C\u1E20\u011E\u0120\u01E6\u0122\u01E4\u0193\uA7A0\uA77D\uA77E]/g,H:/[\u0048\u24BD\uFF28\u0124\u1E22\u1E26\u021E\u1E24\u1E28\u1E2A\u0126\u2C67\u2C75\uA78D]/g,I:/[\u0049\u24BE\uFF29\u00CC\u00CD\u00CE\u0128\u012A\u012C\u0130\u00CF\u1E2E\u1EC8\u01CF\u0208\u020A\u1ECA\u012E\u1E2C\u0197]/g,J:/[\u004A\u24BF\uFF2A\u0134\u0248]/g,K:/[\u004B\u24C0\uFF2B\u1E30\u01E8\u1E32\u0136\u1E34\u0198\u2C69\uA740\uA742\uA744\uA7A2]/g,L:/[\u004C\u24C1\uFF2C\u013F\u0139\u013D\u1E36\u1E38\u013B\u1E3C\u1E3A\u0141\u023D\u2C62\u2C60\uA748\uA746\uA780]/g,LJ:/[\u01C7]/g,Lj:/[\u01C8]/g,M:/[\u004D\u24C2\uFF2D\u1E3E\u1E40\u1E42\u2C6E\u019C]/g,N:/[\u004E\u24C3\uFF2E\u01F8\u0143\u00D1\u1E44\u0147\u1E46\u0145\u1E4A\u1E48\u0220\u019D\uA790\uA7A4]/g,NJ:/[\u01CA]/g,Nj:/[\u01CB]/g,O:/[\u004F\u24C4\uFF2F\u00D2\u00D3\u00D4\u1ED2\u1ED0\u1ED6\u1ED4\u00D5\u1E4C\u022C\u1E4E\u014C\u1E50\u1E52\u014E\u022E\u0230\u00D6\u022A\u1ECE\u0150\u01D1\u020C\u020E\u01A0\u1EDC\u1EDA\u1EE0\u1EDE\u1EE2\u1ECC\u1ED8\u01EA\u01EC\u00D8\u01FE\u0186\u019F\uA74A\uA74C]/g,OI:/[\u01A2]/g,OO:/[\uA74E]/g,OU:/[\u0222]/g,P:/[\u0050\u24C5\uFF30\u1E54\u1E56\u01A4\u2C63\uA750\uA752\uA754]/g,Q:/[\u0051\u24C6\uFF31\uA756\uA758\u024A]/g,R:/[\u0052\u24C7\uFF32\u0154\u1E58\u0158\u0210\u0212\u1E5A\u1E5C\u0156\u1E5E\u024C\u2C64\uA75A\uA7A6\uA782]/g,S:/[\u0053\u24C8\uFF33\u1E9E\u015A\u1E64\u015C\u1E60\u0160\u1E66\u1E62\u1E68\u0218\u015E\u2C7E\uA7A8\uA784]/g,T:/[\u0054\u24C9\uFF34\u1E6A\u0164\u1E6C\u021A\u0162\u1E70\u1E6E\u0166\u01AC\u01AE\u023E\uA786]/g,TZ:/[\uA728]/g,U:/[\u0055\u24CA\uFF35\u00D9\u00DA\u00DB\u0168\u1E78\u016A\u1E7A\u016C\u00DC\u01DB\u01D7\u01D5\u01D9\u1EE6\u016E\u0170\u01D3\u0214\u0216\u01AF\u1EEA\u1EE8\u1EEE\u1EEC\u1EF0\u1EE4\u1E72\u0172\u1E76\u1E74\u0244]/g,V:/[\u0056\u24CB\uFF36\u1E7C\u1E7E\u01B2\uA75E\u0245]/g,VY:/[\uA760]/g,W:/[\u0057\u24CC\uFF37\u1E80\u1E82\u0174\u1E86\u1E84\u1E88\u2C72]/g,X:/[\u0058\u24CD\uFF38\u1E8A\u1E8C]/g,Y:/[\u0059\u24CE\uFF39\u1EF2\u00DD\u0176\u1EF8\u0232\u1E8E\u0178\u1EF6\u1EF4\u01B3\u024E\u1EFE]/g,Z:/[\u005A\u24CF\uFF3A\u0179\u1E90\u017B\u017D\u1E92\u1E94\u01B5\u0224\u2C7F\u2C6B\uA762]/g,a:/[\u0061\u24D0\uFF41\u1E9A\u00E0\u00E1\u00E2\u1EA7\u1EA5\u1EAB\u1EA9\u00E3\u0101\u0103\u1EB1\u1EAF\u1EB5\u1EB3\u0227\u01E1\u00E4\u01DF\u1EA3\u00E5\u01FB\u01CE\u0201\u0203\u1EA1\u1EAD\u1EB7\u1E01\u0105\u2C65\u0250]/g,aa:/[\uA733]/g,ae:/[\u00E6\u01FD\u01E3]/g,ao:/[\uA735]/g,au:/[\uA737]/g,av:/[\uA739\uA73B]/g,ay:/[\uA73D]/g,b:/[\u0062\u24D1\uFF42\u1E03\u1E05\u1E07\u0180\u0183\u0253]/g,c:/[\u0063\u24D2\uFF43\u0107\u0109\u010B\u010D\u00E7\u1E09\u0188\u023C\uA73F\u2184]/g,d:/[\u0064\u24D3\uFF44\u1E0B\u010F\u1E0D\u1E11\u1E13\u1E0F\u0111\u018C\u0256\u0257\uA77A]/g,dz:/[\u01F3\u01C6]/g,e:/[\u0065\u24D4\uFF45\u00E8\u00E9\u00EA\u1EC1\u1EBF\u1EC5\u1EC3\u1EBD\u0113\u1E15\u1E17\u0115\u0117\u00EB\u1EBB\u011B\u0205\u0207\u1EB9\u1EC7\u0229\u1E1D\u0119\u1E19\u1E1B\u0247\u025B\u01DD]/g,f:/[\u0066\u24D5\uFF46\u1E1F\u0192\uA77C]/g,g:/[\u0067\u24D6\uFF47\u01F5\u011D\u1E21\u011F\u0121\u01E7\u0123\u01E5\u0260\uA7A1\u1D79\uA77F]/g,h:/[\u0068\u24D7\uFF48\u0125\u1E23\u1E27\u021F\u1E25\u1E29\u1E2B\u1E96\u0127\u2C68\u2C76\u0265]/g,hv:/[\u0195]/g,i:/[\u0069\u24D8\uFF49\u00EC\u00ED\u00EE\u0129\u012B\u012D\u00EF\u1E2F\u1EC9\u01D0\u0209\u020B\u1ECB\u012F\u1E2D\u0268\u0131]/g,j:/[\u006A\u24D9\uFF4A\u0135\u01F0\u0249]/g,k:/[\u006B\u24DA\uFF4B\u1E31\u01E9\u1E33\u0137\u1E35\u0199\u2C6A\uA741\uA743\uA745\uA7A3]/g,l:/[\u006C\u24DB\uFF4C\u0140\u013A\u013E\u1E37\u1E39\u013C\u1E3D\u1E3B\u017F\u0142\u019A\u026B\u2C61\uA749\uA781\uA747]/g,lj:/[\u01C9]/g,m:/[\u006D\u24DC\uFF4D\u1E3F\u1E41\u1E43\u0271\u026F]/g,n:/[\u006E\u24DD\uFF4E\u01F9\u0144\u00F1\u1E45\u0148\u1E47\u0146\u1E4B\u1E49\u019E\u0272\u0149\uA791\uA7A5]/g,nj:/[\u01CC]/g,o:/[\u006F\u24DE\uFF4F\u00F2\u00F3\u00F4\u1ED3\u1ED1\u1ED7\u1ED5\u00F5\u1E4D\u022D\u1E4F\u014D\u1E51\u1E53\u014F\u022F\u0231\u00F6\u022B\u1ECF\u0151\u01D2\u020D\u020F\u01A1\u1EDD\u1EDB\u1EE1\u1EDF\u1EE3\u1ECD\u1ED9\u01EB\u01ED\u00F8\u01FF\u0254\uA74B\uA74D\u0275]/g,oi:/[\u01A3]/g,ou:/[\u0223]/g,oo:/[\uA74F]/g,p:/[\u0070\u24DF\uFF50\u1E55\u1E57\u01A5\u1D7D\uA751\uA753\uA755]/g,q:/[\u0071\u24E0\uFF51\u024B\uA757\uA759]/g,r:/[\u0072\u24E1\uFF52\u0155\u1E59\u0159\u0211\u0213\u1E5B\u1E5D\u0157\u1E5F\u024D\u027D\uA75B\uA7A7\uA783]/g,s:/[\u0073\u24E2\uFF53\u015B\u1E65\u015D\u1E61\u0161\u1E67\u1E63\u1E69\u0219\u015F\u023F\uA7A9\uA785\u1E9B]/g,ss:/[\u00DF]/g,t:/[\u0074\u24E3\uFF54\u1E6B\u1E97\u0165\u1E6D\u021B\u0163\u1E71\u1E6F\u0167\u01AD\u0288\u2C66\uA787]/g,tz:/[\uA729]/g,u:/[\u0075\u24E4\uFF55\u00F9\u00FA\u00FB\u0169\u1E79\u016B\u1E7B\u016D\u00FC\u01DC\u01D8\u01D6\u01DA\u1EE7\u016F\u0171\u01D4\u0215\u0217\u01B0\u1EEB\u1EE9\u1EEF\u1EED\u1EF1\u1EE5\u1E73\u0173\u1E77\u1E75\u0289]/g,v:/[\u0076\u24E5\uFF56\u1E7D\u1E7F\u028B\uA75F\u028C]/g,vy:/[\uA761]/g,w:/[\u0077\u24E6\uFF57\u1E81\u1E83\u0175\u1E87\u1E85\u1E98\u1E89\u2C73]/g,x:/[\u0078\u24E7\uFF58\u1E8B\u1E8D]/g,y:/[\u0079\u24E8\uFF59\u1EF3\u00FD\u0177\u1EF9\u0233\u1E8F\u00FF\u1EF7\u1E99\u1EF5\u01B4\u024F\u1EFF]/g,z:/[\u007A\u24E9\uFF5A\u017A\u1E91\u017C\u017E\u1E93\u1E95\u01B6\u0225\u0240\u2C6C\uA763]/g};try{for(var i=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}(Object.keys(n)),o=i.next();!o.done;o=i.next()){var a=o.value;e=e.replace(n[a],a)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return e},e}(),K=function(){function e(){}return e.prototype.transform=function(e,t){var r,n=W.LocateList[t||"MXN"];return e/1e5/10>=1?(r=X.round(Number(e/1e5/10),2),r=Number(r).toLocaleString(n.locate,{style:"currency",currency:n.currency}).toString(),r+="M"):e/100/10>=1?(r=X.round(Number(e/100/10),2),r=Number(r).toLocaleString(n.locate,{style:"currency",currency:n.currency}).toString(),r+="K"):(r=Number(e).toFixed(2),r=Number(r).toLocaleString(n.locate,{style:"currency",currency:n.currency}).toString()),""+r},e.decorators=[{type:t.Pipe,args:[{name:"markerPrice"}]}],e}(),$=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[K]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[K],exports:[K]}]}],e}(),Q=function(){function e(){}return e.prototype.transform=function(e,t){var r=t||"en";return W.OfferingTypeList.forEach((function(t){t.value===e&&(r+=" "+t.name.toLowerCase())})),r},e.decorators=[{type:t.Pipe,args:[{name:"offeringType"}]}],e}(),J=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[Q]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Q],exports:[Q]}]}],e}(),Z=function(){function e(){}return e.prototype.transform=function(e,t){var r="";return W.PropertyTypeList.forEach((function(t){t.value===e&&(r=t.name)})),t?r.toLowerCase():r},e.decorators=[{type:t.Pipe,args:[{name:"propertyType"}]}],e}(),ee=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[Z]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[Z],exports:[Z]}]}],e}(),te=function(){function e(e,t){this._elRef=e,this._currency=t,this._subscription=new o.Subscription,this._el=this._elRef.nativeElement}return e.removeError=function(e,t){var r=e.errors;r&&(delete r[t],Object.keys(r).length?e.setErrors(r):e.setErrors(null))},e.prototype.ngOnChanges=function(e){var t=this;e.currency&&e.currency.currentValue&&this._value&&this.validateFormatPrice(this._value),e.control&&e.control.currentValue&&this._subscription.add(this.control.valueChanges.subscribe((function(e){t._value=e})))},e.prototype.ngAfterViewInit=function(){this._el.addEventListener("focus",this.onFocus.bind(this)),this._el.addEventListener("blur",this.onBlur.bind(this)),this._value=this._el.value,this._el.value=this.formatPrice(this._el.value)},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe(),this._el.removeEventListener("focus",this.onFocus.bind(this)),this._el.removeEventListener("blur",this.onBlur.bind(this))},e.prototype.formatPrice=function(e){return this._currency.transform(e,this.currency&&"MXN"!==this.currency?this.currency:null,"symbol","1.0-0")},e.prototype.onFocus=function(){this._el.value=this._value},e.prototype.onBlur=function(e){this.validateFormatPrice(e.target.value)},e.prototype.validateFormatPrice=function(t){Number.isNaN(Number(t))?this.control.setErrors({format:!0}):(e.removeError(this.control,"format"),this._value=t,this._el.value=this.formatPrice(t))},e.decorators=[{type:t.Directive,args:[{selector:"[libFormatPrice]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef},{type:r.CurrencyPipe}]},e.propDecorators={control:[{type:t.Input}],currency:[{type:t.Input}]},e}(),re=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[r.CurrencyPipe,te]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[te],exports:[te]}]}],e}(),ne=function(){function e(e){if(this._ref=e,this.CDN_URL="https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/images-stock",this._el=this._ref.nativeElement,this._el.constructor!==HTMLImageElement)throw new Error("libImageError directive works only image element")}return e.prototype.ngAfterViewInit=function(){var e=this;this._onError=function(){e.updateUrl()},this._el.addEventListener("error",this._onError)},e.prototype.ngOnDestroy=function(){this._el.removeEventListener("error",this._onError)},e.prototype.updateUrl=function(){switch(this.typeImage){case n.PropertyTypeEnum.HOUSE:this._el.src=this.CDN_URL+"/Stock-House.jpg";break;case n.PropertyTypeEnum.OFFICE:this._el.src=this.CDN_URL+"/Stock-Office.jpg";break;case n.PropertyTypeEnum.RETAIL:this._el.src=this.CDN_URL+"/Stock-Retail.jpg";break;case n.PropertyTypeEnum.LAND:this._el.src=this.CDN_URL+"/Stock-Land.jpg";break;case n.PropertyTypeEnum.WAREHOUSE:this._el.src=this.CDN_URL+"/Stock-Warehouse.jpg";break;case n.PropertyTypeEnum.APARTMENT:case n.PropertyTypeEnum.ROOM:this._el.src=this.CDN_URL+"/Stock-Apartment.jpg";break;case n.PropertyTypeEnum.INVESTMENT:this._el.src=this.CDN_URL+"/Stock-Investment.jpg";break;case n.PropertyTypeEnum.RESIDENTIAL:default:this._el.src=this.CDN_URL+"/Stock-House.jpg"}},e.decorators=[{type:t.Directive,args:[{selector:"[libImageError]"}]}],e.ctorParameters=function(){return[{type:t.ElementRef}]},e.propDecorators={typeImage:[{type:t.Input}]},e}(),ie=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule],declarations:[ne],exports:[ne]}]}],e}(),oe=function(){function e(e,t){this._data=e,this._dialog=t}return e.isBase64=function(e){try{return btoa(atob(e))===e}catch(e){return!1}},e.isURL=function(e){return new RegExp("^(?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!(?:10|127)(?:\\.\\d{1,3}){3})(?!(?:169\\.254|192\\.168)(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z¡-￿0-9]-*)*[a-z¡-￿0-9]+)(?:\\.(?:[a-z¡-￿0-9]-*)*[a-z¡-￿0-9]+)*(?:\\.(?:[a-z¡-￿]{2,})))(?::\\d{2,5})?(?:[/?#]\\S*)?$","i").test(e)},e.prototype.ngOnInit=function(){this.url=this._data},e.prototype.close=function(){e.isBase64(this.url)||e.isURL(this.url)||URL.revokeObjectURL(this.url),this._dialog.close()},e.decorators=[{type:t.Component,args:[{selector:"lib-document-visor",template:'<div id="document-visor">\r\n <button mat-mini-fab="" class="close" (click)="close()"><mat-icon>close</mat-icon></button>\r\n <ng-template [ngIf]="url">\r\n <object\r\n [data]="url | safeUrl"\r\n type="application/pdf"\r\n width="100%"\r\n height="100%">\r\n <iframe\r\n [src]="url | safeUrl"\r\n width="100%"\r\n height="100%"\r\n style="border: none;">\r\n </iframe>\r\n <p>Tu navegador no soporta PDFs. <br>\r\n <a [href]="url | safeUrl" download="file.pdf">Descargar PDF</a>\r\n </p>\r\n </object>\r\n </ng-template>\r\n</div>\r\n',styles:["::ng-deep .document_visor_dialog{width:70%;height:90%}@media screen and (max-width:600px){::ng-deep .document_visor_dialog{width:100%!important;max-width:100%!important;height:100%!important}}:host{display:block;width:100%;height:100%}#document-visor{width:100%;height:100%;padding:16px;position:relative;display:flex;box-sizing:border-box}#document-visor .close{position:absolute;top:16px;right:16px}#document-visor iframe{border:0;width:100%;height:100%;border-radius:4px}"]}]}],e.ctorParameters=function(){return[{type:String,decorators:[{type:t.Inject,args:[a.MAT_DIALOG_DATA]}]},{type:a.MatDialogRef}]},e}(),ae=function(){function e(e){this._dialog=e}return e.prototype.open=function(e){return this._dialog.open(oe,{data:e,disableClose:!0,panelClass:"document_visor_dialog"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),se=[s.MatButtonModule,a.MatDialogModule,l.MatIconModule],le=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[ae]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,p.SafeUrlModule.forChild(),se],declarations:[oe],exports:[oe],entryComponents:[oe]}]}],e}(),pe={OFFERING:"OFFERING",PROPERTY_TYPE:"PROPERTY_TYPE",PRICE:"PRICE",BEDROOMS:"BEDROOMS",BATHROOMS:"BATHROOMS",PARKING_PLACES:"PARKING_PLACES",SURFACE:"SURFACE",AMENITIES:"AMENITIES",LISTING:"LISTING"},ce={APPLY:0,INIT:1,AREA:2,SAVE:3,LIST_TYPE:4};ce[ce.APPLY]="APPLY",ce[ce.INIT]="INIT",ce[ce.AREA]="AREA",ce[ce.SAVE]="SAVE",ce[ce.LIST_TYPE]="LIST_TYPE";var ue=new t.InjectionToken("FILTERS MODULE CONFIG"),de=function(){function e(e){this._config=e,this._startComponent=new o.Subject,this._notifier=new o.BehaviorSubject({filter:X.getInitialFilter(this._config||!1),type:ce.INIT,ft:!1})}return e.removeFiltersSaved=function(){c.LocalStorageService.removeItem(e.FILTERS_SAVED_KEY)},e.getFiltersSaved=function(){return c.LocalStorageService.getItem(e.FILTERS_SAVED_KEY)},e.saveFilters=function(t){c.LocalStorageService.setItem(e.FILTERS_SAVED_KEY,{filters:t.filters,ft:t.ft||!1,isSharedProperties:t.isSharedProperties||!1})},e.prototype.setChange=function(e){this._notifier.next(e)},e.prototype.getChanges=function(){return this._notifier.asObservable()},e.prototype.startComponent=function(e){this._startComponent.next(e)},e.prototype.onStartComponent=function(){return this._startComponent.asObservable()},e.FILTERS_SAVED_KEY="FILTERS",e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[ue]}]}]},e}(),me=function(){function e(e,t,r){this._currency=e,this._offeringPipe=t,this._filtersService=r,this.METERS_TO_SQ=10.76391042,this.chips=[],this._subscription=new o.Subscription}return e.prototype.ngOnInit=function(){var e=this;this._subscription.add(this._filtersService.onStartComponent().subscribe((function(t){e._wrapper=t}))),this._subscription.add(this._filtersService.getChanges().subscribe((function(t){e.init(t.filter,t.ft,t.isSharedProperties)})))},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.openFilters=function(){this._wrapper?this._wrapper.open():console.warn("[FabFiltersComponent] waiting onStartComponent")},e.prototype.onClickChip=function(e){e!==pe.PROPERTY_TYPE&&e!==pe.OFFERING||this.openFilters()},e.prototype.init=function(e,t,r){this.chips=[],this._filter=e,this.listingType(r),this.offeringType(),this.propertyType(),this.price(),this.surface(t),this.bedrooms(),this.bathrooms(),this.parkingPlaces(),this.amenities()},e.prototype.listingType=function(e){this.isOPI&&this.chips.push({type:pe.LISTING,text:e?"Compartidas":this._filter.mls?this.mlsLabel||"MLS":"Mi lista",icon:[this._filter.mls?"mlm":"list"]})},e.prototype.offeringType=function(){if(this._filter.offering&&this._filter.type!==n.PropertyTypeEnum.NONE){var e=this._offeringPipe.transform(this._filter.offering," ").replace(/ /g,""),t=e.substr(0,1);e=e.replace(t,""),e=""+t.toLocaleUpperCase()+e,this.chips.push({type:pe.OFFERING,text:e,icon:null})}},e.prototype.propertyType=function(){var e=this;this._filter.type&&this._filter.type!==n.PropertyTypeEnum.NONE&&W.PropertyTypeList.forEach((function(t){t.value===e._filter.type&&e.chips.push({type:pe.PROPERTY_TYPE,text:t.name,icon:[t.iconName]})}))},e.prototype.price=function(){var e,t="",r="";0!==this._filter.downLimitPrice&&(t+=this._currency.transform(this._filter.downLimitPrice)),0!==this._filter.upLimitPrice&&(r+=this._currency.transform(this._filter.upLimitPrice)),""===t&&""===r||(e=this._filter.currency?this._filter.currency:"",this.chips.push({type:pe.PRICE,text:t+(""!==t&&""!==r?" - ":"")+r+" "+e,icon:["price"]}))},e.prototype.surface=function(e){0!==this._filter.mainArea&&this.chips.push({type:pe.SURFACE,text:(e?(this._filter.mainArea/this.METERS_TO_SQ).toFixed(0).toString():this._filter.mainArea.toString())+(e?" sq ft":" m2"),icon:["surface"]})},e.prototype.bedrooms=function(){0!==this._filter.bedrooms&&this.chips.push({type:pe.BEDROOMS,text:this._filter.bedrooms.toString(),icon:["bedroom"]})},e.prototype.bathrooms=function(){0!==this._filter.bathrooms&&this.chips.push({type:pe.BATHROOMS,text:this._filter.bathrooms.toString(),icon:["bathroom"]})},e.prototype.parkingPlaces=function(){0!==this._filter.parkingPlaces&&this.chips.push({type:pe.PARKING_PLACES,text:this._filter.parkingPlaces.toString(),icon:["parking"]})},e.prototype.amenities=function(){this._filter.extras&&this._filter.extras.length>0&&this.chips.push({type:pe.AMENITIES,text:this._filter.extras.length.toString(),icon:[this._filter.extras[0]]})},e.decorators=[{type:t.Component,args:[{selector:"lib-fab-filters",template:'<div class="fab-filters">\r\n <button mat-flat-button="" color="primary" class="btn_filters" (click)="openFilters()">\r\n Filtros\r\n </button>\r\n <div class="filters-container">\r\n <ng-template [ngIf]="chips.length > 0">\r\n <mat-chip-list aria-orientation="horizontal">\r\n <ng-container *ngFor="let chip of chips">\r\n <mat-chip (click)="onClickChip(chip.type)">\r\n <ng-container [ngSwitch]="chip.type">\r\n <ng-container *ngSwitchCase="\'PROPERTY_TYPE\'">\r\n <span class="icon property-icon ic-property-{{chip.icon}}"\r\n [ngStyle]="{\'background\': \'var(--\' + chip.icon + \')\'}"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'LISTING\'">\r\n <ng-template [ngIf]="chip.icon[0] !== \'mlm\'" [ngIfElse]="mlm">\r\n <mat-icon class="listing-icon">\r\n list\r\n </mat-icon>\r\n </ng-template>\r\n <ng-template #mlm>\r\n <mat-icon class="listing-icon" svgIcon="opi:mlm"></mat-icon>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'AMENITIES\'">\r\n <span class="icon ic-amenities-{{chip.icon[0]}}"></span>\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <ng-container *ngFor="let i of chip.icon">\r\n <span class="icon ic-features-{{i}}"></span>\r\n </ng-container>\r\n </ng-container>\r\n </ng-container>\r\n {{chip.text}}\r\n </mat-chip>\r\n </ng-container>\r\n </mat-chip-list>\r\n </ng-template>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block;position:inherit;top:inherit;bottom:inherit;left:inherit;right:inherit;z-index:inherit;width:inherit}.fab-filters{display:flex;width:100%;border-radius:8px 0 0 8px}.fab-filters .filters-container{width:calc(100% - 64px);height:40px;padding-right:8px;box-sizing:border-box;border-radius:4px 4px 4px 0;display:flex;align-items:center;transition:150ms}.fab-filters .filters-container mat-chip-list{width:100%;height:100%;overflow:hidden}.fab-filters .filters-container mat-chip-list mat-chip{min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.fab-filters ::ng-deep .filters-container mat-chip-list .mat-chip-list-wrapper{width:100%;flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:16px;margin:0}.fab-filters .filters-container mat-chip-list mat-chip .icon{width:24px;height:24px;font-size:16px;border-radius:50%;margin-right:8px;display:flex;align-items:center;justify-content:center}"]}]}],e.ctorParameters=function(){return[{type:K},{type:Q},{type:de}]},e.propDecorators={isOPI:[{type:t.Input}],mlsLabel:[{type:t.Input}]},e}(),fe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,u.MatChipsModule,l.MatIconModule,s.MatButtonModule,J.forChild(),$.forChild()],declarations:[me],exports:[me]}]}],e}(),ge=function(){function e(){}return e.prototype.list=function(e,t,r,n){var i=this.getValueByCurrency(t,r),o=this.getValueByCurrency(t,n);return e=e.map((function(e){return r===n?e:o*(e/i)}))},e.prototype.number=function(e,t,r,n){var i=this.getValueByCurrency(t,r);return this.getValueByCurrency(t,n)*(e/i)},e.prototype.getValueByCurrency=function(e,t){var r=0;return e.forEach((function(e){e.type===t.toString()&&(r=e.value)})),r},e.decorators=[{type:t.Injectable}],e}(),ye=function(){function e(){}return e.linSpaceExp=function(e,t,r){for(var n=[],i=1.618033988749895,o=Math.log(t/e)/((r-1)*Math.log(i)),a=0;a<r;a++){n[a]=e*Math.pow(i,o*a);var s=Math.log10(n[a])+1;s>2&&(n[a]=Math.round(n[a]/Math.pow(10,s-2))*Math.pow(10,s-2))}return n},e}();function he(e,t){var r=e.errors;r&&(delete r[t],Object.keys(r).length?e.setErrors(r):e.setErrors(null))}var be=function(){function e(e,r,n,i,a,s){this._config=e,this._render=r,this._ref=n,this._service=i,this._formBuilder=a,this._converter=s,this.METERS_TO_SQ=10.76391042,this.changeFilter=new t.EventEmitter,this.isOPI=this._config||!1,this._subscription=new o.Subscription,this.propertyTypeList=W.PropertyTypeList.map((function(e){return z({},e)})),this.bedroomsList=Object.assign([],W.BedroomList),this.bathroomsList=Object.assign([],W.BathroomList),this.parkingPlacesList=Object.assign([],W.ParkingSpacesList),this.surfaceList=Object.assign([],W.SurfaceList),this.roiList=Object.assign([],W.ROIList),this.surfaceUnitSelected=0,this.buildForm(),this.initComponentByPropertyType(),this.restoreLastFiltersSaved(!0),this.listenChangesOnForm()}return e.prototype.ngOnInit=function(){this.openComponent(!1)},e.prototype.ngAfterViewInit=function(){if(!this.utils)return console.warn("[FiltersComponent] utils param is required");this.initComponent()},e.prototype.ngOnChanges=function(e){e.utils&&e.utils.currentValue&&(console.log("[FiltersComponent] utils ready"),this.initComponent())},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.open=function(){this.restoreLastFiltersSaved(),this.openComponent(!0)},e.prototype.close=function(){this.openComponent(!1)},e.prototype.changePropertyType=function(e){switch(this.resetFilters(e),this.filter.locationType="STATE",this.filter.state=null,this.filter.municipality=null,this.filter.colony=null,this.applyAmenities(),this.filter.type=this.propertyTypeSelected.value,this.propertyTypeSelected.value){case n.PropertyTypeEnum.ROOM:this.filtersForm.controls.offering.setValue(n.OfferingTypeEnum.RENT);break;case n.PropertyTypeEnum.INVESTMENT:this.filtersForm.controls.offering.setValue(n.OfferingTypeEnum.SALE)}this.changeFilter.emit({type:"propertyType",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.changeOffering=function(e){this.filter.locationType="STATE",this.filter.state=null,this.filter.municipality=null,this.filter.colony=null,this.filtersForm.get("state").setValue(""),this.filtersForm.get("state").markAsTouched(),this.filter.offering=e,this.changeFilter.emit({type:"offer",payload:{filter:this.filter,value:this.filtersForm.value}})},e.prototype.changeCurrency=function(e){this.filter.currency=e,this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:this.filter}})},e.prototype.changeState=function(e){this.filter.state=e},e.prototype.updateAmenity=function(e){if(e.checked){var t=this.filter.extras.indexOf(e.value);t>-1&&this.filter.extras.splice(t,1)}else this.filter.extras.push(e.value);e.checked=!e.checked,this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:this.filter}})},e.prototype.saveSearchByFilters=function(){this.applyFilters(ce.SAVE)},e.prototype.applyFilters=function(e){this.getFilterByForm();var t=Object.assign({},this.filter);1===this.surfaceUnitSelected&&(t.mainArea=t.mainArea*this.METERS_TO_SQ),this.updateFiltersSaved(t),this._service.setChange({type:e||ce.APPLY,filter:t,ft:1===this.surfaceUnitSelected,isSharedProperties:this._isSharedProperties}),this.openComponent(!1)},e.prototype.resetFilters=function(e){this.filter.currency=e?this.filter.currency:"MXN",this.initComponentByPropertyType(e),this.surfaceUnitSelected=0,this.filter=e?X.getFilterByPropertyType(this.filter):X.getInitialFilter(this.isOPI,this.filter),this.updateFormByFilters(),this.setPrices(),this.propertyTotal=0},e.prototype.buildForm=function(){var e,t;this.filtersForm=this._formBuilder.group({state:["",[i.Validators.required]],offering:[],currency:[],minPrice:["",[i.Validators.required,i.Validators.pattern(new RegExp("(^[0-9]+)"))]],maxPrice:["",[i.Validators.required,i.Validators.pattern(new RegExp("(^[0-9]+)"))]],bedrooms:[],bathrooms:[],parkingPlaces:[],surface:[],surfaceUnit:[],roi:[]},{validator:(e="minPrice",t="maxPrice",function(r){if(r){var n=r.controls[e],i=r.controls[t];i.value&&(n.value>=i.value&&i.setErrors({currency:!0}),n.value<i.value&&he(i,"currency"))}return null})})},e.prototype.changeFilterStatus=function(){this.getFilterByForm();var e=Object.assign({},this.filter);1===this.surfaceUnitSelected&&(e.mainArea=e.mainArea*this.METERS_TO_SQ),this.changeFilter.emit({type:"filter",payload:{filter:this.filter,value:e}})},e.prototype.updateFormByFilters=function(){this.filtersForm.patchValue({state:this.filter.state,offering:this.filter.offering,currency:this.filter.currency,minPrice:this.filter.downLimitPrice,maxPrice:this.filter.upLimitPrice,bedrooms:this.filter.bedrooms,bathrooms:this.filter.bathrooms,parkingPlaces:this.filter.parkingPlaces,surface:this.filter.mainArea,surfaceUnit:this.surfaceUnitSelected,roi:this.filter.roi})},e.prototype.getFilterByForm=function(){var e=this.filtersForm.value;this.filter.state=e.state,this.filter.offering=e.offering,this.filter.currency=e.currency,this.filter.downLimitPrice=Number(e.minPrice),this.filter.upLimitPrice=Number(e.maxPrice),this.filter.bedrooms=Number(e.bedrooms),this.filter.bathrooms=Number(e.bathrooms),this.filter.parkingPlaces=Number(e.parkingPlaces),this.filter.mainArea=Number(e.surface),this.surfaceUnitSelected=Number(e.surfaceUnit),this.filter.roi=Number(e.roi)},e.prototype.initComponent=function(){var e=this;this.initUtils(),this._subscription.add(this._service.getChanges().subscribe((function(t){switch(t.type){case ce.LIST_TYPE:e._isSharedProperties=t.isSharedProperties,e.updateFiltersSaved(t.filter);break;case ce.AREA:e.updateFiltersSaved(t.filter)}}))),this._service.startComponent(new H(this))},e.prototype.initUtils=function(){this.currencyList=this.utils.cers,this.setPrices()},e.prototype.setPrices=function(e){this.filtersForm.controls.minPrice.reset(0),this.filtersForm.controls.maxPrice.reset(0);var t=this.filtersForm.controls.offering.value;this.minPriceList=this.createPrices(this.utils.limitPrice,this.propertyTypeSelected.value,t),this.minPriceList=this._converter.list(this.minPriceList,this.utils.cers,n.Currency.USD,e||this.filter.currency),this.maxPriceList=Object.assign([],this.minPriceList),this._tmpMinPriceList=Object.assign([],this.minPriceList),this._tmpMaxPriceList=Object.assign([],this.maxPriceList)},e.prototype.applyAmenities=function(){var e=this;this.propertyTypeSelected.amenities=this.propertyTypeSelected.amenities.map((function(t){var r=e.filter.extras.indexOf(t.value);return t.checked=r>-1,t})),this.propertyTypeSelected.features=this.propertyTypeSelected.features.map((function(t){var r=e.filter.extras.indexOf(t.value);return t.checked=r>-1,t}))},e.prototype.createPrices=function(e,t,r){var n=[];return e.propertyRanges.forEach((function(e){e.offering===r&&e.type===t&&(n=ye.linSpaceExp(e.min,e.max,20))})),n},e.prototype.initComponentByPropertyType=function(e){void 0===e&&(e=null),this.propertyTypeSelected=JSON.parse(JSON.stringify(W.PropertyTypeList[null!==e?e:9]))},e.prototype.updateFiltersSaved=function(e){this.filter=e,de.saveFilters({filters:e,ft:1===this.surfaceUnitSelected,isSharedProperties:this._isSharedProperties||!1})},e.prototype.restoreLastFiltersSaved=function(e){var t=this,r=de.getFiltersSaved()||null;this.filter=r?r.filters:X.getInitialFilter(this.isOPI),r&&(r.ft&&(this.filter.mainArea=Number((this.filter.mainArea/this.METERS_TO_SQ).toFixed(0)),this.surfaceUnitSelected=r.ft?1:0),this._isSharedProperties=r.isSharedProperties||!1),this.propertyTypeSelected=W.PropertyTypeList.find((function(e){return e.value===t.filter.type})),this.applyAmenities(),this.updateFormByFilters(),e&&this.applyFilters(ce.INIT)},e.prototype.openComponent=function(e){e?(this._render.setStyle(this._ref.nativeElement,"visibility","visible"),this._render.setStyle(this._ref.nativeElement,"opacity","1")):(this._render.setStyle(this._ref.nativeElement,"opacity","0"),this._render.setStyle(this._ref.nativeElement,"visibility","collapse"))},e.prototype.listenChangesOnForm=function(){var e=this;this._subscription.add(this.filtersForm.controls.offering.valueChanges.subscribe((function(){e.setPrices()}))),this._subscription.add(this.filtersForm.controls.currency.valueChanges.subscribe((function(t){t&&e.setPrices(t.toString())}))),this._subscription.add(this.filtersForm.controls.minPrice.valueChanges.subscribe((function(t){if(t){e.maxPriceList=Object.assign([],e._tmpMaxPriceList);var r=e.minPriceList.indexOf(t);r>-1&&e.maxPriceList.splice(0,r+1)}}))),this._subscription.add(this.filtersForm.controls.maxPrice.valueChanges.subscribe((function(t){if(t){e.minPriceList=Object.assign([],e._tmpMinPriceList);var r=e.maxPriceList.indexOf(t);if(r>-1){var n=e.minPriceList.length-e.maxPriceList.length;e.minPriceList.splice(r+n,e.minPriceList.length-1)}}})))},e.decorators=[{type:t.Component,args:[{selector:"lib-filters",template:'\x3c!-- Todo: [FiltersComponent] Refactor code --\x3e\r\n<form class="filters" [formGroup]="filtersForm" [ngClass]="{\'filters--opened\': propertyTypeSelected.value !== \'NONE\'}">\r\n <ng-template [ngIf]="!isOPI">\r\n <div class="float-button-close">\r\n <button mat-icon-button type="button" class="float-button-close__button" (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <div class="body">\r\n <div class="--padding">\r\n <div class="header">\r\n <mat-form-field class="currency" appearance="outline">\r\n <mat-label>Divisa</mat-label>\r\n <mat-select formControlName="currency">\r\n <ng-container *ngFor="let currency of currencyList">\r\n <mat-option [value]="currency.type" (click)="changeCurrency(currency.type)">\r\n {{currency.type}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-button-toggle-group class="offering-type-list" name="offering-type" formControlName="offering"\r\n aria-label="Offering type">\r\n <mat-button-toggle (click)="changeOffering(\'SALE\')" [value]="\'SALE\'"\r\n [disabled]="propertyTypeSelected.value === \'NONE\' || propertyTypeSelected.value === \'ROOM\'">\r\n Venta\r\n </mat-button-toggle>\r\n <mat-button-toggle (click)="changeOffering(\'RENT\')" [value]="\'RENT\'"\r\n [disabled]="propertyTypeSelected.value === \'NONE\' || propertyTypeSelected.value === \'INVESTMENT\'">\r\n Renta\r\n </mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class="mat-elevation-z2" [ngClass]="{\'property-type-list\': !newFilters, \'new-property-type-list\': newFilters}">\r\n <ng-container *ngFor="let type of propertyTypeList; let i = index">\r\n <ng-template [ngIf]="type.value !== \'NONE\' || (type.value !== \'ROOM\' && newFilters)">\r\n <div class="property-type-list__button">\r\n <div\r\n class="property-type-list__border"\r\n [ngClass]="{\'property-type-list__border--active\': (type.value === propertyTypeSelected.value) || (propertyTypeSelected.value === \'NONE\') || ((type.value === \'HOUSE\' || type.value === \'APARTMENT\') && propertyTypeSelected.value === \'RESIDENTIAL\')}"\r\n [ngStyle]="{\'border-color\': \'var(--\' + type.iconName + \')\'}">\r\n <button mat-mini-fab="" type="button" (click)="changePropertyType(i)"\r\n [ngStyle]="{\'background-color\': \'var(--\' + type.iconName + \')\'}">\r\n <span class="property-type-list__icon ic-property-{{type.iconName}}"></span>\r\n </button>\r\n </div>\r\n <span class="property-type-list__label">{{type.shortName}}</span>\r\n <ng-template [ngIf]="type.value === \'RESIDENTIAL\' && propertyTypeSelected.value === \'RESIDENTIAL\'">\r\n <div class="property-type-list__divider property-type-list__divider--left"></div>\r\n <div class="property-type-list__divider property-type-list__divider--right"></div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n </div>\r\n <ng-template [ngIf]="isOPI">\r\n <div class="all">\r\n <button mat-raised-button="" type="button" class="all__button"\r\n [ngClass]="{\'all__button--active\': propertyTypeSelected.value === \'NONE\'}"\r\n (click)="changePropertyType(9)">Todo\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <ng-template [ngIf]="newFilters && propertyTypeSelected.value !== \'NONE\'">\r\n <div class="--padding">\r\n <h4 class="--title">\r\n Estado\r\n </h4>\r\n <div class="budget">\r\n <mat-form-field appearance="outline">\r\n <mat-label>Estado</mat-label>\r\n <mat-select formControlName="state">\r\n <ng-container *ngFor="let state of stateOptions">\r\n <mat-option [value]="state.name" (click)="changeState(state.name)">{{state.name}}</mat-option>\r\n <mat-error *ngIf="filtersForm.controls[\'state\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value !== \'NONE\'">\r\n <mat-divider></mat-divider>\r\n <div class="--padding">\r\n <h4 class="--title">\r\n <span class="ic-features-price"></span>\r\n Presupuesto\r\n </h4>\r\n <div class="budget">\r\n \x3c!-- Min price [START] --\x3e\r\n <mat-form-field appearance="outline">\r\n <mat-label>Mínimo</mat-label>\r\n <input autocomplete="off" matInput="" type="number" title="Min price" formControlName="minPrice" min="1" (focusout)="changeFilterStatus()">\r\n <mat-error *ngIf="filtersForm.controls[\'minPrice\'].hasError(\'pattern\')">\r\n Debe ingresar solo números\r\n </mat-error>\r\n <mat-error *ngIf="filtersForm.controls[\'minPrice\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Min price [END] --\x3e\r\n \x3c!-- Max price [START] --\x3e\r\n <mat-form-field appearance="outline">\r\n <mat-label>Máximo</mat-label>\r\n <input autocomplete="off" matInput="" type="number" title="max price" formControlName="maxPrice" (focusout)="changeFilterStatus()">\r\n <mat-error *ngIf="filtersForm.controls[\'maxPrice\'].hasError(\'pattern\')">\r\n Debe ingresar solo números\r\n </mat-error>\r\n <mat-error *ngIf="filtersForm.controls[\'maxPrice\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="filtersForm.controls[\'maxPrice\'].hasError(\'currency\')">\r\n Valor mínimo excedido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Max price [END] --\x3e\r\n </div>\r\n <div class="features">\r\n <ng-template\r\n [ngIf]="propertyTypeSelected.value === \'RESIDENTIAL\' || propertyTypeSelected.value === \'HOUSE\' || propertyTypeSelected.value === \'APARTMENT\'">\r\n <div class="features__bedrooms">\r\n <h4 class="--title">\r\n <span class="ic-features-bedroom"></span>\r\n Habitaciones\r\n </h4>\r\n <mat-button-toggle-group name="bedrooms" aria-label="Bedrooms" formControlName="bedrooms">\r\n <ng-container *ngFor="let bedroom of bedroomsList">\r\n <ng-template [ngIf]="bedroom === 0" [ngIfElse]="bedroomNumber">\r\n <mat-button-toggle [value]="bedroom" (click)="changeFilterStatus()" class="features__bedrooms--unlimited">\r\n Sin <br> límite\r\n </mat-button-toggle>\r\n </ng-template>\r\n <ng-template #bedroomNumber>\r\n <mat-button-toggle [value]="bedroom" (click)="changeFilterStatus()">{{bedroom}}+\r\n </mat-button-toggle>\r\n </ng-template>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n <div class="features__bathrooms">\r\n <h4 class="--title">\r\n <span class="ic-features-bathroom"></span>\r\n Baños\r\n </h4>\r\n <mat-button-toggle-group name="bathrooms" aria-label="Bathrooms" formControlName="bathrooms">\r\n <ng-container *ngFor="let bathroom of bathroomsList">\r\n <ng-template [ngIf]="bathroom === 0" [ngIfElse]="bathroomNumber">\r\n <mat-button-toggle [value]="bathroom" (click)="changeFilterStatus()"\r\n class="features__bathrooms--unlimited">\r\n Sin <br> límite\r\n </mat-button-toggle>\r\n </ng-template>\r\n <ng-template #bathroomNumber>\r\n <mat-button-toggle [value]="bathroom" (click)="changeFilterStatus()">{{bathroom}}+\r\n </mat-button-toggle>\r\n </ng-template>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value !== \'LAND\' && propertyTypeSelected.value !== \'INVESTMENT\'">\r\n <div class="features__parking-places">\r\n <h4 class="--title">\r\n <span class="ic-features-parking"></span>\r\n Estacionamientos\r\n </h4>\r\n <mat-button-toggle-group name="parking_places" aria-label="Parking Places"\r\n formControlName="parkingPlaces">\r\n <ng-container *ngFor="let parking of parkingPlacesList">\r\n <ng-template [ngIf]="parking === 0" [ngIfElse]="parkingNumber">\r\n <mat-button-toggle [value]="parking" (click)="changeFilterStatus()"\r\n class="features__parking-places--unlimited">\r\n Sin <br> límite\r\n </mat-button-toggle>\r\n </ng-template>\r\n <ng-template #parkingNumber>\r\n <mat-button-toggle [value]="parking" (click)="changeFilterStatus()">{{parking}}+\r\n </mat-button-toggle>\r\n </ng-template>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value !== \'INVESTMENT\'">\r\n <div class="features__surface">\r\n <h4 class="--title">\r\n <span class="ic-features-surface"></span>\r\n Superficie\r\n </h4>\r\n <div class="--row">\r\n <mat-form-field appearance="outline" class="--col">\r\n <mat-label>Área</mat-label>\r\n <mat-select formControlName="surface" (selectionChange)="changeFilterStatus()">\r\n <mat-option [value]="0" (click)="changeFilterStatus()">\r\n Sin límite\r\n </mat-option>\r\n <ng-container *ngFor="let surface of surfaceList">\r\n <mat-option [value]="surface" (click)="changeFilterStatus()">\r\n {{surface}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-button-toggle-group name="unit_surface" aria-label="Unit surface" formControlName="surfaceUnit">\r\n <mat-button-toggle (click)="changeFilterStatus()" [value]="0">m2</mat-button-toggle>\r\n <mat-button-toggle (click)="changeFilterStatus()" [value]="1">sq ft</mat-button-toggle>\r\n </mat-button-toggle-group>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.value === \'INVESTMENT\'">\r\n <div class="feature investment">\r\n <h4 class="--title">Retorno de inversión</h4>\r\n <mat-form-field appearance="outline" class="--col">\r\n <mat-label>Porcentaje</mat-label>\r\n <mat-select formControlName="roi">\r\n <mat-option [value]="0" (click)="changeFilterStatus()">\r\n Sin límite\r\n </mat-option>\r\n <ng-container *ngFor="let roi of roiList">\r\n <mat-option [value]="roi" (click)="changeFilterStatus()">\r\n {{roi}}%\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </ng-template>\r\n <div class="amenities-container">\r\n <ng-template [ngIf]="propertyTypeSelected.amenities.length > 0">\r\n <div class="amenities">\r\n <h4 class="--title">\r\n Amenidades\r\n </h4>\r\n <div class="amenities__list">\r\n <ng-container *ngFor="let amenity of propertyTypeSelected.amenities">\r\n <div class="amenities__amenity" matRipple (click)="updateAmenity(amenity)">\r\n <span class="amenity__icon ic-amenities-{{amenity.iconName}}"\r\n [ngClass]="{\'amenity--active\': amenity.checked}"></span>\r\n <span class="amenity__label">{{amenity.name}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="propertyTypeSelected.features.length > 0">\r\n <div class="amenities">\r\n <h4 class="--title">\r\n Caracteristicas de la ubicación\r\n </h4>\r\n <div class="amenities__list">\r\n <ng-container *ngFor="let feature of propertyTypeSelected.features">\r\n <div class="amenities__amenity" matRipple (click)="updateAmenity(feature)">\r\n <span class="amenity__icon ic-amenities-{{feature.iconName}}"\r\n [ngClass]="{\'amenity--active\': feature.checked}"></span>\r\n <span class="amenity__label">{{feature.name}}</span>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class="actions">\r\n \x3c!--ng-template [ngIf]="!isOPI" [ngIfElse]="closeButtonTemplate">\r\n <button mat-flat-button="" type="button" class="action__button" color="primary" (click)="saveSearchByFilters()">\r\n GUARDAR\r\n </button>\r\n </ng-template--\x3e\r\n <ng-template #closeButtonTemplate>\r\n <button mat-flat-button="" type="button" class="action__button" color="primary" (click)="close()">CERRAR</button>\r\n </ng-template>\r\n <button mat-flat-button="" type="button" class="action__button" color="primary"\r\n (click)="resetFilters()">LIMPIAR\r\n </button>\r\n <button mat-flat-button="" type="submit" class="action__button" color="primary" [disabled]="(propertyTotal === 0 || filtersForm.invalid) && newFilters"\r\n (click)="applyFilters()">APLICAR <span *ngIf="propertyTotal > 0 && newFilters">({{propertyTotal}})</span>\r\n </button>\r\n </div>\r\n</form>\r\n',styles:[":host{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;display:flex;background:var(--overlay);transition:250ms}.filters--opened{height:90%!important}@media screen and (max-width:600px){.filters--opened{width:100%!important;height:100%!important;top:0!important}}.filters{width:700px;height:auto;margin:auto;border-radius:16px;position:relative;overflow:hidden;transition:150ms}.filters .--padding{padding:16px 48px;box-sizing:border-box}.filters .--row{display:flex;justify-content:space-between;align-items:flex-start}.filters .--col{width:45%}.filters .--title{margin:16px 0;color:#707070}.filters .float-button-close{position:absolute;top:16px;right:16px;height:16px;border-radius:50%}.filters .body{height:calc(100% - 36px);overflow-x:hidden;overflow-y:auto}.filters .header{display:flex;align-items:center;justify-content:space-around;margin-bottom:8px}.filters .listing-types{width:100%;border-radius:16px}.filters .listing-types mat-button-toggle{width:50%;height:36px}.filters ::ng-deep .listing-types mat-button-toggle button{height:36px}.filters ::ng-deep .listing-types mat-button-toggle button .mat-button-toggle-label-content{line-height:36px}.filters .currency ::ng-deep .mat-form-field-wrapper{padding:0}@media screen and (max-width:600px){.filters{width:100%;position:absolute;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;top:initial;bottom:0;left:0}.filters .--padding{padding:16px 24px}.filters .header{flex-direction:column}.filters .currency{width:70%;margin-bottom:8px}}.filters .offering-type-list{width:40%;border-radius:16px}.filters .offering-type-list mat-button-toggle{width:50%;height:36px}.filters ::ng-deep .offering-type-list mat-button-toggle button{height:36px}.filters ::ng-deep .offering-type-list mat-button-toggle button .mat-button-toggle-label-content{line-height:36px}.filters .property-type-list{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 9))[9];grid-template-columns:repeat(9,calc(100% / 9));-ms-grid-rows:(80px)[1];grid-template-rows:repeat(1,80px);border-radius:40px;padding:8px;box-sizing:border-box}@media screen and (max-width:600px){.filters .offering-type-list{width:70%}.filters .property-type-list{-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3));-ms-grid-rows:(80px)[3];grid-template-rows:repeat(3,80px)}}.filters .new-property-type-list{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 8))[8];grid-template-columns:repeat(8,calc(100% / 8));-ms-grid-rows:(80px)[1];grid-template-rows:repeat(1,80px);border-radius:40px;padding:8px;box-sizing:border-box}.filters .property-type-list .property-type-list__button{margin:auto;position:relative}.filters .property-type-list .property-type-list__button button{box-shadow:none}.filters .property-type-list .property-type-list__icon{width:24px;height:24px;font-size:24px}.filters .property-type-list .property-type-list__border{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto;opacity:.7;border-radius:50%;box-sizing:border-box}.filters .property-type-list .property-type-list__border--active{padding:4px;border:2px solid;opacity:1!important}.filters .property-type-list .property-type-list__label{font-size:12px;display:block;margin:8px 0;text-align:center}.filters .property-type-list .property-type-list__divider{width:14%;height:2px;background:#707070;top:30%;position:absolute}.filters .property-type-list .property-type-list__divider--left{left:-9px}.filters .property-type-list .property-type-list__divider--right{right:-9px}@media screen and (max-width:600px){.filters .new-property-type-list{-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3));-ms-grid-rows:(80px)[3];grid-template-rows:repeat(3,80px)}.filters .property-type-list .property-type-list__divider{width:60%}.filters .property-type-list .property-type-list__divider--left{left:-38px}.filters .property-type-list .property-type-list__divider--right{right:-38px}}.filters .new-property-type-list .property-type-list__button{margin:auto;position:relative}.filters .new-property-type-list .property-type-list__button button{box-shadow:none}.filters .new-property-type-list .property-type-list__icon{width:24px;height:24px;font-size:24px}.filters .new-property-type-list .property-type-list__border{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:auto;opacity:.7;border-radius:50%;box-sizing:border-box}.filters .new-property-type-list .property-type-list__border--active{padding:4px;border:2px solid;opacity:1!important}.filters .new-property-type-list .property-type-list__label{font-size:12px;display:block;margin:8px 0;text-align:center}.filters .new-property-type-list .property-type-list__divider{width:14%;height:2px;background:#707070;top:30%;position:absolute}.filters .new-property-type-list .property-type-list__divider--left{left:-9px}.filters .new-property-type-list .property-type-list__divider--right{right:-9px}@media screen and (max-width:600px){.filters .new-property-type-list .property-type-list__divider{width:60%}.filters .new-property-type-list .property-type-list__divider--left{left:-38px}.filters .new-property-type-list .property-type-list__divider--right{right:-38px}}.filters .all{width:100%;margin:8px 0}.filters .all .all__button{margin:0 40%;width:20%;border-radius:16px;background:0 0}.filters .budget{display:flex}.filters .budget mat-form-field{margin-right:8px;width:calc(100% / 2 - 8px)}.filters .features{display:-ms-grid;display:grid;-ms-grid-columns:(50%)[2];grid-template-columns:repeat(2,50%);-ms-grid-rows:(auto)[2];grid-template-rows:repeat(2,auto)}@media screen and (max-width:600px){.filters .all .all__button{width:50%;margin:0 25%}.filters .features{display:block}.filters .amenities-container{flex-direction:column}}.filters .features .features__bathrooms mat-button-toggle-group,.filters .features .features__bedrooms mat-button-toggle-group,.filters .features .features__parking-places mat-button-toggle-group{width:calc(100% - 16px)}.filters .features .features__bathrooms mat-button-toggle-group mat-button-toggle,.filters .features .features__bedrooms mat-button-toggle-group mat-button-toggle,.filters .features .features__parking-places mat-button-toggle-group mat-button-toggle{width:calc(100% / 5)}.filters .features .features__bedrooms--unlimited ::ng-deep .mat-button-toggle-label-content{line-height:16px;padding:8px;font-size:12px}.filters .features .features__bathrooms--unlimited ::ng-deep .mat-button-toggle-label-content{line-height:16px;padding:8px;font-size:12px}.filters .features .features__parking-places--unlimited ::ng-deep .mat-button-toggle-label-content{line-height:16px;padding:8px;font-size:12px}.filters .features .features__surface mat-button-toggle-group{margin-top:6px;margin-right:16px}.filters .amenities-container{width:100%;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3;display:flex}.filters .amenities{width:50%}@media screen and (max-width:600px){.filters .amenities{width:100%}}.filters .amenities__amenity{width:calc(100% / 3 - 24px);height:120px;border-radius:8px;padding:8px;display:inline-flex;flex-direction:column;align-items:center;box-sizing:border-box;margin:0 8px 8px 0;cursor:pointer}.filters .amenity__icon{display:block;width:24px;height:24px;margin:8px auto;font-size:24px;padding:8px;border-radius:50%}.filters .amenity__label{width:100%;display:block;text-align:center;font-size:12px;margin:auto}.filters .actions{display:flex}.filters .actions .action__button{width:50%;border-radius:0}"]}]}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[ue]}]},{type:t.Renderer2},{type:t.ElementRef},{type:de},{type:i.FormBuilder},{type:ge}]},e.propDecorators={utils:[{type:t.Input}],newFilters:[{type:t.Input}],stateOptions:[{type:t.Input}],propertyTotal:[{type:t.Input}],changeFilter:[{type:t.Output}]},e}(),_e=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[ge]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule]}]}],e}(),ve=function(){function e(){}return e.forChild=function(t){return{ngModule:e,providers:[de,{provide:ue,useValue:t||!1}]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,i.ReactiveFormsModule,i.FormsModule,y.MatRippleModule,m.MatFormFieldModule,f.MatSelectModule,d.MatButtonToggleModule,l.MatIconModule,s.MatButtonModule,g.MatDividerModule,h.MatInputModule,$.forChild(),_e.forChild()],declarations:[be],exports:[be],providers:[de]}]}],e}(),Ee=function(){function e(e){this._lazy=e}return e.checkTouchSupported=function(){return!!window&&(null!==window.navigator.msMaxTouchPoints&&void 0!==window.navigator.msMaxTouchPoints||"ontouchstart"in window)},e.prototype.ngAfterViewInit=function(){var e=this;this.url&&""!==this.url&&this._lazy.load("https://pchen66.github.io/js/three/three.min.js").then((function(){return e._lazy.load("https://rawgit.com/pchen66/panolens.js/dev/build/panolens.min.js")})).then((function(){setTimeout((function(){e.showPanorama=!0,e.init()}),500)})).catch((function(e){console.log("Failed",e)}))},e.prototype.ngOnDestroy=function(){this._panorama&&this._panorama.dispose(),this._viewer&&(this._viewer.dispose(),this._viewer.destroy())},e.prototype.fullscreen=function(){this.toggleFullscreen()},e.prototype.changeControl=function(e){var t=this;if(this._viewer)switch(e){case"MOUSE":case"TOUCH":this._viewer.enableControl(PANOLENS.CONTROLS.ORBIT);break;case"SENSOR":this.requestPermissions().subscribe((function(e){e?t._viewer.enableControl(PANOLENS.CONTROLS.DEVICEORIENTATION):confirm("No se otorgarón los permisos de movimiento y orientación, ¿desea ir a ajustes?")?window.location.href="prefs:root=Safari":alert("Permisos de movimiento y orientación no otorgados")}))}},e.prototype.changeMode=function(e){if(this._viewer)switch(e){case"NORMAL":this._viewer.disableEffect();break;case"CARDBOARD":this._viewer.enableEffect(PANOLENS.MODES.CARDBOARD);break;case"STEREOSCOPIC":this._viewer.enableEffect(PANOLENS.MODES.STEREO)}},e.prototype.init=function(){try{this.isTouch=e.checkTouchSupported(),this._panorama=new PANOLENS.ImagePanorama(this.url),this._viewer=new PANOLENS.Viewer({container:this._container.nativeElement,controlBar:!0,controlButtons:[]}),this._viewer.onWindowResize(this._container.nativeElement.offsetWidth,this._container.nativeElement.offsetHeight),this._viewer.add(this._panorama)}catch(e){console.log("Failed",e)}},e.prototype.toggleFullscreen=function(){var e=window.document,t=this._container.nativeElement,r=t.requestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullScreen||t.msRequestFullscreen,n=e.exitFullscreen||e.mozCancelFullScreen||e.webkitExitFullscreen||e.msExitFullscreen;e.fullscreenElement||e.mozFullScreenElement||e.webkitFullscreenElement||e.msFullscreenElement?(n.call(e),this.isFullScreen=!1):(r.call(t),this.isFullScreen=!0)},e.prototype.requestPermissions=function(){var e=o.of(!0),t=o.of(!1);return"function"==typeof DeviceMotionEvent.requestPermission?b.fromPromise(DeviceOrientationEvent.requestPermission()).pipe(_.mergeMap((function(e){return"granted"===e?b.fromPromise(DeviceMotionEvent.requestPermission()).pipe(_.map((function(e){return"granted"===e}))):t}))):e},e.decorators=[{type:t.Component,args:[{selector:"lib-panorama-visor",template:'<div class="panorama-visor">\r\n <ng-template [ngIf]="!showPanorama">\r\n <div class="panorama-visor__loading">\r\n <img class="loading__image" src="https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/360-animation.gif" alt="360 icon">\r\n <p class="loading__label">Cargando...</p>\r\n </div>\r\n </ng-template>\r\n <div #container class="panorama-visor__container" [ngStyle]="{\'opacity\': showPanorama ? \'1\' : \'0\'}">\r\n <div class="panorama-visor__actions">\r\n <a mat-icon-button class="actions__menu-item">\r\n <mat-icon>settings</mat-icon>\r\n <ul class="menu-item__hidden-list mat-elevation-z2">\r\n <li mat-menu-item class="hidden-list__item">\r\n Control\r\n <ul class="hidden-list__nested-list mat-elevation-z2">\r\n <li mat-menu-item class="nested-list__item" *ngIf="!isTouch" (click)="changeControl(\'MOUSE\')">\r\n Mouse\r\n </li>\r\n <li mat-menu-item class="nested-list__item" *ngIf="isTouch" (click)="changeControl(\'TOUCH\')">\r\n Touch\r\n </li>\r\n <li mat-menu-item class="nested-list__item" (click)="changeControl(\'SENSOR\')">\r\n Sensor\r\n </li>\r\n </ul>\r\n </li>\r\n <li mat-menu-item class="hidden-list__item">\r\n Mode\r\n <ul class="hidden-list__nested-list mat-elevation-z2">\r\n <li mat-menu-item class="nested-list__item" (click)="changeMode(\'NORMAL\')">\r\n Normal\r\n </li>\r\n <li mat-menu-item class="nested-list__item" (click)="changeMode(\'CARDBOARD\')">\r\n Cardboard\r\n </li>\r\n <li mat-menu-item class="nested-list__item" (click)="changeMode(\'STEREOSCOPIC\')">\r\n Stereoscopic\r\n </li>\r\n </ul>\r\n </li>\r\n </ul>\r\n </a>\r\n <button mat-icon-button (click)="fullscreen()">\r\n <mat-icon *ngIf="!isFullScreen">fullscreen</mat-icon>\r\n <mat-icon *ngIf="isFullScreen">fullscreen_exit</mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block;width:inherit;height:inherit}.panorama-visor{width:100%;padding-bottom:calc(100% / 4 * 3);position:relative;border-radius:8px;transition:.2s;cursor:move}.panorama-visor__loading{position:absolute;width:100%;height:100%;font-size:12px;display:flex;flex-direction:column;align-items:center;justify-content:center}.loading__image{width:200px}.loading__label{color:#fff;font-weight:700}.panorama-visor__actions{position:absolute;border-radius:0 8px 8px 0;background:rgba(0,0,0,.4);z-index:100;color:#fff}.panorama-visor__actions button{display:block}.actions__menu-item{position:relative}.actions__menu-item:hover .menu-item__hidden-list,.hidden-list__item:hover .hidden-list__nested-list{display:block}.hidden-list__nested-list,.menu-item__hidden-list{display:none;list-style:none;position:absolute;background:#fff;margin:0;padding:0;left:calc(100% - 8px);top:0;z-index:1;border-radius:4px}.hidden-list__item,.nested-list__item{min-width:80px;padding:0 16px;text-align:left;cursor:pointer}.panorama-visor__container{position:absolute;top:0;left:0;width:100%;height:100%;border-radius:8px;transition:250ms}::ng-deep .panorama-visor__container canvas{width:100%!important;height:100%!important}"]}]}],e.ctorParameters=function(){return[{type:p.LazyLoadService}]},e.propDecorators={url:[{type:t.Input}],_container:[{type:t.ViewChild,args:["container",{static:!0}]}]},e}(),xe=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,h.MatMenuModule,h.MatButtonModule,h.MatIconModule,p.LazyLoaderModule.forChild()],declarations:[Ee],exports:[Ee]}]}],e}(),Ie=function(){function e(e,t){switch(this._data=e,this._dialog=t,this._data.currentType){case n.PFileTypeEnum.IMAGE:this.fileType="image",this.currentIndex=0;break;case n.PFileTypeEnum.SPHERIC:this.fileType="image360",this.currentIndex=1;break;case n.PFileTypeEnum.VIDEO:this.fileType="document",this.currentIndex=2}this.images=[],this.images360=[],this.videos=[],this._newMedia=[]}return e.getYouTubeID=function(e){if(-1!==e.indexOf("https://youtu.be/"))return e=e.replace("https://youtu.be/","");if(-1===e.indexOf("https://www.youtube.com/"))return null;if(-1===(e=e.replace("https://www.youtube.com/","")).indexOf("watch?v="))return null;if((e=e.replace("watch?v=","")).indexOf("&")){var t=e.split("&");e=t[0]}return e},e.prototype.ngOnInit=function(){this.parseMultimedia()},e.prototype.onUploadImage=function(e){var t=this;if(e)switch(this.fileType){case"image":Array.isArray(e)?e.forEach((function(e){t.createImagePFile(e)})):this.createImagePFile(e);break;case"image360":Array.isArray(e)?e.forEach((function(e){t.createImage360PFile(e)})):this.createImage360PFile(e)}},e.prototype.onTabChanged=function(e){switch(this.currentIndex=e,e){case 0:this.fileType="image";break;case 1:this.fileType="image360"}},e.prototype.onListChanged=function(e){switch(this.currentIndex){case 0:Array.isArray(e)&&e.length>0&&(e=e.map((function(e,t){return e.position=t,e})),this.images=e);break;case 1:Array.isArray(e)&&e.length>0&&(e=e.map((function(e,t){return e.position=t,e})),this.images360=e);break;case 2:Array.isArray(e)&&e.length>0&&(e=e.map((function(e,t){return e.position=t,e})),this.videos=e)}},e.prototype.removeMedia=function(e){var t=-1;if(e.id)switch(e.type){case n.PFileTypeEnum.IMAGE:this.images.splice(this.images.indexOf(e),1);break;case n.PFileTypeEnum.SPHERIC:this.images360.splice(this.images360.indexOf(e),1);break;case n.PFileTypeEnum.VIDEO:this.videos.splice(this.videos.indexOf(e),1)}else{switch(e.type){case n.PFileTypeEnum.IMAGE:this.images.splice(this.images.indexOf(e),1);break;case n.PFileTypeEnum.SPHERIC:this.images360.splice(this.images360.indexOf(e),1);break;case n.PFileTypeEnum.VIDEO:this.videos.splice(this.videos.indexOf(e),1)}this._newMedia.forEach((function(r,n){r.url===e.fileCS.thumbnail&&(t=n)})),t>-1&&this._newMedia.splice(t,1)}},e.prototype.onYouTubeInputTextChanged=function(t){if(""!==t.value){var r=e.getYouTubeID(t.value);if(r&&r.length>=11){var i=new n.PFile;i.type=n.PFileTypeEnum.VIDEO,i.media=!0,i.name="video_"+(new Date).getTime(),i.fileCS={thumbnail:r,blobName:null},i.position=0===this.videos.length?0:this.videos.length,this.videos.push(i),t.value=""}}},e.prototype.accept=function(){this._dialog.close({multimedia:this.joinMultimediaTypes(),newMedia:this._newMedia})},e.prototype.close=function(){this._dialog.close(null)},e.prototype.createImagePFile=function(e){var t=new n.PFile;t.type=n.PFileTypeEnum.IMAGE,e.type=n.PFileTypeEnum.IMAGE,t.media=!0,t.fileCS={thumbnail:e.url,blobName:null};var r="image_"+Date.now()+"_"+Math.round(1e6*Math.random())+"."+e.blob.type.replace("image/","");t.name=r,e.name=r,t.position=0===this.images.length?0:this.images.length,this._newMedia.push(e),this.images.push(t)},e.prototype.createImage360PFile=function(e){var t=new n.PFile;t.type=n.PFileTypeEnum.SPHERIC,e.type=n.PFileTypeEnum.SPHERIC,t.media=!0;var r="spheric_"+Date.now()+"_"+Math.round(1e6*Math.random())+"."+e.blob.type.replace("image/","");t.name=r,e.name=r,t.fileCS={thumbnail:e.url,blobName:null},t.position=0===this.images360.length?0:this.images360.length,this._newMedia.push(e),this.images360.push(t)},e.prototype.parseMultimedia=function(){var e=this;this._data&&(this._data.multimedia.forEach((function(t){switch(t.type){case n.PFileTypeEnum.IMAGE:e.images.push(t);break;case n.PFileTypeEnum.SPHERIC:e.images360.push(t);break;case n.PFileTypeEnum.VIDEO:e.videos.push(t)}})),this._newMedia=this._data.newMedia||[])},e.prototype.joinMultimediaTypes=function(){var e=[];return e=(e=(e=e.concat(this.images)).concat(this.images360)).concat(this.videos)},e.decorators=[{type:t.Component,args:[{selector:"lib-property-multimedia-uploader",template:'<div class="multimedia-uploader">\r\n <p class="title">\r\n Multimedia\r\n <ng-template [ngIf]="currentIndex !== 2">\r\n <lib-upload-file [content]="buttonUploadTemplate" [noCrop]="true" [fab]="true" [fileType]="fileType" [aspectRatio]="4 / 3"\r\n [multiple]="true"\r\n (loadImage)="onUploadImage($event)">\r\n <ng-template #buttonUploadTemplate>\r\n <button mat-icon-button color="primary">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </ng-template>\r\n </lib-upload-file>\r\n </ng-template>\r\n </p>\r\n <mat-tab-group class="multimedia-uploader__tab-group" [selectedIndex]="currentIndex"\r\n (selectedIndexChange)="onTabChanged($event)">\r\n <mat-tab label="Fotografias">\r\n <lib-custom-drag-and-drop [items]="images" [content]="imageTemplate" (itemsChanged)="onListChanged($event)">\r\n <ng-template #imageTemplate let-image="image" let-index="index">\r\n <div class="list__item" [ngClass]="{\'first-photo\': index === 0}">\r\n <img alt="Property image" [src]="image.fileCS.thumbnail" class="list__item-img">\r\n <button mat-icon-button class="list__item-button mat-elevation-z2" (click)="removeMedia(image)">\r\n <mat-icon class="list__item-icon">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </lib-custom-drag-and-drop>\r\n </mat-tab>\r\n <mat-tab label="Esfericas">\r\n <lib-custom-drag-and-drop [items]="images360" [content]="image360Template" (itemsChanged)="onListChanged($event)">\r\n <ng-template #image360Template let-image="image">\r\n <div class="list__item">\r\n <img alt="Property image" [src]="image.fileCS.thumbnail" class="list__item-img">\r\n <button mat-icon-button class="list__item-button mat-elevation-z2" (click)="removeMedia(image)">\r\n <mat-icon class="list__item-icon">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </lib-custom-drag-and-drop>\r\n </mat-tab>\r\n <mat-tab label="Videos">\r\n <div class="you-tube-container">\r\n <span class="you-tube-container__searchbox">\r\n <button *ngIf="inputYouTube.value !== \'\'" mat-icon-button class="you-tube-container__close-btn"\r\n (click)="inputYouTube.value = \'\'"><mat-icon>close</mat-icon></button>\r\n <input class="you-tube-container__input" #inputYouTube (input)="onYouTubeInputTextChanged(inputYouTube)"\r\n title="YouTube URL" placeholder="YouTube URL o YouTube Video ID">\r\n </span>\r\n <a href="https://www.youtube.com" target="_blank" mat-button color="primary">\r\n Ir a Youtube\r\n </a>\r\n </div>\r\n <lib-custom-drag-and-drop [items]="videos" [content]="videosTemplate" (itemsChanged)="onListChanged($event)">\r\n <ng-template #videosTemplate let-image="image">\r\n <div class="list__item">\r\n <img alt="Property image" [src]="\'https://i3.ytimg.com/vi/\'+image.fileCS.thumbnail+\'/hqdefault.jpg\'"\r\n class="list__item-img">\r\n <button mat-icon-button class="list__item-button mat-elevation-z2" (click)="removeMedia(image)">\r\n <mat-icon class="list__item-icon">close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n </lib-custom-drag-and-drop>\r\n </mat-tab>\r\n </mat-tab-group>\r\n <div class="multimedia-uploader__actions">\r\n <button mat-flat-button color="primary" class="actions__button" (click)="close()">\r\n CERRAR\r\n </button>\r\n <button mat-flat-button color="primary" class="actions__button" (click)="accept()">\r\n ACEPTAR\r\n </button>\r\n </div>\r\n</div>\r\n',styles:[':host{display:block;width:100%;height:100%}::ng-deep .multimedia-uploader-panel-class{width:50%;height:70%}::ng-deep .multimedia-uploader-panel-class mat-dialog-container{width:100%;height:100%;padding:16px;overflow:hidden;position:relative}.multimedia-uploader{width:100%;height:100%}.multimedia-uploader__actions{position:absolute;left:0;bottom:0;width:100%;background:#fff;z-index:1}.actions__button{width:50%}.actions__button:first-child{border-radius:8px 0 0}.actions__button:last-child{border-radius:0 8px 0 0}.title{font-weight:700;display:flex;align-items:center;justify-content:space-between;padding:0 16px;margin:0}.multimedia-uploader__tab-group{width:100%;height:calc(100% - 36px)}.multimedia-uploader__list{width:100%;height:100%;overflow-x:hidden;overflow-y:auto;display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3))}@media screen and (max-width:600px){::ng-deep .multimedia-uploader-panel-class{width:100%!important;max-width:100%!important;height:100%!important}.multimedia-uploader__list{-ms-grid-columns:100%;grid-template-columns:100%}}.list__item{width:200px;height:150px;border-radius:8px;margin:16px auto;position:relative}.first-photo:after{content:"Imagen principal del anuncio";position:absolute;top:0;padding:8px;box-sizing:border-box;font-size:12px;width:100%;color:#fff;background:rgba(0,0,0,.3)}.list__item-img{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:8px}.list__item-button{position:absolute;width:24px;height:24px;top:-12px;right:-12px;background:#000;color:#fff}.list__item-icon{width:24px;height:24px;font-size:16px;line-height:8px}.you-tube-container{display:flex;padding:8px 0;box-sizing:border-box;justify-content:space-between;position:-webkit-sticky;position:sticky;top:0;z-index:5;background:#fff}.you-tube-container__searchbox{position:relative;width:calc(100% - 120px);box-sizing:border-box;display:flex;align-items:center}.you-tube-container__close-btn{position:absolute;right:0}.you-tube-container__input{width:100%;border:1px solid #d3d3d3;padding:8px 32px 8px 8px;border-radius:8px;outline:0}']}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[a.MAT_DIALOG_DATA]}]},{type:a.MatDialogRef}]},e}(),we=function(){function e(e){this._dialog=e}return e.prototype.open=function(e,t,r){return this._dialog.open(Ie,{data:{currentType:e||n.PFileTypeEnum.IMAGE,multimedia:t||[],newMedia:r||[]},panelClass:"multimedia-uploader-panel-class",disableClose:!0})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),Ae=function(){function e(e){this._dialogRef=e,this.list=W.AnnounceCheckList.map((function(e){return z({},e)}))}return e.prototype.close=function(){this._dialogRef.close({code:n.DialogResponseType.CANCEL})},e.prototype.accept=function(){var e=this;this.errorField=!1,this.list.forEach((function(t){t.checked||(e.errorField=!0)})),this.errorField||this._dialogRef.close({code:n.DialogResponseType.ACCEPT})},e.decorators=[{type:t.Component,args:[{selector:"lib-property-announce-confirm",template:'<div class="announce-confirm">\r\n <div class="body">\r\n <h2 class="body__title">\r\n Para anunciar es necesario confirmar lo siguiente\r\n </h2>\r\n <mat-checkbox class="body__check-box" *ngFor="let item of list" [(ngModel)]="item.checked">\r\n {{item.name}}\r\n </mat-checkbox>\r\n <ng-template [ngIf]="errorField">\r\n <p class="body__error-field">\r\n Para anunciar es necesario confirmar todas las casillas.\r\n </p>\r\n </ng-template>\r\n </div>\r\n <div class="body__actions">\r\n <button mat-button color="primary" (click)="close()">CANCELAR</button>\r\n <button mat-button color="primary" (click)="accept()">ANUNCIAR</button>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block}::ng-deep .confirm-announce-panel-class{width:30%}::ng-deep .confirm-announce-panel-class mat-dialog-container{padding:0;overflow:hidden}@media screen and (max-width:600px){::ng-deep .confirm-announce-panel-class{min-width:90%!important}}.announce-confirm .body{width:100%;padding:24px;box-sizing:border-box}.announce-confirm .body__title{font-size:18px;margin:0 0 16px}.announce-confirm .body__check-box{display:block}.announce-confirm .body__error-field{color:red;font-size:12px}.announce-confirm .body__actions{padding:16px;box-sizing:border-box;display:flex;justify-content:flex-end}.announce-confirm .body__actions button:first-child{margin-right:16px}"]}]}],e.ctorParameters=function(){return[{type:a.MatDialogRef}]},e}(),Ce=function(){function e(e){this._dialog=e}return e.prototype.open=function(){return this._dialog.open(Ae,{disableClose:!0,panelClass:"confirm-announce-panel-class"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),Fe=function(){function e(e,t,r){this._data=e,this._ref=t,this._breakpointObserver=r,this._subscription=new o.Subscription,this.multimedia=this.getPFilesByType(n.PFileTypeEnum.IMAGE,this._data.multimedia||[]),this.sideOpened=!0,this.indexSelected=this._data.indexSelected,this.typeSelected="IMAGE",this.count={image:0,sphere:0,video:0}}return e.prototype.ngOnInit=function(){var e=this;this._subscription.add(this._breakpointObserver.observe(["(max-width: 1024px)"]).subscribe((function(t){e._mobileVersion=t.matches}))),this.assignCountByType(),this.assignMultimediaByType()},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.close=function(){this._ref.close()},e.prototype.updateSideNav=function(){this.sideOpened=!this.sideOpened},e.prototype.selectPFile=function(e){this.indexSelected=e,this._mobileVersion&&this.updateSideNav()},e.prototype.onIndexSelectedChange=function(e){this.indexSelected=e},e.prototype.changePFileType=function(e){this.indexSelected=0,this.typeSelected=e;var t=e;this.multimedia=this.getPFilesByType(t,this._data.multimedia)},e.prototype.assignCountByType=function(){this.count.image=this.getPFilesByType(n.PFileTypeEnum.IMAGE,this._data.multimedia).length,this.count.video=this.getPFilesByType(n.PFileTypeEnum.VIDEO,this._data.multimedia).length,this.count.sphere=this.getPFilesByType(n.PFileTypeEnum.SPHERIC,this._data.multimedia).length},e.prototype.assignMultimediaByType=function(){this._data.type&&(this.typeSelected=this._data.type,this.multimedia=this.getPFilesByType(this.typeSelected,this._data.multimedia))},e.prototype.getPFilesByType=function(e,t){return t.filter((function(t){return t.type===e}))||[]},e.decorators=[{type:t.Component,args:[{selector:"lib-gallery",template:'<div class="gallery">\r\n <mat-sidenav-container class="gallery__sidenav-container">\r\n <mat-sidenav mode="side" [opened]="sideOpened" class="sidenav-container__sidenav">\r\n <mat-toolbar class="sidenav__toolbar" color="primary">\r\n <span>Galeria</span>\r\n <button mat-icon-button (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <mat-toolbar class="sidenav__thumbnails-types">\r\n <button class="thumbnails-types__item-type" mat-button\r\n [ngClass]="{\'item-type--selected\': typeSelected === \'IMAGE\'}" (click)="changePFileType(\'IMAGE\')">\r\n <span class="item-type__icon ic-component-property-file-image"></span>\r\n <span class="item-type__label">{{count.image}}</span>\r\n </button>\r\n <button class="thumbnails-types__item-type" mat-button\r\n [ngClass]="{\'item-type--selected\': typeSelected === \'SPHERIC\'}" (click)="changePFileType(\'SPHERIC\')">\r\n <span class="item-type__icon ic-component-property-sphere"></span>\r\n <span class="item-type__label">{{count.sphere}}</span>\r\n </button>\r\n <button class="thumbnails-types__item-type" mat-button\r\n [ngClass]="{\'item-type--selected\': typeSelected === \'VIDEO\'}" (click)="changePFileType(\'VIDEO\')">\r\n <span class="item-type__icon ic-component-property-video"></span>\r\n <span class="item-type__label">{{count.video}}</span>\r\n </button>\r\n </mat-toolbar>\r\n <div class="sidenav__thumbnail-list">\r\n <ng-container *ngFor="let image of multimedia; let i = index">\r\n <div class="thumbnail-list__item" (click)="selectPFile(i)"\r\n [ngClass]="{\'thumbnail-list__item--selected\': indexSelected === i}">\r\n <ng-template [ngIf]="image.type !== \'VIDEO\'" [ngIfElse]="youTubeVideo">\r\n <img class="item__img" [src]="image.fileCS.thumbnail" alt="Property image">\r\n </ng-template>\r\n <ng-template #youTubeVideo>\r\n <img class="item__img" [src]="\'https://i3.ytimg.com/vi/\'+image.fileCS.thumbnail+\'/hqdefault.jpg\'"\r\n alt="Property image">\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <ng-template [ngIf]="multimedia.length === 0">\r\n <div class="thumbnail-list__empty-list">\r\n <p class="empty-list__label">\r\n Por el momento no hay\r\n <span *ngIf="typeSelected === \'IMAGE\'">fotos</span>\r\n <span *ngIf="typeSelected === \'VIDEO\'">videos</span>\r\n <span *ngIf="typeSelected === \'SPHERIC\'">fotos esféricas</span>\r\n </p>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </mat-sidenav>\r\n <mat-sidenav-content class="sidenav-container__content" [ngStyle]="{\'width\': sideOpened ? \'80%\' : \'100%\'}">\r\n <button class="sidenav-container__button-sidenav" mat-flat-button color="primary" (click)="updateSideNav()">\r\n <mat-icon *ngIf="sideOpened">chevron_left</mat-icon>\r\n <mat-icon *ngIf="!sideOpened">chevron_right</mat-icon>\r\n </button>\r\n <button class="sidenav-container__button-close" mat-mini-fab color="primary" (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n <div class="content__list-container">\r\n <lib-property-slide-show class="list-container__slide-show" [multimedia]="multimedia" [selectIndex]="indexSelected"\r\n [initialIndex]="indexSelected"\r\n (currentIndex)="onIndexSelectedChange($event)"></lib-property-slide-show>\r\n </div>\r\n </mat-sidenav-content>\r\n </mat-sidenav-container>\r\n</div>\r\n',styles:["::ng-deep .gallery_dialog{max-width:100%!important;width:100%;height:100%}::ng-deep .gallery_dialog mat-dialog-container{width:100%;height:100%;padding:0}:host{display:block;width:100%;height:100%}.gallery,.gallery__sidenav-container{width:100%;height:100%}.sidenav__toolbar{display:flex;justify-content:space-between}.sidenav__thumbnail-list{width:100%;height:calc(100% - 128px);padding:16px;box-sizing:border-box;overflow-x:hidden;overflow-y:auto}.thumbnail-list__empty-list{width:100%;height:100%;display:flex}.empty-list__label{margin:auto;text-align:center}.thumbnail-list__item{width:100%;cursor:pointer;padding-bottom:calc(100% / 4 * 3);border-radius:8px;margin-bottom:16px;position:relative}.item__img{position:absolute;top:0;left:0;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:8px}.sidenav-container__sidenav{width:20%}@media screen and (max-width:1024px){.sidenav-container__sidenav{width:100%}}.sidenav__thumbnails-types{display:flex;align-items:center;justify-content:space-around}.item-type{padding:0}.item-type__label{padding:0 4px;display:inline-block}.item-type__icon{display:inline-block;width:24px;height:24px;font-size:24px;margin:auto}.sidenav-container__content{width:80%;display:flex;position:relative}@media screen and (max-width:1024px){.sidenav-container__content{width:100%}}.sidenav-container__button-sidenav{position:absolute;top:0;left:0;height:64px;padding:0;min-width:36px;border-radius:0 8px 8px 0;z-index:1}.sidenav-container__button-close{position:absolute;top:16px;right:16px;z-index:1}.content__list-container{width:100%;height:100%;margin:auto;overflow:hidden;position:relative;border-radius:8px}.list-container__slide-show{width:100%;height:100%;padding:initial}::ng-deep .list-container__slide-show .panorama-visor{height:100%!important;padding:initial!important}::ng-deep .list-container__slide-show lib-panorama-visor .panorama-visor__actions{top:72px!important}"]}]}],e.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[a.MAT_DIALOG_DATA]}]},{type:a.MatDialogRef},{type:E.BreakpointObserver}]},e}(),Te=function(){function e(e){this._dialog=e}return e.prototype.open=function(e,t,r){return this._dialog.open(Fe,{data:{multimedia:e||[],indexSelected:t||0,type:r||null},disableClose:!0,panelClass:"gallery_dialog"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:a.MatDialog}]},e}(),Pe=new t.InjectionToken("PROPERTY MODULE CONFIG"),Se=function(){function e(e,t){this.data=e,this._dialogRef=t,this.data=new n.LeadInfo(this.data||null)}return e.prototype.ngOnInit=function(){},e.prototype.close=function(){this._dialogRef.close()},e.decorators=[{type:t.Component,args:[{selector:"lib-stats",template:'<div class="stats">\r\n <mat-toolbar class="stats__toolbar" color="primary">\r\n Estadísticas\r\n <button mat-icon-button (click)="close()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </mat-toolbar>\r\n <div class="stats__content">\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>visibility</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.views ? data.views[\'RV\'] || 0 : 0}}\r\n </p>\r\n <p class="stat__label">\r\n Vistas en Renta o Venta\r\n </p>\r\n <div class="stat__app-icon">\r\n <img alt="Renta o Venta logo" class="app-icon__img" src="https://storage.googleapis.com/maplander-develop/public/file/front-end/email/rentaoventa.png">\r\n </div>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>visibility</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.views ? data.views[\'FIABCI\'] || 0 : 0}}\r\n </p>\r\n <p class="stat__label">\r\n Vistas en GlobalMLS\r\n </p>\r\n <div class="stat__app-icon">\r\n <img alt="GlobalMLS logo" class="app-icon__img" src="https://storage.googleapis.com/maplander-develop/public/file/front-end/email/globalmls.png">\r\n </div>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>favorite</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.favorites || 0}}\r\n </p>\r\n <p class="stat__label">\r\n Veces añadida a favoritos\r\n </p>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>share</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.shared || 0}}\r\n </p>\r\n <p class="stat__label">\r\n Veces compartida\r\n </p>\r\n </div>\r\n <div class="content__stat">\r\n <div class="stat__icon-container">\r\n <mat-icon>assignment</mat-icon>\r\n </div>\r\n <p class="stat__count">\r\n {{data.requests || 0}}\r\n </p>\r\n <p class="stat__label">\r\n Solicitudes de información\r\n </p>\r\n </div>\r\n </div>\r\n</div>\r\n',styles:["::ng-deep .stats-panel-class{width:30%;height:80%}::ng-deep .stats-panel-class mat-dialog-container{padding:0;overflow:hidden}@media screen and (max-width:600px){::ng-deep .stats-panel-class{min-width:90%!important}}:host{display:block;width:100%;height:100%}.stats{width:100%;height:100%;overflow:auto}.stats__toolbar{width:100%;height:64px;display:flex;position:-webkit-sticky;position:sticky;top:0;z-index:2;justify-content:space-between}.stats__content{padding:16px;box-sizing:content-box;display:-ms-grid;display:grid;-ms-grid-columns:(calc(50%))[2];grid-template-columns:repeat(2,calc(50%))}.content__stat{border:1px solid #000;border-radius:8px;padding:16px;box-sizing:content-box;position:relative;margin:0 16px 16px 0}.stat__icon-container{position:absolute;top:16px;right:16px}.stat__app-icon{position:absolute;bottom:16px;right:16px}.app-icon__img{width:24px;height:24px;border-radius:4px}.stat__count{font-size:32px;font-weight:700;margin:0 0 16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.stat__label{width:80%;margin:0}"]}]}],e.ctorParameters=function(){return[{type:n.LeadInfo,decorators:[{type:t.Inject,args:[h.MAT_DIALOG_DATA]}]},{type:h.MatDialogRef}]},e}(),Me=function(){function e(e){this._dialog=e}return e.prototype.open=function(e){this._dialog.open(Se,{data:e||null,panelClass:"stats-panel-class"})},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:h.MatDialog}]},e}(),Ne={CREATE:"CREATE",UPDATE:"UPDATE",ANNOUNCE:"ANNOUNCE",HIDE:"HIDE",SHOW:"SHOW",ADDRESS:"ADDRESS",OFFER:"OFFER",FAVORITE:"FAVORITE",REQUEST_INFO:"REQUEST_INFO",SHARE:"SHARE",ARCHIVE:"ARCHIVE",REAL_ESTATE_EXCHANGE:"REAL_ESTATE_EXCHANGE",SHARE_COMMISSION:"SHARE_COMMISSION",BROCHURE:"BROCHURE",POSTER:"POSTER",CLIENTS:"CLIENTS",BACK:"BACK",SHOW_AGENTS:"SHOW_AGENTS",TARPS:"TARPS"},ke=function(){function e(e,r,i,o,a,s,l,p){this._config=e,this._uploaderService=r,this._announceService=i,this._snackBar=o,this._share=a,this._gallery=s,this._documentService=l,this._statsService=p,this.sharedProperty={isShared:!1,ownerAvailable:!0},this.initCompleteProperty(),this.change=new t.EventEmitter,this.modeChange=new t.EventEmitter,this.disableShareCommission=!1,this.disableConfirmAnnounce=!1,this.currentIndex=0,this.multimedia=[],this._allMultimedia=[],this._newMedia=[],this.multimediaCount={images:0,images360:0,videos:0},this.isOPI=this._config||!1,this.currentType=n.PFileTypeEnum.IMAGE}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.property&&e.property.currentValue&&(this.completeProperty=new n.NewCompleteProperty(e.property.currentValue||null),this.parseMultimedia(),this.assignMultimediaByType(),this.validateMultimediaTypeCount())},e.prototype.saveData=function(){this.restoreFrontImageError(),this._editorInstance.validateFormInvalid()?this._snackBar.setMessage("Verifique todos los campos obligatorios","OK",5e3,"left","bottom"):(this.parseDataByComponents(),this.change.emit({type:this.completeProperty.property.id?Ne.UPDATE:Ne.CREATE,payload:{property:this.completeProperty,newMedia:this._newMedia}}))},e.prototype.agentActions=function(e){this.change.emit({type:e,payload:{property:this.completeProperty,newMedia:this._newMedia}})},e.prototype.shareProperty=function(){this.agentActions("SHARE"),this._share.open({url:this.completeProperty.property.url,urlUser:this.userUrl})},e.prototype.openGallery=function(){if(0!==this._allMultimedia.length){var e=null;this.multimedia.length>0&&(e=this.multimedia[0].type),this._gallery.open(this._allMultimedia,this.currentIndex,e)}},e.prototype.goToStats=function(){this._statsService.open(this.completeProperty.leadInfo||null)},e.prototype.goToEditProperty=function(){this.mode="add",this.modeChange.emit(this.mode)},e.prototype.goToBack=function(){this.restoreFrontImageError(),this.change.emit({type:Ne.BACK})},e.prototype.goToClients=function(){this.change.emit({type:Ne.CLIENTS})},e.prototype.goToUpdateVisibility=function(){this.change.emit({type:this.completeProperty.property.status===n.StatusTypeEnum.ANNOUNCED?Ne.HIDE:Ne.SHOW,payload:{property:this.completeProperty,newMedia:this._newMedia}})},e.prototype.goToPublish=function(){var e=this;"add"===this.mode&&this.parseDataByComponents();var t=X.getErrorsForPublish(this.completeProperty.property);if(t.length>0)this.mode="add",this.modeChange.emit(this.mode),setTimeout((function(){e.validateFrontImageOnErrors(t),e._editorInstance.setErrorsOnFields(t)}),200),this._snackBar.setMessage("Complete los campos faltantes para poder publicar","OK",5e3,"left","bottom");else{if(this.disableConfirmAnnounce)return void this.change.emit({type:Ne.ANNOUNCE,payload:{property:this.completeProperty,newMedia:this._newMedia}});this._announceService.open().afterClosed().subscribe((function(t){t.code===n.DialogResponseType.ACCEPT&&e.change.emit({type:Ne.ANNOUNCE,payload:{property:e.completeProperty,newMedia:e._newMedia}})}))}},e.prototype.onMultimediaIndexChanged=function(e){this.currentIndex=e},e.prototype.changeMultimediaType=function(e){this.currentType=e,this.assignMultimediaByType()},e.prototype.openUploaderMultimedia=function(){var e=this;this._uploaderService.open(this.currentType,this._allMultimedia,this._newMedia).afterClosed().subscribe((function(t){t&&(e._newMedia=t.newMedia||[],e._allMultimedia=Object.assign([],t.multimedia||[]),e.assignFrontImage(),e.assignMultimediaByType(),e.validateMultimediaTypeCount())}))},e.prototype.onEditorInstance=function(e){this._editorInstance=e},e.prototype.onOwnerInstance=function(e){this._ownerInstance=e},e.prototype.onDocumentsInstance=function(e){this._documentsInstance=e},e.prototype.onSelectAddress=function(){this.change.emit({type:Ne.ADDRESS})},e.prototype.restoreFrontImageError=function(){this.frontImageError=!1},e.prototype.parseMultimedia=function(){this._allMultimedia=[],this._allMultimedia=this._allMultimedia.concat(this.completeProperty.images||[]),this._allMultimedia=this._allMultimedia.concat(this.completeProperty.videos||[]),this._allMultimedia=this._allMultimedia.concat(this.completeProperty.spherics||[])},e.prototype.getMultimediaByType=function(e){var t=[];return this._allMultimedia.forEach((function(r){r.type===e&&t.push(r)})),t},e.prototype.assignFrontImage=function(){var e=[];this._allMultimedia.forEach((function(t){t.type===n.PFileTypeEnum.IMAGE&&e.push(t)})),e.length>0?(this.completeProperty.property.image=e[0].fileCS.thumbnail,this.frontImageError=!1):this.completeProperty.property.image=null,this.completeProperty=new n.NewCompleteProperty(this.completeProperty)},e.prototype.assignMultimediaByType=function(){var e=this,t=[];this._allMultimedia.forEach((function(r){r.type===e.currentType&&t.push(r)})),this.multimedia=Object.assign([],t)},e.prototype.validateFrontImageOnErrors=function(e){var t=this;e.forEach((function(e){"image"===e&&(t.frontImageError=!0)}))},e.prototype.validateMultimediaTypeCount=function(){var e=this;this.multimediaCount.images=0,this.multimediaCount.images360=0,this.multimediaCount.videos=0,this._allMultimedia.forEach((function(t){switch(t.type){case n.PFileTypeEnum.IMAGE:e.multimediaCount.images++;break;case n.PFileTypeEnum.SPHERIC:e.multimediaCount.images360++;break;case n.PFileTypeEnum.VIDEO:e.multimediaCount.videos++}}))},e.prototype.parseDataByComponents=function(){this.completeProperty.property=this._editorInstance.getProperty(),this.completeProperty.property.propertyInfo.owner=this._ownerInstance.getOwner();var e=this._documentsInstance.getDocuments();this.completeProperty.files=e.documents,this._newMedia=this._newMedia.concat(e.newMedia),this.completeProperty.images=this.getMultimediaByType(n.PFileTypeEnum.IMAGE),this.completeProperty.spherics=this.getMultimediaByType(n.PFileTypeEnum.SPHERIC),this.completeProperty.videos=this.getMultimediaByType(n.PFileTypeEnum.VIDEO)},e.prototype.initCompleteProperty=function(){var e=new n.NewCompleteProperty;e.property=new n.NewProperty,e.property.propertyInfo=new n.PropertyInfo,this.completeProperty=e},e.decorators=[{type:t.Component,args:[{selector:"lib-property",template:'<div class="property">\r\n <div class="header">\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <h1 class="title">\r\n <span *ngIf="!completeProperty.property.id">Cargar </span>\r\n <span *ngIf="completeProperty.property.id">Editar </span>\r\n expediente de {{ propertyType | propertyType }}\r\n </h1>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <h1 class="title">Expediente de {{propertyType | propertyType}}</h1>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <div class="breadcrumb-list">\r\n <p class="breadcrumb-content">\r\n <span class="breadcrumb-item">\r\n {{completeProperty.property.type | propertyType}}\r\n </span>\r\n <span class="breadcrumb-item">\r\n {{completeProperty.property.offering | offeringType : \' \' | stringManipulation : \'capitalize\'}}\r\n </span>\r\n <span *ngIf="completeProperty.property.address.city" class="breadcrumb-item">\r\n {{completeProperty.property.address.city}}\r\n </span>\r\n <span *ngIf="completeProperty.property.address.postalCode" class="breadcrumb-item">\r\n {{completeProperty.property.address.postalCode}}\r\n </span>\r\n <span *ngIf="completeProperty.property.address.colony" class="breadcrumb-item">\r\n {{completeProperty.property.address.colony}}\r\n </span>\r\n </p>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n <div class="header__actions">\r\n \x3c!-- Button Publish [START] --\x3e\r\n <ng-template\r\n [ngIf]="(mode === \'record\' || mode === \'add\') && (completeProperty.property.status !== \'ANNOUNCED\' && completeProperty.property.status !== \'HIDDEN\')">\r\n <button mat-icon-button color="primary" matTooltip="Publicar" matTooltipPosition="left"\r\n class="header__actions-button-publish" (click)="goToPublish()">\r\n <span class="header__actions-button-publish-icon ic-property-status-announce"></span>\r\n </button>\r\n </ng-template>\r\n \x3c!-- Button Publish [END] --\x3e\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <ng-template [ngIf]="multimedia.length > 0">\r\n <button mat-icon-button color="primary" (click)="openUploaderMultimedia()">\r\n <mat-icon>photo_library</mat-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template [ngIf]="completeProperty?.property?.id">\r\n <button mat-icon-button color="primary" matTooltip="Guardar" matTooltipPosition="left" (click)="saveData()">\r\n <mat-icon>save</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <ng-template\r\n [ngIf]="!sharedProperty.isShared && (completeProperty.property.status !== \'DRAFT\' && completeProperty.property.status !== \'NONE\')">\r\n <button mat-icon-button color="primary" matTooltip="Estadísticas" matTooltipPosition="left"\r\n (click)="goToStats()">\r\n <mat-icon>bar_chart</mat-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template\r\n [ngIf]="(completeProperty.property.status === \'ANNOUNCED\' || completeProperty.property.status === \'HIDDEN\') && !sharedProperty.isShared">\r\n <button mat-icon-button color="primary"\r\n matTooltip="{{completeProperty.property.status === \'ANNOUNCED\' ? \'Ocultar\' : \'Mostrar\'}}"\r\n matTooltipPosition="left" (click)="goToUpdateVisibility()">\r\n <mat-icon *ngIf="completeProperty.property.status === \'HIDDEN\'">visibility</mat-icon>\r\n <mat-icon *ngIf="completeProperty.property.status === \'ANNOUNCED\'">visibility_off</mat-icon>\r\n </button>\r\n </ng-template>\r\n <ng-template [ngIf]="!sharedProperty.isShared">\r\n <button mat-icon-button color="primary" matTooltip="Editar" matTooltipPosition="left"\r\n (click)="goToEditProperty()">\r\n <mat-icon>edit</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <ng-template [ngIf]="isOPI" [ngIfElse]="maplanderActions">\r\n <button mat-flat-button color="primary" class="header__actions-button-commission"\r\n [disabled]="disableShareCommission"\r\n (click)="agentActions(\'SHARE_COMMISSION\')">\r\n <span *ngIf="!disableShareCommission">Solicitar comisión compartida</span>\r\n <span *ngIf="disableShareCommission">Solicitud pendiente</span>\r\n </button>\r\n </ng-template>\r\n <ng-template #maplanderActions>\r\n <button mat-flat-button color="primary" class="header__actions-button-commission"\r\n (click)="agentActions(\'SHOW_AGENTS\')">\r\n Mostrar Asesor\r\n </button>\r\n <button mat-icon-button color="primary" class="header__actions-button-commission"\r\n (click)="agentActions(\'FAVORITE\')">\r\n <mat-icon *ngIf="isFavorite">favorite</mat-icon>\r\n <mat-icon *ngIf="!isFavorite">favorite_border</mat-icon>\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n </ng-container>\r\n \x3c!-- Button Share [START] --\x3e\r\n <ng-template\r\n [ngIf]="mode === \'detail\' || (mode === \'record\' && (completeProperty.property.status === \'READY\' || completeProperty.property.status === \'ANNOUNCED\'))" [ngIfElse]="noShare">\r\n <button mat-icon-button color="primary" (click)="shareProperty()">\r\n <mat-icon>share</mat-icon>\r\n </button>\r\n </ng-template>\r\n \x3c!-- Button Share [END] --\x3e\r\n <ng-template #noShare>\r\n <ng-template [ngIf]="sharedProperty.isShared">\r\n <h1 class="title">\r\n Propiedad oculta</h1>\r\n </ng-template>\r\n </ng-template>\r\n \x3c!-- Button Back [START] --\x3e\r\n <button mat-icon-button color="primary" (click)="goToBack()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n \x3c!-- Button Back [END] --\x3e\r\n </div>\r\n </div>\r\n <div class="body">\r\n <div class="body__multimedia-wrapper">\r\n <div class="multimedia-wrapper__list-thumbnails">\r\n <div class="list-thumbnails__wrapper-thumbnails">\r\n <div class="wrapper-thumbnails__header-types">\r\n <button mat-button class="header-types__button-type"\r\n [ngClass]="{\'header-types__button-type--active\': currentType === \'IMAGE\'}"\r\n (click)="changeMultimediaType(\'IMAGE\')">\r\n <span class="button-type__icon ic-component-property-file-image"></span>\r\n <span class="button-type__label">{{multimediaCount.images}}</span>\r\n </button>\r\n <button mat-button class="header-types__button-type"\r\n [ngClass]="{\'header-types__button-type--active\': currentType === \'SPHERIC\'}"\r\n (click)="changeMultimediaType(\'SPHERIC\')">\r\n <span class="button-type__icon ic-component-property-sphere"></span>\r\n <span class="button-type__label">{{multimediaCount.images360}}</span>\r\n </button>\r\n <button mat-button class="header-types__button-type"\r\n [ngClass]="{\'header-types__button-type--active\': currentType === \'VIDEO\'}"\r\n (click)="changeMultimediaType(\'VIDEO\')">\r\n <span class="button-type__icon ic-component-property-video"></span>\r\n <span class="button-type__label">{{multimediaCount.videos}}</span>\r\n </button>\r\n </div>\r\n <ng-template [ngIf]="multimedia && multimedia.length === 0">\r\n <div class="wrapper-thumbnails__item-thumbnail"></div>\r\n <div class="wrapper-thumbnails__item-thumbnail"></div>\r\n <div class="wrapper-thumbnails__item-thumbnail"></div>\r\n </ng-template>\r\n <ng-container *ngFor="let image of multimedia; let i = index;">\r\n <div class="wrapper-thumbnails__item-thumbnail"\r\n [ngClass]="{\'wrapper-thumbnails__item-thumbnail--selected\': i === currentIndex}"\r\n (click)="onMultimediaIndexChanged(i)">\r\n <ng-container [ngSwitch]="image.type">\r\n <ng-container *ngSwitchCase="\'VIDEO\'">\r\n <img class="item-thumbnail__img" alt="Property image"\r\n [src]="\'https://i3.ytimg.com/vi/\'+image.fileCS.thumbnail+\'/hqdefault.jpg\'">\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n <img class="item-thumbnail__img" alt="Property image" [src]="image.fileCS.thumbnail">\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class="multimedia-wrapper__front-image">\r\n <lib-property-slide-show [multimedia]="multimedia"\r\n [selectIndex]="currentIndex"\r\n (currentIndex)="onMultimediaIndexChanged($event)"\r\n [customActions]="customSlideShowActions"\r\n ></lib-property-slide-show>\r\n <ng-template [ngIf]="mode === \'add\' && multimedia.length === 0">\r\n <div class="front-image__upload-multimedia">\r\n <div class="upload-multimedia__container-add-multimedia">\r\n <button class="container-add-multimedia__button" mat-button color="primary"\r\n (click)="openUploaderMultimedia()">\r\n AGREGAR\r\n </button>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #customSlideShowActions>\r\n <button *ngIf="multimedia.length > 0" mat-icon-button (click)="openGallery()" matTooltip="Fullscreen">\r\n <mat-icon>fullscreen</mat-icon>\r\n </button>\r\n </ng-template>\r\n </div>\r\n </div>\r\n <div class="body__additional-content">\r\n <ng-template\r\n [ngIf]="mode === \'record\' && property.property.status === \'ANNOUNCED\' && property.property.propertyInfo.mls">\r\n <div class="additional-content__mls">\r\n <p class="mls__title">\r\n Bolsa inmobiliaria\r\n </p>\r\n <button mat-flat-button color="primary" class="mls__button"\r\n (click)="agentActions(\'REAL_ESTATE_EXCHANGE\')">\r\n Mesa de comercialización\r\n </button>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <div class="body__content">\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <lib-property-details [property]="completeProperty.property" [mlsLabel]="mlsLabel"\r\n [currencyConverted]="currencyConverted" [visibleTour]="!isOPI"></lib-property-details>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <lib-property-details [property]="completeProperty.property" [mlsLabel]="mlsLabel"\r\n [record]="true"></lib-property-details>\r\n <ng-template [ngIf]="sharedProperty.ownerAvailable">\r\n <div class="content__private-info">\r\n <p class="private-info__title">INFORMACIÓN PRIVADA</p>\r\n <lib-property-owner-info [owner]="completeProperty.property.propertyInfo.owner"\r\n [disabled]="true"></lib-property-owner-info>\r\n <ng-template [ngIf]="!sharedProperty.isShared">\r\n <lib-property-documents [files]="completeProperty.files" [disabled]="true"></lib-property-documents>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <ng-template [ngIf]="frontImageError">\r\n <p class="content__error-front-image">\r\n * Debe subir al menos una imagen\r\n </p>\r\n </ng-template>\r\n <lib-property-editor [utils]="utils" [propertyType]="propertyType" [address]="address"\r\n [mlsLabel]="mlsLabel"\r\n [property]="completeProperty.property"\r\n (editorInstance)="onEditorInstance($event)"\r\n (selectAddress)="onSelectAddress()"></lib-property-editor>\r\n <div class="content__private-info">\r\n <p class="private-info__title">INFORMACIÓN PRIVADA</p>\r\n <lib-property-owner-info (ownerInstance)="onOwnerInstance($event)"\r\n [owner]="completeProperty.property.propertyInfo.owner"></lib-property-owner-info>\r\n <lib-property-documents (documentsInstance)="onDocumentsInstance($event)"\r\n [files]="completeProperty.files"></lib-property-documents>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n <div class="footer mat-elevation-z2" [ngClass]="{\'footer--primary\': mode === \'record\'}"\r\n [ngStyle]="{\'display\': (mode === \'detail\' && isOPI) ? \'none\' : \'block\'}">\r\n <ng-container [ngSwitch]="mode">\r\n <ng-container *ngSwitchCase="\'detail\'">\r\n <div class="footer__footer-content">\r\n <ng-template [ngIf]="!isOPI">\r\n <button mat-raised-button color="primary" class="footer-content__button-request-info mat-elevation-z2"\r\n (click)="agentActions(\'REQUEST_INFO\')">\r\n Solicitar información\r\n </button>\r\n </ng-template>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'record\'">\r\n <div class="footer__footer-content">\r\n <p class="footer-content__status-label">\r\n <ng-container [ngSwitch]="completeProperty.property.status">\r\n <ng-container *ngSwitchCase="\'HIDDEN\'">\r\n Propiedad oculta\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'READY\'">\r\n Propiedad lista <br> para publicar\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'EXPIRED\'">\r\n Propiedad expirada desde el <br>\r\n {{completeProperty.property.propertyInfo.endPublishDate | libFormatDate : true : \'dd MMMMM yyyy\'}}\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'ANNOUNCED\'">\r\n Anunciada\r\n <br> Anuncio valido hasta el\r\n {{completeProperty.property.propertyInfo.endPublishDate | libFormatDate : true : \'dd MMMMM yyyy\'}}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n Propiedad en borrador\r\n </ng-container>\r\n </ng-container>\r\n </p>\r\n <div class="footer-content__fab">\r\n <eco-fab-speed-dial>\r\n <eco-fab-speed-dial-trigger>\r\n <button mat-fab color="primary">\r\n <mat-icon>add</mat-icon>\r\n </button>\r\n </eco-fab-speed-dial-trigger>\r\n <eco-fab-speed-dial-actions>\r\n <button *ngIf="completeProperty.property.status !== \'NONE\' && completeProperty.property.status !== \'DRAFT\'"\r\n mat-mini-fab color="primary" matTooltip="Clientes" matTooltipPosition="left" (click)="goToClients()">\r\n <mat-icon class="fab-button__icon">people</mat-icon>\r\n </button>\r\n <button *ngIf="!sharedProperty.isShared" mat-mini-fab color="primary" matTooltip="Archivar propiedad"\r\n matTooltipPosition="left"\r\n (click)="agentActions(\'ARCHIVE\')">\r\n <mat-icon class="fab-button__icon">archive</mat-icon>\r\n </button>\r\n <button mat-mini-fab color="primary" matTooltip="Generar letrero" matTooltipPosition="left"\r\n (click)="agentActions(\'POSTER\')">\r\n <span class="fab-button__icon ic-component-property-poster"></span>\r\n </button>\r\n <button mat-mini-fab color="primary" matTooltip="Generar folleto" matTooltipPosition="left"\r\n (click)="agentActions(\'BROCHURE\')">\r\n <span class="fab-button__icon ic-component-property-brochure"></span>\r\n </button>\r\n <button mat-mini-fab color="primary" matTooltip="Generar lona" matTooltipPosition="left"\r\n (click)="agentActions(\'TARPS\')">\r\n <span class="fab-button__icon ic-component-property-canvas"></span>\r\n </button>\r\n </eco-fab-speed-dial-actions>\r\n </eco-fab-speed-dial>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'add\'">\r\n <div class="footer__footer-content">\r\n <button class="footer-content__button-save" mat-flat-button color="primary" (click)="saveData()">Guardar\r\n </button>\r\n </div>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n',styles:[":host{width:100%;height:100%;display:block}.property{position:relative;width:100%;height:100%;z-index:5;border-radius:4px}.title{margin:0 16px;font-size:24px}.breadcrumb-list{width:50%;padding:4px 16px;box-sizing:border-box;border-radius:0 24px 24px 0}.breadcrumb-content{color:#fff;margin:4px 0;width:100%;line-height:21px}.breadcrumb-item{position:relative;display:inline-flex;padding:0 18px 0 4px}.breadcrumb-item:last-child:before{content:none}.divider{border-width:1px}.divider-vertical{display:block;border:.5px inset}.header{width:100%;position:-webkit-sticky;position:sticky;top:0;z-index:10;padding:8px 0;display:flex;align-items:center;justify-content:space-between}@media screen and (max-width:600px){.breadcrumb-list{width:100%;order:1}.header{flex-direction:column}}.header__actions{padding:8px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between}@media screen and (max-width:600px){.header__actions{order:0;width:100%;padding:4px 8px;justify-content:flex-end}}.header__actions button{margin-right:8px}.header__actions-button-commission{border-radius:16px}.actions-button-commission__icon{display:inline-block;width:24px;height:24px;font-size:24px;margin-left:8px}.header__actions-button-publish-icon{font-size:24px;width:24px;height:24px}.body{width:100%;height:calc(100% - 80px);overflow-x:hidden;overflow-y:auto;background:0 0;box-sizing:border-box;padding-bottom:56px}@media screen and (max-width:600px){.body{display:flex;flex-direction:column;padding:0 8px 56px}}.body__additional-content{width:25%;display:inline-block;padding:16px;box-sizing:border-box;background:#fff}@media screen and (max-width:600px){.body__additional-content{width:100%;order:2}}.mls__title{font-size:12px}.mls__button{width:100%;display:block;margin-bottom:8px;border-radius:16px}.body__content{width:75%;display:inline-block;padding:16px;box-sizing:border-box;float:right;background:#fff}.body__multimedia-wrapper{width:100%;background:#fff;display:flex}@media screen and (max-width:600px){.body__content{width:100%;order:1}.body__multimedia-wrapper{width:100%;order:0;flex-direction:column}}.multimedia-wrapper__list-thumbnails{width:25%;height:0;padding-bottom:calc((100% - 25%)/ 4 * 3);overflow:hidden;position:relative}@media screen and (max-width:600px){.multimedia-wrapper__list-thumbnails{width:100%;height:56px;padding:0}}.list-thumbnails__wrapper-thumbnails{position:absolute;width:100%;height:100%;background:#fff;overflow-x:hidden;overflow-y:scroll;padding:0 18px 8px;box-sizing:border-box}.wrapper-thumbnails__header-types{width:100%;height:40px;background:#fff;padding-top:8px;position:-webkit-sticky;position:sticky;top:0;z-index:1}.header-types__button-type{min-width:calc(100% / 3);width:calc(100% / 3);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;padding:0;height:100%;font-size:12px;line-height:16px}.button-type__icon{font-size:24px;width:24px;height:24px;display:inline-block}.button-type__label{display:inline-block;margin:0 4px}.wrapper-thumbnails__item-thumbnail{width:100%;padding-bottom:calc(100% / 4 * 3);margin-top:8px;border-radius:8px;position:relative;cursor:pointer}.item-thumbnail__img{position:absolute;width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:inherit}.multimedia-wrapper__front-image{width:calc(75% - 16px);height:0;padding-bottom:calc((75% - 16px)/ 4 * 3);margin:auto;border-radius:8px;position:relative}@media screen and (max-width:600px){.wrapper-thumbnails__item-thumbnail{display:none}.multimedia-wrapper__front-image{width:100%;padding-bottom:calc(100% / 4 * 3)}}.front-image__upload-multimedia{position:absolute;top:0;left:25%;width:50%;height:100%;z-index:1;display:flex}@media screen{.front-image__upload-multimedia{width:80%;left:10%}}.upload-multimedia__container-add-multimedia{margin:auto;width:200px;height:200px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;position:relative;background:url(https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/360-image.svg) center/80% no-repeat}.container-add-multimedia__button{position:absolute;bottom:8px}.content__error-front-image{font-size:12px;margin:8px 0 8px 8px}.content__private-info{border-radius:8px}.private-info__title{font-weight:700;margin:0;padding:16px;border-radius:8px 8px 0 0}.footer{width:100%;height:43px;border-radius:16px 16px 0 0;padding:8px 16px;box-sizing:border-box;background:#fff;position:-webkit-sticky;position:sticky;z-index:2;bottom:0}.footer__footer-content{width:100%;height:100%;position:relative;display:flex;align-items:center;justify-content:center}.footer-content__status-label{margin:6px 0;font-size:14px;text-align:center}.footer-content__button-request-info{width:30%;border-radius:16px}@media screen and (max-width:600px){.footer-content__button-request-info{width:90%}}.footer-content__button-save{width:120px;border-radius:16px}.footer-content__fab{position:absolute;right:0;bottom:12px;padding:8px;border-radius:50%;background:linear-gradient(transparent 50%,#fff 50%)}.fab-button__icon{width:24px;height:24px;font-size:24px}"]}]}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[Pe]}]},{type:we},{type:Ce},{type:v.SnackBarService},{type:p.ShareService},{type:Te},{type:ae},{type:Me}]},e.propDecorators={property:[{type:t.Input}],utils:[{type:t.Input}],propertyType:[{type:t.Input}],mode:[{type:t.Input}],sharedProperty:[{type:t.Input}],address:[{type:t.Input}],mlsLabel:[{type:t.Input}],disableShareCommission:[{type:t.Input}],isFavorite:[{type:t.Input}],disableConfirmAnnounce:[{type:t.Input}],currencyConverted:[{type:t.Input}],userUrl:[{type:t.Input}],change:[{type:t.Output}],modeChange:[{type:t.Output}]},e}(),De=function(){function e(){}return e.validator=function(e){var t=e.get("minPrice"),r=Number(t.value)>Number(e.get("price").value);r?(t.setErrors({minPriceInvalid:!0}),t.markAsTouched()):he(t,"minPriceInvalid"),(r=(t=e.get("commission")).value&&(!e.get("price").value||0===Number(e.get("price").value)))?(t.setErrors({commissionInvalid:!0}),t.markAsTouched()):he(t,"commissionInvalid"),t=e.get("consumerReportingOption"),(r=e.get("consumerReporting").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),t=e.get("transferPrice"),(r=e.get("transfer").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),t=e.get("maintenancePrice"),(r=e.get("maintenance").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),t=e.get("sharedCommission"),(r=e.get("mlm").value&&!t.value)?(t.setErrors({required:!0}),t.markAsTouched()):he(t,"required"),r=e.get("mlm").value&&!e.get("commission").value,t=e.get("sharedCommission"),r?(t.setErrors({sharedCommissionInvalid:!0}),t.markAsTouched()):he(t,"sharedCommissionInvalid")},e}(),Oe=I,Re={parse:{dateInput:"L"},display:{dateInput:"L",monthYearLabel:"MMM YYYY",dateA11yLabel:"L",monthYearA11yLabel:"MMMM YYYY"}},Le=function(){function e(e,r,a){this._formBuilder=e,this._dialog=r,this._adapter=a,this.REGEX_ONLY_INTEGERS=new RegExp(/^[0-9]\d*$/),this.REGEX_MIDDLE_NUMBER=new RegExp(/^[0-9]*(\.[5])?$/),this.REGEX_WEBSITE=new RegExp(/(http|https):\/\/(\w+:?\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@\-\/]))?/),this.REGEX_ALPHA_NUMBER=new RegExp(/[A-Za-z0-9_]/),this.editorInstance=new t.EventEmitter,this.selectAddress=new t.EventEmitter,this._subscription=new o.Subscription,this.offeringTypeList=W.OfferingTypeList.map((function(e){return z({},e)})),this.landUseList=W.LandUseList.map((function(e){return z({},e)})),this.commissionList=W.CommissionList[n.OfferingTypeEnum.SALE],this.roiList=Object.assign([],W.ROIList),this.durationList=Object.assign([],W.DurationList),this.sharedCommissionList=Object.assign([],W.SharedCommissionList),this._adapter.setLocale("es"),this._errorFields=[],this._validators={bedrooms:[i.Validators.pattern(this.REGEX_ONLY_INTEGERS)],bathrooms:[i.Validators.pattern(this.REGEX_MIDDLE_NUMBER)],parkingSpaces:[i.Validators.pattern(this.REGEX_ONLY_INTEGERS)],mainArea:[],secondaryArea:[],externalLink:[i.Validators.pattern(this.REGEX_WEBSITE)],sku:[i.Validators.pattern(this.REGEX_ALPHA_NUMBER)]},this.propertyForm=this._formBuilder.group({offering:[n.OfferingTypeEnum.SALE],sku:[null,this._validators.sku],consumerReporting:[],consumerReportingOption:[1],currency:["MXN"],minPrice:[],price:[],maintenance:[],maintenancePrice:[],transfer:[],transferPrice:[],bedrooms:[null,this._validators.bedrooms],bathrooms:[null,this._validators.bathrooms],parkingSpaces:[null,this._validators.parkingSpaces],mainArea:[null,this._validators.mainArea],secondaryArea:[null,this._validators.secondaryArea],unit:[n.AreaUnitEnum.M2],buildIn:[],landUse:[],exclusivity:[],mlm:[],sharedCommission:[],agreementDate:[{value:null,disabled:!0}],duration:[],commission:[],roi:[],description:[],externalLink:[null,this._validators.externalLink],notes:[],address:this._formBuilder.group({country:[],postalCode:[],state:[],city:[],township:[],colony:[],street:[],extNumber:[],intNumber:[],mz:[],lt:[],visible:[!0]})},{validators:De.validator})}return e.geoPtGenerator=function(e,t,r){var n=Math.random()*(r-t)+t,i=Math.random()*Math.PI/2,o=Math.random()<.5?n*Math.cos(i):-n*Math.cos(i),a=(Math.random()<.5?n*Math.sin(i):-n*Math.sin(i))/6371010*180/Math.PI,s=e.latitude+a,l=o/6371010/Math.cos(s*Math.PI/180)*180/Math.PI;return{latitude:s,longitude:e.longitude+l}},e.prototype.ngOnInit=function(){this.listenChangesOnForm()},e.prototype.ngOnChanges=function(e){e.utils&&e.utils.currentValue&&(this.currencyList=e.utils.currentValue.cers),e.propertyType&&e.propertyType.currentValue&&(this.propertyType=e.propertyType.currentValue,this.searchAmenitiesByPropertyType()),e.property&&e.property.currentValue&&this.createProperty(e.property.currentValue),e.address&&e.address.currentValue&&this.updateAddressForm(e.address.currentValue)},e.prototype.ngAfterViewInit=function(){this.editorInstance.emit(this)},e.prototype.ngOnDestroy=function(){this._subscription.unsubscribe()},e.prototype.getProperty=function(){return this.setValidatorOnFields(this._errorFields,!0),this.updatePropertyByForm(this.propertyForm.getRawValue()),this._property},e.prototype.validateFormInvalid=function(){return this.setValidatorOnFields(this._errorFields,!0),this.propertyForm.invalid},e.prototype.updateAmenity=function(e){e.checked=!e.checked,this._property.amenities[e.value]=e.checked},e.prototype.goToSelectAddress=function(){this.selectAddress.emit()},e.prototype.setErrorsOnFields=function(e){this._errorFields=e,this.setValidatorOnFields(this._errorFields),this._btnSubmitRef.nativeElement.click()},e.prototype.updateAddressForm=function(e){this.propertyForm.patchValue({address:{country:e.country,state:e.state,city:e.city,township:e.township,colony:e.colony,street:e.street,postalCode:e.postalCode,extNumber:e.outdoorNumber}})},e.prototype.assignAmenities=function(){var e=this;this.amenitiesList.forEach((function(t){t.checked=e._property.amenities[t.value]}))},e.prototype.assignLocationFeatures=function(){var e=this;this.featuresList.forEach((function(t){t.checked=e._property.amenities[t.value]}))},e.prototype.assignCommission=function(){this.commissionList=W.CommissionList[this._property.offering]},e.prototype.assignBusinessRules=function(){switch(this.propertyType){case n.PropertyTypeEnum.ROOM:this.propertyForm.patchValue({offering:n.OfferingTypeEnum.RENT});break;case n.PropertyTypeEnum.INVESTMENT:this.propertyForm.patchValue({offering:n.OfferingTypeEnum.SALE})}if(this._property.status===n.StatusTypeEnum.ANNOUNCED){var e=X.listErrorsByPropertyTypeForPublish(this._property.type);this.setValidatorOnFields(e)}},e.prototype.updateFormByProperty=function(){this.propertyForm.patchValue({offering:this._property.offering,sku:this._property.sku,consumerReporting:this._property.propertyInfo.consumerReporting&&0!==this._property.propertyInfo.consumerReporting,consumerReportingOption:this._property.propertyInfo.consumerReporting,currency:this._property.currency,minPrice:this._property.propertyInfo.lowestPrice,price:this._property.price,maintenance:this._property.features.condominiumFeePrice&&0!==this._property.features.condominiumFeePrice,maintenancePrice:this._property.features.condominiumFeePrice,transfer:this._property.propertyInfo.leaseTransferPrice&&0!==this._property.propertyInfo.leaseTransferPrice,transferPrice:this._property.propertyInfo.leaseTransferPrice,bedrooms:this._property.features.bedrooms,bathrooms:this._property.features.bathrooms,parkingSpaces:this._property.features.parkingSpaces,mainArea:this._property.features.mainArea,secondaryArea:this._property.features.secondaryArea,unit:this._property.features.areaUnit,buildIn:this._property.features.builtIn?new Date(this._property.features.builtIn,1,1):null,landUse:this._property.features.landUse,exclusivity:this._property.propertyInfo.exclusivity,mlm:this._property.propertyInfo.mls,sharedCommission:this._property.propertyInfo.sharedCommission,agreementDate:this._property.propertyInfo.listingAgreementStartDate?Oe(new j(this._property.propertyInfo.listingAgreementStartDate).toDate()):null,duration:this._property.propertyInfo.listingAgreementTime,commission:this._property.propertyInfo.commission,roi:this._property.features.roi,description:this._property.description,externalLink:this._property.externalLink,notes:this._property.propertyInfo.notes,address:{country:this._property.address.country,state:this._property.address.state,city:this._property.address.city,township:this._property.address.township,colony:this._property.address.colony,postalCode:this._property.address.postalCode,street:this._property.address.street,extNumber:this._property.address.outdoorNumber,intNumber:this._property.address.interiorNumber,mz:this._property.address.mz,lt:this._property.address.lt,visible:this._property.address.visible||!1}})},e.prototype.updatePropertyByForm=function(t){this._property.type=this.propertyType,this._property.offering=t.offering,this._property.sku=t.sku,this._property.propertyInfo.consumerReporting=t.consumerReporting?t.consumerReportingOption:null,this._property.currency=t.currency,this._property.propertyInfo.lowestPrice=t.minPrice?Number(t.minPrice):null,this._property.price=t.price?Number(t.price):null,this._property.features.condominiumFeePrice=t.maintenance?Number(t.maintenancePrice):null,this._property.propertyInfo.leaseTransferPrice=t.transfer?Number(t.transferPrice):null,this._property.features.bedrooms=t.bedrooms?Number(t.bedrooms):null,this._property.features.bathrooms=t.bathrooms?Number(t.bathrooms):null,this._property.features.parkingSpaces=t.parkingSpaces?Number(t.parkingSpaces):null,this._property.features.mainArea=t.mainArea?Number(t.mainArea):null,this._property.features.secondaryArea=t.secondaryArea?Number(t.secondaryArea):null,this._property.features.areaUnit=t.unit,this._property.features.builtIn=t.buildIn?t.buildIn.getFullYear():null,this._property.features.landUse=t.landUse,this._property.propertyInfo.exclusivity=t.exclusivity,this._property.propertyInfo.mls=t.mlm,this._property.propertyInfo.sharedCommission=t.mlm?Number(t.sharedCommission):null,this._property.propertyInfo.listingAgreementStartDate=t.agreementDate?j.getTimestamp(t.agreementDate.toDate()):null,this._property.propertyInfo.listingAgreementTime=t.duration,this._property.propertyInfo.commission=t.commission,this._property.features.roi=t.roi,this._property.description=t.description,this._property.externalLink=t.externalLink,this._property.propertyInfo.notes=t.notes,this._property.address.country=t.address.country,this._property.address.state=t.address.state,this._property.address.city=t.address.city,this._property.address.township=t.address.township,this._property.address.colony=t.address.colony,this._property.address.postalCode=t.address.postalCode,this._property.address.street=t.address.street,this._property.address.outdoorNumber=t.address.extNumber,this._property.address.interiorNumber=t.address.intNumber,this._property.address.mz=t.address.mz,this._property.address.lt=t.address.lt,this._property.address.location=this.address.location,this._property.address.publicLocation=t.address.visible?this.address.location:e.geoPtGenerator(this.address.location,200,400),this._property.address.visible=t.address.visible},e.prototype.searchAmenitiesByPropertyType=function(){var e=this;W.PropertyTypeList.forEach((function(t){t.value===e.propertyType&&(e._propertyTypeItem=t,e.amenitiesList=t.amenities.map((function(e){return z({},e)})),e.featuresList=t.features.map((function(e){return z({},e)})))}))},e.prototype.listenChangesOnForm=function(){var e=this;this._subscription.add(this.propertyForm.controls.offering.valueChanges.subscribe((function(t){e.commissionList=W.CommissionList[t],e.propertyForm.patchValue({minPrice:null,maxPrice:null})}))),this._subscription.add(this.propertyForm.controls.price.valueChanges.subscribe((function(t){t&&0===Number(t)&&e.propertyForm.patchValue({minPrice:null})}))),this._subscription.add(this.propertyForm.controls.mlm.valueChanges.subscribe((function(){e.propertyForm.controls.sharedCommission.setValue(null)}))),this._subscription.add(this.propertyForm.controls.maintenance.valueChanges.subscribe((function(){e.propertyForm.controls.maintenancePrice.setValue(null)}))),this._subscription.add(this.propertyForm.controls.transfer.valueChanges.subscribe((function(){e.propertyForm.controls.transferPrice.setValue(null)}))),this._subscription.add(this.propertyForm.controls.consumerReporting.valueChanges.subscribe((function(){e.propertyForm.controls.consumerReportingOption.setValue(1)})))},e.prototype.createProperty=function(e){this._property=new n.NewProperty(e||null),this._property.type=this.propertyType,this._property.propertyInfo=new n.PropertyInfo(e?e.propertyInfo:null),this._property.features=new n.Features(e?e.features:null),this._property.address=new n.Address(e?e.address:null),this._property.amenities=new n.Amenities(e?e.amenities:null),this.assignBusinessRules(),e&&e.id&&(this.updateFormByProperty(),this.assignAmenities(),this.assignLocationFeatures(),this.assignCommission())},e.prototype.setValidatorOnFields=function(e,t){var r=this;0!==e.length&&e.forEach((function(e){r.propertyForm.controls[e]&&(t?(r.propertyForm.controls[e].clearValidators(),r.propertyForm.controls[e].setValidators(r._validators[e]?r._validators[e]:[]),r.propertyForm.controls[e].updateValueAndValidity()):(r.propertyForm.controls[e].clearValidators(),r.propertyForm.controls[e].setValidators(r._validators[e]?r._validators[e].concat(i.Validators.required):[i.Validators.required]),r.propertyForm.controls[e].updateValueAndValidity()))}))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-editor",template:'<form class="editor" [formGroup]="propertyForm" autocomplete="off">\r\n <div class="offering">\r\n <p class="section_label"><span>Tipo de oferta</span> <span>Información Pública</span></p>\r\n <mat-button-toggle-group class="offering__toggle" formControlName="offering">\r\n <ng-container *ngFor="let offering of offeringTypeList">\r\n <mat-button-toggle\r\n [disabled]="(propertyType === \'ROOM\' && offering.value === \'SALE\') || (propertyType === \'INVESTMENT\' && offering.value === \'RENT\')"\r\n [value]="offering.value">{{offering.name}}</mat-button-toggle>\r\n </ng-container>\r\n </mat-button-toggle-group>\r\n </div>\r\n <ng-template [ngIf]="propertyForm.controls[\'offering\'].value === \'RENT\'">\r\n <div class="direct-debit">\r\n <mat-checkbox class="direct-debit__check-box" formControlName="consumerReporting">Domiciliación</mat-checkbox>\r\n <mat-radio-group class="direct-debit__radio-group" aria-label="Select an option"\r\n formControlName="consumerReportingOption"\r\n *ngIf="propertyForm.controls[\'consumerReporting\'].value">\r\n <mat-radio-button class="direct-debit__radio-button" [value]="1">Requerir certificado <br> de fiabilidad\r\n </mat-radio-button>\r\n <mat-radio-button class="direct-debit__radio-button" [value]="2">Requerir poliza <br> de arrendamiento\r\n </mat-radio-button>\r\n <p>\r\n Para mayor información de este servicio visite <br>\r\n <a href="https://www.burorentas.mx">\r\n www.burorentas.mx\r\n </a>\r\n </p>\r\n <mat-error *ngIf="propertyForm.controls[\'consumerReportingOption\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-radio-group>\r\n </div>\r\n </ng-template>\r\n <div class="pricing">\r\n <mat-form-field appearance="outline" class="pricing__form-field">\r\n <mat-label>Moneda</mat-label>\r\n <mat-select formControlName="currency">\r\n <ng-container *ngFor="let currency of currencyList">\r\n <mat-option [value]="currency.type">{{currency.type}}</mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-error *ngIf="propertyForm.controls[\'currency\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="pricing__form-field">\r\n <mat-label>Precio deseado</mat-label>\r\n <input libFormatPrice autocomplete="off" matInput="" type="text" title="Max price" formControlName="price"\r\n [control]="propertyForm.controls[\'price\']" [currency]="propertyForm.get(\'currency\').value">\r\n <mat-error *ngIf="propertyForm.controls[\'price\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'price\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="pricing__form-field">\r\n <mat-label>Precio mínimo</mat-label>\r\n <input libFormatPrice autocomplete="off" matInput="" type="text" title="Min price" formControlName="minPrice"\r\n [control]="propertyForm.controls[\'minPrice\']" [currency]="propertyForm.get(\'currency\').value">\r\n <mat-error *ngIf="propertyForm.controls[\'minPrice\'].hasError(\'minPriceInvalid\')">\r\n Este valor debe ser menor al precio deseado\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'minPrice\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n </mat-form-field>\r\n <div class="pricing__maintenance-fee" *ngIf="propertyType !== \'INVESTMENT\' && propertyType !== \'LAND\'">\r\n <mat-checkbox formControlName="maintenance">Tiene cuota de mantenimiento\r\n </mat-checkbox>\r\n <mat-form-field appearance="outline" class="pricing__form-field"\r\n *ngIf="propertyForm.controls[\'maintenance\'].value">\r\n <mat-label>Cuota de mantenimiento</mat-label>\r\n <input autocomplete="off" matInput type="text" libFormatPrice title="Price"\r\n [control]="propertyForm.controls[\'maintenancePrice\']"\r\n [currency]="propertyForm.get(\'currency\').value"\r\n formControlName="maintenancePrice">\r\n <mat-error *ngIf="propertyForm.controls[\'maintenancePrice\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'maintenancePrice\'].hasError(\'required\')">\r\n Esta campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="sku__maintenance-fee">\r\n <mat-form-field appearance="outline" class="sku__form-field">\r\n <mat-label>SKU</mat-label>\r\n <input matInput="" title="SKU" formControlName="sku">\r\n <mat-error *ngIf="propertyForm.controls[\'sku\'].hasError(\'pattern\')">\r\n SKU invalida\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <ng-template [ngIf]="propertyForm.controls[\'offering\'].value === \'RENT\' && propertyType !== \'INVESTMENT\'">\r\n <div class="pricing__maintenance-fee" *ngIf="propertyType !== \'ROOM\'">\r\n <mat-checkbox formControlName="transfer">Traspaso\r\n </mat-checkbox>\r\n <mat-form-field appearance="outline" class="pricing__form-field"\r\n *ngIf="propertyForm.controls[\'transfer\'].value">\r\n <mat-label>Monto por traspaso</mat-label>\r\n <input autocomplete="off" matInput type="text" libFormatPrice\r\n title="Price" [control]="propertyForm.controls[\'transferPrice\']"\r\n [currency]="propertyForm.get(\'currency\').value"\r\n formControlName="transferPrice">\r\n <mat-error *ngIf="propertyForm.controls[\'transferPrice\'].hasError(\'format\')">\r\n Debe ingresar solo numeros\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'transferPrice\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </ng-template>\r\n </div>\r\n <hr>\r\n <div class="address" formGroupName="address">\r\n <p class="section_label">\r\n Dirección\r\n <button mat-flat-button="" type="button" color="primary" (click)="goToSelectAddress()"\r\n class="address__label-button">\r\n COLOCAR UBICACIÓN EN EL MAPA\r\n </button>\r\n </p>\r\n <div class="address__body">\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>País</mat-label>\r\n <input autocomplete="off" matInput="" title="Country" formControlName="country">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Código postal</mat-label>\r\n <input autocomplete="off" matInput="" title="Postal code" formControlName="postalCode" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Entidad Federativa</mat-label>\r\n <input autocomplete="off" matInput="" title="State" formControlName="state">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Ciudad</mat-label>\r\n <input autocomplete="off" matInput="" title="City" formControlName="city">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Alcaldia/Municipio</mat-label>\r\n <input autocomplete="off" matInput="" title="Township" formControlName="township">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Colonia</mat-label>\r\n <input autocomplete="off" matInput="" title="Colony" formControlName="colony">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Vialidad</mat-label>\r\n <input autocomplete="off" matInput="" title="Street" formControlName="street">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Número exterior</mat-label>\r\n <input autocomplete="off" matInput="" title="No exterior" formControlName="extNumber" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Número interior</mat-label>\r\n <input autocomplete="off" matInput="" title="No interior" formControlName="intNumber" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Manzana</mat-label>\r\n <input autocomplete="off" matInput="" title="Mz" formControlName="mz" type="number">\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="address__form-field">\r\n <mat-label>Lote</mat-label>\r\n <input autocomplete="off" matInput="" title="Lt" formControlName="lt" type="number">\r\n </mat-form-field>\r\n <div class="address__visibility">\r\n <p class="section_label">\r\n Ubicación en el mapa\r\n </p>\r\n <div class="address__visibility-body">\r\n <mat-radio-group formControlName="visible" class="address__visibility-radio-group">\r\n <mat-radio-button class="visibility-radio-group__button" [value]="true">\r\n Mostrar dirección exacta\r\n </mat-radio-button>\r\n <mat-radio-button class="visibility-radio-group__button" [value]="false">\r\n Mostrar dirección aproximada\r\n </mat-radio-button>\r\n </mat-radio-group>\r\n <p class="visibility__about">\r\n <span class="visibility__about-label" [ngStyle]="{\'font-weight\': propertyForm.get(\'address.visible\').value ? \'bold\' : \'normal\'}">\r\n Mostrar dirección exacta: muestra el <br> lugar preciso en el mapa con un marcador.\r\n </span>\r\n <span class="visibility__about-label" [ngStyle]="{\'font-weight\': !propertyForm.get(\'address.visible\').value ? \'bold\' : \'normal\'}">\r\n Mostrar dirección aproximada: reacomoda la ubicación en un radio de 50 metros, ocultando calle y número.\r\n </span>\r\n </p>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <hr>\r\n \x3c!-- Features [START], Only visible for all property types except INVESTMENT --\x3e\r\n <div class="features">\r\n <p class="section_label">Caracteristicas</p>\r\n <div class="features__body">\r\n <div class="features__item" *ngIf="propertyType === \'HOUSE\' || propertyType === \'APARTMENT\'">\r\n <span class="label__icon ic-features-bedroom"></span>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Habitaciones</mat-label>\r\n <input autocomplete="off" matInput title="Bedrooms" formControlName="bedrooms" type="number">\r\n <mat-error *ngIf="propertyForm.controls[\'bedrooms\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'bedrooms\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="features__item features-item-bathrooms"\r\n *ngIf="propertyType === \'HOUSE\' || propertyType === \'APARTMENT\' || propertyType === \'ROOM\'">\r\n <span class="label__icon ic-features-bathroom"></span>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Baños</mat-label>\r\n <input autocomplete="off" title="Bathrooms" matInput formControlName="bathrooms" type="number">\r\n <mat-error *ngIf="propertyForm.controls[\'bathrooms\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'bathrooms\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="features__item features-item-parking-spaces" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <span class="label__icon ic-features-parking"></span>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Estacionamientos</mat-label>\r\n <input autocomplete="off" title="Parking spaces" matInput formControlName="parkingSpaces" type="number">\r\n <mat-error *ngIf="propertyForm.controls[\'parkingSpaces\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n \x3c!-- Surfaces [START] Only visible for property type distinct INVESTMENT--\x3e\r\n <div class="features__item features-item-surface" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <p class="features-item__label">\r\n <span class="label__icon ic-features-surface"></span>\r\n Superficie\r\n </p>\r\n <mat-radio-group class="features-item__radio-group" formControlName="unit">\r\n <mat-radio-button class="features-item__radio-button" [value]="\'M2\'">m<sup>2</sup></mat-radio-button>\r\n <mat-radio-button class="features-item__radio-button" [value]="\'FT2\'">sq ft</mat-radio-button>\r\n </mat-radio-group>\r\n \x3c!--\r\n Build area [START]\r\n Only visible for HOUSE, APARTMENT, ROOM, OFFICE, RETAIL, WAREHOUSE and LAND property types\r\n --\x3e\r\n <mat-form-field appearance="outline"\r\n *ngIf="propertyType !== \'INVESTMENT\'">\r\n <mat-label>\r\n <ng-container [ngSwitch]="propertyType">\r\n <span *ngSwitchDefault>Construida</span>\r\n <span *ngSwitchCase="\'OFFICE\'">De Oficinas</span>\r\n <span *ngSwitchCase="\'LAND\'">De Terreno</span>\r\n </ng-container>\r\n </mat-label>\r\n <input autocomplete="off" matInput="" title="Surface build" formControlName="mainArea" type="number">\r\n <span matSuffix>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'M2\'">m<sup>2</sup></span>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'FT2\'">sq ft</span>\r\n </span>\r\n <mat-error *ngIf="propertyForm.controls[\'mainArea\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'mainArea\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Build area [END] --\x3e\r\n \x3c!--\r\n Secondary build area [START]\r\n Only visible for HOUSE, and WAREHOUSE\r\n --\x3e\r\n <mat-form-field appearance="outline"\r\n *ngIf="propertyType === \'HOUSE\' || propertyType === \'WAREHOUSE\'">\r\n <mat-label>\r\n <ng-container [ngSwitch]="propertyType">\r\n <span *ngSwitchCase="\'HOUSE\'">De terreno</span>\r\n <span *ngSwitchCase="\'WAREHOUSE\'">De oficinas</span>\r\n </ng-container>\r\n </mat-label>\r\n <input autocomplete="off" matInput="" title="Surface land build" formControlName="secondaryArea" type="number">\r\n <span matSuffix>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'M2\'">m<sup>2</sup></span>\r\n <span *ngIf="propertyForm.controls[\'unit\'].value === \'FT2\'">sq ft</span>\r\n </span>\r\n <mat-error *ngIf="propertyForm.controls[\'secondaryArea\'].hasError(\'pattern\')">\r\n Valor invalido\r\n </mat-error>\r\n </mat-form-field>\r\n \x3c!-- Secondary build area [END]--\x3e\r\n </div>\r\n \x3c!-- Surfaces [END]--\x3e\r\n \x3c!-- Year build [START], Only visible for HOUSE, APARTMENT, ROOM, OFFICE, RETAIL and WAREHOUSE property types --\x3e\r\n <div class="features__item"\r\n *ngIf="propertyType === \'HOUSE\' || propertyType === \'APARTMENT\' || propertyType === \'ROOM\' || propertyType === \'OFFICE\' || propertyType === \'RETAIL\' || propertyType === \'WAREHOUSE\'">\r\n <p class="features-item__label">\r\n <span class="label__icon"><mat-icon>event</mat-icon></span>\r\n Año de construcción\r\n </p>\r\n <lib-property-custom-datepicker formControlName="buildIn"></lib-property-custom-datepicker>\r\n </div>\r\n \x3c!-- Year build [END] --\x3e\r\n \x3c!-- Land use [START], Only for LAND property type --\x3e\r\n <div class="features__item" *ngIf="propertyType === \'LAND\'">\r\n <p class="features-item__label">\r\n <span class="label__icon ic-features-land-use"></span>\r\n Uso de suelo\r\n </p>\r\n <mat-form-field appearance="outline">\r\n <mat-label>Tipo</mat-label>\r\n <mat-select formControlName="landUse">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let use of landUseList">\r\n <mat-option [value]="use.value">\r\n {{use.name}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n \x3c!-- Land use [END] --\x3e\r\n </div>\r\n </div>\r\n \x3c!-- Features [END] --\x3e\r\n <hr>\r\n <div class="agreement">\r\n <p class="section_label">Contrato</p>\r\n <div class="agreement__body">\r\n <mat-form-field appearance="outline" class="agreement__form-field">\r\n <mat-label>Fecha de inicio</mat-label>\r\n <input autocomplete="off" matInput formControlName="agreementDate" [matDatepicker]="dp2"\r\n placeholder="Seleccione una fecha"\r\n title="Chose a date">\r\n <mat-datepicker-toggle matSuffix [for]="dp2"></mat-datepicker-toggle>\r\n <mat-datepicker #dp2 [disabled]="false"></mat-datepicker>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="agreement__form-field">\r\n <mat-label>Duración</mat-label>\r\n <mat-select formControlName="duration">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let time of durationList">\r\n <mat-option [value]="time">\r\n <ng-container [ngSwitch]="time">\r\n <span *ngSwitchCase="365">1 año</span>\r\n <span *ngSwitchCase="180">6 meses</span>\r\n <span *ngSwitchDefault>{{time}} días</span>\r\n </ng-container>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-form-field appearance="outline" class="agreement__form-field">\r\n <mat-label>Comisión</mat-label>\r\n <mat-select formControlName="commission">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let commission of commissionList">\r\n <mat-option [value]="commission">\r\n <span *ngIf="propertyForm.controls[\'offering\'].value === \'RENT\'">\r\n <ng-container [ngSwitch]="commission">\r\n <span *ngSwitchCase="1">1 mes = {{propertyForm.controls[\'price\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}</span>\r\n <span *ngSwitchDefault>\r\n {{commission}} meses = {{propertyForm.controls[\'price\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </ng-container>\r\n </span>\r\n <span *ngIf="propertyForm.controls[\'offering\'].value === \'SALE\'">\r\n <span>{{commission * 100 | currency: \'\' : \'\': \'1.1-1\'}}\r\n % = {{propertyForm.controls[\'price\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}</span>\r\n </span>\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-error *ngIf="propertyForm.controls[\'commission\'].hasError(\'commissionInvalid\')">\r\n Es necesario ingresar el precio deseado\r\n </mat-error>\r\n </mat-form-field>\r\n <ng-template [ngIf]="propertyType === \'INVESTMENT\'">\r\n <mat-form-field appearance="outline" class="investment-return__form-field">\r\n <mat-label>Retorno de Inversión</mat-label>\r\n <input autocomplete="off" matInput title="Investment return" formControlName="roi" type="number">\r\n <span matSuffix>%</span>\r\n </mat-form-field>\r\n </ng-template>\r\n <mat-checkbox class="agreement__body-check-box" formControlName="exclusivity">Contrato con exclusividad\r\n </mat-checkbox>\r\n <mat-checkbox class="agreement__body-check-box" formControlName="mlm">Quiero compartir en el {{mlsLabel || \'MLS\'}}</mat-checkbox>\r\n <mat-form-field appearance="outline" class="agreement__form-field" *ngIf="propertyForm.controls[\'mlm\'].value">\r\n <mat-label>Monto de comisión compartida</mat-label>\r\n <mat-select formControlName="sharedCommission">\r\n <mat-option [value]="null">\r\n Seleccione una opción\r\n </mat-option>\r\n <ng-container *ngFor="let commission of sharedCommissionList">\r\n <mat-option [value]="commission">\r\n {{commission * 100}}% de mi comisión\r\n = {{propertyForm.controls[\'price\'].value * propertyForm.controls[\'commission\'].value * commission | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </mat-option>\r\n </ng-container>\r\n </mat-select>\r\n <mat-error *ngIf="propertyForm.controls[\'sharedCommission\'].hasError(\'sharedCommissionInvalid\')">\r\n Debe seleccionar su comisión\r\n </mat-error>\r\n <mat-error *ngIf="propertyForm.controls[\'sharedCommission\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n <hr>\r\n <div class="description">\r\n <p class="section_label">Descripción</p>\r\n <mat-form-field appearance="outline" class="description__form-field">\r\n <textarea matInput="" cdkTextareaAutosize title="Description" formControlName="description"></textarea>\r\n <mat-hint align="end"><span>Número de caracteres ideal: 3500</span>\r\n Actuales: {{propertyForm.controls[\'description\'].value ? propertyForm.controls[\'description\'].value.length : 0}}\r\n </mat-hint>\r\n <mat-error *ngIf="propertyForm.controls[\'description\'].hasError(\'required\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="external-link">\r\n <p class="section_label">Tour virtual</p>\r\n <mat-form-field appearance="outline" class="external-link__form-field">\r\n <input matInput="" title="externalLink" formControlName="externalLink">\r\n <mat-error *ngIf="propertyForm.controls[\'externalLink\'].hasError(\'pattern\')">\r\n Url invalida\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <div class="notes">\r\n <p class="section_label">Notas</p>\r\n <mat-form-field appearance="outline" class="notes__form-field">\r\n <textarea matInput="" cdkTextareaAutosize title="Notes" formControlName="notes"></textarea>\r\n </mat-form-field>\r\n </div>\r\n <hr *ngIf="propertyType !== \'INVESTMENT\'">\r\n <div class="amenities" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <p class="section_label">Amenidades</p>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let amenity of amenitiesList">\r\n <span matRipple class="list-amenities__amenity" (click)="updateAmenity(amenity)">\r\n <span class="amenity__icon ic-amenities-{{amenity.iconName}}"\r\n [ngClass]="{\'amenity__icon-active\': amenity.checked}"></span>\r\n <span class="amenity__text">{{amenity.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n <div class="attributes" *ngIf="propertyType !== \'INVESTMENT\'">\r\n <p class="section_label">Caracteristicas de ubicación</p>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let feature of featuresList">\r\n <span matRipple class="list-amenities__amenity" (click)="updateAmenity(feature)">\r\n <span class="amenity__icon ic-amenities-{{feature.iconName}}"\r\n [ngClass]="{\'amenity__icon-active\': feature.checked}"></span>\r\n <span class="amenity__text">{{feature.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </div>\r\n <button type="submit" class="button-submit" mat-button #btnSubmit>Enviar</button>\r\n</form>\r\n',providers:[{provide:y.MAT_DATE_LOCALE,useValue:"es-MX"},{provide:y.DateAdapter,useClass:x.MomentDateAdapter,deps:[y.MAT_DATE_LOCALE,x.MAT_MOMENT_DATE_ADAPTER_OPTIONS]},{provide:y.MAT_DATE_FORMATS,useValue:Re}],styles:[":host{display:block;width:100%}.section_label{font-weight:700;display:flex;justify-content:space-between}.address__label-button{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}.offering{margin-bottom:8px}.direct-debit{margin:16px 0;display:flex}.direct-debit__check-box{margin-top:4px}.direct-debit__radio-group{display:inline-block;margin:0 0 0 32px}@media screen and (max-width:600px){.section_label{flex-direction:column}.section_label :last-child{margin-top:16px}.direct-debit{flex-direction:column;align-items:flex-start}.direct-debit__radio-group{margin:16px 0 0}}.direct-debit__radio-button{margin-right:16px}.pricing{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3))}@media screen and (max-width:600px){.pricing{-ms-grid-columns:100%;grid-template-columns:100%}}@media screen and (min-width:1800px){.pricing{-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}}.agreement__body{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[2];grid-template-columns:repeat(2,calc(100% / 3))}@media screen and (max-width:600px){.agreement__body{-ms-grid-columns:100%;grid-template-columns:100%}}@media screen and (min-width:1800px){.agreement__body{-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}}.agreement__body-check-box{margin-bottom:16px;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3}.address__body{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}@media screen and (max-width:600px){.agreement__body-check-box{-ms-grid-column-span:auto;grid-column-end:auto}.address__body{-ms-grid-columns:100%;grid-template-columns:100%}}@media screen and (min-width:1800px){.address__body{-ms-grid-columns:(calc(100% / 5))[4];grid-template-columns:repeat(4,calc(100% / 5))}}.features__body{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 2))[2];grid-template-columns:repeat(2,calc(100% / 2))}.features-item__label{display:flex;align-items:center;margin:0;padding:8px 0}.features-item__radio-group{display:block;margin:8px 0}.features-item__radio-button{margin-right:16px}.features-item-bathrooms,.features-item-parking-spaces{-ms-grid-column:1;grid-column-start:1}.features-item-surface{-ms-grid-column:2;grid-column-start:2;-ms-grid-row:1;grid-row-start:1;-ms-grid-row-span:2;grid-row-end:3}.address__form-field,.agreement__form-field,.description__form-field,.external-link__form-field,.notes__form-field,.pricing__form-field{width:95%;margin:0 auto 0 0}@media screen and (max-width:600px){.features__body{-ms-grid-columns:100%;grid-template-columns:100%}.features-item-surface{-ms-grid-column:auto;grid-column-start:auto;-ms-grid-row:auto;grid-row-start:auto;-ms-grid-row-span:NaN;grid-row-end:auto}.address__form-field,.agreement__form-field,.description__form-field,.external-link__form-field,.notes__form-field,.pricing__form-field{width:100%;margin:0}}.pricing__maintenance-fee{display:flex;align-items:center;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:2;grid-column-end:3}.pricing__maintenance-fee :first-child{margin:0 16px 0 0}@media screen and (max-width:600px){.pricing__maintenance-fee{flex-direction:column;align-items:start;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:NaN;grid-column-end:auto}.pricing__maintenance-fee :first-child{margin:0 0 16px}}.address__visibility{-ms-grid-row:4;grid-row-start:4;-ms-grid-column:1;grid-column-start:1;-ms-grid-column-span:4;grid-column-end:5}.address__visibility-body{display:flex}.address__visibility-radio-group{display:block;margin-right:16px}.visibility-radio-group__button{margin-bottom:16px;display:block}.visibility__about{margin:0}.visibility__about-label{display:block;padding:0 8px 8px;font-size:14px}.label__icon{width:24px;height:24px;font-size:24px;color:#707070;margin-right:8px}.amenities,.attributes{width:50%;display:inline-block}@media screen and (max-width:600px){.address__visibility{-ms-grid-row:auto;grid-row-start:auto;-ms-grid-column:auto;grid-column-start:auto;-ms-grid-column-span:NaN;grid-column-end:auto}.address__visibility-body{flex-direction:column}.amenities,.attributes{width:100%;display:block}}.amenities__list-amenities{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 3))[3];grid-template-columns:repeat(3,calc(100% / 3))}.list-amenities__amenity{display:flex;flex-direction:column;justify-content:space-between;align-items:center;cursor:pointer;width:100px;padding:4px;box-sizing:border-box;border-radius:8px;margin:8px auto 0;text-align:center}.amenity__icon{width:24px;height:24px;font-size:24px;background:#707070;border-radius:50%;padding:8px;color:#fff;display:block;margin:0 auto}.amenity__text{padding:8px;box-sizing:border-box;display:block;font-size:12px}.button-submit{display:none}"]}]}],e.ctorParameters=function(){return[{type:i.FormBuilder},{type:p.DialogService},{type:y.DateAdapter}]},e.propDecorators={_btnSubmitRef:[{type:t.ViewChild,args:["btnSubmit",{static:!0,read:t.ElementRef}]}],utils:[{type:t.Input}],address:[{type:t.Input}],propertyType:[{type:t.Input}],property:[{type:t.Input}],mlsLabel:[{type:t.Input}],editorInstance:[{type:t.Output}],selectAddress:[{type:t.Output}]},e}();function Be(e){return function(t){if(t.parent){var r=t.parent.controls[e];if(!t.value&&!r.value)return he(r,"phoneFieldsError"),null;if(""===t.value||r.value&&""!==r.value||r.setErrors({phoneFieldsError:!0}),r.value&&""!==r.value&&(!t.value||""===t.value))return{phoneFieldsError:!0}}return null}}var ze=function(){function e(e){this._formBuilder=e,this.ownerInstance=new t.EventEmitter,this.ownerForm=this._formBuilder.group({name:[],lastName:[],email:["",[i.Validators.email]],code:["",[Be("phone")]],phone:["",[Be("code"),i.Validators.maxLength(13),i.Validators.minLength(8),i.Validators.pattern(new RegExp(/^[0-9]\d*$/))]],address:[]}),this.createOwner()}return e.prototype.ngOnChanges=function(e){e.disabled&&this.ownerForm.disable(),e.owner&&e.owner.currentValue&&this.createOwner(e.owner.currentValue)},e.prototype.ngAfterViewInit=function(){this.ownerInstance.emit(this)},e.prototype.onCodePhoneChanged=function(e){this.ownerForm.controls.code.setValue(e?e.code:"")},e.prototype.getOwner=function(){return this.updateOwnerByForm(this.ownerForm.value),this._owner},e.prototype.updateOwnerByForm=function(e){this._owner.name=e.name,this._owner.lastName=e.lastName,this._owner.email=e.email,this._owner.phone=e.phone,this._owner.codePhone=e.code?e.code.replace("+",""):"",this._owner.address=e.address},e.prototype.updateFormByOwner=function(){this.ownerForm.patchValue({name:this._owner.name,lastName:this._owner.lastName,email:this._owner.email,phone:this._owner.phone,code:this._owner.codePhone?"+"+this._owner.codePhone:"",address:this._owner.address})},e.prototype.createOwner=function(e){this._owner=new n.Owner(e||null),e&&this.updateFormByOwner()},e.decorators=[{type:t.Component,args:[{selector:"lib-property-owner-info",template:'<div class="owner-info">\r\n <p class="title">Propietario</p>\r\n <form class="owner-info__form" [formGroup]="ownerForm" autocomplete="off">\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Nombre(s)</mat-label>\r\n <input autocomplete="off" title="Name" type="text" matInput formControlName="name">\r\n </mat-form-field>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Apellido(s)</mat-label>\r\n <input autocomplete="off" title="Last name" type="text" matInput formControlName="lastName">\r\n </mat-form-field>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Email</mat-label>\r\n <input autocomplete="off" title="Email" type="email" matInput formControlName="email">\r\n <mat-error *ngIf="ownerForm.controls[\'email\'].hasError(\'email\')">\r\n Dirección de correo no válida\r\n </mat-error>\r\n </mat-form-field>\r\n <div class="field-phone">\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Código</mat-label>\r\n <input autocomplete="off" libCountryCode formControlName="code" (countrySelected)="onCodePhoneChanged($event)" title="Code number"\r\n type="text" matInput>\r\n <mat-error *ngIf="ownerForm.controls[\'code\'].hasError(\'phoneFieldsError\')">\r\n Este campo es requerido\r\n </mat-error>\r\n </mat-form-field>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Teléfono</mat-label>\r\n <input autocomplete="off" title="Phone" type="text" matInput formControlName="phone">\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'phoneFieldsError\')">\r\n Este campo es requerido\r\n </mat-error>\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'maxlength\')">\r\n El número de teléfono no debe tener menos de 8 ni más de 13 números\r\n </mat-error>\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'minlength\')">\r\n El número de teléfono no debe tener menos de 8 ni más de 13 números\r\n </mat-error>\r\n <mat-error *ngIf="ownerForm.controls[\'phone\'].hasError(\'pattern\')">\r\n Este campo solo admite números\r\n </mat-error>\r\n </mat-form-field>\r\n </div>\r\n <mat-form-field class="form__field" appearance="outline">\r\n <mat-label>Dirección</mat-label>\r\n <textarea title="Address" cdkTextareaAutosize type="text" matInput\r\n formControlName="address"></textarea>\r\n </mat-form-field>\r\n </form>\r\n</div>\r\n',styles:[":host{display:block;width:100%;padding:16px;box-sizing:border-box}.title{padding:8px;margin:0;font-weight:700}.owner-info__form{width:100%;display:-ms-grid;display:grid;-ms-grid-columns:(50%)[2];grid-template-columns:repeat(2,50%)}@media screen and (max-width:600px){.owner-info__form{-ms-grid-columns:(100%)[1];grid-template-columns:repeat(1,100%)}}.form__field{padding:8px;box-sizing:border-box}.field-phone{display:flex;justify-content:space-between}.field-phone .form__field:first-child{width:30%}.field-phone .form__field:last-child{width:70%}"]}]}],e.ctorParameters=function(){return[{type:i.FormBuilder}]},e.propDecorators={owner:[{type:t.Input}],disabled:[{type:t.Input}],ownerInstance:[{type:t.Output}]},e}(),Ve=function(){function e(e,r,n){this._visor=e,this._snackBar=r,this._http=n,this.documentsInstance=new t.EventEmitter,this.documents=W.DocumentsList.map((function(e){return z({},e)})),this._newMedia=[],this._files=[]}return e.prototype.ngAfterViewInit=function(){this.documentsInstance.emit(this)},e.prototype.ngOnChanges=function(e){e.files&&e.files.currentValue&&(this._files=e.files.currentValue||[],this.validateDocumentsLoaded())},e.prototype.getDocuments=function(){return{documents:this._files,newMedia:this._newMedia}},e.prototype.openFile=function(e){var t=this.getPFileByType(e),r=this.getUserMediaByType(e);r?this._visor.open(r.url):t?this.openBlobFile(t.fileCS.thumbnail):t||r||this._snackBar.setMessage("Este documento no ha sido añadido","OK",2500,"left")},e.prototype.onUploadFile=function(e,t){var r=t.value.toString().toLowerCase();t.loaded&&this.updateDocument(r),t.loaded=!0;var i=new n.PFile;i.type=t.value,e.type=t.value,i.media=!1;var o=r+"_"+(new Date).getTime()+".pdf";i.name=o,e.name=o,i.fileCS={thumbnail:e.url,blobName:null},this._files.push(i),this._newMedia.push(e)},e.prototype.openBlobFile=function(e){var t=this;this.downloadFile(e).subscribe((function(e){t._visor.open(e)}))},e.prototype.updateDocument=function(e){var t=-1,r=null;this._files.forEach((function(n,i){n.name===e&&(r=n,t=i)})),t>-1&&this._files.splice(t,1),r&&(t=-1,this._newMedia.forEach((function(e,n){e.name===r.name&&(t=n)})),t>-1&&this._newMedia.splice(t,1))},e.prototype.validateDocumentsLoaded=function(){var e=this;this._files&&0!==this._files.length&&this._files.forEach((function(t){return e.documents.forEach((function(e){e.value===t.type&&(e.loaded=!0)}))}))},e.prototype.getPFileByType=function(e){var t=null;return this.files&&0!==this.files.length?(this.files.forEach((function(r){r.type===e&&(t=r)})),t):t},e.prototype.getUserMediaByType=function(e){var t=null;return this._newMedia&&0!==this._newMedia.length?(this._newMedia.forEach((function(r){r.type===e&&(t=r)})),t):t},e.prototype.downloadFile=function(e){return this._http.get(e,{responseType:"arraybuffer"}).pipe(_.map((function(e){var t=new Blob([e],{type:"application/pdf"});return URL.createObjectURL(t)})))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-documents",template:'<div class="documents">\r\n <p class="title">Documentación</p>\r\n <div class="documents__body">\r\n <ng-container *ngFor="let doc of documents">\r\n <div class="body__document-item">\r\n <lib-upload-file [content]="buttonTemplate" [fab]="true" [fileType]="\'document\'"\r\n [disabled]="disabled"\r\n (loadImage)="onUploadFile($event, doc)">\r\n <ng-template #buttonTemplate>\r\n <button mat-icon-button color="primary" class="document-item__button" [disabled]="disabled">\r\n \x3c!-- Document not uploaded on create/edit property --\x3e\r\n <ng-template [ngIf]="!doc.loaded && !disabled">\r\n <mat-icon>cloud_upload</mat-icon>\r\n </ng-template>\r\n \x3c!-- Document not uploaded on property record --\x3e\r\n <ng-template [ngIf]="!doc.loaded && disabled">\r\n <span class="button__icon ic-component-property-unloaded-file"></span>\r\n </ng-template>\r\n \x3c!-- Document uploaded on property record --\x3e\r\n <ng-template [ngIf]="doc.loaded && disabled">\r\n <mat-icon [ngClass]="{\'document-item__icon--loaded\': doc.loaded && disabled}">description\r\n </mat-icon>\r\n </ng-template>\r\n \x3c!-- Document uploaded on property --\x3e\r\n <ng-template [ngIf]="doc.loaded && !disabled">\r\n <span class="button__icon ic-component-property-update-file"></span>\r\n </ng-template>\r\n </button>\r\n </ng-template>\r\n </lib-upload-file>\r\n <p class="document-item__label"\r\n [ngClass]="{\'document-item__label--disabled\': !doc.loaded, \'mat-elevation-z2\': doc.loaded}"\r\n matRipple (click)="openFile(doc.value)">\r\n {{doc.name}}\r\n </p>\r\n </div>\r\n </ng-container>\r\n </div>\r\n</div>\r\n',styles:[":host{display:block;width:100%;padding:0 16px 16px;box-sizing:border-box}.title{margin:0;padding:8px;font-weight:700}.documents__body{display:-ms-grid;display:grid;-ms-grid-columns:(50%)[2];grid-template-columns:repeat(2,50%)}@media screen and (max-width:600px){.documents__body{-ms-grid-columns:100%;grid-template-columns:100%}}.body__document-item{display:flex;padding:8px;box-sizing:border-box}.document-item__button{margin-right:8px}.button__icon{display:inline-block;width:24px;height:24px;font-size:24px}.document-item__label{width:100%;background:#fff;border-radius:8px;padding:8px;margin:0;cursor:pointer}"]}]}],e.ctorParameters=function(){return[{type:ae},{type:v.SnackBarService},{type:w.HttpClient}]},e.propDecorators={files:[{type:t.Input}],disabled:[{type:t.Input}],documentsInstance:[{type:t.Output}]},e}(),Ue=function(){function e(e){this._sanitizer=e,this.amenities=[],this.features=[]}return e.prototype.ngOnInit=function(){},e.prototype.ngOnChanges=function(e){e.property&&e.property.currentValue&&(this.property=e.property.currentValue,this.searchPropertyType(),this.createAmenities(),this.createFeatures(),this.validateAgreement())},e.prototype.getTourUrl=function(){return this._sanitizer.bypassSecurityTrustResourceUrl(this.property.externalLink)},e.prototype.validateAgreement=function(){if(this.property.propertyInfo.listingAgreementStartDate&&this.property.propertyInfo.listingAgreementTime){var e=new j(this.property.propertyInfo.listingAgreementStartDate).toDate();e.setDate(e.getDate()+this.property.propertyInfo.listingAgreementTime),this.agreementEndDate=j.getTimestamp(e)}},e.prototype.searchPropertyType=function(){var e=this;W.PropertyTypeList.forEach((function(t){e.property.type===t.value&&(e.propertyType=t)}))},e.prototype.createAmenities=function(){var e=this;this.amenities=[];var t=[];W.PropertyTypeList.forEach((function(r){r.value===e.property.type&&(t=r.amenities)})),t.length>0&&t.forEach((function(t){e.property.amenities[t.value]&&e.amenities.push(t)}))},e.prototype.createFeatures=function(){var e=this;this.features=[];var t=[];W.PropertyTypeList.forEach((function(r){r.value===e.property.type&&(t=r.features)})),t.length>0&&t.forEach((function(t){e.property.amenities[t.value]&&e.features.push(t)}))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-details",template:'<div class="info" *ngIf="property">\r\n <h1 class="title">\r\n <span class="title__address">\r\n \x3c!--\r\n Address visible\r\n Street #Ext Int. Lt Mz, Colony, PostalCode, Township, City, State, Country\r\n Address hidden\r\n Colony, PostalCode, Township, City, State, Country\r\n --\x3e\r\n <ng-template [ngIf]="property.address.visible">\r\n {{property.address.street}}\r\n <span *ngIf="property.address.outdoorNumber">#{{property.address.outdoorNumber}} </span>\r\n <span *ngIf="property.address.interiorNumber">Int. {{property.address.interiorNumber}} </span>\r\n <span *ngIf="property.address.lt">Lt. {{property.address.lt}} </span>\r\n <span *ngIf="property.address.mz">Mz. {{property.address.mz}} </span>\r\n </ng-template>\r\n <span *ngIf="property.address.colony">{{property.address.colony}}, </span>\r\n <span *ngIf="property.address.postalCode">{{property.address.postalCode}}, </span>\r\n <span *ngIf="property.address.township">{{property.address.township}}, </span>\r\n <span *ngIf="property.address.city">{{property.address.city}}, </span>\r\n <span *ngIf="property.address.state">{{property.address.state}}, </span>\r\n <span *ngIf="property.address.country">{{property.address.country}}</span>\r\n <span *ngIf="!property.address.visible" class="address-street__hidden"><br> Dirección aproximada</span>\r\n </span>\r\n <span class="title__property-offering">\r\n <span class="title__property-offering-price">\r\n <ng-template [ngIf]="currencyConverted" [ngIfElse]="realPrice">\r\n {{currencyConverted.price | currency : \'\' : \'symbol\' : \'1.0-0\'}} {{currencyConverted.currency}}\r\n <br>\r\n <span class="property-offering-price__info-currency"><mat-icon class="info-currency__icon">info</mat-icon> Precio convertido <br> aproximado</span>\r\n </ng-template>\r\n <ng-template #realPrice>\r\n {{property.price | currency : \'\' : \'symbol\' : \'1.0-0\'}} {{property.currency}}\r\n </ng-template>\r\n </span>\r\n <ng-template [ngIf]="currencyConverted">\r\n <br>\r\n <span>{{property.price | currency : \'\' : \'symbol\' : \'1.0-0\'}} {{property.currency}}</span>\r\n <br>\r\n <span class="property-offering-price__info-currency"><mat-icon class="info-currency__icon">info</mat-icon> Precio publicado</span>\r\n </ng-template>\r\n <br>\r\n <div class="div__title-sku">\r\n <div>\r\n <span\r\n class="ic-property-{{propertyType.iconName}}">\r\n </span>{{property.type | propertyType}} {{property.offering | offeringType}}\r\n </div>\r\n <ng-template [ngIf]="property.sku !== \'\' && property.sku">\r\n <span class="title__sku">\r\n SKU: {{property.sku}}\r\n </span>\r\n </ng-template>\r\n </div>\r\n </span>\r\n </h1>\r\n <hr class="divider">\r\n <section class="features">\r\n <ng-template [ngIf]="property.features.bedrooms && property.features.bedrooms > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-bedroom"></span>\r\n <span class="features__item-text">{{property.features.bedrooms}}</span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.bathrooms && property.features.bathrooms > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-bathroom"></span>\r\n <span class="features__item-text">{{property.features.bathrooms}}</span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.mainArea && property.features.mainArea > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-surface"></span>\r\n <span class="features__item-text">\r\n {{property.features.mainArea}}\r\n <span>m<sup>2</sup></span>\r\n </span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.parkingSpaces && property.features.parkingSpaces > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-parking"></span>\r\n <span class="features__item-text">{{property.features.parkingSpaces}}</span>\r\n </p>\r\n </ng-template>\r\n <ng-template [ngIf]="property.features.roi && property.features.roi > 0">\r\n <p class="features__item">\r\n <span class="features__item-icon ic-features-roi"></span>\r\n <span class="features__item-text">{{property.features.roi}}</span>\r\n </p>\r\n </ng-template>\r\n </section>\r\n <section class="description">\r\n <h2 class="sub-title">\r\n Descripción\r\n </h2>\r\n <p class="description__body">\r\n {{property.description}}\r\n </p>\r\n </section>\r\n <ng-template [ngIf]="property.externalLink && visibleTour">\r\n <hr class="divider">\r\n <section class="external-link">\r\n <h2 class="sub-title">\r\n Tour virtual\r\n </h2>\r\n <iframe class="external-link__body" [src]="getTourUrl()"></iframe>\r\n </section>\r\n </ng-template>\r\n <ng-template [ngIf]="record">\r\n <hr class="divider">\r\n <section class="agreement">\r\n <h2 class="sub-title">\r\n Contrato\r\n </h2>\r\n <p class="agreement__body">\r\n <span class="agreement__body-filed">\r\n <span class="agreement__body-field-title">\r\n Exclusividad de contrato\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{property.propertyInfo.exclusivity ? \'Si\' : \'No\'}}\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed" *ngIf="property.propertyInfo.listingAgreementStartDate">\r\n <span class="agreement__body-field-title">\r\n Fecha de inicio de contrato\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{property.propertyInfo.listingAgreementStartDate | libFormatDate : true : \'dd/MM/yyyy\'}}\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed" *ngIf="agreementEndDate">\r\n <span class="agreement__body-field-title">\r\n Fecha de termino de contrato\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{agreementEndDate | libFormatDate : true : \'dd/MM/yyyy\'}}\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed" *ngIf="property.propertyInfo.commission">\r\n <span class="agreement__body-field-title">\r\n Comisión\r\n </span>\r\n <span class="agreement__body-field-content">\r\n <span *ngIf="property.offering === \'RENT\'">{{property.propertyInfo.commission}} meses</span>\r\n <span *ngIf="property.offering === \'SALE\'">{{property.propertyInfo.commission * 100}}%</span>\r\n </span>\r\n </span>\r\n <span class="agreement__body-filed">\r\n <span class="agreement__body-field-title">\r\n Anunciada en el {{mlsLabel || \'MLS\'}}\r\n </span>\r\n <span class="agreement__body-field-content">\r\n {{property.propertyInfo.mls ? \'Si\' : \'No\'}}\r\n </span>\r\n </span>\r\n </p>\r\n </section>\r\n <hr class="divider">\r\n <section class="private-features">\r\n <h2 class="sub-title">\r\n Caracteristicas\r\n </h2>\r\n <p class="private-features__body">\r\n <span class="private-features__body-filed" *ngIf="property.propertyInfo.lowestPrice">\r\n <span class="private-features__body-field-title">\r\n Precio minimo\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.propertyInfo.lowestPrice | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.features.condominiumFeePrice">\r\n <span class="private-features__body-field-title">\r\n Cuota de mantenimiento\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.features.condominiumFeePrice | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.propertyInfo.leaseTransferPrice">\r\n <span class="private-features__body-field-title">\r\n Traspaso\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.propertyInfo.leaseTransferPrice | currency : \'\' : \'symbol\' : \'1.0-0\'}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.features.builtIn">\r\n <span class="private-features__body-field-title">\r\n Año de construcción\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.features.builtIn}}\r\n </span>\r\n </span>\r\n <span class="private-features__body-filed" *ngIf="property.features.roi">\r\n <span class="private-features__body-field-title">\r\n Retorno de inversión\r\n </span>\r\n <span class="private-features__body-field-content">\r\n {{property.features.roi}}\r\n </span>\r\n </span>\r\n </p>\r\n </section>\r\n <ng-template [ngIf]="property.propertyInfo.consumerReporting && property.propertyInfo.consumerReporting !== 0">\r\n <hr class="divider">\r\n <section class="buro-rentas">\r\n <h2 class="sub-title">\r\n Buró Rentas\r\n </h2>\r\n <p class="private-features__body" *ngIf="property.propertyInfo.consumerReporting === 1">Requerir certificado de\r\n fiabiidad\r\n </p>\r\n <p class="private-features__body" *ngIf="property.propertyInfo.consumerReporting === 2">Requerir poliza de\r\n arrendamiento\r\n </p>\r\n </section>\r\n </ng-template>\r\n <ng-template [ngIf]="property.propertyInfo.notes">\r\n <hr class="divider">\r\n <section class="notes">\r\n <h2 class="sub-title">\r\n Notas\r\n </h2>\r\n <p class="notes__body">{{property.propertyInfo.notes}}</p>\r\n </section>\r\n </ng-template>\r\n </ng-template>\r\n <hr class="divider">\r\n <section class="indications">\r\n <h2 class="sub-title">\r\n Indicaciones\r\n </h2>\r\n <div class="indications__body">\r\n <a class="indications__body-item-link"\r\n href="https://www.google.com/maps/dir/?api=1&destination={{property.address.location.latitude}},{{property.address.location.longitude}}"\r\n [target]="\'_blank\'">\r\n <p matRipple class="indications__body-item">\r\n <span class="indications__body-item-icon ic-component-property-marker"></span>\r\n <span class="indications__body-item-text">¿COMO LLEGAR?</span>\r\n </p>\r\n </a>\r\n <a class="indications__body-item-link"\r\n href="https://www.google.com/maps/@?api=1&map_action=pano&viewpoint={{property.address.location.latitude}},{{property.address.location.longitude}}"\r\n [target]="\'_blank\'">\r\n <p matRipple class="indications__body-item">\r\n <span class="indications__body-item-icon ic-component-property-streetview"></span>\r\n <span class="indications__body-item-text">VISTA DE LA CALLE</span>\r\n </p>\r\n </a>\r\n </div>\r\n </section>\r\n <hr class="divider">\r\n <ng-template [ngIf]="amenities && amenities.length > 0">\r\n <section class="amenities">\r\n <h2 class="sub-title">Amenidades</h2>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let amenity of amenities">\r\n <span matRipple class="list-amenities__amenity">\r\n <span class="amenity__icon ic-amenities-{{amenity.iconName}}"></span>\r\n <span class="amenity__text">{{amenity.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </section>\r\n </ng-template>\r\n <ng-template [ngIf]="features && features.length > 0">\r\n <section class="amenities">\r\n <h2 class="sub-title">Caracteristicas de la zona</h2>\r\n <p class="amenities__list-amenities">\r\n <ng-container *ngFor="let feature of features">\r\n <span matRipple class="list-amenities__amenity">\r\n <span class="amenity__icon ic-amenities-{{feature.iconName}}"></span>\r\n <span class="amenity__text">{{feature.name}}</span>\r\n </span>\r\n </ng-container>\r\n </p>\r\n </section>\r\n </ng-template>\r\n</div>\r\n',styles:[":host{display:block;width:100%}.divider{border:none;border-bottom:1px solid}.title{display:flex;font-size:18px;color:#707070;font-weight:400}.sub-title{margin:0;font-size:18px;padding:0 16px 16px 0}.title>span:first-child{width:60%}@media screen and (max-width:600px){.title{flex-direction:column}.title>span:first-child{width:100%}}.title>span:last-child{width:40%}.div__title-sku{display:flex;flex-direction:column}.title__sku{margin-bottom:2%}.address-street__hidden{font-size:12px}.title__property-offering{text-align:right}@media screen and (max-width:600px){.title>span:last-child{width:100%}.title__property-offering{text-align:left;margin:16px 0}}.title__property-offering-price{font-size:26px;font-weight:700}.property-offering-price__info-currency{font-size:12px;display:inline-block;margin:4px 0}.info-currency__icon{width:12px;height:12px;font-size:12px}.features{padding:8px 0;display:flex;align-items:center}.features__item{width:auto;margin:0 24px 0 0;display:flex;justify-content:center;align-items:center;position:relative}.features__item:last-child:after{content:none}.features__item-text{font-size:16px;display:inline-block}.features__item-icon{display:inline-block;font-size:24px;width:24px;height:24px;margin-right:8px}.agreement,.buro-rentas,.description,.external-link,.indications,.notes,.private-features{display:flex;padding:16px 0}.indications__body{display:flex}.indications__body-item-link{color:inherit;text-decoration:none}.indications__body-item{padding:8px;margin:0 16px 0 0;border-radius:8px;cursor:pointer}.indications__body-item-icon{margin:auto;padding:8px;border-radius:8px;display:block;font-size:24px;width:24px;height:24px}.indications__body-item-text{display:block;text-align:center;font-size:12px;margin:6px 0}.agreement__body,.description__body,.notes__body,.private-features__body{width:75%;margin:0 0 0 auto}@media screen and (max-width:600px){.agreement,.buro-rentas,.description,.external-link,.indications,.notes,.private-features{flex-direction:column;align-items:start}.agreement__body,.description__body,.notes__body,.private-features__body{width:100%;margin:0}}.external-link__body{width:75%;height:280px;border-radius:16px;margin-left:20px}@media screen and (max-width:600px){.external-link__body{width:100%;margin:0}}.agreement__body-filed,.private-features__body-filed{display:block;padding:8px 0}.agreement__body-field-content,.agreement__body-field-title,.private-features__body-field-content,.private-features__body-field-title{width:50%;display:inline-block}.amenities__list{width:50%;display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}.amenities,.attributes{width:50%;display:inline-block}@media screen and (max-width:600px){.amenities,.attributes{width:100%;display:block}}.amenities__list-amenities{display:-ms-grid;display:grid;-ms-grid-columns:(calc(100% / 4))[4];grid-template-columns:repeat(4,calc(100% / 4))}.list-amenities__amenity{display:flex;flex-direction:column;align-items:center;cursor:pointer;padding:4px;box-sizing:border-box;border-radius:8px;text-align:center}.amenity__icon{width:24px;height:24px;font-size:24px;border-radius:50%;padding:8px;display:block;margin:8px}.amenity__text{padding:8px;box-sizing:border-box;display:block;font-size:12px}"]}]}],e.ctorParameters=function(){return[{type:A.DomSanitizer}]},e.propDecorators={record:[{type:t.Input}],currencyConverted:[{type:t.Input}],property:[{type:t.Input}],mlsLabel:[{type:t.Input}],visibleTour:[{type:t.Input}]},e}(),He=function(){function e(e){this._render=e,this.currentIndex=new t.EventEmitter,this.index=this.initialIndex||0,this.multimedia=[]}return e.prototype.ngAfterViewInit=function(){this.currentIndex.emit(this.index)},e.prototype.ngOnChanges=function(e){e.selectIndex&&void 0!==e.selectIndex.currentValue&&null!==e.selectIndex.currentValue&&this.moveImageByIndex(e.selectIndex.currentValue),e.multimedia&&e.multimedia.currentValue&&(this.multimedia=e.multimedia.currentValue||[],this.multimedia.length>0&&(this.count=this.multimedia.length,this.moveImageByIndex(this.initialIndex||0),this.validateHTTPS()))},e.prototype.moveImage=function(e){this.index=e?this.index+1:this.index-1,this.index===this.multimedia.length&&(this.index=0),this.currentIndex.emit(this.index),this._render.setStyle(this._slider.nativeElement,"margin-left","-"+100*this.index+"%")},e.prototype.moveImageByIndex=function(e){this.index=e,this.index===this.multimedia.length&&(this.index=0),this.currentIndex.emit(this.index),this._render.setStyle(this._slider.nativeElement,"margin-left","-"+100*this.index+"%")},e.prototype.validateHTTPS=function(){this.multimedia.forEach((function(e){-1===e.fileCS.thumbnail.indexOf("https")&&(e.fileCS.thumbnail=e.fileCS.thumbnail.replace("http","https"))}))},e.decorators=[{type:t.Component,args:[{selector:"lib-property-slide-show",template:'<div class="slide-show">\r\n <div class="slide-show__actions">\r\n <ng-container [ngTemplateOutlet]="customActions"></ng-container>\r\n <p class="actions__count" *ngIf="multimedia && multimedia.length > 0">\r\n {{index + 1}}/{{count}}\r\n </p>\r\n </div>\r\n <button mat-button="" class="button-previous" [ngClass]="{\'disabled\':index===0}" [disabled]="index===0"\r\n (click)="moveImage()">\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n </button>\r\n <ul class="images-list" #slider [ngStyle]="{\'width\':\'calc(100% *\' + count + \')\'}">\r\n <ng-template [ngIf]="multimedia && multimedia.length > 0">\r\n <ng-container *ngFor="let m of multimedia">\r\n <li class="images-item" [ngStyle]="{\'width\':\'calc(100% /\' + count + \')\'}">\r\n <ng-container [ngSwitch]="m.type">\r\n <ng-container *ngSwitchCase="\'IMAGE\'">\r\n <img class="images-item__img" [src]="m.fileCS.thumbnail" alt="Property image">\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'SPHERIC\'">\r\n <lib-panorama-visor class="images-item__panorama" [url]="m.fileCS.thumbnail"></lib-panorama-visor>\r\n </ng-container>\r\n <ng-container *ngSwitchCase="\'VIDEO\'">\r\n <iframe class="images-item__video"\r\n [src]="\'https://www.youtube.com/embed/\' + m.fileCS.thumbnail | safeUrl"></iframe>\r\n </ng-container>\r\n </ng-container>\r\n </li>\r\n </ng-container>\r\n </ng-template>\r\n <ng-template [ngIf]="multimedia && multimedia.length === 0">\r\n <div class="no-items"></div>\r\n </ng-template>\r\n </ul>\r\n <button mat-button="" class="button-next" [disabled]="multimedia.length === 0" (click)="moveImage(true)">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n</div>\r\n',styles:[":host{display:block;position:relative;width:100%;padding-bottom:calc(100% / 4 * 3)}.slide-show{width:100%;height:100%;overflow:hidden;position:absolute}.slide-show__actions{position:absolute;bottom:0;left:0;right:0;width:100%;color:#fff;padding:8px 24px;z-index:2;display:flex;align-items:center;justify-content:flex-end;box-sizing:border-box;background:linear-gradient(transparent,rgba(0,0,0,.4))}.actions__count{margin:4px 0 0 8px;font-size:14px}.images-list{width:100%;height:100%;list-style:none;padding:0;margin:0;display:flex;overflow:hidden;transition:250ms}.images-item{width:100%;height:100%}.images-item__img{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;border-radius:8px}.images-item__panorama,.images-item__video{width:100%;height:100%;border:0;border-radius:8px}.button-next,.button-previous{position:absolute;min-width:30px;width:30px;height:80px;padding:0;z-index:1;color:#fff;top:calc(50% - 40px);background:rgba(0,0,0,.3)}.button-next mat-icon,.button-previous mat-icon{width:30px;height:30px;font-size:30px}.button-next:hover,.button-previous:hover{color:#000;background:#fff}.disabled{color:#d3d3d3}.button-previous{left:0;border-radius:0 16px 16px 0}.button-next{right:0;border-radius:16px 0 0 16px}.no-items{width:100%;height:100%;border-radius:8px}"]}]}],e.ctorParameters=function(){return[{type:t.Renderer2}]},e.propDecorators={customActions:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]},{type:t.Input}],_slider:[{type:t.ViewChild,args:["slider",{static:!0}]}],multimedia:[{type:t.Input}],selectIndex:[{type:t.Input}],initialIndex:[{type:t.Input}],currentIndex:[{type:t.Output}]},e}(),je=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return function(e,t){function r(){this.constructor=e}B(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}(t,e),t.prototype.format=function(e,t){return e.getFullYear().toString()},t}(y.NativeDateAdapter),Ge=function(){function e(e,t,r,n){this._calendar=e,this._dateAdapter=t,this._dateFormats=r,this._destroyed=new o.Subject,e.stateChanges.pipe(_.takeUntil(this._destroyed)).subscribe((function(){return n.markForCheck()}))}return e.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete()},Object.defineProperty(e.prototype,"periodLabel",{get:function(){var e=this._dateAdapter.format(this._calendar.activeDate,"YYYY");return Number(e)-23+" - "+e},enumerable:!0,configurable:!0}),e.prototype.previousClicked=function(){this._calendar.activeDate=this._dateAdapter.addCalendarYears(this._calendar.activeDate,-23)},e.prototype.nextClicked=function(){this._calendar.activeDate=this._dateAdapter.addCalendarYears(this._calendar.activeDate,23)},e.decorators=[{type:t.Component,args:[{selector:"lib-property-custom-datepicker-header",template:'<div class="header">\r\n <span>{{ periodLabel }}</span>\r\n <span>\r\n <button mat-icon-button (click)="previousClicked()">\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n </button>\r\n <button mat-icon-button (click)="nextClicked()">\r\n <mat-icon>keyboard_arrow_right</mat-icon>\r\n </button>\r\n </span>\r\n</div>\r\n',styles:[".header{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;display:flex;justify-content:space-between;align-items:center;padding:8px;box-sizing:border-box}"]}]}],e.ctorParameters=function(){return[{type:C.MatCalendar},{type:y.DateAdapter},{type:void 0,decorators:[{type:t.Inject,args:[y.MAT_DATE_FORMATS]}]},{type:t.ChangeDetectorRef}]},e}(),qe={parse:{dateInput:"LL"},display:{dateInput:"YYYY",monthYearLabel:"YYYY",dateA11yLabel:"YYYY",monthYearA11yLabel:"YYYY"}},Ye=function(){function e(e){this._injector=e,this.customHeader=Ge,this.currentYear=new Date,this.year=""}return e.prototype.ngAfterViewInit=function(){this._control=this._injector.get(i.NgControl),this._control.valueAccessor=this},e.prototype.onYearSelected=function(e,t){t.close(),this.year=e,this._control.control.patchValue(e)},e.prototype.registerOnChange=function(e){},e.prototype.registerOnTouched=function(e){},e.prototype.writeValue=function(e){void 0!==e&&(this.year=e)},e.decorators=[{type:t.Component,args:[{selector:"lib-property-custom-datepicker",template:'<mat-form-field appearance="outline">\r\n <mat-label>Año</mat-label>\r\n <input matInput="" title="Build in" [matDatepicker]="dt1" [max]="currentYear"\r\n placeholder="Seleccione el año de construcción" [value]="year" disabled>\r\n <mat-datepicker-toggle matSuffix [for]="dt1"></mat-datepicker-toggle>\r\n <mat-datepicker #dt1 startView="multi-year" [disabled]="false" [calendarHeaderComponent]="customHeader"\r\n (yearSelected)="onYearSelected($event, dt1)"></mat-datepicker>\r\n</mat-form-field>\r\n',providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:t.forwardRef((function(){return e})),multi:!0},{provide:y.MAT_DATE_FORMATS,useValue:qe},{provide:y.DateAdapter,useClass:je}],styles:[""]}]}],e.ctorParameters=function(){return[{type:t.Injector}]},e}(),We=[m.MatFormFieldModule,F.MatInputModule,C.MatDatepickerModule,s.MatButtonModule,l.MatIconModule],Xe=[Ye,Ge],Ke=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,We],declarations:[Xe],entryComponents:[Ge],exports:[Ye]}]}],e}(),$e=function(){function e(e){var r=this;this._viewportRuler=e,this.itemsChanged=new t.EventEmitter,this.target=null,this.source=null,this.dropListEnterPredicate=function(e,t){if(t===r.placeholder)return!0;if(t!==r.activeContainer)return!1;var n=r.placeholder.element.nativeElement,i=e.dropContainer.element.nativeElement,o=t.element.nativeElement,a=Qe(o.parentElement.children,r.source?n:i),s=Qe(o.parentElement.children,o);return r.source||(r.sourceIndex=a,r.source=e.dropContainer,n.style.width=i.clientWidth+"px",n.style.height=i.clientHeight+"px",i.parentElement.removeChild(i)),r.targetIndex=s,r.target=t,n.style.display="",o.parentElement.insertBefore(n,s>a?o.nextSibling:o),r.placeholder.enter(e,e.element.nativeElement.offsetLeft,e.element.nativeElement.offsetTop),!1}}return e.prototype.ngOnInit=function(){},e.prototype.ngAfterViewInit=function(){var e=this.placeholder.element.nativeElement;e.style.display="none",e.parentElement.removeChild(e)},e.prototype.dragMoved=function(e){var t=this,r=this.getPointerPositionOnPage(e.event);this.listGroup._items.forEach((function(e){(function(e,t,r){var n=e.element.nativeElement.getBoundingClientRect(),i=n.top,o=n.bottom,a=n.left,s=n.right;return r>=i&&r<=o&&t>=a&&t<=s})(e,r.x,r.y)&&(t.activeContainer=e)}))},e.prototype.dropListDropped=function(){if(this.target){var e=this.placeholder.element.nativeElement,t=e.parentElement;e.style.display="none",t.removeChild(e),t.appendChild(e),t.insertBefore(this.source.element.nativeElement,t.children[this.sourceIndex]),this.target=null,this.source=null,this.sourceIndex!==this.targetIndex&&(O.moveItemInArray(this.items,this.sourceIndex,this.targetIndex),this.itemsChanged.emit(this.items))}},e.prototype.getPointerPositionOnPage=function(e){var t=function(e){return e.type.startsWith("touch")}(e)?e.touches[0]||e.changedTouches[0]:e,r=this._viewportRuler.getViewportScrollPosition();return{x:t.pageX-r.left,y:t.pageY-r.top}},e.decorators=[{type:t.Component,args:[{selector:"lib-custom-drag-and-drop",template:'<div class="custom-drag-and-drop-container" cdkDropListGroup>\r\n <div cdkDropList [cdkDropListEnterPredicate]="dropListEnterPredicate" (cdkDropListDropped)="dropListDropped()"></div>\r\n <div cdkDropList *ngFor="let item of items; let i = index;"\r\n [cdkDropListEnterPredicate]="dropListEnterPredicate" (cdkDropListDropped)="dropListDropped()">\r\n <div cdkDrag class="custom-drag-and-drop-box" (cdkDragMoved)="dragMoved($event)">\r\n <ng-container [ngTemplateOutlet]="content" [ngTemplateOutletContext]="{image: item, index: i}"></ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n',styles:[".custom-drag-and-drop-container{display:flex;flex-wrap:wrap;min-width:600px;max-width:900px}.custom-drag-and-drop-box{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;cursor:move;border-radius:8px;position:relative;z-index:1;transition:box-shadow .2s cubic-bezier(0,0,.2,1)}.custom-drag-and-drop-box:active{opacity:.6}.cdk-drop-list{margin:0 8px 8px 0}.cdk-drag-preview{box-sizing:border-box;border-radius:4px}.cdk-drag-placeholder{opacity:.3}.cdk-drag-animating{transition:transform 250ms cubic-bezier(0,0,.2,1)}"]}]}],e.ctorParameters=function(){return[{type:R.ViewportRuler}]},e.propDecorators={listGroup:[{type:t.ViewChild,args:[O.CdkDropListGroup,{static:!0}]}],placeholder:[{type:t.ViewChild,args:[O.CdkDropList,{static:!0}]}],content:[{type:t.ContentChild,args:[t.TemplateRef,{static:!0}]},{type:t.Input}],items:[{type:t.Input}],itemsChanged:[{type:t.Output}]},e}();function Qe(e,t){return Array.prototype.indexOf.call(e,t)}var Je=[s.MatButtonModule,T.MatCheckboxModule,l.MatIconModule,d.MatButtonToggleModule,P.MatRadioModule,F.MatInputModule,m.MatFormFieldModule,f.MatSelectModule,S.MatSidenavModule,N.MatToolbarModule,M.MatTabsModule,C.MatDatepickerModule,k.MatTooltipModule,y.MatRippleModule,y.MatNativeDateModule,O.DragDropModule],Ze=[ke],et=[Ue,Le,ze,He,Ve,Ie,Ae,$e,Fe,Se],tt=[Ie,Ae,Fe,Se],rt=[we,Ce,r.CurrencyPipe,Te,Me],nt=function(){function e(){}return e.forChild=function(t){return{ngModule:e,providers:[{provide:Pe,useValue:t||!1}]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,Je,D.EcoFabSpeedDialModule,i.ReactiveFormsModule,i.FormsModule,p.UploadFileModule,le.forChild(),J.forChild(),ee.forChild(),p.SafeUrlModule.forChild(),p.StringManipulationModule.forChild(),q.forChild(),re.forChild(),p.ShareModule.forChild(),xe,p.CountryCodeModule,p.LocationModule,p.DialogModule,Ke,v.SnackBarModule.forRoot()],declarations:[Ze,et],entryComponents:[tt],exports:[ke],providers:[rt]}]}],e}(),it=new t.InjectionToken("PROPERTY CARD CONFIG MODULE"),ot=function(){function e(e){this.isOPI=e,this.mode="full",this.currency=null,this.markerChanged=new t.EventEmitter,this.favoriteChanged=new t.EventEmitter,this.propertyDiscarded=new t.EventEmitter}return e.prototype.ngOnInit=function(){this.positionLatLng&&this.latLng(this.positionLatLng.latitude,this.positionLatLng.longitude)},e.prototype.ngOnChanges=function(e){e.currency&&e.currency.currentValue&&(this.currency="MXN"!==e.currency.currentValue?e.currency.currentValue:null),e.marker&&e.marker.currentValue&&(this.info=e.marker.currentValue.info)},e.prototype.onFrontImageOver=function(){this.marker.hover=!0,this.markerChanged.emit(this.marker)},e.prototype.onFrontImageLeave=function(){this.marker.hover=!1,this.markerChanged.emit(this.marker)},e.prototype.favorite=function(){this.favoriteChanged.emit(this.info.propertyId)},e.prototype.discard=function(){this.propertyDiscarded.emit(this.info.propertyId)},e.prototype.deg2rad=function(e){return e*(Math.PI/180)},e.prototype.latLng=function(e,t){var r=e,n=t,i=this.marker.location.latitude,o=this.marker.location.longitude,a=this.deg2rad(i-r),s=this.deg2rad(o-n),l=Math.sin(a/2)*Math.sin(a/2)+Math.cos(this.deg2rad(r))*Math.cos(this.deg2rad(i))*Math.sin(s/2)*Math.sin(s/2),p=6371*(2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l)));Math.trunc(p)<1?(p*=1e3,(p=Math.trunc(p))<10?this.distance="10 m de su búsqueda":(p-=p%10,this.distance=p+" m de su búsqueda")):this.distance=p.toFixed(2)+" km de su búsqueda"},e.decorators=[{type:t.Component,args:[{selector:"lib-property-card",template:'<div class="property-card">\r\n <ng-template [ngIf]="!isOPI">\r\n <div class="property-card__favorite">\r\n <button class="favorite__button" mat-icon-button (click)="favorite()">\r\n <ng-template [ngIf]="isFavorite" [ngIfElse]="noIsFavorite">\r\n <mat-icon>favorite</mat-icon>\r\n </ng-template>\r\n <ng-template #noIsFavorite>\r\n <mat-icon>favorite_border</mat-icon>\r\n </ng-template>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="showDiscard">\r\n <div class="property-card__discard">\r\n <button class="discard__button" mat-icon-button (click)="discard()">\r\n <mat-icon>close</mat-icon>\r\n </button>\r\n </div>\r\n </ng-template>\r\n <ng-template [ngIf]="isOPI && showAlert">\r\n <div class="expiration-message">\r\n <p>\r\n Aviso\r\n <br>\r\n Este anuncio expira el {{info.endPublishDate | libFormatDate : true : \'dd/MM/yyyy\'}}\r\n </p>\r\n </div>\r\n </ng-template>\r\n <a routerLink="{{href || \'/\'}}" [queryParams]="queryParams || null" [target]="target || null"\r\n [state]="state || null"\r\n class="property-card__image" (mouseover)="onFrontImageOver()"\r\n (mouseleave)="onFrontImageLeave()">\r\n <img [src]="info.image" alt="Property image" libImageError [typeImage]="info.type">\r\n <ng-template [ngIf]="mode === \'summary\'">\r\n <div class="property-card__body-summary">\r\n <h2 class="color--white property-card__price">\r\n {{info.price | currency}} {{info.currency}}\r\n </h2>\r\n <p class="color--white property-card__type">\r\n {{info.type | propertyType}} {{info.offering | offeringType}}\r\n </p>\r\n <p class="color--white property-card__address body-summary__address">\r\n {{info.address.colony}}, {{info.address.city}}\r\n </p>\r\n </div>\r\n </ng-template>\r\n </a>\r\n <ng-template [ngIf]="mode === \'full\'">\r\n <div class="property-card__body">\r\n <div class="property-card__location-title">\r\n <h2 class="property-card__price">\r\n {{info.price | currency : currency : \'symbol\' : \'1.0-0\'}} {{info.currency}}\r\n </h2>\r\n <ng-container *ngIf="distance !== \'\'" >\r\n <h2 class="property-card__location" [hidden]="!distance">\r\n {{distance}}\r\n </h2>\r\n </ng-container>\r\n </div>\r\n <p class="property-card__type">\r\n {{info.type | propertyType}} {{info.offering | offeringType}}\r\n </p>\r\n <p class="property-card__address">\r\n {{info.address.colony}}, {{info.address.city}}\r\n </p>\r\n <ng-template [ngIf]="info.features">\r\n <div class="property-card__features">\r\n <ng-template [ngIf]="info.features && info.features.bedrooms && info.features.bedrooms > 0">\r\n <p class="property-card__feature">\r\n <span class="property-card__icon ic-features-bedroom"></span>\r\n {{info.features.bedrooms}}\r\n </p>\r\n <span class="property-card__divider"></span>\r\n </ng-template>\r\n <ng-template [ngIf]="info.features && info.features.bathrooms && info.features.bathrooms > 0 ">\r\n <p class="property-card__feature">\r\n <span class="property-card__icon ic-features-bathroom"></span>\r\n {{info.features.bathrooms}}\r\n </p>\r\n <span class="property-card__divider"></span>\r\n </ng-template>\r\n <ng-template [ngIf]="info.features && info.features.mainArea && info.features.mainArea > 0">\r\n <p class="property-card__feature">\r\n <span class="property-card__icon ic-features-surface"></span>\r\n {{info.features.mainArea}}\r\n <ng-template [ngIf]="info.features.areaUnit && info.features.areaUnit === \'M2\'"\r\n [ngIfElse]="ftUnit">\r\n m<sup>2</sup>\r\n </ng-template>\r\n <ng-template #ftUnit>\r\n sq ft\r\n </ng-template>\r\n </p>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n </div>\r\n </ng-template>\r\n</div>\r\n',styles:[":host{display:block;width:calc(100% - 16px);margin:16px auto;border-radius:16px}.property-card{width:100%;border-radius:16px;position:relative}.property-card__favorite{position:absolute;top:4px;right:4px;border-radius:50%;z-index:1;width:40px;height:40px;display:flex}.favorite__button{margin:auto}.expiration-message{position:absolute;top:0;background-color:#fff;width:100%;height:80px;z-index:1;text-align:center;color:red;font-size:16px;margin:auto;opacity:.9}.property-card__discard{position:absolute;right:8px;bottom:8px;z-index:1;width:40px;height:40px;border-radius:16px;display:flex}.discard__button{margin:auto}.property-card__image{width:100%;border-radius:16px;padding-bottom:calc(100% / 4 * 3);position:relative;text-decoration:none;display:block}.property-card__image:hover{width:calc(100% - 6px);padding-bottom:calc((100% - 6px)/ 4 * 3)}.property-card__image img{border-radius:16px;position:absolute;width:100%;height:100%;-o-object-fit:cover;object-fit:cover}.property-card__body{padding:8px;box-sizing:border-box}.property-card__body-summary{padding:8px;box-sizing:border-box;position:absolute;bottom:0;width:100%;border-radius:16px;background:linear-gradient(transparent,rgba(0,0,0,.8))}.body-summary__address{width:80%!important}.property-card__location-title{display:flex;width:100%;flex-direction:row;flex-wrap:wrap}.property-card__location{font-size:12px;margin:4px;color:#707070}@media (min-width:1200px){.property-card__location{font-size:14px}}.property-card__location:empty{width:60%;height:14px;background:#e0e0e0;border-radius:16px}.property-card__price{margin:3px 0;font-size:16px}.property-card__price:empty{width:60%;height:16px;background:#e0e0e0;border-radius:16px}.property-card__type{margin:3px 0}.property-card__type:empty{width:70%;height:16px;border-radius:16px;background:#e0e0e0}.property-card__address{margin:3px 0;color:#707070;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.property-card__address:empty{width:80%;height:16px;border-radius:16px;background:#e0e0e0}.property-card__features{display:flex;margin:6px 0 0}.property-card__feature{margin:0 8px 0 0;display:flex;align-items:center;font-size:12px;color:#707070}.property-card__divider{display:block;margin:auto 8px;width:1px;height:16px;background:#9e9e9e}.property-card__icon{width:24px;height:24px;font-size:24px;margin:0 4px 0 0;color:#bdbdbd}"]}]}],e.ctorParameters=function(){return[{type:Boolean,decorators:[{type:t.Optional},{type:t.Inject,args:[it]}]}]},e.propDecorators={marker:[{type:t.Input}],href:[{type:t.Input}],target:[{type:t.Input}],queryParams:[{type:t.Input}],state:[{type:t.Input}],showAlert:[{type:t.Input}],positionLatLng:[{type:t.Input}],isFavorite:[{type:t.Input}],currency:[{type:t.Input}],showDiscard:[{type:t.Input}],mode:[{type:t.Input}],markerChanged:[{type:t.Output}],favoriteChanged:[{type:t.Output}],propertyDiscarded:[{type:t.Output}]},e}(),at=function(){function e(){}return e.forChild=function(t){return{ngModule:e,providers:[{provide:it,useValue:t}]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,L.RouterModule,ee,J,ie,l.MatIconModule,s.MatButtonModule,q],declarations:[ot],exports:[ot]}]}],e}(),st=function(){function e(e,t,r){this._propertyTypePipe=e,this._offeringTypePipe=t,this._converter=r}return e.getPropertyTypeItemByType=function(e){var t=null;return W.PropertyTypeList.forEach((function(r){r.value===e&&(t=r)})),t},e.validatePropertyInFavorites=function(e,t){for(var r=!1,n=0;n<t.length;n++)if(e===t[n].id){r=!0;break}return r},e.calculateLocationFrom=function(e,t,r){var n=e.latitude*Math.PI/180,i=e.longitude*Math.PI/180,o=r/6378100,a=Math.asin(Math.sin(n)*Math.cos(o)+Math.cos(n)*Math.sin(o)*Math.cos(t)),s=i+Math.atan2(Math.sin(t)*Math.sin(o)*Math.cos(n),Math.cos(o)-Math.sin(n)*Math.sin(a)),l={};return l.latitude=180*a/Math.PI,l.longitude=180*s/Math.PI,l},e.prototype.buildURL=function(e){var t="property/";return t+=this._propertyTypePipe.transform(e.propertyType,!0)+"-",t+=this._offeringTypePipe.transform(e.offering," ").replace(/ /g,"")+"-",t+=e.address.colony?e.address.colony+"-":"",t+=e.address.city?e.address.city+"-":"",t+=e.propertyId,t=X.removeDiacritics(t).replace(/ /g,"-").toLowerCase()},e.prototype.validatePropertiesInPoly=function(e,t){var r=new google.maps.Polygon({paths:t});return e&&e.length>0?(e.map((function(e){e.extras.showInPolygon=!1;var t=new google.maps.LatLng(e.location.latitude,e.location.longitude);return google.maps.geometry.poly.containsLocation(t,r)?(e.extras.showInPolygon=!0,e):(e.extras.showInPolygon=!1,e)})),e=e.filter((function(e){if(e.extras.showInPolygon)return e}))):[]},e.prototype.markersToCurrency=function(e,t,r){var i=this;return e=e.map((function(e){return n.Currency[e.info.currency]!==t&&(e.info.price=i._converter.number(e.info.price,r,n.Currency[e.info.currency],t),e.info.currency=t.toString()),e}))},e.prototype.buildMarkers=function(t,r){var i=this,o=[];return t.forEach((function(t){var a={location:t.address.location,hover:!1,visited:!1,type:e.getPropertyTypeItemByType(t.type),info:i.createPropertyInfoCard(t),isFavorite:!1,extras:{}};t instanceof n.NewPropertyLite?a.isFavorite=!!(r&&r.length>0)&&e.validatePropertyInFavorites(t.id,r):a.isFavorite=!!(r&&r.length>0)&&e.validatePropertyInFavorites(t.propertyId,r),o.push(a)})),o},e.prototype.buildSpider=function(t){var r={markers:[],polyLines:[]};return t.map((function(n){n.extras.repeat=!1;var i=t.filter((function(e){return n.location.latitude===e.location.latitude&&n.location.longitude===e.location.longitude})),o=12*i.length/2,a=2*Math.PI/i.length;if(!n.extras.repeat&&i.length>1)for(var s=Object.assign({},n.location),l=0;l<i.length;l++){var p=a*l;i[l].repeat=!0;var c=e.calculateLocationFrom(s,p,o);r.polyLines.push({path:[{latitude:Number(s.latitude),longitude:Number(s.longitude)},{latitude:Number(c.latitude),longitude:Number(c.longitude)}]}),i[l].location=c}return n})),r.markers=t,r},e.prototype.createPropertyInfoCard=function(e){return{address:new n.Address(e.address||null),authUsers:e instanceof n.NewPropertyLite?e.authUsers:"",currency:e.currency,propertyId:e instanceof n.NewPropertyLite?e.id:e.propertyId,image:e.image,offering:e.offering,price:e.price,type:e.type,url:this.buildURL({address:e.address,offering:e.offering,propertyType:e.type,propertyId:e instanceof n.NewPropertyLite?e.id:e.propertyId}),status:e instanceof n.NewPropertyLite?e.status:null,features:e instanceof n.NewPropertyLite?e.features:null}},e.decorators=[{type:t.Injectable}],e.ctorParameters=function(){return[{type:Z},{type:Q},{type:ge}]},e}(),lt=function(){function e(){}return e.forChild=function(){return{ngModule:e,providers:[st]}},e.decorators=[{type:t.NgModule,args:[{imports:[r.CommonModule,_e.forChild()]}]}],e}();e.AddressFormatModule=U,e.AddressFormatPipe=V,e.AmenityName=Y,e.ConstantsComponents=W,e.CurrencyConverterModule=_e,e.CurrencyConverterService=ge,e.DocumentVisorComponent=oe,e.DocumentVisorModule=le,e.DocumentVisorService=ae,e.FabFiltersComponent=me,e.FabFiltersModule=fe,e.FilterChipType=pe,e.FiltersChangeType=ce,e.FiltersModule=ve,e.FiltersService=de,e.FiltersWrapper=H,e.FormatDateModule=q,e.FormatDatePipe=G,e.FormatPriceDirective=te,e.FormatPriceModule=re,e.ImageErrorDirective=ne,e.ImageErrorModule=ie,e.MDate=j,e.MarkerPriceModule=$,e.MarkerPricePipe=K,e.MarkersModule=lt,e.MarkersService=st,e.OfferingTypeModule=J,e.OfferingTypePipe=Q,e.PanoramaVisorComponent=Ee,e.PanoramaVisorModule=xe,e.PropertyCardComponent=ot,e.PropertyCardModule=at,e.PropertyComponent=ke,e.PropertyEventType=Ne,e.PropertyModule=nt,e.PropertyTypeModule=ee,e.PropertyTypePipe=Z,e.ɵa=ue,e.ɵb=be,e.ɵc=Pe,e.ɵd=we,e.ɵe=Ce,e.ɵg=Te,e.ɵh=Me,e.ɵi=Ke,e.ɵj=Ye,e.ɵk=je,e.ɵl=Ge,e.ɵm=Ue,e.ɵn=Le,e.ɵo=ze,e.ɵp=He,e.ɵq=Ve,e.ɵr=Ie,e.ɵs=Ae,e.ɵt=$e,e.ɵu=Fe,e.ɵv=Se,e.ɵw=it,Object.defineProperty(e,"__esModule",{value:!0})}));
16
16
  //# sourceMappingURL=maplander-components.umd.min.js.map