@maplander/components 0.21.70 → 0.21.71
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.
- package/bundles/maplander-components.umd.js +5 -1
- package/bundles/maplander-components.umd.js.map +1 -1
- package/bundles/maplander-components.umd.min.js +1 -1
- package/bundles/maplander-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/filters/filters.component.js +8 -2
- package/esm5/lib/components/filters/filters.component.js +8 -2
- package/fesm2015/maplander-components.js +5 -1
- package/fesm2015/maplander-components.js.map +1 -1
- package/fesm5/maplander-components.js +5 -1
- package/fesm5/maplander-components.js.map +1 -1
- package/lib/components/filters/filters.component.d.ts +1 -0
- package/maplander-components.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@maplander/components/lib/pipes/address/address-format.pipe.ts","ng://@maplander/components/lib/pipes/address/address-format.module.ts","ng://@maplander/components/lib/utils/classes/filters-wrapper.ts","ng://@maplander/components/lib/utils/classes/mDate.ts","ng://@maplander/components/lib/pipes/format-date/format-date.pipe.ts","ng://@maplander/components/lib/pipes/format-date/format-date.module.ts","ng://@maplander/components/lib/utils/enums/amenity-name.ts","ng://@maplander/components/lib/constantsComponents.ts","ng://@maplander/components/lib/utils.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.pipe.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.module.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.pipe.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.module.ts","ng://@maplander/components/lib/pipes/property-type/property-type.pipe.ts","ng://@maplander/components/lib/pipes/property-type/property-type.module.ts","ng://@maplander/components/lib/directives/format-price/format-price.directive.ts","ng://@maplander/components/lib/directives/format-price/format-price.module.ts","ng://@maplander/components/lib/directives/image-error/image-error.directive.ts","ng://@maplander/components/lib/directives/image-error/image-error.module.ts","ng://@maplander/components/lib/components/document-visor/document-visor.component.ts","ng://@maplander/components/lib/components/document-visor/document-visor.service.ts","ng://@maplander/components/lib/components/document-visor/document-visor.module.ts","ng://@maplander/components/lib/utils/enums/filter-chip-type.ts","ng://@maplander/components/lib/utils/enums/filters-change-type.ts","ng://@maplander/components/lib/components/filters/token.ts","ng://@maplander/components/lib/components/filters/filters.service.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.component.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.module.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.service.ts","ng://@maplander/components/lib/utils/classes/mUtils.ts","ng://@maplander/components/lib/components/property/validators/remove-error.ts","ng://@maplander/components/lib/components/filters/filters.component.ts","ng://@maplander/components/lib/components/property/validators/currency-filter-validator.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.module.ts","ng://@maplander/components/lib/components/filters/filters.module.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.component.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.module.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.component.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.service.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.component.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.service.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.component.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.service.ts","ng://@maplander/components/lib/components/property/token.ts","ng://@maplander/components/lib/components/property/components/stats/stats.component.ts","ng://@maplander/components/lib/components/property/components/stats/stats.service.ts","ng://@maplander/components/lib/components/property/components/property/property.component.ts","ng://@maplander/components/lib/components/property/validators/property-editor-validators.ts","ng://@maplander/components/lib/components/property/components/editor/editor.component.ts","ng://@maplander/components/lib/components/property/validators/phone-fields-validator.ts","ng://@maplander/components/lib/components/property/components/owner-info/owner-info.component.ts","ng://@maplander/components/lib/components/property/components/documents/documents.component.ts","ng://@maplander/components/lib/components/property/components/details/details.component.ts","ng://@maplander/components/lib/components/property/components/slideshow/slide-show.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/date-adapter.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker-header/custom-datepicker-header.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker/custom-datepicker.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker.module.ts","ng://@maplander/components/lib/components/property/components/custom-drag-and-drop/custom-drag-and-drop.component.ts","ng://@maplander/components/lib/components/property/property.module.ts","ng://@maplander/components/lib/components/property-card/token.ts","ng://@maplander/components/lib/components/property-card/property-card.component.ts","ng://@maplander/components/lib/components/property-card/property-card.module.ts","ng://@maplander/components/lib/services/markers/markers.service.ts","ng://@maplander/components/lib/services/markers/markers.module.ts"],"names":["extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","AddressFormatPipe","transform","value","long","country","result","language","street","colony","postalCode","city","state","Pipe","args","name","AddressFormatModule","forChild","ngModule","providers","NgModule","imports","CommonModule","declarations","exports","FiltersWrapper","component","this","_component","open","close","MDate","date","_timestamp","toString","getTimestamp","time","timestamp","getHours","getMinutes","getSeconds","Number","getFullYear","getMonth","getDate","slice","getWeekDayName","day","toLowerCase","getMonthName","month","toDate","cDate","getYear","getMoth","getDay","cTime","Date","getFormat","format","_a","_b","_c","_d","_e","format12Hours","FormatDatePipe","mDate","FormatDateModule","AdjacentCommerce","AdjacentGym","AdjacentPicnic","AirConditioner","Balcony","CustomerParking","DiningRoom","DoubleHeight","DressingRooms","FacingStreet","Finishings","Furnished","Garden","Gym","HighResistanceFloors","HighSpeedInternet","InCommercialArea","InIndustrialPark","InShoppingCenter","Jacuzzi","KitchenServices","MaidsBathroom","ManeuverArea","MeetingRoom","Mezzanine","MixedBuilding","NaturalLighting","Offices","OpenSpace","Platforms","Playground","Playroom","Pool","RailSpur","RailYard","Reception","SecurityGuard","Storage","VisitorParking","NearPublicTransportation","NearShops","OnBusyRoad","CountrySide","Downtown","GoodReachableTraffic","NearFitnessCentre","NearHighway","NearHospital","NearPark","NearSchools","OnQuietRoad","RoofGarden","PetFriendly","DifferentAbilities","ConstantsComponents","Amenities","roofGarden","checked","iconName","AmenityName","petFriendly","differentAbilities","adjacentCommerce","adjacentGym","adjacentPicnic","airConditioner","balcony","customerParking","diningRoom","doubleHeight","dressingRooms","facingStreet","finishings","furnished","garden","gym","highResistanceFloors","highSpeedInternet","inCommercialArea","inIndustrialPark","inShoppingCenter","jacuzzi","kitchenServices","maidsBathroom","maneuverArea","meetingRoom","mezzanine","mixedBuilding","naturalLighting","offices","openSpace","platforms","playground","playroom","pool","railSpur","railyard","reception","securityGuard","storage","visitorParking","features","DurationList","CommissionList","SALE","RENT","SharedCommissionList","LandUseList","LandUseEnum","SINGLE_FAMILY_HOUSING","MULTI_FAMILY_HOUSING","HOUSING_WITH_COMMERCE","HOUSING_WITH_OFFICE","MIXED_HOUSING","COMMERCE","OFFICE","SERVICES","INDUSTRY","AGRICULTURAL","OTHER","AnnounceCheckList","DocumentsList","PFileTypeEnum","DEED","loaded","OWNER_ID","WATER_BILL","ELECTRICITY_BILL","PROPERTY_BILL","CONSTANCY_OF_NO_DEBT","EXEMPTION_TAX","BUILDING_LICENSE","COMPLETION_OF_CONSTRUCTION","ALIGNMENT_AND_OFFICIAL_NUMBER","MORTGAGE","BedroomList","BathroomList","ParkingSpacesList","SurfaceList","ROIList","PropertyTypeList","PropertyTypeEnum","HOUSE","shortName","amenities","RESIDENTIAL","APARTMENT","ROOM","RETAIL","WAREHOUSE","LAND","INVESTMENT","NONE","OfferingTypeList","OfferingTypeEnum","LocateList","USD","locate","currency","MXN","GBP","EUR","BRL","CNY","PropertyStatusList","icon","StatusTypeEnum","ANNOUNCED","EXPIRED","HIDDEN","READY","DRAFT","Utils","round","precision","multiplier","Math","pow","getFilterByPropertyType","filter","type","offering","distance","location","latitude","longitude","upLimitPrice","downLimitPrice","bathrooms","exclusivity","bedrooms","parkingPlaces","extras","mainArea","roi","mls","getInitialFilter","isOPI","listErrorsByPropertyTypeForPublish","errorField","concat","getErrorsForPublish","property","price","description","image","secondaryArea","removeDiacritics","str","diacriticsMap","A","AA","AE","AO","AU","AV","AY","B","C","D","DZ","Dz","E","F","G","H","I","J","K","L","LJ","Lj","M","N","NJ","Nj","O","OI","OO","OU","P","Q","R","S","T","TZ","U","V","VY","W","X","Y","Z","a","aa","ae","ao","au","av","ay","c","dz","e","f","g","h","hv","j","k","l","lj","m","nj","o","oi","ou","oo","q","r","ss","tz","u","v","vy","w","x","y","z","Symbol","iterator","next","done","tslib_1.__values","keys","replace","MarkerPricePipe","outputPrice","toLocaleString","style","toFixed","MarkerPriceModule","OfferingTypePipe","prefix","response","forEach","OfferingTypeModule","PropertyTypePipe","PropertyTypeModule","FormatPriceDirective","_elRef","_currency","_subscription","Subscription","_el","nativeElement","removeError","control","error","err","errors","setErrors","ngOnChanges","changes","_this","currentValue","_value","validateFormatPrice","add","valueChanges","subscribe","ngAfterViewInit","addEventListener","onFocus","bind","onBlur","formatPrice","ngOnDestroy","unsubscribe","removeEventListener","event","target","isNaN","Directive","selector","ElementRef","CurrencyPipe","Input","FormatPriceModule","ImageErrorDirective","_ref","CDN_URL","constructor","HTMLImageElement","Error","_onError","updateUrl","typeImage","src","ImageErrorModule","DocumentVisorComponent","_data","_dialog","isBase64","btoa","atob","isURL","url","RegExp","test","ngOnInit","URL","revokeObjectURL","Component","template","Inject","MAT_DIALOG_DATA","MatDialogRef","DocumentVisorService","document","data","disableClose","panelClass","Injectable","MatDialog","MATERIAL","MatButtonModule","MatDialogModule","MatIconModule","DocumentVisorModule","SafeUrlModule","entryComponents","OFFERING","PROPERTY_TYPE","PRICE","BEDROOMS","BATHROOMS","PARKING_PLACES","SURFACE","AMENITIES","LISTING","APPLY","INIT","AREA","SAVE","LIST_TYPE","FILTERS_TOKEN","InjectionToken","FiltersService","_config","_startComponent","Subject","_notifier","BehaviorSubject","FiltersChangeType","ft","removeFiltersSaved","LocalStorageService","removeItem","FILTERS_SAVED_KEY","getFiltersSaved","getItem","saveFilters","config","setItem","filters","isSharedProperties","setChange","change","getChanges","asObservable","startComponent","wrapper","onStartComponent","Optional","FabFiltersComponent","_offeringPipe","_filtersService","METERS_TO_SQ","chips","filterDeleted","EventEmitter","_wrapper","init","openFilters","console","warn","onClickChip","FilterChipType","removeFilter","emit","sharedProperties","_filter","listingType","propertyType","offeringType","surface","push","text","mlsLabel","firstLetter","substr","toLocaleUpperCase","item","min","max","Output","FabFiltersModule","MatChipsModule","MatFormFieldModule","MatInputModule","CurrencyConverterService","list","prices","currencies","from","to","valueFrom","getValueByCurrency","valueTo","map","number","MUtils","linSpaceExp","start","stop","phi","log","length_1","log10","FiltersComponent","_render","_service","_formBuilder","_converter","filterChange","propertyTypeList","bedroomsList","bathroomsList","parkingPlacesList","surfaceList","roiList","surfaceUnitSelected","buildForm","initComponentByPropertyType","restoreLastFiltersSaved","listenChangesOnForm","openComponent","utils","initComponent","changePropertyType","index","resetFilters","applyAmenities","propertyTypeSelected","filtersForm","controls","setValue","changeFilter","getFilterByForm","changeOffering","ev","changeCurrency","changePrice","get","patchValue","minPrice","maxPrice","updateAmenity","amenity","indexOf","splice","saveSearchByFilters","applyFilters","filterToSearch","updateFiltersSaved","_isSharedProperties","propertyTypeItemIndex","updateFormByFilters","setPrices","controlName","controlName2","group","Validators","required","pattern","surfaceUnit","validator","peerControl","peerControl2","initUtils","currencyList","cers","reset","minPriceList","createPrices","limitPrice","Currency","maxPriceList","_tmpMinPriceList","_tmpMaxPriceList","propertyRanges","range","JSON","parse","stringify","filtersSaved","find","setStyle","difference","Renderer2","FormBuilder","CurrencyConverterModule","FiltersModule","provide","useValue","ReactiveFormsModule","FormsModule","MatRippleModule","MatSelectModule","MatButtonToggleModule","MatDividerModule","PanoramaVisorComponent","_lazy","checkTouchSupported","window","navigator","msMaxTouchPoints","undefined","load","then","setTimeout","showPanorama","catch","_panorama","dispose","_viewer","destroy","fullscreen","toggleFullscreen","changeControl","enableControl","PANOLENS","CONTROLS","ORBIT","requestPermissions","DEVICEORIENTATION","confirm","href","alert","changeMode","mode","disableEffect","enableEffect","MODES","CARDBOARD","STEREO","isTouch","ImagePanorama","Viewer","container","_container","controlBar","controlButtons","onWindowResize","offsetWidth","offsetHeight","doc","docEl","requestFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","cancelFullScreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","isFullScreen","success","of","failed","DeviceMotionEvent","requestPermission","fromPromise","DeviceOrientationEvent","pipe","mergeMap","response2","LazyLoadService","ViewChild","static","PanoramaVisorModule","MatMenuModule","LazyLoaderModule","MultimediaUploaderComponent","currentType","IMAGE","fileType","currentIndex","SPHERIC","VIDEO","images","images360","videos","_newMedia","getYouTubeID","arr","split","parseMultimedia","onUploadImage","isArray","createImagePFile","createImage360PFile","onTabChanged","tab","onListChanged","position","removeMedia","id","fileCS","thumbnail","onYouTubeInputTextChanged","input","file","PFile","media","getTime","blobName","accept","multimedia","joinMultimediaTypes","newMedia","fileName","now","random","blob","MultimediaUploaderService","AnnounceConfirmComponent","_dialogRef","code","DialogResponseType","CANCEL","ACCEPT","AnnounceConfirmService","GalleryComponent","_breakpointObserver","getPFilesByType","sideOpened","indexSelected","typeSelected","count","sphere","video","observe","_mobileVersion","matches","assignCountByType","assignMultimediaByType","updateSideNav","selectPFile","onIndexSelectedChange","changePFileType","pFileType","BreakpointObserver","GalleryService","PROPERTY_TOKEN","StatsComponent","LeadInfo","decorators","StatsService","leadInfo","CREATE","UPDATE","ANNOUNCE","HIDE","SHOW","ADDRESS","OFFER","FAVORITE","REQUEST_INFO","SHARE","ARCHIVE","REAL_ESTATE_EXCHANGE","SHARE_COMMISSION","BROCHURE","POSTER","CLIENTS","BACK","SHOW_AGENTS","TARPS","PropertyComponent","_uploaderService","_announceService","_snackBar","_share","_gallery","_documentService","_statsService","sharedProperty","isShared","ownerAvailable","initCompleteProperty","modeChange","disableShareCommission","disableConfirmAnnounce","_allMultimedia","multimediaCount","completeProperty","NewCompleteProperty","validateMultimediaTypeCount","saveData","restoreFrontImageError","_editorInstance","validateFormInvalid","setMessage","parseDataByComponents","PropertyEventType","payload","agentActions","shareProperty","urlUser","userUrl","openGallery","goToStats","goToEditProperty","goToBack","goToClients","goToUpdateVisibility","status","goToPublish","validateFrontImageOnErrors","setErrorsOnFields","afterClosed","onMultimediaIndexChanged","changeMultimediaType","openUploaderMultimedia","assignFrontImage","onEditorInstance","onOwnerInstance","_ownerInstance","onDocumentsInstance","_documentsInstance","onSelectAddress","frontImageError","spherics","getMultimediaByType","getProperty","propertyInfo","owner","getOwner","documentsResponse","getDocuments","files","documents","complete","NewProperty","PropertyInfo","SnackBarService","ShareService","PropertyEditorValidators","form","condition","minPriceInvalid","markAsTouched","commissionInvalid","sharedCommissionInvalid","moment","momentImported","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","EditorComponent","_adapter","REGEX_ONLY_INTEGERS","REGEX_MIDDLE_NUMBER","REGEX_WEBSITE","REGEX_ALPHA_NUMBER","editorInstance","selectAddress","offeringTypeList","landUseList","commissionList","durationList","sharedCommissionList","setLocale","_errorFields","_validators","parkingSpaces","externalLink","sku","propertyForm","consumerReporting","consumerReportingOption","maintenance","maintenancePrice","transfer","transferPrice","unit","AreaUnitEnum","M2","buildIn","landUse","mlm","sharedCommission","agreementDate","disabled","duration","commission","notes","address","township","extNumber","intNumber","mz","lt","visible","validators","geoPtGenerator","geoPt","minDistance","maxDistance","alpha","PI","sx","cos","deltaLat","sin","lat","deltaLong","searchAmenitiesByPropertyType","createProperty","updateAddressForm","setValidatorOnFields","updatePropertyByForm","getRawValue","_property","invalid","goToSelectAddress","_btnSubmitRef","click","outdoorNumber","assignAmenities","amenitiesList","assignLocationFeatures","featuresList","assignCommission","assignBusinessRules","updateFormByProperty","lowestPrice","condominiumFeePrice","leaseTransferPrice","areaUnit","builtIn","listingAgreementStartDate","listingAgreementTime","interiorNumber","publicLocation","_propertyTypeItem","Features","Address","remove","clearValidators","setValidators","updateValueAndValidity","MAT_DATE_LOCALE","DateAdapter","useClass","MomentDateAdapter","deps","MAT_MOMENT_DATE_ADAPTER_OPTIONS","MAT_DATE_FORMATS","ɵ0","DialogService","read","phoneFieldsValidator","parent","phoneFieldsError","OwnerInfoComponent","ownerInstance","ownerForm","lastName","email","phone","maxLength","minLength","createOwner","disable","onCodePhoneChanged","updateOwnerByForm","_owner","codePhone","updateFormByOwner","Owner","DocumentsComponent","_visor","_http","documentsInstance","_files","validateDocumentsLoaded","openFile","getPFileByType","getUserMediaByType","openBlobFile","onUploadFile","updateDocument","downloadFile","responseType","Blob","createObjectURL","HttpClient","DetailsComponent","_sanitizer","searchPropertyType","createAmenities","createFeatures","validateAgreement","getTourUrl","bypassSecurityTrustResourceUrl","startDate","setDate","agreementEndDate","DomSanitizer","SlideShowComponent","initialIndex","moveImageByIndex","validateHTTPS","moveImage","_slider","ContentChild","TemplateRef","CustomDateAdapter","__","create","tslib_1.__extends","displayFormat","NativeDateAdapter","CustomDatepickerHeaderComponent","_calendar","_dateAdapter","_dateFormats","cdr","_destroyed","stateChanges","takeUntil","markForCheck","defineProperty","currentDate","activeDate","previousClicked","addCalendarYears","nextClicked","MatCalendar","ChangeDetectorRef","CustomDatepickerComponent","_injector","customHeader","currentYear","year","_control","NgControl","valueAccessor","onYearSelected","datepicker","registerOnChange","fn","registerOnTouched","writeValue","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","ɵ0$1","Injector","MatDatepickerModule","COMPONENTS","CustomDatepickerModule","CustomDragAndDropComponent","_viewportRuler","itemsChanged","source","dropListEnterPredicate","drag","drop","placeholder","activeContainer","phElement","element","sourceElement","dropContainer","dropElement","dragIndex","__indexOf","parentElement","children","dropIndex","sourceIndex","width","clientWidth","height","clientHeight","removeChild","targetIndex","insertBefore","nextSibling","enter","offsetLeft","offsetTop","dragMoved","point","getPointerPositionOnPage","listGroup","_items","dropList","getBoundingClientRect","top","bottom","left","right","__isInsideDropListClientRect","dropListDropped","appendChild","moveItemInArray","items","startsWith","__isTouchEvent","touches","changedTouches","scrollPosition","getViewportScrollPosition","pageX","pageY","ViewportRuler","CdkDropListGroup","CdkDropList","collection","node","MatCheckboxModule","MatRadioModule","MatSidenavModule","MatToolbarModule","MatTabsModule","MatTooltipModule","MatNativeDateModule","DragDropModule","PAGES","ENTRY_COMPONENTS","PROVIDERS","PropertyModule","EcoFabSpeedDialModule","UploadFileModule","StringManipulationModule","ShareModule","CountryCodeModule","LocationModule","DialogModule","SnackBarModule","forRoot","PROPERTY_CARD_CONFIG_MODULE","PropertyCardComponent","markerChanged","favoriteChanged","propertyDiscarded","positionLatLng","latLng","info","onFrontImageOver","marker","hover","onFrontImageLeave","favorite","propertyId","discard","deg2rad","deg","lng","lat1","lon1","lat2","lon2","dLat","dLon","atan2","sqrt","trunc","PropertyCardModule","RouterModule","MarkersService","_propertyTypePipe","_offeringTypePipe","getPropertyTypeItemByType","validatePropertyInFavorites","favorites","calculateLocationFrom","bearingInRadians","distanceInMetres","coordinateLatitudeInRadians","coordinateLongitudeInRadians","distanceComparedToEarth","resultLatitudeInRadians","asin","resultLongitudeInRadians","newCoordinates","buildURL","validatePropertiesInPoly","properties","paths","polygon","google","maps","Polygon","el","customLatLng","LatLng","geometry","poly","containsLocation","markersToCurrency","markers","toCurrency","buildMarkers","entities","entity","visited","createPropertyInfoCard","isFavorite","NewPropertyLite","buildSpider","polyLines","size","radiansBetweenAnnotations","locationShare","heading","newLocation","path","authUsers","MarkersModule"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgBC,OAAOC,gBACtB,CAAEC,UAAW,cAAgBC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EA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ACED,SAAUpN,OAAO2sC,EAAYv/B,UAC7BC,UAAWrN,OAAO2sC,EAAYt/B,eAGpCk/B,EAAKrvC,GAAGiQ,SAAWw/B,EAGvB,OAAOtB,KAET12B,EAASi3B,QAAUzsB,EACZxK,GAGDk1B,EAAAvsC,UAAA4uC,uBAAR,SAA+BF,GAC7B,MAAQ,CACNxT,QAAS,IAAIkD,EAAAA,QAAQsQ,EAAOxT,SAAW,MACvCqU,UAAYb,aAAkBI,EAAAA,gBAAmBJ,EAAOa,UAAY,GACpEnhC,SAAUsgC,EAAOtgC,SACjBm9B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOzf,GAAKyf,EAAOnD,WACrEp6B,MAAOu9B,EAAOv9B,MACdxB,SAAU++B,EAAO/+B,SACjBsB,MAAOy9B,EAAOz9B,MACdvB,KAAMg/B,EAAOh/B,KACb0L,IAAKxZ,KAAK2rC,SAAS,CACjBrS,QAASwT,EAAOxT,QAChBvrB,SAAU++B,EAAO/+B,SACjBgR,aAAc+tB,EAAOh/B,KACrB67B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOzf,GAAKyf,EAAOnD,aAEvExV,OAAS2Y,aAAkBI,EAAAA,gBAAmBJ,EAAO3Y,OAAS,KAC9DprB,SAAW+jC,aAAkBI,EAAAA,gBAAmBJ,EAAO/jC,SAAW,2BA9KvEyR,EAAAA,sDANO5E,SADAL,SAGAyK,MAqLR2qB,EAvMA,GCAAiD,GAAA,WAKA,SAAAA,KAeA,OARSA,EAAAtuC,SAAP,WACE,MAAQ,CACNC,SAAUquC,EACVpuC,UAAW,CACTmrC,0BAXPlrC,EAAAA,SAAQN,KAAA,CAAC,CACRO,QAAS,CACPC,EAAAA,aACA0mB,GAAwB/mB,gBAY5BsuC,EApBA","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {Address} from '@maplander/types';\r\n\r\n@Pipe({\r\n name: 'addressFormat'\r\n})\r\nexport class AddressFormatPipe implements PipeTransform {\r\n\r\n transform(value: Address, long?: boolean, country?: string): string {\r\n let result = '';\r\n const language = country || 'mx';\r\n result += value.street;\r\n switch (language) {\r\n case 'mx':\r\n if (long) {\r\n result += `, ${value.colony || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.colony || ''}`;\r\n }\r\n break;\r\n case 'usa':\r\n if (long) {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n }\r\n break;\r\n }\r\n return result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {AddressFormatPipe} from './address-format.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n AddressFormatPipe\r\n ],\r\n exports: [\r\n AddressFormatPipe\r\n ]\r\n})\r\nexport class AddressFormatModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: AddressFormatModule,\r\n providers: [\r\n AddressFormatPipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {FiltersComponent} from '../../components/filters/filters.component';\r\n\r\nexport class FiltersWrapper {\r\n private _component: FiltersComponent;\r\n\r\n constructor(component: FiltersComponent) {\r\n this._component = component;\r\n }\r\n\r\n open(): void {\r\n this._component.open();\r\n }\r\n\r\n close(): void {\r\n this._component.close();\r\n }\r\n\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\n/**\r\n *\r\n * @author Alejandro Lopez Arreola\r\n * Custom class for dates compatible with Google Data Store\r\n *\r\n * */\r\n\r\nexport class MDate {\r\n\r\n private _timestamp: string;\r\n\r\n /**\r\n * @param date Timestamp with format YYYYMMDD\r\n * @example 20190812\r\n * */\r\n constructor(date: number) {\r\n this._timestamp = date.toString();\r\n }\r\n\r\n /**\r\n * @param date Date object\r\n * @param time Returns timestamp as time, default is date\r\n * @example Date: Format YYYYMMDD = 20190812, Time: Format HHMMSS = 171401\r\n * @return number\r\n * */\r\n public static getTimestamp(date: Date, time?: boolean): number {\r\n let timestamp = '';\r\n if (time) {\r\n timestamp += `${date.getHours()}`;\r\n timestamp += date.getMinutes() < 10 ? `0${date.getMinutes()}` : `${date.getMinutes()}`;\r\n timestamp += date.getSeconds() < 10 ? `0${date.getSeconds()}` : `${date.getSeconds()}`;\r\n return Number(timestamp);\r\n } else {\r\n timestamp += `${date.getFullYear().toString()}`;\r\n timestamp += (date.getMonth() + 1) < 10 ? `0${(date.getMonth() + 1)}` : `${date.getMonth() + 1}`;\r\n timestamp += date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate().toString()}`;\r\n return Number(timestamp);\r\n }\r\n }\r\n\r\n private static getHours(time: string): string {\r\n return time.slice(0, 2);\r\n }\r\n\r\n private static getMinutes(time: string): string {\r\n return time.slice(2, 4);\r\n }\r\n\r\n private static getSeconds(time: string): string {\r\n return time.slice(4, time.length);\r\n }\r\n\r\n private static getWeekDayName(day: number, toLowerCase?: boolean): string {\r\n switch (day) {\r\n case 0:\r\n return toLowerCase ? 'lunes' : 'Lunes';\r\n case 1:\r\n return toLowerCase ? 'martes' : 'Martes';\r\n case 2:\r\n return toLowerCase ? 'miercoles' : 'Miercoles';\r\n case 3:\r\n return toLowerCase ? 'jueves' : 'Jueves';\r\n case 4:\r\n return toLowerCase ? 'viernes' : 'Viernes';\r\n case 5:\r\n return toLowerCase ? 'sabado' : 'Sabado';\r\n case 6:\r\n return toLowerCase ? 'domingo' : 'Domingo';\r\n }\r\n }\r\n\r\n private static getMonthName(month: string, toLowerCase?: boolean): string {\r\n switch (month) {\r\n case '01':\r\n return toLowerCase ? 'ene.' : 'Ene.';\r\n case '02':\r\n return toLowerCase ? 'feb.' : 'Feb.';\r\n case '03':\r\n return toLowerCase ? 'mar.' : 'Mar.';\r\n case '04':\r\n return toLowerCase ? 'abr.' : 'Abr.';\r\n case '05':\r\n return toLowerCase ? 'may.' : 'May.';\r\n case '06':\r\n return toLowerCase ? 'jun.' : 'Jun.';\r\n case '07':\r\n return toLowerCase ? 'jul.' : 'Jul.';\r\n case '08':\r\n return toLowerCase ? 'ago.' : 'Ago.';\r\n case '09':\r\n return toLowerCase ? 'sep.' : 'Sep.';\r\n case '10':\r\n return toLowerCase ? 'oct.' : 'Oct.';\r\n case '11':\r\n return toLowerCase ? 'nov.' : 'Nov.';\r\n case '12':\r\n return toLowerCase ? 'dic.' : 'Dic.';\r\n }\r\n }\r\n\r\n /**\r\n * @param time Timestamp with format HHMMSS\r\n * @example 171401\r\n * @return Date\r\n * Converting timestamp with format YYYYMMDD,\r\n * if you not assign the time param, the hours, minutes and seconds is a zero\r\n * */\r\n public toDate(time?: number): Date {\r\n if (time) {\r\n const cDate = `${this.getYear()}-${this.getMoth()}-${this.getDay()}`;\r\n const cTime = `${MDate.getHours(time.toString())}:${MDate.getMinutes(time.toString())}:${MDate.getSeconds(time.toString())}`;\r\n const fullCDate = `${cDate}T${cTime}Z`;\r\n return new Date(fullCDate);\r\n } else {\r\n return new Date(Number(this.getYear()), Number(this.getMoth()) - 1, Number(this.getDay()));\r\n }\r\n }\r\n\r\n /**\r\n * @param format Format date | 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' |'dd MMMMM yyyy HH:mm'\r\n * @param time Timestamp as time with format HHMMSS\r\n * @param toLowerCase Words on lower case\r\n * @param format12Hours 12 hours format on time\r\n * @return string\r\n * Return string with date format\r\n * */\r\n public getFormat(format: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm', {\r\n time = null,\r\n toLowerCase = false,\r\n format12Hours = false\r\n } = {}): string {\r\n let date = '', d: Date = null;\r\n switch (format) {\r\n case 'dd/MM/yyyy':\r\n date = `${this.getDay()}/${this.getMoth()}/${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM yyyy':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n break;\r\n case 'EEEEE HH:mm':\r\n date += `${MDate.getWeekDayName(this.toDate(time).getDay() - 1, toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM yyyy HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n }\r\n return date;\r\n }\r\n\r\n private getYear(): string {\r\n return this._timestamp.slice(0, 4);\r\n }\r\n\r\n private getMoth(): string {\r\n return this._timestamp.slice(4, 6);\r\n }\r\n\r\n private getDay(): string {\r\n return this._timestamp.slice(6, this._timestamp.length);\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {MDate} from '../../utils/classes';\r\n\r\n@Pipe({\r\n name: 'libFormatDate'\r\n})\r\nexport class FormatDatePipe implements PipeTransform {\r\n\r\n transform(value: any, mDate?: boolean, format?: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm'): any {\r\n if (mDate) {\r\n return new MDate(value).getFormat(format, {toLowerCase: true});\r\n } else {\r\n const d = new Date(Number(value));\r\n return `${d.getDate() < 10 ? '0' + d.getDate() : d.getDate()}/${d.getMonth() < 10 ? '0' + d.getMonth() : d.getMonth()}/${d.getFullYear()}`;\r\n }\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FormatDatePipe} from './format-date.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatDatePipe\r\n ],\r\n exports: [\r\n FormatDatePipe\r\n ]\r\n})\r\nexport class FormatDateModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatDateModule,\r\n providers: [\r\n FormatDatePipe\r\n ]\r\n };\r\n }\r\n}\r\n","export enum AmenityName {\r\n AdjacentCommerce = 'adjacentCommerce',\r\n AdjacentGym = 'gym',\r\n AdjacentPicnic = 'adjacentPicnic',\r\n AirConditioner = 'airConditioner',\r\n Balcony = 'balcony',\r\n CustomerParking = 'customerParking',\r\n DiningRoom = 'diningRoom',\r\n DoubleHeight = 'doubleHeight',\r\n DressingRooms = 'dressingRooms',\r\n FacingStreet = 'facingStreet',\r\n Finishings = 'finishings',\r\n Furnished = 'furnished',\r\n Garden = 'garden',\r\n Gym = 'gym',\r\n HighResistanceFloors = 'highResistanceFloors',\r\n HighSpeedInternet = 'highSpeedInternet',\r\n InCommercialArea = 'inCommercialArea',\r\n InIndustrialPark = 'inIndustrialPark',\r\n InShoppingCenter = 'inShoppingCenter',\r\n Jacuzzi = 'jacuzzi',\r\n KitchenServices = 'kitchenServices',\r\n MaidsBathroom = 'maidsBathroom',\r\n ManeuverArea = 'maneuverArea',\r\n MeetingRoom = 'meetingRoom',\r\n Mezzanine = 'mezzanine',\r\n MixedBuilding = 'mixedBuilding',\r\n NaturalLighting = 'naturalLighting',\r\n Offices = 'offices',\r\n OpenSpace = 'openSpace',\r\n Platforms = 'platforms',\r\n Playground = 'playground',\r\n Playroom = 'playroom',\r\n Pool = 'pool',\r\n RailSpur = 'railSpur',\r\n RailYard = 'maneuverArea',\r\n Reception = 'reception',\r\n SecurityGuard = 'securityGuard',\r\n Storage = 'storage',\r\n VisitorParking = 'visitorParking',\r\n NearPublicTransportation = 'nearPublicTransportation',\r\n NearShops = 'nearShops',\r\n OnBusyRoad = 'onBusyRoad',\r\n CountrySide = 'countrySide',\r\n Downtown = 'downtown',\r\n GoodReachableTraffic = 'goodReachableTraffic',\r\n NearFitnessCentre = 'nearFitnessCentre',\r\n NearHighway = 'nearHighway',\r\n NearHospital = 'nearHospital',\r\n NearPark = 'nearPark',\r\n NearSchools = 'nearSchools',\r\n OnQuietRoad = 'onQuietRoad',\r\n RoofGarden = 'roofGarden',\r\n PetFriendly = 'petFriendly',\r\n DifferentAbilities = 'differentAbilities'\r\n}\r\n","import {LandUseEnum, OfferingTypeEnum, PFileTypeEnum, PropertyTypeEnum, StatusTypeEnum} from '@maplander/types';\r\nimport {AmenitiesList} from './utils/models/amenities-list';\r\nimport {AmenityName} from './utils/enums/amenity-name';\r\nimport {PropertyTypeItem} from './utils/models/property-type-item';\r\nimport {PropertyStatusItem} from './utils/models/propertyStatusItem';\r\n\r\nexport class ConstantsComponents {\r\n static Amenities: AmenitiesList = {\r\n roofGarden: {\r\n checked: false,\r\n iconName: AmenityName.RoofGarden,\r\n value: AmenityName.RoofGarden,\r\n name: 'Terraza'\r\n },\r\n petFriendly: {\r\n checked: false,\r\n iconName: AmenityName.PetFriendly,\r\n value: AmenityName.PetFriendly,\r\n name: 'Acepta Mascotas'\r\n },\r\n differentAbilities: {\r\n checked: false,\r\n iconName: AmenityName.DifferentAbilities,\r\n value: AmenityName.DifferentAbilities,\r\n name: 'Con capacidades diferentes'\r\n },\r\n adjacentCommerce: {\r\n checked: false,\r\n iconName: AmenityName.AdjacentCommerce,\r\n value: AmenityName.AdjacentCommerce,\r\n name: 'Comercio adyacente'\r\n },\r\n adjacentGym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.AdjacentGym, name: 'Gym adyacente'},\r\n adjacentPicnic: {checked: false, iconName: AmenityName.AdjacentPicnic, value: AmenityName.AdjacentPicnic, name: 'Merendero adyacente'},\r\n airConditioner: {checked: false, iconName: AmenityName.AirConditioner, value: AmenityName.AirConditioner, name: 'Aire acondicionado'},\r\n balcony: {checked: false, iconName: AmenityName.Balcony, value: AmenityName.Balcony, name: 'Balcón'},\r\n customerParking: {\r\n checked: false,\r\n iconName: AmenityName.CustomerParking,\r\n value: AmenityName.CustomerParking,\r\n name: 'Estacionamiento para clientes'\r\n },\r\n diningRoom: {checked: false, iconName: AmenityName.DiningRoom, value: AmenityName.DiningRoom, name: 'Comedor'},\r\n doubleHeight: {checked: false, iconName: AmenityName.DoubleHeight, value: AmenityName.DoubleHeight, name: 'Doble altura'},\r\n dressingRooms: {checked: false, iconName: AmenityName.DressingRooms, value: AmenityName.DressingRooms, name: 'Con vestidores'},\r\n facingStreet: {checked: false, iconName: AmenityName.FacingStreet, value: AmenityName.FacingStreet, name: 'Frente a calle'},\r\n finishings: {checked: false, iconName: AmenityName.Finishings, value: AmenityName.Finishings, name: 'Con acabados'},\r\n furnished: {checked: false, iconName: AmenityName.Furnished, value: AmenityName.Furnished, name: 'Amueblada'},\r\n garden: {checked: false, iconName: AmenityName.Garden, value: AmenityName.Garden, name: 'JardÃn'},\r\n gym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.Gym, name: 'Gym'},\r\n highResistanceFloors: {\r\n checked: false,\r\n iconName: AmenityName.HighResistanceFloors,\r\n value: AmenityName.HighResistanceFloors,\r\n name: 'Pisos de alta resistencia'\r\n },\r\n highSpeedInternet: {\r\n checked: false,\r\n iconName: AmenityName.HighSpeedInternet,\r\n value: AmenityName.HighSpeedInternet,\r\n name: 'Internet de alta velocidad'\r\n },\r\n inCommercialArea: {\r\n checked: false,\r\n iconName: AmenityName.InCommercialArea,\r\n value: AmenityName.InCommercialArea,\r\n name: 'En zona comercial'\r\n },\r\n inIndustrialPark: {\r\n checked: false,\r\n iconName: AmenityName.InIndustrialPark,\r\n value: AmenityName.InIndustrialPark,\r\n name: 'En parque industrial'\r\n },\r\n inShoppingCenter: {\r\n checked: false,\r\n iconName: AmenityName.InShoppingCenter,\r\n value: AmenityName.InShoppingCenter,\r\n name: 'En centro comercial'\r\n },\r\n jacuzzi: {checked: false, iconName: AmenityName.Jacuzzi, value: AmenityName.Jacuzzi, name: 'Jacuzzi'},\r\n kitchenServices: {\r\n checked: false,\r\n iconName: AmenityName.KitchenServices,\r\n value: AmenityName.KitchenServices,\r\n name: 'Servicios para cocina'\r\n },\r\n maidsBathroom: {checked: false, iconName: AmenityName.MaidsBathroom, value: AmenityName.MaidsBathroom, name: 'Cuarto de Servicio'},\r\n maneuverArea: {checked: false, iconName: AmenityName.ManeuverArea, value: AmenityName.ManeuverArea, name: 'Ãrea de maniobras'},\r\n meetingRoom: {checked: false, iconName: AmenityName.MeetingRoom, value: AmenityName.MeetingRoom, name: 'Sala de conferencias'},\r\n mezzanine: {checked: false, iconName: AmenityName.Mezzanine, value: AmenityName.Mezzanine, name: 'Con entrepiso'},\r\n mixedBuilding: {checked: false, iconName: AmenityName.MixedBuilding, value: AmenityName.MixedBuilding, name: 'En edificio mixto'},\r\n naturalLighting: {\r\n checked: false,\r\n iconName: AmenityName.NaturalLighting,\r\n value: AmenityName.NaturalLighting,\r\n name: 'Iluminacion natural'\r\n },\r\n offices: {checked: false, iconName: AmenityName.Offices, value: AmenityName.Offices, name: 'Con oficinas'},\r\n openSpace: {checked: false, iconName: AmenityName.OpenSpace, value: AmenityName.OpenSpace, name: 'Espacio abierto'},\r\n platforms: {checked: false, iconName: AmenityName.Platforms, value: AmenityName.Platforms, name: 'Andenes'},\r\n playground: {checked: false, iconName: AmenityName.Playground, value: AmenityName.Playground, name: 'Juegos infantiles'},\r\n playroom: {checked: false, iconName: AmenityName.Playroom, value: AmenityName.Playroom, name: 'Salón de juegos'},\r\n pool: {checked: false, iconName: AmenityName.Pool, value: AmenityName.Pool, name: 'Alberca'},\r\n railSpur: {checked: false, iconName: AmenityName.RailSpur, value: AmenityName.RailSpur, name: 'Espuela de FF.CC'},\r\n railyard: {checked: false, iconName: AmenityName.RailYard, value: AmenityName.RailYard, name: 'Patio de maniobras'},\r\n reception: {checked: false, iconName: AmenityName.Reception, value: AmenityName.Reception, name: 'Recepción'},\r\n securityGuard: {checked: false, iconName: AmenityName.SecurityGuard, value: AmenityName.SecurityGuard, name: 'Con vigilancia'},\r\n storage: {checked: false, iconName: AmenityName.Storage, value: AmenityName.Storage, name: 'Bodega'},\r\n visitorParking: {\r\n checked: false,\r\n iconName: AmenityName.VisitorParking,\r\n value: AmenityName.VisitorParking,\r\n name: 'Estacionamiento para visitas'\r\n },\r\n features: [\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPublicTransportation,\r\n value: AmenityName.NearPublicTransportation,\r\n name: 'Cerca de estaciones de transporte'\r\n },\r\n {checked: false, iconName: AmenityName.AdjacentCommerce, value: AmenityName.NearShops, name: 'Cerca de comercios'},\r\n {checked: false, iconName: AmenityName.OnBusyRoad, value: AmenityName.OnBusyRoad, name: 'Avenida principal'},\r\n {checked: false, iconName: AmenityName.CountrySide, value: AmenityName.CountrySide, name: 'Suburbio'},\r\n {checked: false, iconName: AmenityName.Downtown, value: AmenityName.Downtown, name: 'Céntrico'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.GoodReachableTraffic,\r\n value: AmenityName.GoodReachableTraffic,\r\n name: 'Se llega sin trafico'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearFitnessCentre,\r\n value: AmenityName.NearFitnessCentre,\r\n name: 'Cerca de centro deportivo'\r\n },\r\n {checked: false, iconName: AmenityName.NearHighway, value: AmenityName.NearHighway, name: 'Cerca de autopista'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearHospital,\r\n value: AmenityName.NearHospital,\r\n name: 'Cerca de centros de salud'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPark,\r\n value: AmenityName.NearPark,\r\n name: 'Cerca de parque'\r\n },\r\n {checked: false, iconName: AmenityName.NearSchools, value: AmenityName.NearSchools, name: 'Cerca de escuelas'},\r\n {checked: false, iconName: AmenityName.OnQuietRoad, value: AmenityName.OnQuietRoad, name: 'En calle tranquila'},\r\n ]\r\n };\r\n static DurationList = [\r\n 30, 60, 90, 180, 365\r\n ];\r\n static CommissionList: {SALE: number[], RENT: number[]} = {\r\n SALE: [0.06, 0.055, 0.05, 0.045, 0.04, 0.035, 0.030, 0.025, 0.020, 0.015, 0.01],\r\n RENT: [2, 1.5, 1, 0.5]\r\n };\r\n static SharedCommissionList: number[] = [\r\n 0.50, 0.40, 0.30, 0.20, 0.10\r\n ];\r\n static LandUseList: {name: string, value: LandUseEnum}[] = [\r\n {\r\n name: 'Habitacional unifamiliar',\r\n value: LandUseEnum.SINGLE_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional plurifamiliar',\r\n value: LandUseEnum.MULTI_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional con comercio',\r\n value: LandUseEnum.HOUSING_WITH_COMMERCE\r\n },\r\n {\r\n name: 'Habitacional con oficina',\r\n value: LandUseEnum.HOUSING_WITH_OFFICE\r\n },\r\n {\r\n name: 'Habitacional mixto',\r\n value: LandUseEnum.MIXED_HOUSING\r\n },\r\n {\r\n name: 'Comercio',\r\n value: LandUseEnum.COMMERCE\r\n },\r\n {\r\n name: 'Oficina',\r\n value: LandUseEnum.OFFICE\r\n },\r\n {\r\n name: 'Servicios',\r\n value: LandUseEnum.SERVICES\r\n },\r\n {\r\n name: 'Industria',\r\n value: LandUseEnum.INDUSTRY\r\n },\r\n {\r\n name: 'AgrÃcola',\r\n value: LandUseEnum.AGRICULTURAL\r\n }, {\r\n name: 'No especificado',\r\n value: LandUseEnum.OTHER\r\n }\r\n ];\r\n static AnnounceCheckList = [\r\n {\r\n name: 'Las fotos y videos son los correctos',\r\n value: 0,\r\n checked: false\r\n },\r\n {\r\n name: 'La ortografÃa y gramática es correcta',\r\n value: 1,\r\n checked: false\r\n },\r\n {\r\n name: 'Los datos de contacto son correctos',\r\n value: 2,\r\n checked: false\r\n },\r\n {\r\n name: 'La dirección, email y web están correctos',\r\n value: 3,\r\n checked: false\r\n },\r\n {\r\n name: 'Todo está correcto y apruebo mi anuncio',\r\n value: 4,\r\n checked: false\r\n }\r\n ];\r\n static DocumentsList: {name: string, value: PFileTypeEnum, loaded: boolean}[] = [\r\n {\r\n name: 'Escritura',\r\n value: PFileTypeEnum.DEED,\r\n loaded: false\r\n },\r\n {\r\n name: 'Identificación Propietario',\r\n value: PFileTypeEnum.OWNER_ID,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de agua',\r\n value: PFileTypeEnum.WATER_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de luz',\r\n value: PFileTypeEnum.ELECTRICITY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo predial',\r\n value: PFileTypeEnum.PROPERTY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Constancia de no adeudo',\r\n value: PFileTypeEnum.CONSTANCY_OF_NO_DEBT,\r\n loaded: false\r\n },\r\n {\r\n name: 'Libertad de Gravamen',\r\n value: PFileTypeEnum.EXEMPTION_TAX,\r\n loaded: false\r\n },\r\n {\r\n name: 'Licencia de construcción',\r\n value: PFileTypeEnum.BUILDING_LICENSE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Terminación de obra',\r\n value: PFileTypeEnum.COMPLETION_OF_CONSTRUCTION,\r\n loaded: false\r\n },\r\n {\r\n name: 'Alineación y número oficial',\r\n value: PFileTypeEnum.ALIGNMENT_AND_OFFICIAL_NUMBER,\r\n loaded: false\r\n },\r\n {\r\n name: 'Hipoteca',\r\n value: PFileTypeEnum.MORTGAGE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Otros',\r\n value: PFileTypeEnum.OTHER,\r\n loaded: false\r\n }\r\n ];\r\n static BedroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static BathroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static ParkingSpacesList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static SurfaceList: number[] = [\r\n 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000\r\n ];\r\n static ROIList: number[] = [\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20\r\n ];\r\n static PropertyTypeList: PropertyTypeItem[] = [\r\n {\r\n value: PropertyTypeEnum.HOUSE,\r\n iconName: 'house',\r\n name: 'Casa',\r\n shortName: 'Casa',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RESIDENTIAL,\r\n iconName: 'residential',\r\n name: 'Vivienda',\r\n shortName: 'Vivienda',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.APARTMENT,\r\n iconName: 'apartment',\r\n name: 'Departamento',\r\n shortName: 'Depto',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.ROOM,\r\n iconName: 'room',\r\n name: 'Habitación',\r\n shortName: 'Habitación',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.OFFICE,\r\n iconName: 'office',\r\n name: 'Oficina',\r\n shortName: 'Oficina',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.reception,\r\n ConstantsComponents.Amenities.adjacentPicnic,\r\n ConstantsComponents.Amenities.meetingRoom,\r\n ConstantsComponents.Amenities.adjacentGym,\r\n ConstantsComponents.Amenities.openSpace,\r\n ConstantsComponents.Amenities.airConditioner,\r\n ConstantsComponents.Amenities.adjacentCommerce,\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RETAIL,\r\n iconName: 'retail',\r\n name: 'Comercio',\r\n shortName: 'Comercio',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.facingStreet,\r\n ConstantsComponents.Amenities.maneuverArea,\r\n ConstantsComponents.Amenities.kitchenServices,\r\n ConstantsComponents.Amenities.finishings,\r\n ConstantsComponents.Amenities.mezzanine,\r\n ConstantsComponents.Amenities.inShoppingCenter,\r\n ConstantsComponents.Amenities.inCommercialArea,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.WAREHOUSE,\r\n iconName: 'warehouse',\r\n name: 'Bodega',\r\n shortName: 'Bodega',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.railyard,\r\n ConstantsComponents.Amenities.platforms,\r\n ConstantsComponents.Amenities.highResistanceFloors,\r\n ConstantsComponents.Amenities.offices,\r\n ConstantsComponents.Amenities.dressingRooms,\r\n ConstantsComponents.Amenities.diningRoom,\r\n ConstantsComponents.Amenities.inIndustrialPark,\r\n ConstantsComponents.Amenities.naturalLighting,\r\n ConstantsComponents.Amenities.railSpur,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.LAND,\r\n iconName: 'land',\r\n name: 'Terreno',\r\n shortName: 'Terreno',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.INVESTMENT,\r\n iconName: 'investment',\r\n name: 'Inversión',\r\n shortName: 'Inversión',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: []\r\n },\r\n {\r\n value: PropertyTypeEnum.NONE,\r\n name: 'Todo',\r\n shortName: 'Todo',\r\n iconName: 'all',\r\n features: [],\r\n amenities: []\r\n }\r\n ];\r\n static OfferingTypeList: { value: OfferingTypeEnum, name: string }[] = [\r\n {\r\n value: OfferingTypeEnum.SALE,\r\n name: 'Venta'\r\n },\r\n {\r\n value: OfferingTypeEnum.RENT,\r\n name: 'Renta'\r\n },\r\n ];\r\n static LocateList: any = {\r\n USD: {locate: 'en-US', currency: 'USD'},\r\n MXN: {locate: 'es-MX', currency: 'MXN'},\r\n GBP: {locate: 'en-GB', currency: 'GBP'},\r\n EUR: {locate: 'de-DE', currency: 'EUR'},\r\n BRL: {locate: 'pt-BR', currency: 'BRL'},\r\n CNY: {locate: 'zh-CH', currency: 'CNY'}\r\n };\r\n static PropertyStatusList: PropertyStatusItem[] = [\r\n { icon: 'announce', name: 'Anunciadas', value: StatusTypeEnum.ANNOUNCED },\r\n { icon: 'expired', name: 'Expiradas', value: StatusTypeEnum.EXPIRED },\r\n { icon: 'hidden', name: 'Ocultas', value: StatusTypeEnum.HIDDEN },\r\n { icon: 'ready', name: 'Listas para anunciar', value: StatusTypeEnum.READY },\r\n { icon: 'draft', name: 'Borrador', value: StatusTypeEnum.DRAFT }\r\n ];\r\n}\r\n","import {Filter, NewProperty, OfferingTypeEnum, PropertyTypeEnum} from '@maplander/types';\r\n\r\nexport class Utils {\r\n static round(value: number, precision: number): number {\r\n const multiplier = Math.pow(10, precision || 0);\r\n return Math.round(value * multiplier) / multiplier;\r\n }\r\n static getFilterByPropertyType(filter: Filter): Filter {\r\n return {\r\n type: filter.type,\r\n offering: filter.offering,\r\n distance: filter.distance,\r\n location: {\r\n latitude: filter.location.latitude,\r\n longitude: filter.location.longitude\r\n },\r\n currency: filter.currency,\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter.exclusivity,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter.mls\r\n };\r\n }\r\n static getInitialFilter(isOPI: boolean, filter: Filter = null): Filter {\r\n return {\r\n type: isOPI ? PropertyTypeEnum.NONE : PropertyTypeEnum.RESIDENTIAL,\r\n offering: isOPI ? OfferingTypeEnum.RENT : OfferingTypeEnum.RENT,\r\n distance: filter ? filter.distance : 0,\r\n location: {\r\n latitude: filter ? filter.location.latitude : 0,\r\n longitude: filter ? filter.location.longitude : 0\r\n },\r\n currency: filter ? filter.currency : 'MXN',\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter ? filter.exclusivity : false,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter ? filter.mls : true\r\n };\r\n }\r\n static listErrorsByPropertyTypeForPublish(type: PropertyTypeEnum): string[] {\r\n let errorField = ['price', 'currency', 'description', 'image'];\r\n switch (type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat(['mainArea', 'bedrooms', 'bathrooms']);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n case PropertyTypeEnum.OFFICE:\r\n case PropertyTypeEnum.RETAIL:\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat(['mainArea']);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat(['mainArea', 'secondaryArea']);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat(['roi']);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static getErrorsForPublish(property: NewProperty): string[] {\r\n let errorField = [];\r\n errorField = errorField.concat((!property.price || property.price === 0) ? ['price'] : []);\r\n errorField = errorField.concat((!property.currency || property.currency === '') ? ['currency'] : []);\r\n errorField = errorField.concat((!property.description || property.description === '') ? ['description'] : []);\r\n errorField = errorField.concat((!property.image || property.image === '') ? ['image'] : []);\r\n switch (property.type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bedrooms || property.features.bedrooms === 0)) ? ['bedrooms'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bathrooms || property.features.bathrooms === 0)) ? ['bathrooms'] : []);\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat(\r\n (property.features && (!property.features.secondaryArea || property.features.secondaryArea === 0)) ? ['secondaryArea'] : []);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.roi || property.features.roi === 0)) ? ['roi'] : []);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static removeDiacritics (str): string {\r\n const diacriticsMap = {\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,\r\n AA: /[\\uA732]/g,\r\n AE: /[\\u00C6\\u01FC\\u01E2]/g,\r\n AO: /[\\uA734]/g,\r\n AU: /[\\uA736]/g,\r\n AV: /[\\uA738\\uA73A]/g,\r\n AY: /[\\uA73C]/g,\r\n B: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g,\r\n C: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g,\r\n D: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g,\r\n DZ: /[\\u01F1\\u01C4]/g,\r\n Dz: /[\\u01F2\\u01C5]/g,\r\n 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,\r\n F: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g,\r\n G: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g,\r\n H: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g,\r\n I: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g,\r\n J: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g,\r\n K: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g,\r\n L: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g,\r\n LJ: /[\\u01C7]/g,\r\n Lj: /[\\u01C8]/g,\r\n M: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g,\r\n N: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g,\r\n NJ: /[\\u01CA]/g,\r\n Nj: /[\\u01CB]/g,\r\n 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,\r\n OI: /[\\u01A2]/g,\r\n OO: /[\\uA74E]/g,\r\n OU: /[\\u0222]/g,\r\n P: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g,\r\n Q: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g,\r\n R: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g,\r\n S: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g,\r\n T: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g,\r\n TZ: /[\\uA728]/g,\r\n 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,\r\n V: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g,\r\n VY: /[\\uA760]/g,\r\n W: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g,\r\n X: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g,\r\n Y: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g,\r\n Z: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g,\r\n 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,\r\n aa: /[\\uA733]/g,\r\n ae: /[\\u00E6\\u01FD\\u01E3]/g,\r\n ao: /[\\uA735]/g,\r\n au: /[\\uA737]/g,\r\n av: /[\\uA739\\uA73B]/g,\r\n ay: /[\\uA73D]/g,\r\n b: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g,\r\n c: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g,\r\n d: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g,\r\n dz: /[\\u01F3\\u01C6]/g,\r\n 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,\r\n f: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g,\r\n g: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g,\r\n h: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g,\r\n hv: /[\\u0195]/g,\r\n i: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g,\r\n j: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g,\r\n k: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g,\r\n l: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g,\r\n lj: /[\\u01C9]/g,\r\n m: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g,\r\n n: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g,\r\n nj: /[\\u01CC]/g,\r\n 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,\r\n oi: /[\\u01A3]/g,\r\n ou: /[\\u0223]/g,\r\n oo: /[\\uA74F]/g,\r\n p: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g,\r\n q: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g,\r\n r: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g,\r\n s: /[\\u0073\\u24E2\\uFF53\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g,\r\n ss: /[\\u00DF]/g,\r\n t: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g,\r\n tz: /[\\uA729]/g,\r\n 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,\r\n v: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g,\r\n vy: /[\\uA761]/g,\r\n w: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g,\r\n x: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g,\r\n y: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g,\r\n z: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g\r\n };\r\n for (const x of Object.keys(diacriticsMap)) {\r\n // Iterate through each keys in the above object and perform a replace\r\n str = str.replace(diacriticsMap[x], x);\r\n }\r\n return str;\r\n }\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\nimport {Pipe, PipeTransform} from '@angular/core';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\n\r\n@Pipe({\r\n name: 'markerPrice'\r\n})\r\nexport class MarkerPricePipe implements PipeTransform {\r\n\r\n transform(price: number, currency?: string): string {\r\n const locate: {locate: string, currency: string} = ConstantsComponents.LocateList[currency || 'MXN'];\r\n let outputPrice;\r\n if (((price / 100000.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100000.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'M';\r\n } else if (((price / 100.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'K';\r\n } else {\r\n outputPrice = Number(price).toFixed(2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n }\r\n return '' + outputPrice;\r\n }\r\n\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {MarkerPricePipe} from './marker-price.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n MarkerPricePipe\r\n ],\r\n exports: [\r\n MarkerPricePipe\r\n ]\r\n})\r\nexport class MarkerPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkerPriceModule,\r\n providers: [\r\n MarkerPricePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {OfferingTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'offeringType'\r\n})\r\nexport class OfferingTypePipe implements PipeTransform {\r\n\r\n transform(value: OfferingTypeEnum, prefix?: string): string {\r\n let response = prefix ? prefix : 'en';\r\n ConstantsComponents.OfferingTypeList.forEach(type => {\r\n if (type.value === value) {\r\n response += ` ${type.name.toLowerCase()}`;\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {OfferingTypePipe} from './offering-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n OfferingTypePipe\r\n ],\r\n exports: [\r\n OfferingTypePipe\r\n ]\r\n})\r\nexport class OfferingTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: OfferingTypeModule,\r\n providers: [\r\n OfferingTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'propertyType'\r\n})\r\nexport class PropertyTypePipe implements PipeTransform {\r\n transform(value: PropertyTypeEnum, toLowerCase?: boolean): string {\r\n let result = '';\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === value) {\r\n result = type.name;\r\n }\r\n });\r\n return (toLowerCase) ? result.toLowerCase() : result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PropertyTypePipe} from './property-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n PropertyTypePipe\r\n ],\r\n exports: [\r\n PropertyTypePipe\r\n ]\r\n})\r\nexport class PropertyTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyTypeModule,\r\n providers: [\r\n PropertyTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\r\nimport {CurrencyPipe} from '@angular/common';\r\nimport {AbstractControl} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[libFormatPrice]'\r\n})\r\nexport class FormatPriceDirective implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n @Input() control: AbstractControl;\r\n @Input() currency: string;\r\n private _el: HTMLInputElement;\r\n private _value: any;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n private _elRef: ElementRef,\r\n private _currency: CurrencyPipe\r\n ) {\r\n this._subscription = new Subscription();\r\n this._el = this._elRef.nativeElement;\r\n }\r\n\r\n private static removeError(control: AbstractControl, error: string): void {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n if (this._value) {\r\n this.validateFormatPrice(this._value);\r\n }\r\n }\r\n if (changes['control'] && changes['control'].currentValue) {\r\n this._subscription.add(\r\n this.control.valueChanges.subscribe(response => {\r\n this._value = response;\r\n })\r\n );\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._el.addEventListener('focus', this.onFocus.bind(this));\r\n this._el.addEventListener('blur', this.onBlur.bind(this));\r\n this._value = this._el.value;\r\n this._el.value = this.formatPrice(this._el.value);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n this._el.removeEventListener('focus', this.onFocus.bind(this));\r\n this._el.removeEventListener('blur', this.onBlur.bind(this));\r\n }\r\n\r\n private formatPrice(value: any): any {\r\n return this._currency.transform(value, this.currency && this.currency !== 'MXN' ? this.currency : null, 'symbol', '1.0-0');\r\n }\r\n\r\n private onFocus() {\r\n this._el.value = this._value;\r\n }\r\n\r\n private onBlur(event: any) {\r\n this.validateFormatPrice(event.target.value);\r\n }\r\n\r\n private validateFormatPrice(value: any): void {\r\n if (Number.isNaN(Number(value))) {\r\n this.control.setErrors({\r\n format: true\r\n });\r\n return;\r\n }\r\n FormatPriceDirective.removeError(this.control, 'format');\r\n this._value = value;\r\n this._el.value = this.formatPrice(value);\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {FormatPriceDirective} from './format-price.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatPriceDirective\r\n ],\r\n exports: [\r\n FormatPriceDirective\r\n ]\r\n})\r\nexport class FormatPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatPriceModule,\r\n providers: [\r\n CurrencyPipe,\r\n FormatPriceDirective\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnDestroy} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\n\r\n@Directive({\r\n selector: '[libImageError]'\r\n})\r\nexport class ImageErrorDirective implements AfterViewInit, OnDestroy {\r\n\r\n @Input() typeImage: PropertyTypeEnum;\r\n private _el: HTMLImageElement;\r\n private _onError;\r\n private readonly CDN_URL: string = 'https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/images-stock';\r\n\r\n constructor(private _ref: ElementRef) {\r\n this._el = this._ref.nativeElement;\r\n if (this._el.constructor !== HTMLImageElement) {\r\n throw new Error('libImageError directive works only image element');\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._onError = () => {\r\n this.updateUrl();\r\n };\r\n this._el.addEventListener('error', this._onError);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._el.removeEventListener('error', this._onError);\r\n }\r\n\r\n updateUrl() {\r\n switch (this.typeImage) {\r\n case PropertyTypeEnum.HOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n this._el.src = `${this.CDN_URL}/Stock-Office.jpg`;\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n this._el.src = `${this.CDN_URL}/Stock-Retail.jpg`;\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n this._el.src = `${this.CDN_URL}/Stock-Land.jpg`;\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-Warehouse.jpg`;\r\n break;\r\n case PropertyTypeEnum.APARTMENT:\r\n case PropertyTypeEnum.ROOM:\r\n this._el.src = `${this.CDN_URL}/Stock-Apartment.jpg`;\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this._el.src = `${this.CDN_URL}/Stock-Investment.jpg`;\r\n break;\r\n case PropertyTypeEnum.RESIDENTIAL:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n default:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {ImageErrorDirective} from './image-error.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n ImageErrorDirective\r\n ],\r\n exports: [\r\n ImageErrorDirective\r\n ]\r\n})\r\nexport class ImageErrorModule { }\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'lib-document-visor',\r\n templateUrl: './document-visor.component.html',\r\n styleUrls: ['./document-visor.component.scss']\r\n})\r\nexport class DocumentVisorComponent implements OnInit {\r\n\r\n public url: string;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: string,\r\n private _dialog: MatDialogRef<DocumentVisorComponent>\r\n ) {\r\n }\r\n\r\n private static isBase64(str): boolean {\r\n try {\r\n return btoa(atob(str)) === str;\r\n } catch (err) {\r\n return false;\r\n }\r\n }\r\n\r\n private static isURL(url: string): boolean {\r\n const pattern = 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\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\\\d{2,5})?(?:[/?#]\\\\S*)?$', 'i');\r\n return pattern.test(url);\r\n }\r\n\r\n ngOnInit() {\r\n this.url = this._data;\r\n }\r\n\r\n close(): void {\r\n if (!DocumentVisorComponent.isBase64(this.url) && !DocumentVisorComponent.isURL(this.url)) {\r\n URL.revokeObjectURL(this.url);\r\n }\r\n this._dialog.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\n\r\n@Injectable()\r\nexport class DocumentVisorService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(document: string): MatDialogRef<DocumentVisorComponent> {\r\n return this._dialog.open(DocumentVisorComponent, {\r\n data: document,\r\n disableClose: true,\r\n panelClass: 'document_visor_dialog'\r\n });\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatDialogModule} from '@angular/material/dialog';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\nimport {DocumentVisorService} from './document-visor.service';\r\nimport {SafeUrlModule} from '@maplander/shared';\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SafeUrlModule.forChild(),\r\n MATERIAL\r\n ],\r\n declarations: [\r\n DocumentVisorComponent\r\n ],\r\n exports: [\r\n DocumentVisorComponent\r\n ],\r\n entryComponents: [\r\n DocumentVisorComponent\r\n ]\r\n})\r\nexport class DocumentVisorModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: DocumentVisorModule,\r\n providers: [\r\n DocumentVisorService\r\n ]\r\n };\r\n }\r\n}\r\n","export enum FilterChipType {\r\n OFFERING = 'OFFERING',\r\n PROPERTY_TYPE = 'PROPERTY_TYPE',\r\n PRICE = 'PRICE',\r\n BEDROOMS = 'BEDROOMS',\r\n BATHROOMS = 'BATHROOMS',\r\n PARKING_PLACES = 'PARKING_PLACES',\r\n SURFACE = 'SURFACE',\r\n AMENITIES = 'AMENITIES',\r\n LISTING = 'LISTING'\r\n}\r\n","export enum FiltersChangeType {\r\n APPLY,\r\n INIT,\r\n AREA,\r\n SAVE,\r\n LIST_TYPE\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const FILTERS_TOKEN = new InjectionToken<boolean>('FILTERS MODULE CONFIG');\r\n","import {Inject, Injectable, Optional} from '@angular/core';\r\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\r\nimport {LocalStorageService} from '@maplander/static';\r\nimport {FiltersChangeType} from '../../utils/enums/filters-change-type';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {Utils} from '../../utils';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\nimport {FiltersSaved} from '../../utils/models';\r\n\r\n@Injectable()\r\nexport class FiltersService {\r\n\r\n private static FILTERS_SAVED_KEY = 'FILTERS';\r\n private _notifier: BehaviorSubject<FiltersChange>;\r\n private _startComponent: Subject<FiltersWrapper>;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean\r\n ) {\r\n this._startComponent = new Subject<FiltersWrapper>();\r\n this._notifier = new BehaviorSubject<FiltersChange>({\r\n filter: Utils.getInitialFilter(this._config || false),\r\n type: FiltersChangeType.INIT,\r\n ft: false\r\n });\r\n }\r\n\r\n static removeFiltersSaved(): void {\r\n LocalStorageService.removeItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static getFiltersSaved(): FiltersSaved {\r\n return LocalStorageService.getItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static saveFilters(config: FiltersSaved): void {\r\n LocalStorageService.setItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY, {\r\n filters: config.filters,\r\n ft: config.ft || false,\r\n isSharedProperties: config.isSharedProperties || false\r\n });\r\n }\r\n\r\n setChange(change: FiltersChange): void {\r\n this._notifier.next(change);\r\n }\r\n\r\n getChanges(): Observable<FiltersChange> {\r\n return this._notifier.asObservable();\r\n }\r\n\r\n startComponent(wrapper: FiltersWrapper): void {\r\n this._startComponent.next(wrapper);\r\n }\r\n\r\n onStartComponent(): Observable<FiltersWrapper> {\r\n return this._startComponent.asObservable();\r\n }\r\n}\r\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\r\nimport {Filter, PropertyTypeEnum} from '@maplander/types';\r\nimport {MarkerPricePipe} from './../../pipes/marker-price/marker-price.pipe';\r\nimport {OfferingTypePipe} from './../../pipes/offering-type/offering-type.pipe';\r\nimport {FilterChip} from './../../utils/models/filter-chip';\r\nimport {FilterChipType} from '../../utils/enums/filter-chip-type';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {FiltersService} from './../filters/filters.service';\r\nimport {Subscription} from 'rxjs';\r\nimport {FiltersChange} from '././../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\n\r\n@Component({\r\n selector: 'lib-fab-filters',\r\n templateUrl: './fab-filters.component.html',\r\n styleUrls: ['./fab-filters.component.scss']\r\n})\r\nexport class FabFiltersComponent implements OnInit, OnDestroy {\r\n @Input() isOPI: boolean;\r\n @Input() mlsLabel: string;\r\n @Output() filterDeleted: EventEmitter<FilterChipType>;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _filter: Filter;\r\n private _wrapper: FiltersWrapper;\r\n private _subscription: Subscription;\r\n public chips: FilterChip[];\r\n\r\n constructor(\r\n private _currency: MarkerPricePipe,\r\n private _offeringPipe: OfferingTypePipe,\r\n private _filtersService: FiltersService\r\n ) {\r\n this.chips = [];\r\n this._subscription = new Subscription();\r\n this.filterDeleted = new EventEmitter<FilterChipType>();\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._filtersService.onStartComponent().subscribe(response => {\r\n this._wrapper = response;\r\n })\r\n );\r\n this._subscription.add(\r\n this._filtersService.getChanges().subscribe((response: FiltersChange) => {\r\n this.init(response.filter, response.ft, response.isSharedProperties);\r\n })\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n openFilters(): void {\r\n if (!this._wrapper) {\r\n console.warn('[FabFiltersComponent] waiting onStartComponent');\r\n return;\r\n }\r\n this._wrapper.open();\r\n }\r\n\r\n onClickChip(type: FilterChipType): void {\r\n if (type === FilterChipType.PROPERTY_TYPE || type === FilterChipType.OFFERING) {\r\n this.openFilters();\r\n }\r\n }\r\n removeFilter(type: FilterChipType): void {\r\n this.filterDeleted.emit(type);\r\n }\r\n\r\n private init(filter: Filter, ft: boolean, sharedProperties?: boolean): void {\r\n this.chips = [];\r\n this._filter = filter;\r\n this.listingType(sharedProperties);\r\n this.propertyType();\r\n this.offeringType();\r\n this.price();\r\n this.surface(ft);\r\n this.bedrooms();\r\n this.bathrooms();\r\n this.parkingPlaces();\r\n this.amenities();\r\n }\r\n\r\n private listingType(sharedProperties?: boolean): void {\r\n if (!this.isOPI) {\r\n return;\r\n }\r\n this.chips.push({\r\n type: FilterChipType.LISTING,\r\n text: sharedProperties ? 'Compartidas' : (this._filter.mls ? this.mlsLabel || 'MLS' : 'Mi lista'),\r\n icon: [this._filter.mls ? 'mlm' : 'list']\r\n });\r\n }\r\n\r\n private offeringType(): void {\r\n if (this._filter.offering && this._filter.type !== PropertyTypeEnum.NONE) {\r\n let offering = this._offeringPipe.transform(this._filter.offering, ' ').replace(/ /g, '');\r\n const firstLetter = offering.substr(0, 1);\r\n offering = offering.replace(firstLetter, '');\r\n offering = `${firstLetter.toLocaleUpperCase()}${offering}`;\r\n this.chips.push({\r\n type: FilterChipType.OFFERING,\r\n text: offering,\r\n icon: null\r\n });\r\n }\r\n }\r\n\r\n private propertyType(): void {\r\n if (this._filter.type && this._filter.type !== PropertyTypeEnum.NONE) {\r\n ConstantsComponents.PropertyTypeList.forEach(item => {\r\n if (item.value === this._filter.type) {\r\n this.chips.push({\r\n type: FilterChipType.PROPERTY_TYPE,\r\n text: item.name,\r\n icon: [item.iconName]\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private price(): void {\r\n let min = '', max = '', currency;\r\n if (this._filter.downLimitPrice !== 0) {\r\n min += this._currency.transform(this._filter.downLimitPrice);\r\n }\r\n if (this._filter.upLimitPrice !== 0) {\r\n max += this._currency.transform(this._filter.upLimitPrice);\r\n }\r\n if (min !== '' || max !== '') {\r\n currency = this._filter.currency ? this._filter.currency : '';\r\n this.chips.push({\r\n type: FilterChipType.PRICE,\r\n text: `${min}${min !== '' && max !== '' ? ' - ' : ''}${max} ${currency}`,\r\n icon: ['price']\r\n });\r\n }\r\n }\r\n\r\n private surface(ft: boolean): void {\r\n if (this._filter.mainArea !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.SURFACE,\r\n text: (ft ? (this._filter.mainArea / this.METERS_TO_SQ).toFixed(0).toString() : this._filter.mainArea.toString()) + (ft ? ' sq ft' : ' m2'),\r\n icon: ['surface']\r\n });\r\n }\r\n }\r\n\r\n private bedrooms(): void {\r\n if (this._filter.bedrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BEDROOMS,\r\n text: this._filter.bedrooms.toString(),\r\n icon: ['bedroom']\r\n });\r\n }\r\n }\r\n\r\n private bathrooms(): void {\r\n if (this._filter.bathrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BATHROOMS,\r\n text: this._filter.bathrooms.toString(),\r\n icon: ['bathroom']\r\n });\r\n }\r\n }\r\n\r\n private parkingPlaces(): void {\r\n if (this._filter.parkingPlaces !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.PARKING_PLACES,\r\n text: this._filter.parkingPlaces.toString(),\r\n icon: ['parking']\r\n });\r\n }\r\n }\r\n\r\n private amenities(): void {\r\n if (this._filter.extras && this._filter.extras.length > 0) {\r\n this.chips.push({\r\n type: FilterChipType.AMENITIES,\r\n text: this._filter.extras.length.toString(),\r\n icon: [this._filter.extras[0]]\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {FabFiltersComponent} from './fab-filters.component';\r\nimport {MatChipsModule} from '@angular/material/chips';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatInputModule} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n OfferingTypeModule.forChild(),\r\n MarkerPriceModule.forChild()\r\n ],\r\n declarations: [\r\n FabFiltersComponent\r\n ],\r\n exports: [\r\n FabFiltersComponent\r\n ]\r\n})\r\nexport class FabFiltersModule {\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CER, Currency} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class CurrencyConverterService {\r\n\r\n list(prices: number[], currencies: CER[], from: Currency, to: Currency): number[] {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n prices = prices.map(price => {\r\n if (from === to) {\r\n return price;\r\n } else {\r\n return valueTo * (price / valueFrom);\r\n }\r\n });\r\n return prices;\r\n }\r\n\r\n number(price: number, currencies: CER[], from: Currency, to: Currency): number {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n return valueTo * (price / valueFrom);\r\n }\r\n\r\n private getValueByCurrency(currencies: CER[], c: Currency): number {\r\n let value = 0;\r\n currencies.forEach(currency => {\r\n if (currency.type === c.toString()) {\r\n value = currency.value;\r\n }\r\n });\r\n return value;\r\n }\r\n}\r\n","export class MUtils {\r\n static linSpaceExp(start: number, stop: number, n: number): number[] {\r\n const list: number[] = [];\r\n const phi = 1.618033988749895, b = Math.log(stop / start) / ((n - 1) * Math.log(phi));\r\n for (let i = 0; i < n; i++) {\r\n list[i] = start * Math.pow(phi, b * i);\r\n const length = (Math.log10(list[i]) + 1);\r\n if (length > 2) {\r\n list[i] = (Math.round(list[i] / Math.pow(10, length - 2)) * Math.pow(10, length - 2));\r\n }\r\n }\r\n return list;\r\n }\r\n}\r\n","import {AbstractControl} from '@angular/forms';\r\n\r\nexport function removeError(control: AbstractControl, error: string) {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef, EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Optional, Output,\r\n Renderer2,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\nimport {AppUtil, CER, Currency, Filter, LimitPrice, OfferingTypeEnum, PropertyRange, PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes/filters-wrapper';\r\nimport {PropertyTypeItem} from './../../utils/models/property-type-item';\r\nimport {CurrencyConverterService} from './../../services/currency-converter/currency-converter.service';\r\nimport {Filters} from '../../utils/interfaces/filters';\r\nimport {FiltersService} from './filters.service';\r\nimport {FiltersChangeType} from '../../utils/enums';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {MUtils} from '../../utils/classes/mUtils';\r\nimport {AmenityItem} from '../../utils/models';\r\nimport {CurrencyFilterValidator} from '../property/validators/currency-filter-validator';\r\n\r\n@Component({\r\n selector: 'lib-filters',\r\n templateUrl: './filters.component.html',\r\n styleUrls: ['./filters.component.scss']\r\n})\r\nexport class FiltersComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy, Filters {\r\n @Input() utils: AppUtil;\r\n @Input() newFilters: boolean;\r\n @Input() totalProperties: number;\r\n @Input() hideAmenities: boolean;\r\n @Output() filterChange: EventEmitter<Filter>;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _tmpMinPriceList: number[];\r\n private _tmpMaxPriceList: number[];\r\n private _subscription: Subscription;\r\n private _isSharedProperties: boolean;\r\n public filtersForm: FormGroup;\r\n public propertyTypeList: PropertyTypeItem[];\r\n public bedroomsList: number[];\r\n public bathroomsList: number[];\r\n public parkingPlacesList: number[];\r\n public currencyList: CER[];\r\n public minPriceList: number[];\r\n public maxPriceList: number[];\r\n public surfaceList: number[];\r\n public roiList: number[];\r\n public propertyTypeSelected: PropertyTypeItem;\r\n public filter: Filter;\r\n public isOPI: boolean;\r\n public surfaceUnitSelected: number;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean,\r\n private _render: Renderer2,\r\n private _ref: ElementRef,\r\n private _service: FiltersService,\r\n private _formBuilder: FormBuilder,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n this.filterChange = new EventEmitter<Filter>();\r\n this.isOPI = this._config || false;\r\n this._subscription = new Subscription();\r\n this.propertyTypeList = ConstantsComponents.PropertyTypeList.map(item => ({...item}));\r\n this.bedroomsList = Object.assign([], ConstantsComponents.BedroomList);\r\n this.bathroomsList = Object.assign([], ConstantsComponents.BathroomList);\r\n this.parkingPlacesList = Object.assign([], ConstantsComponents.ParkingSpacesList);\r\n this.surfaceList = Object.assign([], ConstantsComponents.SurfaceList);\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.surfaceUnitSelected = 0;\r\n this.buildForm();\r\n this.initComponentByPropertyType();\r\n this.restoreLastFiltersSaved(true);\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnInit() {\r\n this.openComponent(false);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.utils) {\r\n return console.warn('[FiltersComponent] utils param is required');\r\n }\r\n this.initComponent();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n console.log('[FiltersComponent] utils ready');\r\n this.initComponent();\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n open(): void {\r\n this.restoreLastFiltersSaved();\r\n this.openComponent(true);\r\n }\r\n\r\n close(): void {\r\n this.openComponent(false);\r\n }\r\n\r\n changePropertyType(index: number): void {\r\n this.resetFilters(index);\r\n this.applyAmenities();\r\n this.filter.type = this.propertyTypeSelected.value;\r\n switch (this.propertyTypeSelected.value) {\r\n case PropertyTypeEnum.ROOM:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.RENT);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.SALE);\r\n break;\r\n }\r\n this.changeFilter();\r\n }\r\n\r\n changeFilter(): void {\r\n this.getFilterByForm();\r\n this.filterChange.emit(this.filter);\r\n }\r\n\r\n changeOffering(ev: string): void {\r\n this.filter.offering = ev as OfferingTypeEnum;\r\n this.changeFilter();\r\n }\r\n\r\n changeCurrency(ev: string): void {\r\n this.filter.currency = ev;\r\n this.changeFilter();\r\n }\r\n\r\n changePrice(): void {\r\n if (!this.filtersForm.get('minPrice').value || this.filtersForm.get('minPrice').value === '') {\r\n this.filtersForm.patchValue({\r\n minPrice: 0\r\n });\r\n }\r\n if (!this.filtersForm.get('maxPrice').value || this.filtersForm.get('maxPrice').value === '') {\r\n this.filtersForm.patchValue({\r\n maxPrice: 0\r\n });\r\n }\r\n this.changeFilter();\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n if (amenity.checked) {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n if (i > -1) {\r\n this.filter.extras.splice(i, 1);\r\n }\r\n } else {\r\n this.filter.extras.push(amenity.value);\r\n }\r\n amenity.checked = !amenity.checked;\r\n this.changeFilter();\r\n }\r\n\r\n saveSearchByFilters(): void {\r\n this.applyFilters(FiltersChangeType.SAVE);\r\n }\r\n\r\n applyFilters(type?: FiltersChangeType): void {\r\n this.getFilterByForm();\r\n const filterToSearch = Object.assign({}, this.filter);\r\n if (this.surfaceUnitSelected === 1) {\r\n filterToSearch.mainArea = filterToSearch.mainArea * this.METERS_TO_SQ;\r\n }\r\n this.updateFiltersSaved(filterToSearch);\r\n this._service.setChange({\r\n type: type || FiltersChangeType.APPLY,\r\n filter: filterToSearch,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties\r\n });\r\n this.openComponent(false);\r\n }\r\n\r\n resetFilters(propertyTypeItemIndex?: number): void {\r\n this.filter.currency = !propertyTypeItemIndex ? 'MXN' : this.filter.currency;\r\n this.initComponentByPropertyType(propertyTypeItemIndex);\r\n this.surfaceUnitSelected = 0;\r\n this.filter = propertyTypeItemIndex ? Utils.getFilterByPropertyType(this.filter) : Utils.getInitialFilter(this.isOPI, this.filter);\r\n this.updateFormByFilters();\r\n this.setPrices();\r\n }\r\n\r\n private buildForm(): void {\r\n this.filtersForm = this._formBuilder.group({\r\n offering: [],\r\n currency: [],\r\n minPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n maxPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n bedrooms: [],\r\n bathrooms: [],\r\n parkingPlaces: [],\r\n surface: [],\r\n surfaceUnit: [],\r\n roi: []\r\n }, {\r\n validator: CurrencyFilterValidator('minPrice', 'maxPrice')\r\n });\r\n }\r\n\r\n private updateFormByFilters(): void {\r\n this.filtersForm.patchValue({\r\n offering: this.filter.offering,\r\n currency: this.filter.currency,\r\n minPrice: this.filter.downLimitPrice,\r\n maxPrice: this.filter.upLimitPrice,\r\n bedrooms: this.filter.bedrooms,\r\n bathrooms: this.filter.bathrooms,\r\n parkingPlaces: this.filter.parkingPlaces,\r\n surface: this.filter.mainArea,\r\n surfaceUnit: this.surfaceUnitSelected,\r\n roi: this.filter.roi\r\n });\r\n }\r\n\r\n private getFilterByForm(): void {\r\n const data = this.filtersForm.value;\r\n this.filter.offering = data.offering;\r\n this.filter.currency = data.currency;\r\n this.filter.downLimitPrice = Number(data.minPrice);\r\n this.filter.upLimitPrice = Number(data.maxPrice);\r\n this.filter.bedrooms = Number(data.bedrooms);\r\n this.filter.bathrooms = Number(data.bathrooms);\r\n this.filter.parkingPlaces = Number(data.parkingPlaces);\r\n this.filter.mainArea = Number(data.surface);\r\n this.surfaceUnitSelected = Number(data.surfaceUnit);\r\n this.filter.roi = Number(data.roi);\r\n }\r\n\r\n private initComponent(): void {\r\n this.initUtils();\r\n this._subscription.add(\r\n this._service.getChanges().subscribe((response: FiltersChange) => {\r\n switch (response.type) {\r\n case FiltersChangeType.LIST_TYPE:\r\n this._isSharedProperties = response.isSharedProperties;\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n case FiltersChangeType.AREA:\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n }\r\n })\r\n );\r\n this._service.startComponent(new FiltersWrapper(this));\r\n }\r\n\r\n private initUtils(): void {\r\n this.currencyList = this.utils.cers;\r\n this.setPrices();\r\n }\r\n\r\n private setPrices(to?: Currency): void {\r\n this.filtersForm.controls['minPrice'].reset(0);\r\n this.filtersForm.controls['maxPrice'].reset(0);\r\n const offering = this.filtersForm.controls['offering'].value;\r\n this.minPriceList = this.createPrices(this.utils.limitPrice, this.propertyTypeSelected.value, offering);\r\n this.minPriceList = this._converter.list(this.minPriceList, this.utils.cers, Currency.USD, to || this.filter.currency as Currency);\r\n this.maxPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMinPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMaxPriceList = Object.assign([], this.maxPriceList);\r\n }\r\n\r\n private applyAmenities(): void {\r\n this.propertyTypeSelected.amenities = this.propertyTypeSelected.amenities.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n this.propertyTypeSelected.features = this.propertyTypeSelected.features.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n }\r\n\r\n private createPrices(limitPrice: LimitPrice, propertyType: PropertyTypeEnum, offering: OfferingTypeEnum): number[] {\r\n let list: number[] = [];\r\n limitPrice.propertyRanges.forEach((range: PropertyRange) => {\r\n if (range.offering === offering && range.type === propertyType) {\r\n list = MUtils.linSpaceExp(range.min, range.max, 20);\r\n }\r\n });\r\n return list;\r\n }\r\n\r\n private initComponentByPropertyType(propertyTypeItemIndex: number = null): void {\r\n this.propertyTypeSelected = JSON.parse(\r\n JSON.stringify(ConstantsComponents.PropertyTypeList[propertyTypeItemIndex !== null ? propertyTypeItemIndex : 9]));\r\n }\r\n\r\n private updateFiltersSaved(filters: Filter): void {\r\n this.filter = filters;\r\n FiltersService.saveFilters({\r\n filters: filters,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties || false\r\n });\r\n }\r\n\r\n private restoreLastFiltersSaved(init?: boolean): void {\r\n const filtersSaved = FiltersService.getFiltersSaved() || null;\r\n this.filter = filtersSaved ? filtersSaved.filters : Utils.getInitialFilter(this.isOPI);\r\n if (filtersSaved) {\r\n if (filtersSaved.ft) {\r\n this.filter.mainArea = Number((this.filter.mainArea / this.METERS_TO_SQ).toFixed(0));\r\n this.surfaceUnitSelected = filtersSaved.ft ? 1 : 0;\r\n }\r\n this._isSharedProperties = filtersSaved.isSharedProperties || false;\r\n }\r\n this.propertyTypeSelected = ConstantsComponents.PropertyTypeList.find(item => item.value === this.filter.type);\r\n this.applyAmenities();\r\n this.updateFormByFilters();\r\n if (init) {\r\n this.applyFilters(FiltersChangeType.INIT);\r\n }\r\n }\r\n\r\n private openComponent(open: boolean): void {\r\n if (open) {\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'visible');\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '1');\r\n } else {\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '0');\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'collapse');\r\n }\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.filtersForm.controls['offering'].valueChanges.subscribe(() => {\r\n this.setPrices();\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['currency'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.setPrices(value.toString() as Currency);\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['minPrice'].valueChanges.subscribe((value) => {\r\n if (!value) {\r\n return;\r\n }\r\n this.maxPriceList = Object.assign([], this._tmpMaxPriceList);\r\n const i = this.minPriceList.indexOf(value);\r\n if (i > -1) {\r\n this.maxPriceList.splice(0, i + 1);\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['maxPrice'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.minPriceList = Object.assign([], this._tmpMinPriceList);\r\n const i = this.maxPriceList.indexOf(value);\r\n if (i > -1) {\r\n const difference = this.minPriceList.length - this.maxPriceList.length;\r\n this.minPriceList.splice(i + difference, this.minPriceList.length - 1);\r\n }\r\n })\r\n );\r\n }\r\n\r\n}\r\n","import {AbstractControl, FormGroup, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\n\r\nexport function CurrencyFilterValidator(controlName: string, controlName2: string): ValidatorFn {\r\n return (control: FormGroup): { [key: string]: boolean } | null => {\r\n if (control) {\r\n const peerControl = control.controls[controlName];\r\n const peerControl2 = control.controls[controlName2];\r\n if (peerControl2.value) {\r\n if (peerControl.value >= peerControl2.value) {\r\n peerControl2.setErrors({\r\n currency: true\r\n });\r\n }\r\n if (peerControl.value < peerControl2.value) {\r\n removeError(peerControl2, 'currency');\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {CurrencyConverterService} from './currency-converter.service';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class CurrencyConverterModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: CurrencyConverterModule,\r\n providers: [\r\n CurrencyConverterService\r\n ]\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FiltersComponent} from './filters.component';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatDividerModule} from '@angular/material/divider';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {CurrencyConverterModule} from './../../services/currency-converter/currency-converter.module';\r\nimport {FiltersService} from './filters.service';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {MatRippleModule} from '@angular/material/core';\r\nimport { MatInputModule } from '@angular/material';\r\nimport {FormatPriceModule} from '../../directives/format-price/format-price.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n MatRippleModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatButtonToggleModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatDividerModule,\r\n MatInputModule,\r\n MarkerPriceModule.forChild(),\r\n CurrencyConverterModule.forChild(),\r\n FormatPriceModule.forChild()\r\n ],\r\n declarations: [\r\n FiltersComponent\r\n ],\r\n exports: [\r\n FiltersComponent\r\n ],\r\n providers: [\r\n FiltersService\r\n ]\r\n})\r\nexport class FiltersModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: FiltersModule,\r\n providers: [\r\n FiltersService,\r\n {\r\n provide: FILTERS_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild} from '@angular/core';\r\nimport {LazyLoadService} from '@maplander/shared';\r\nimport {Observable, of} from 'rxjs';\r\nimport {fromPromise} from 'rxjs/internal-compatibility';\r\nimport {map, mergeMap} from 'rxjs/operators';\r\n\r\ndeclare var PANOLENS: any;\r\ndeclare var DeviceOrientationEvent: any;\r\ndeclare var DeviceMotionEvent: any;\r\n\r\n@Component({\r\n selector: 'lib-panorama-visor',\r\n templateUrl: './panorama-visor.component.html',\r\n styleUrls: ['./panorama-visor.component.scss']\r\n})\r\nexport class PanoramaVisorComponent implements AfterViewInit, OnDestroy {\r\n @Input() url: string;\r\n @ViewChild('container', {static: true}) private _container: ElementRef;\r\n private _panorama: any;\r\n private _viewer: any;\r\n public isTouch: boolean;\r\n public showPanorama: boolean;\r\n public isFullScreen: boolean;\r\n\r\n constructor(\r\n private _lazy: LazyLoadService\r\n ) {\r\n }\r\n\r\n private static checkTouchSupported(): boolean {\r\n return window ? (\r\n window.navigator.msMaxTouchPoints !== null &&\r\n window.navigator.msMaxTouchPoints !== undefined)\r\n || 'ontouchstart' in window : false;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.url || this.url === '') {\r\n return;\r\n }\r\n this._lazy.load('https://pchen66.github.io/js/three/three.min.js').then(() => {\r\n return this._lazy.load('https://rawgit.com/pchen66/panolens.js/dev/build/panolens.min.js');\r\n }).then(() => {\r\n setTimeout(() => {\r\n this.showPanorama = true;\r\n this.init();\r\n }, 500);\r\n }).catch((e) => {\r\n console.log('Failed', e);\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._panorama) {\r\n this._panorama.dispose();\r\n }\r\n if (this._viewer) {\r\n this._viewer.dispose();\r\n this._viewer.destroy();\r\n }\r\n }\r\n\r\n fullscreen(): void {\r\n this.toggleFullscreen();\r\n }\r\n\r\n changeControl(type: 'TOUCH' | 'MOUSE' | 'SENSOR'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (type) {\r\n case 'MOUSE':\r\n case 'TOUCH':\r\n this._viewer.enableControl(PANOLENS.CONTROLS.ORBIT);\r\n break;\r\n case 'SENSOR':\r\n this.requestPermissions().subscribe((value) => {\r\n if (value) {\r\n this._viewer.enableControl(PANOLENS.CONTROLS.DEVICEORIENTATION);\r\n } else {\r\n if (confirm(`No se otorgarón los permisos de movimiento y orientación, ¿desea ir a ajustes?`)) {\r\n window.location.href = 'prefs:root=Safari';\r\n } else {\r\n alert('Permisos de movimiento y orientación no otorgados');\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n }\r\n\r\n changeMode(mode: 'NORMAL' | 'CARDBOARD' | 'STEREOSCOPIC'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (mode) {\r\n case 'NORMAL':\r\n this._viewer.disableEffect();\r\n break;\r\n case 'CARDBOARD':\r\n this._viewer.enableEffect(PANOLENS.MODES.CARDBOARD);\r\n break;\r\n case 'STEREOSCOPIC':\r\n this._viewer.enableEffect(PANOLENS.MODES.STEREO);\r\n break;\r\n }\r\n }\r\n\r\n private init(): void {\r\n try {\r\n this.isTouch = PanoramaVisorComponent.checkTouchSupported();\r\n this._panorama = new PANOLENS.ImagePanorama(this.url);\r\n this._viewer = new PANOLENS.Viewer({container: this._container.nativeElement, controlBar: true, controlButtons: []});\r\n this._viewer.onWindowResize(this._container.nativeElement.offsetWidth, this._container.nativeElement.offsetHeight);\r\n this._viewer.add(this._panorama);\r\n } catch (e) {\r\n console.log('Failed', e);\r\n }\r\n }\r\n\r\n private toggleFullscreen(): void {\r\n const doc: any = window.document;\r\n const docEl: any = this._container.nativeElement;\r\n const requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen ||\r\n docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;\r\n const cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;\r\n if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {\r\n requestFullScreen.call(docEl);\r\n this.isFullScreen = true;\r\n } else {\r\n cancelFullScreen.call(doc);\r\n this.isFullScreen = false;\r\n }\r\n }\r\n\r\n private requestPermissions(): Observable<boolean> {\r\n const success = of(true), failed = of(false);\r\n if (typeof DeviceMotionEvent.requestPermission === 'function') {\r\n return fromPromise(DeviceOrientationEvent.requestPermission()).pipe(\r\n mergeMap((response) => {\r\n if (response === 'granted') {\r\n return fromPromise(DeviceMotionEvent.requestPermission()).pipe(\r\n map((response2) => {\r\n return response2 === 'granted';\r\n })\r\n );\r\n } else {\r\n return failed;\r\n }\r\n })\r\n );\r\n } else {\r\n return success;\r\n }\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PanoramaVisorComponent} from './panorama-visor.component';\r\nimport {LazyLoaderModule} from '@maplander/shared';\r\nimport {MatButtonModule, MatIconModule, MatMenuModule} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatMenuModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n LazyLoaderModule.forChild()\r\n ],\r\n declarations: [\r\n PanoramaVisorComponent\r\n ],\r\n exports: [\r\n PanoramaVisorComponent\r\n ]\r\n})\r\nexport class PanoramaVisorModule {\r\n}\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\n\r\ninterface MultimediaUploaderData {\r\n currentType: PFileTypeEnum;\r\n multimedia: PFile[];\r\n newMedia: UserMedia[];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property-multimedia-uploader',\r\n templateUrl: './multimedia-uploader.component.html',\r\n styleUrls: ['./multimedia-uploader.component.scss']\r\n})\r\nexport class MultimediaUploaderComponent implements OnInit {\r\n\r\n public fileType: 'image' | 'image360' | 'document';\r\n public images: PFile[];\r\n public images360: PFile[];\r\n public videos: PFile[];\r\n public currentIndex: number;\r\n private _newMedia: UserMedia[];\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: MultimediaUploaderData,\r\n private _dialog: MatDialogRef<MultimediaUploaderComponent, { multimedia: PFile[], newMedia: UserMedia[] }>\r\n ) {\r\n switch (this._data.currentType) {\r\n case PFileTypeEnum.IMAGE:\r\n this.fileType = 'image';\r\n this.currentIndex = 0;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.fileType = 'image360';\r\n this.currentIndex = 1;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.fileType = 'document';\r\n this.currentIndex = 2;\r\n break;\r\n }\r\n this.images = [];\r\n this.images360 = [];\r\n this.videos = [];\r\n this._newMedia = [];\r\n }\r\n\r\n private static getYouTubeID(text: string): string {\r\n if (text.indexOf('https://youtu.be/') !== -1) {\r\n text = text.replace('https://youtu.be/', '');\r\n return text;\r\n } else if (text.indexOf('https://www.youtube.com/') !== -1) {\r\n text = text.replace('https://www.youtube.com/', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('watch?v=') !== -1) {\r\n text = text.replace('watch?v=', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('&')) {\r\n const arr = text.split('&');\r\n text = arr[0];\r\n }\r\n return text;\r\n }\r\n\r\n ngOnInit() {\r\n this.parseMultimedia();\r\n }\r\n\r\n onUploadImage(ev: UserMedia | UserMedia[]): void {\r\n if (!ev) {\r\n return;\r\n }\r\n switch (this.fileType) {\r\n case 'image':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImagePFile(image);\r\n });\r\n } else {\r\n this.createImagePFile(ev);\r\n }\r\n break;\r\n case 'image360':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImage360PFile(image);\r\n });\r\n } else {\r\n this.createImage360PFile(ev);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n onTabChanged(tab: number): void {\r\n this.currentIndex = tab;\r\n switch (tab) {\r\n case 0:\r\n this.fileType = 'image';\r\n break;\r\n case 1:\r\n this.fileType = 'image360';\r\n break;\r\n }\r\n }\r\n\r\n onListChanged(ev: PFile[]): void {\r\n switch (this.currentIndex) {\r\n case 0:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images = ev;\r\n }\r\n break;\r\n case 1:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images360 = ev;\r\n }\r\n break;\r\n case 2:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.videos = ev;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n removeMedia(ev: PFile): void {\r\n let i = -1;\r\n if (!ev.id) {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n this._newMedia.forEach((item, index) => {\r\n if (item.url === ev.fileCS.thumbnail) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n } else {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n onYouTubeInputTextChanged(input: HTMLInputElement): void {\r\n if (input.value === '') {\r\n return;\r\n }\r\n const id = MultimediaUploaderComponent.getYouTubeID(input.value);\r\n if (!id) {\r\n return;\r\n }\r\n if (id.length >= 11) {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.VIDEO;\r\n file.media = true;\r\n file.name = `video_${new Date().getTime()}`;\r\n file.fileCS = {\r\n thumbnail: id,\r\n blobName: null\r\n };\r\n file.position = this.videos.length === 0 ? 0 : this.videos.length;\r\n this.videos.push(file);\r\n input.value = '';\r\n }\r\n }\r\n\r\n accept(): void {\r\n this._dialog.close({multimedia: this.joinMultimediaTypes(), newMedia: this._newMedia});\r\n }\r\n\r\n close(): void {\r\n this._dialog.close(null);\r\n }\r\n\r\n private createImagePFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.IMAGE;\r\n image.type = PFileTypeEnum.IMAGE;\r\n file.media = true;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n const fileName = `image_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.position = this.images.length === 0 ? 0 : this.images.length;\r\n this._newMedia.push(image);\r\n this.images.push(file);\r\n }\r\n\r\n private createImage360PFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.SPHERIC;\r\n image.type = PFileTypeEnum.SPHERIC;\r\n file.media = true;\r\n const fileName = `spheric_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n file.position = this.images360.length === 0 ? 0 : this.images360.length;\r\n this._newMedia.push(image);\r\n this.images360.push(file);\r\n }\r\n\r\n private parseMultimedia(): void {\r\n if (this._data) {\r\n this._data.multimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.push(item);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.push(item);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.push(item);\r\n break;\r\n }\r\n });\r\n this._newMedia = this._data.newMedia || [];\r\n }\r\n }\r\n\r\n private joinMultimediaTypes(): PFile[] {\r\n let response = [];\r\n response = response.concat(this.images);\r\n response = response.concat(this.images360);\r\n response = response.concat(this.videos);\r\n return response;\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {MultimediaUploaderComponent} from './multimedia-uploader.component';\r\n\r\n@Injectable()\r\nexport class MultimediaUploaderService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(currentType: PFileTypeEnum, multimedia?: PFile[], newMedia?: UserMedia[]): MatDialogRef<MultimediaUploaderComponent> {\r\n return this._dialog.open<MultimediaUploaderComponent, {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]},\r\n {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]}>\r\n (MultimediaUploaderComponent, {\r\n data: {currentType: currentType || PFileTypeEnum.IMAGE, multimedia: multimedia || [], newMedia: newMedia || []},\r\n panelClass: 'multimedia-uploader-panel-class',\r\n disableClose: true\r\n });\r\n }\r\n}\r\n","import {Component} from '@angular/core';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse, DialogResponseType} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\n\r\n@Component({\r\n selector: 'lib-property-announce-confirm',\r\n templateUrl: './announce-confirm.component.html',\r\n styleUrls: ['./announce-confirm.component.scss']\r\n})\r\nexport class AnnounceConfirmComponent {\r\n\r\n public list: { name: string, value: number, checked: boolean }[];\r\n public errorField: boolean;\r\n constructor(\r\n private _dialogRef: MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>>\r\n ) {\r\n this.list = ConstantsComponents.AnnounceCheckList.map(item => ({...item}));\r\n }\r\n\r\n public close(): void {\r\n this._dialogRef.close({code: DialogResponseType.CANCEL});\r\n }\r\n\r\n public accept(): void {\r\n this.errorField = false;\r\n this.list.forEach(item => {\r\n if (!item.checked) {\r\n this.errorField = true;\r\n }\r\n });\r\n if (this.errorField) {\r\n return;\r\n }\r\n this._dialogRef.close({code: DialogResponseType.ACCEPT});\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse} from '@maplander/types';\r\nimport {AnnounceConfirmComponent} from './announce-confirm.component';\r\n\r\n@Injectable()\r\nexport class AnnounceConfirmService {\r\n\r\n constructor(private _dialog: MatDialog) {\r\n }\r\n\r\n public open():\r\n MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>> {\r\n return this._dialog.open(AnnounceConfirmComponent, {\r\n disableClose: true,\r\n panelClass: 'confirm-announce-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, Inject, OnDestroy, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum} from '@maplander/types';\r\nimport {BreakpointObserver} from '@angular/cdk/layout';\r\nimport {GalleryConfig} from './gallery.service';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-gallery',\r\n templateUrl: './gallery.component.html',\r\n styleUrls: ['./gallery.component.scss']\r\n})\r\nexport class GalleryComponent implements OnInit, OnDestroy {\r\n\r\n public multimedia: PFile[];\r\n public sideOpened: boolean;\r\n public typeSelected: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n public indexSelected: number;\r\n public count: {\r\n image: number,\r\n video: number,\r\n sphere: number\r\n };\r\n private _mobileVersion: boolean;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: GalleryConfig,\r\n private _ref: MatDialogRef<GalleryComponent>,\r\n private _breakpointObserver: BreakpointObserver\r\n ) {\r\n this._subscription = new Subscription();\r\n this.multimedia = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia || []);\r\n this.sideOpened = true;\r\n this.indexSelected = this._data.indexSelected;\r\n this.typeSelected = 'IMAGE';\r\n this.count = {\r\n image: 0,\r\n sphere: 0,\r\n video: 0\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._breakpointObserver.observe(['(max-width: 1024px)']).subscribe((state) => {\r\n this._mobileVersion = state.matches;\r\n })\r\n );\r\n this.assignCountByType();\r\n this.assignMultimediaByType();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n close(): void {\r\n this._ref.close();\r\n }\r\n\r\n updateSideNav(): void {\r\n this.sideOpened = !this.sideOpened;\r\n }\r\n\r\n selectPFile(index: number): void {\r\n this.indexSelected = index;\r\n if (this._mobileVersion) {\r\n this.updateSideNav();\r\n }\r\n }\r\n\r\n onIndexSelectedChange(ev: number): void {\r\n this.indexSelected = ev;\r\n }\r\n\r\n changePFileType(type: 'IMAGE' | 'VIDEO' | 'SPHERIC'): void {\r\n this.indexSelected = 0;\r\n this.typeSelected = type;\r\n const pFileType = type as PFileTypeEnum;\r\n this.multimedia = this.getPFilesByType(pFileType, this._data.multimedia);\r\n }\r\n\r\n private assignCountByType(): void {\r\n this.count.image = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia).length;\r\n this.count.video = this.getPFilesByType(PFileTypeEnum.VIDEO, this._data.multimedia).length;\r\n this.count.sphere = this.getPFilesByType(PFileTypeEnum.SPHERIC, this._data.multimedia).length;\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n if (this._data.type) {\r\n this.typeSelected = this._data.type;\r\n this.multimedia = this.getPFilesByType(this.typeSelected as PFileTypeEnum, this._data.multimedia);\r\n }\r\n }\r\n\r\n private getPFilesByType(type: PFileTypeEnum, list: PFile[]): PFile[] {\r\n return list.filter(item => {\r\n return (item.type === type);\r\n }) || [];\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile} from '@maplander/types';\r\nimport {GalleryComponent} from './gallery.component';\r\n\r\nexport interface GalleryConfig {\r\n multimedia: PFile[];\r\n indexSelected: number;\r\n type: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n}\r\n\r\n\r\n@Injectable()\r\nexport class GalleryService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(multimedia: PFile[], indexSelected?: number, type?: 'IMAGE' | 'VIDEO' | 'SPHERIC'): MatDialogRef<GalleryComponent> {\r\n return this._dialog.open<GalleryComponent, GalleryConfig>(\r\n GalleryComponent, {\r\n data: {\r\n multimedia: multimedia || [],\r\n indexSelected: indexSelected || 0,\r\n type: type || null\r\n },\r\n disableClose: true,\r\n panelClass: 'gallery_dialog'\r\n });\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_TOKEN = new InjectionToken<boolean>('PROPERTY MODULE CONFIG');\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-stats',\r\n templateUrl: './stats.component.html',\r\n styleUrls: ['./stats.component.scss']\r\n})\r\nexport class StatsComponent implements OnInit {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: LeadInfo,\r\n private _dialogRef: MatDialogRef<StatsComponent>\r\n ) {\r\n this.data = new LeadInfo(this.data || null);\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n close(): void {\r\n this._dialogRef.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog} from '@angular/material';\r\nimport {StatsComponent} from './stats.component';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class StatsService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(leadInfo: LeadInfo): void {\r\n this._dialog.open<void, LeadInfo>(StatsComponent, {\r\n data: leadInfo || null,\r\n panelClass: 'stats-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Optional, Output, SimpleChanges} from '@angular/core';\r\nimport {\r\n Address,\r\n AppUtil,\r\n DialogResponseType,\r\n NewCompleteProperty,\r\n NewProperty,\r\n PFile,\r\n PFileTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum,\r\n UserMedia\r\n} from '@maplander/types';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {EditorComponent} from '../editor/editor.component';\r\nimport {OwnerInfoComponent} from '../owner-info/owner-info.component';\r\nimport {DocumentsComponent} from '../documents/documents.component';\r\nimport {MultimediaUploaderService} from '../multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from '../announce-confirm/announce-confirm.service';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {Utils} from '../../../../utils';\r\nimport {ShareService} from '@maplander/shared';\r\nimport {GalleryService} from '../gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from '../../token';\r\nimport {StatsService} from '../stats/stats.service';\r\n\r\nexport enum PropertyEventType {\r\n CREATE = 'CREATE',\r\n UPDATE = 'UPDATE',\r\n ANNOUNCE = 'ANNOUNCE',\r\n HIDE = 'HIDE',\r\n SHOW = 'SHOW',\r\n ADDRESS = 'ADDRESS',\r\n OFFER = 'OFFER',\r\n FAVORITE = 'FAVORITE',\r\n REQUEST_INFO = 'REQUEST_INFO',\r\n SHARE = 'SHARE',\r\n ARCHIVE = 'ARCHIVE',\r\n REAL_ESTATE_EXCHANGE = 'REAL_ESTATE_EXCHANGE',\r\n SHARE_COMMISSION = 'SHARE_COMMISSION',\r\n BROCHURE = 'BROCHURE',\r\n POSTER = 'POSTER',\r\n CLIENTS = 'CLIENTS',\r\n BACK = 'BACK',\r\n SHOW_AGENTS = 'SHOW_AGENTS',\r\n TARPS = 'TARPS'\r\n}\r\n\r\nexport interface PropertyEventChange {\r\n type: PropertyEventType;\r\n payload?: any;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property',\r\n templateUrl: './property.component.html',\r\n styleUrls: ['./property.component.scss']\r\n})\r\nexport class PropertyComponent implements OnInit, OnChanges {\r\n @Input() property: NewCompleteProperty;\r\n @Input() utils: AppUtil;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() mode: 'detail' | 'record' | 'add';\r\n @Input() sharedProperty: { isShared: boolean, ownerAvailable: boolean } = {isShared: false, ownerAvailable: true};\r\n @Input() address: Address;\r\n @Input() mlsLabel: string;\r\n @Input() disableShareCommission: boolean;\r\n @Input() isFavorite: boolean;\r\n @Input() disableConfirmAnnounce: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() userUrl: string;\r\n @Output() change: EventEmitter<PropertyEventChange>;\r\n @Output() modeChange: EventEmitter<'detail' | 'record' | 'add'>;\r\n public multimedia: PFile[];\r\n public isOPI: boolean;\r\n public currentIndex: number;\r\n public frontImageError: boolean;\r\n public currentType: PFileTypeEnum;\r\n public multimediaCount: {\r\n images: number,\r\n images360: number,\r\n videos: number\r\n };\r\n public completeProperty: NewCompleteProperty;\r\n private _allMultimedia: PFile[];\r\n private _newMedia: UserMedia[];\r\n private _editorInstance: EditorComponent;\r\n private _ownerInstance: OwnerInfoComponent;\r\n private _documentsInstance: DocumentsComponent;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_TOKEN) private _config: boolean,\r\n private _uploaderService: MultimediaUploaderService,\r\n private _announceService: AnnounceConfirmService,\r\n private _snackBar: SnackBarService,\r\n private _share: ShareService,\r\n private _gallery: GalleryService,\r\n private _documentService: DocumentVisorService,\r\n private _statsService: StatsService\r\n ) {\r\n this.initCompleteProperty();\r\n this.change = new EventEmitter<PropertyEventChange>();\r\n this.modeChange = new EventEmitter<'detail' | 'record' | 'add'>();\r\n this.disableShareCommission = false;\r\n this.disableConfirmAnnounce = false;\r\n this.currentIndex = 0;\r\n this.multimedia = [];\r\n this._allMultimedia = [];\r\n this._newMedia = [];\r\n this.multimediaCount = {\r\n images: 0,\r\n images360: 0,\r\n videos: 0\r\n };\r\n this.isOPI = this._config || false;\r\n this.currentType = PFileTypeEnum.IMAGE;\r\n }\r\n\r\n ngOnInit() {\r\n // this.agentActions('SHOW_AGENTS');\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.completeProperty = new NewCompleteProperty(changes['property'].currentValue || null);\r\n this.parseMultimedia();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n }\r\n\r\n saveData(): void {\r\n this.restoreFrontImageError();\r\n if (this._editorInstance.validateFormInvalid()) {\r\n this._snackBar.setMessage('Verifique todos los campos obligatorios', 'OK', 5000, 'left', 'bottom');\r\n return;\r\n }\r\n this.parseDataByComponents();\r\n this.change.emit({\r\n type: this.completeProperty.property.id ? PropertyEventType.UPDATE : PropertyEventType.CREATE,\r\n payload: {\r\n property: this.completeProperty,\r\n newMedia: this._newMedia\r\n }\r\n });\r\n }\r\n\r\n agentActions(type: any): void {\r\n this.change.emit({\r\n type: type as PropertyEventType,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n shareProperty(): void {\r\n this.agentActions('SHARE');\r\n this._share.open({\r\n url: this.completeProperty.property.url,\r\n urlUser: this.userUrl\r\n });\r\n }\r\n\r\n openGallery(): void {\r\n if (this._allMultimedia.length === 0) {\r\n return;\r\n }\r\n let type = null;\r\n if (this.multimedia.length > 0) {\r\n type = this.multimedia[0].type;\r\n }\r\n this._gallery.open(this._allMultimedia, this.currentIndex, type);\r\n }\r\n\r\n goToStats(): void {\r\n this._statsService.open(this.completeProperty.leadInfo || null);\r\n }\r\n\r\n goToEditProperty(): void {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n }\r\n\r\n goToBack(): void {\r\n this.restoreFrontImageError();\r\n this.change.emit({\r\n type: PropertyEventType.BACK\r\n });\r\n }\r\n\r\n goToClients(): void {\r\n this.change.emit({\r\n type: PropertyEventType.CLIENTS\r\n });\r\n }\r\n\r\n goToUpdateVisibility(): void {\r\n this.change.emit({\r\n type: this.completeProperty.property.status === StatusTypeEnum.ANNOUNCED ? PropertyEventType.HIDE : PropertyEventType.SHOW,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n goToPublish(): void {\r\n if (this.mode === 'add') {\r\n this.parseDataByComponents();\r\n }\r\n const errors = Utils.getErrorsForPublish(this.completeProperty.property);\r\n if (errors.length > 0) {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n setTimeout(() => {\r\n this.validateFrontImageOnErrors(errors);\r\n this._editorInstance.setErrorsOnFields(errors);\r\n }, 200);\r\n this._snackBar.setMessage('Complete los campos faltantes para poder publicar', 'OK', 5000, 'left', 'bottom');\r\n } else {\r\n if (this.disableConfirmAnnounce) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n return;\r\n }\r\n this._announceService.open().afterClosed().subscribe((response) => {\r\n if (response.code === DialogResponseType.ACCEPT) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n onMultimediaIndexChanged(ev: number): void {\r\n this.currentIndex = ev;\r\n }\r\n\r\n changeMultimediaType(type: string): void {\r\n this.currentType = type as PFileTypeEnum;\r\n this.assignMultimediaByType();\r\n }\r\n\r\n openUploaderMultimedia(): void {\r\n this._uploaderService.open(this.currentType, this._allMultimedia, this._newMedia).afterClosed().subscribe((response) => {\r\n if (response) {\r\n this._newMedia = response.newMedia || [];\r\n this._allMultimedia = Object.assign([], response.multimedia || []);\r\n this.assignFrontImage();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n });\r\n }\r\n\r\n onEditorInstance(ev: EditorComponent): void {\r\n this._editorInstance = ev;\r\n }\r\n\r\n onOwnerInstance(ev: OwnerInfoComponent): void {\r\n this._ownerInstance = ev;\r\n }\r\n\r\n onDocumentsInstance(ev: DocumentsComponent): void {\r\n this._documentsInstance = ev;\r\n }\r\n\r\n onSelectAddress(): void {\r\n this.change.emit({\r\n type: PropertyEventType.ADDRESS\r\n });\r\n }\r\n\r\n private restoreFrontImageError(): void {\r\n this.frontImageError = false;\r\n }\r\n\r\n private parseMultimedia(): void {\r\n this._allMultimedia = [];\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.images || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.videos || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.spherics || []);\r\n }\r\n\r\n private getMultimediaByType(type: PFileTypeEnum): PFile[] {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === type) {\r\n response.push(item);\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n private assignFrontImage(): void {\r\n const images: PFile[] = [];\r\n this._allMultimedia.forEach(multimedia => {\r\n if (multimedia.type === PFileTypeEnum.IMAGE) {\r\n images.push(multimedia);\r\n }\r\n });\r\n if (images.length > 0) {\r\n this.completeProperty.property.image = images[0].fileCS.thumbnail;\r\n this.frontImageError = false;\r\n } else {\r\n this.completeProperty.property.image = null;\r\n }\r\n this.completeProperty = new NewCompleteProperty(this.completeProperty);\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === this.currentType) {\r\n response.push(item);\r\n }\r\n });\r\n this.multimedia = Object.assign([], response);\r\n }\r\n\r\n private validateFrontImageOnErrors(errors: string[]): void {\r\n errors.forEach(error => {\r\n if (error === 'image') {\r\n this.frontImageError = true;\r\n }\r\n });\r\n }\r\n\r\n private validateMultimediaTypeCount(): void {\r\n this.multimediaCount.images = 0;\r\n this.multimediaCount.images360 = 0;\r\n this.multimediaCount.videos = 0;\r\n this._allMultimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.multimediaCount.images++;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.multimediaCount.images360++;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.multimediaCount.videos++;\r\n break;\r\n }\r\n });\r\n }\r\n\r\n private parseDataByComponents(): void {\r\n this.completeProperty.property = this._editorInstance.getProperty();\r\n this.completeProperty.property.propertyInfo.owner = this._ownerInstance.getOwner();\r\n const documentsResponse = this._documentsInstance.getDocuments();\r\n this.completeProperty.files = documentsResponse.documents;\r\n this._newMedia = this._newMedia.concat(documentsResponse.newMedia);\r\n this.completeProperty.images = this.getMultimediaByType(PFileTypeEnum.IMAGE);\r\n this.completeProperty.spherics = this.getMultimediaByType(PFileTypeEnum.SPHERIC);\r\n this.completeProperty.videos = this.getMultimediaByType(PFileTypeEnum.VIDEO);\r\n }\r\n\r\n private initCompleteProperty(): void {\r\n const complete = new NewCompleteProperty();\r\n complete.property = new NewProperty();\r\n complete.property.propertyInfo = new PropertyInfo();\r\n this.completeProperty = complete;\r\n }\r\n}\r\n","import {FormGroup} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport class PropertyEditorValidators {\r\n static validator(form: FormGroup): void {\r\n // Min price rule\r\n let control = form.get('minPrice');\r\n let condition = Number(control.value) > Number(form.get('price').value);\r\n if (condition) {\r\n control.setErrors({\r\n minPriceInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'minPriceInvalid');\r\n }\r\n // Commission rule\r\n control = form.get('commission');\r\n condition = control.value && (!form.get('price').value || Number(form.get('price').value) === 0);\r\n if (condition) {\r\n control.setErrors({\r\n commissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'commissionInvalid');\r\n }\r\n // Consumer reporting rule\r\n control = form.get('consumerReportingOption');\r\n condition = form.get('consumerReporting').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Lease transfer rule\r\n control = form.get('transferPrice');\r\n condition = form.get('transfer').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Condominium fee rule\r\n control = form.get('maintenancePrice');\r\n condition = form.get('maintenance').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule\r\n control = form.get('sharedCommission');\r\n condition = form.get('mlm').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule 2\r\n condition = form.get('mlm').value && !form.get('commission').value;\r\n control = form.get('sharedCommission');\r\n if (condition) {\r\n control.setErrors({\r\n sharedCommissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'sharedCommissionInvalid');\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, ValidatorFn, Validators} from '@angular/forms';\r\nimport {\r\n Address,\r\n Amenities,\r\n AppUtil,\r\n AreaUnitEnum,\r\n CER,\r\n Features,\r\n GeoPt,\r\n LandUseEnum,\r\n NewProperty,\r\n OfferingTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum\r\n} from '@maplander/types';\r\nimport {Subscription} from 'rxjs';\r\nimport {DialogService} from '@maplander/shared';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\r\nimport {MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter} from '@angular/material-moment-adapter';\r\nimport * as momentImported from 'moment';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyEditorValidators} from '../../validators/property-editor-validators';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {Utils} from '../../../../utils';\r\nconst moment = momentImported;\r\n\r\nconst MY_FORMATS = {\r\n parse: {\r\n dateInput: 'L',\r\n },\r\n display: {\r\n dateInput: 'L',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'L',\r\n monthYearA11yLabel: 'MMMM YYYY',\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-editor',\r\n templateUrl: './editor.component.html',\r\n styleUrls: ['./editor.component.scss'],\r\n providers: [\r\n {provide: MAT_DATE_LOCALE, useValue: 'es-MX'},\r\n {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]},\r\n {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}\r\n ]\r\n})\r\nexport class EditorComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\r\n @ViewChild('btnSubmit', {static: true, read: ElementRef}) private _btnSubmitRef: ElementRef;\r\n @Input() utils: AppUtil;\r\n @Input() address: Address;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Output() editorInstance: EventEmitter<EditorComponent>;\r\n @Output() selectAddress: EventEmitter<void>;\r\n /**\r\n * REGEX_ONLY_INTEGERS\r\n * Regex pattern to only accept integer and positive numbers\r\n * */\r\n private readonly REGEX_ONLY_INTEGERS = new RegExp(/^[0-9]\\d*$/);\r\n private readonly REGEX_MIDDLE_NUMBER = new RegExp(/^[0-9]*(\\.[5])?$/);\r\n private readonly REGEX_WEBSITE = new RegExp(/(http|https):\\/\\/(\\w+:?\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@\\-\\/]))?/);\r\n private readonly REGEX_ALPHA_NUMBER = new RegExp(/[A-Za-z0-9_]/);\r\n private readonly _subscription: Subscription;\r\n private readonly _validators: {\r\n bedrooms: ValidatorFn[],\r\n bathrooms: ValidatorFn[],\r\n parkingSpaces: ValidatorFn[],\r\n mainArea: ValidatorFn[],\r\n secondaryArea: ValidatorFn[],\r\n externalLink: ValidatorFn[],\r\n sku: ValidatorFn[]\r\n };\r\n private _property: NewProperty;\r\n private _propertyTypeItem: PropertyTypeItem;\r\n private _errorFields: string[];\r\n public propertyForm: FormGroup;\r\n public offeringTypeList: { name: string, value: OfferingTypeEnum }[];\r\n public currencyList: CER[];\r\n public roiList: number[];\r\n public landUseList: { name: string, value: LandUseEnum }[];\r\n public amenitiesList: AmenityItem[];\r\n public featuresList: AmenityItem[];\r\n public commissionList: number[];\r\n public sharedCommissionList: number[];\r\n public durationList: number[];\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder,\r\n private _dialog: DialogService,\r\n private _adapter: DateAdapter<any>\r\n ) {\r\n this.editorInstance = new EventEmitter<EditorComponent>();\r\n this.selectAddress = new EventEmitter<void>();\r\n this._subscription = new Subscription();\r\n this.offeringTypeList = ConstantsComponents.OfferingTypeList.map(doc => ({...doc}));\r\n this.landUseList = ConstantsComponents.LandUseList.map(doc => ({...doc}));\r\n this.commissionList = ConstantsComponents.CommissionList[OfferingTypeEnum.SALE];\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.durationList = Object.assign([], ConstantsComponents.DurationList);\r\n this.sharedCommissionList = Object.assign([], ConstantsComponents.SharedCommissionList);\r\n this._adapter.setLocale('es');\r\n this._errorFields = [];\r\n this._validators = {\r\n bedrooms: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n bathrooms: [Validators.pattern(this.REGEX_MIDDLE_NUMBER)],\r\n parkingSpaces: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n mainArea: [],\r\n secondaryArea: [],\r\n externalLink: [Validators.pattern(this.REGEX_WEBSITE)],\r\n sku: [Validators.pattern(this.REGEX_ALPHA_NUMBER)]\r\n };\r\n this.propertyForm = this._formBuilder.group({\r\n offering: [OfferingTypeEnum.SALE],\r\n sku: [null, this._validators.sku],\r\n consumerReporting: [],\r\n consumerReportingOption: [1],\r\n currency: ['MXN'],\r\n minPrice: [],\r\n price: [],\r\n maintenance: [],\r\n maintenancePrice: [],\r\n transfer: [],\r\n transferPrice: [],\r\n bedrooms: [null, this._validators.bedrooms],\r\n bathrooms: [null, this._validators.bathrooms],\r\n parkingSpaces: [null, this._validators.parkingSpaces],\r\n mainArea: [null, this._validators.mainArea],\r\n secondaryArea: [null, this._validators.secondaryArea],\r\n unit: [AreaUnitEnum.M2],\r\n buildIn: [],\r\n landUse: [],\r\n exclusivity: [],\r\n mlm: [],\r\n sharedCommission: [],\r\n agreementDate: [{value: null, disabled: true}],\r\n duration: [],\r\n commission: [],\r\n roi: [],\r\n description: [],\r\n externalLink: [null, this._validators.externalLink],\r\n notes: [],\r\n address: this._formBuilder.group({\r\n country: [],\r\n postalCode: [],\r\n state: [],\r\n city: [],\r\n township: [],\r\n colony: [],\r\n street: [],\r\n extNumber: [],\r\n intNumber: [],\r\n mz: [],\r\n lt: [],\r\n visible: [true],\r\n }),\r\n }, {\r\n validators: PropertyEditorValidators.validator\r\n });\r\n }\r\n\r\n private static geoPtGenerator(geoPt: GeoPt, minDistance: number, maxDistance: number): GeoPt {\r\n const EARTH_RADIUS_METERS = 6371010.0;\r\n const l = Math.random() * (maxDistance - minDistance) + minDistance;\r\n const alpha = Math.random() * Math.PI / 2;\r\n const sx = (Math.random() < 0.5) ? l * Math.cos(alpha) : -l * Math.cos(alpha);\r\n const sy = (Math.random() < 0.5) ? l * Math.sin(alpha) : -l * Math.sin(alpha);\r\n const deltaLat = sy / EARTH_RADIUS_METERS * 180 / Math.PI;\r\n const lat = geoPt.latitude + deltaLat;\r\n const deltaLong = sx / EARTH_RADIUS_METERS / Math.cos(lat * Math.PI / 180) * 180 / Math.PI;\r\n return {\r\n latitude: lat,\r\n longitude: geoPt.longitude + deltaLong\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n this.currencyList = changes['utils'].currentValue.cers;\r\n }\r\n if (changes['propertyType'] && changes['propertyType'].currentValue) {\r\n this.propertyType = changes['propertyType'].currentValue;\r\n this.searchAmenitiesByPropertyType();\r\n }\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.createProperty(changes['property'].currentValue);\r\n }\r\n if (changes['address'] && changes['address'].currentValue) {\r\n this.updateAddressForm(changes['address'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.editorInstance.emit(this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n getProperty(): NewProperty {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n this.updatePropertyByForm(this.propertyForm.getRawValue());\r\n return this._property;\r\n }\r\n\r\n validateFormInvalid(): boolean {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n return this.propertyForm.invalid;\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n amenity.checked = !amenity.checked;\r\n this._property.amenities[amenity.value] = amenity.checked;\r\n }\r\n\r\n goToSelectAddress(): void {\r\n this.selectAddress.emit();\r\n }\r\n\r\n setErrorsOnFields(errors: string[]): void {\r\n this._errorFields = errors;\r\n this.setValidatorOnFields(this._errorFields);\r\n this._btnSubmitRef.nativeElement.click();\r\n }\r\n\r\n private updateAddressForm(address: Address): void {\r\n this.propertyForm.patchValue({\r\n address: {\r\n country: address.country,\r\n state: address.state,\r\n city: address.city,\r\n township: address.township,\r\n colony: address.colony,\r\n street: address.street,\r\n postalCode: address.postalCode,\r\n extNumber: address.outdoorNumber\r\n }\r\n });\r\n }\r\n\r\n private assignAmenities(): void {\r\n this.amenitiesList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignLocationFeatures(): void {\r\n this.featuresList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignCommission(): void {\r\n this.commissionList = ConstantsComponents.CommissionList[this._property.offering];\r\n }\r\n\r\n private assignBusinessRules(): void {\r\n switch (this.propertyType) {\r\n case PropertyTypeEnum.ROOM:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.RENT\r\n });\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.SALE\r\n });\r\n break;\r\n }\r\n if (this._property.status === StatusTypeEnum.ANNOUNCED) {\r\n const errors = Utils.listErrorsByPropertyTypeForPublish(this._property.type);\r\n this.setValidatorOnFields(errors);\r\n }\r\n }\r\n\r\n private updateFormByProperty(): void {\r\n this.propertyForm.patchValue({\r\n offering: this._property.offering,\r\n sku: this._property.sku,\r\n consumerReporting: this._property.propertyInfo.consumerReporting && this._property.propertyInfo.consumerReporting !== 0,\r\n consumerReportingOption: this._property.propertyInfo.consumerReporting,\r\n currency: this._property.currency,\r\n minPrice: this._property.propertyInfo.lowestPrice,\r\n price: this._property.price,\r\n maintenance: this._property.features.condominiumFeePrice && this._property.features.condominiumFeePrice !== 0,\r\n maintenancePrice: this._property.features.condominiumFeePrice,\r\n transfer: this._property.propertyInfo.leaseTransferPrice && this._property.propertyInfo.leaseTransferPrice !== 0,\r\n transferPrice: this._property.propertyInfo.leaseTransferPrice,\r\n bedrooms: this._property.features.bedrooms,\r\n bathrooms: this._property.features.bathrooms,\r\n parkingSpaces: this._property.features.parkingSpaces,\r\n mainArea: this._property.features.mainArea,\r\n secondaryArea: this._property.features.secondaryArea,\r\n unit: this._property.features.areaUnit,\r\n buildIn: this._property.features.builtIn ? new Date(this._property.features.builtIn, 1, 1) : null,\r\n landUse: this._property.features.landUse,\r\n exclusivity: this._property.propertyInfo.exclusivity,\r\n mlm: this._property.propertyInfo.mls,\r\n sharedCommission: this._property.propertyInfo.sharedCommission,\r\n agreementDate: this._property.propertyInfo.listingAgreementStartDate ?\r\n moment(new MDate(this._property.propertyInfo.listingAgreementStartDate).toDate()) : null,\r\n duration: this._property.propertyInfo.listingAgreementTime,\r\n commission: this._property.propertyInfo.commission,\r\n roi: this._property.features.roi,\r\n description: this._property.description,\r\n externalLink: this._property.externalLink,\r\n notes: this._property.propertyInfo.notes,\r\n address: {\r\n country: this._property.address.country,\r\n state: this._property.address.state,\r\n city: this._property.address.city,\r\n township: this._property.address.township,\r\n colony: this._property.address.colony,\r\n postalCode: this._property.address.postalCode,\r\n street: this._property.address.street,\r\n extNumber: this._property.address.outdoorNumber,\r\n intNumber: this._property.address.interiorNumber,\r\n mz: this._property.address.mz,\r\n lt: this._property.address.lt,\r\n visible: this._property.address.visible || false,\r\n }\r\n });\r\n }\r\n\r\n private updatePropertyByForm(data: any): void {\r\n this._property.type = this.propertyType;\r\n this._property.offering = data.offering;\r\n this._property.sku = data.sku;\r\n this._property.propertyInfo.consumerReporting = data.consumerReporting ? data.consumerReportingOption : null;\r\n this._property.currency = data.currency;\r\n this._property.propertyInfo.lowestPrice = data.minPrice ? Number(data.minPrice) : null;\r\n this._property.price = data.price ? Number(data.price) : null;\r\n this._property.features.condominiumFeePrice = data.maintenance ? Number(data.maintenancePrice) : null;\r\n this._property.propertyInfo.leaseTransferPrice = data.transfer ? Number(data.transferPrice) : null;\r\n this._property.features.bedrooms = data.bedrooms ? Number(data.bedrooms) : null;\r\n this._property.features.bathrooms = data.bathrooms ? Number(data.bathrooms) : null;\r\n this._property.features.parkingSpaces = data.parkingSpaces ? Number(data.parkingSpaces) : null;\r\n this._property.features.mainArea = data.mainArea ? Number(data.mainArea) : null;\r\n this._property.features.secondaryArea = data.secondaryArea ? Number(data.secondaryArea) : null;\r\n this._property.features.areaUnit = data.unit;\r\n this._property.features.builtIn = data.buildIn ? data.buildIn.getFullYear() : null;\r\n this._property.features.landUse = data.landUse;\r\n this._property.propertyInfo.exclusivity = data.exclusivity;\r\n this._property.propertyInfo.mls = data.mlm;\r\n this._property.propertyInfo.sharedCommission = data.mlm ? Number(data.sharedCommission) : null;\r\n this._property.propertyInfo.listingAgreementStartDate =\r\n data.agreementDate ? MDate.getTimestamp(data.agreementDate.toDate()) : null;\r\n this._property.propertyInfo.listingAgreementTime = data.duration;\r\n this._property.propertyInfo.commission = data.commission;\r\n this._property.features.roi = data.roi;\r\n this._property.description = data.description;\r\n this._property.externalLink = data.externalLink;\r\n this._property.propertyInfo.notes = data.notes;\r\n this._property.address.country = data.address.country;\r\n this._property.address.state = data.address.state;\r\n this._property.address.city = data.address.city;\r\n this._property.address.township = data.address.township;\r\n this._property.address.colony = data.address.colony;\r\n this._property.address.postalCode = data.address.postalCode;\r\n this._property.address.street = data.address.street;\r\n this._property.address.outdoorNumber = data.address.extNumber;\r\n this._property.address.interiorNumber = data.address.intNumber;\r\n this._property.address.mz = data.address.mz;\r\n this._property.address.lt = data.address.lt;\r\n this._property.address.location = this.address.location;\r\n this._property.address.publicLocation = !data.address.visible ?\r\n EditorComponent.geoPtGenerator(this.address.location, 200, 400) : this.address.location;\r\n this._property.address.visible = data.address.visible;\r\n }\r\n\r\n private searchAmenitiesByPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === this.propertyType) {\r\n this._propertyTypeItem = type;\r\n this.amenitiesList = type.amenities.map(item => ({...item}));\r\n this.featuresList = type.features.map(item => ({...item}));\r\n }\r\n });\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.propertyForm.controls['offering'].valueChanges.subscribe((value) => {\r\n this.commissionList = ConstantsComponents.CommissionList[value];\r\n this.propertyForm.patchValue({\r\n minPrice: null,\r\n maxPrice: null\r\n });\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['price'].valueChanges.subscribe((value) => {\r\n if (value && Number(value) === 0) {\r\n this.propertyForm.patchValue({\r\n minPrice: null\r\n });\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['mlm'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['sharedCommission'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['maintenance'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['maintenancePrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['transfer'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['transferPrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['consumerReporting'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['consumerReportingOption'].setValue(1);\r\n })\r\n );\r\n }\r\n\r\n private createProperty(property?: NewProperty): void {\r\n this._property = new NewProperty(property || null);\r\n this._property.type = this.propertyType;\r\n this._property.propertyInfo = new PropertyInfo(property ? property.propertyInfo : null);\r\n this._property.features = new Features(property ? property.features : null);\r\n this._property.address = new Address(property ? property.address : null);\r\n this._property.amenities = new Amenities(property ? property.amenities : null);\r\n this.assignBusinessRules();\r\n if (property && property.id) {\r\n this.updateFormByProperty();\r\n this.assignAmenities();\r\n this.assignLocationFeatures();\r\n this.assignCommission();\r\n }\r\n }\r\n\r\n private setValidatorOnFields(errors: string[], remove?: boolean): void {\r\n if (errors.length === 0) {\r\n return;\r\n }\r\n errors.forEach(error => {\r\n if (!this.propertyForm.controls[error]) {\r\n return;\r\n }\r\n if (remove) {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(this._validators[error] ? this._validators[error] : []);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n } else {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(\r\n this._validators[error] ? this._validators[error].concat(Validators.required) : [Validators.required]);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import {AbstractControl, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport function phoneFieldsValidator(controlName: string): ValidatorFn {\r\n return (control: AbstractControl): { [key: string]: boolean } | null => {\r\n if (control.parent) {\r\n const peerControl = control.parent.controls[controlName] as AbstractControl;\r\n if (!control.value && !peerControl.value) {\r\n removeError(peerControl, 'phoneFieldsError');\r\n return null;\r\n }\r\n if (control.value !== '' && (!peerControl.value || peerControl.value === '')) {\r\n peerControl.setErrors({\r\n phoneFieldsError: true\r\n });\r\n }\r\n if ((peerControl.value && peerControl.value !== '') && (!control.value || control.value === '')) {\r\n return {\r\n phoneFieldsError: true\r\n };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {CountryCode, Owner} from '@maplander/types';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {phoneFieldsValidator} from '../../validators/phone-fields-validator';\r\n\r\n@Component({\r\n selector: 'lib-property-owner-info',\r\n templateUrl: './owner-info.component.html',\r\n styleUrls: ['./owner-info.component.scss']\r\n})\r\nexport class OwnerInfoComponent implements OnChanges, AfterViewInit {\r\n @Input() owner: Owner;\r\n @Input() disabled: boolean;\r\n @Output() ownerInstance: EventEmitter<OwnerInfoComponent>;\r\n public ownerForm: FormGroup;\r\n private _owner: Owner;\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder\r\n ) {\r\n this.ownerInstance = new EventEmitter<OwnerInfoComponent>();\r\n this.ownerForm = this._formBuilder.group({\r\n name: [],\r\n lastName: [],\r\n email: ['', [Validators.email]],\r\n code: ['', [phoneFieldsValidator('phone')]],\r\n phone: ['', [\r\n phoneFieldsValidator('code'),\r\n Validators.maxLength(13),\r\n Validators.minLength(8),\r\n Validators.pattern(new RegExp(/^[0-9]\\d*$/))]\r\n ],\r\n address: []\r\n });\r\n this.createOwner();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['disabled']) {\r\n this.ownerForm.disable();\r\n }\r\n if (changes['owner'] && changes['owner'].currentValue) {\r\n this.createOwner(changes['owner'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.ownerInstance.emit(this);\r\n }\r\n\r\n onCodePhoneChanged(ev: CountryCode): void {\r\n this.ownerForm.controls['code'].setValue(ev ? ev.code : '');\r\n }\r\n\r\n getOwner(): Owner {\r\n this.updateOwnerByForm(this.ownerForm.value);\r\n return this._owner;\r\n }\r\n\r\n private updateOwnerByForm(data: any): void {\r\n this._owner.name = data.name;\r\n this._owner.lastName = data.lastName;\r\n this._owner.email = data.email;\r\n this._owner.phone = data.phone;\r\n this._owner.codePhone = data.code ? data.code.replace('+', '') : '';\r\n this._owner.address = data.address;\r\n }\r\n\r\n private updateFormByOwner(): void {\r\n this.ownerForm.patchValue({\r\n name: this._owner.name,\r\n lastName: this._owner.lastName,\r\n email: this._owner.email,\r\n phone: this._owner.phone,\r\n code: (this._owner.codePhone) ? `+${this._owner.codePhone}` : '',\r\n address: this._owner.address,\r\n });\r\n }\r\n\r\n private createOwner(owner?: Owner): void {\r\n this._owner = new Owner(owner || null);\r\n if (owner) {\r\n this.updateFormByOwner();\r\n }\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {Observable} from 'rxjs';\r\nimport {map} from 'rxjs/operators';\r\nimport {HttpClient} from '@angular/common/http';\r\n\r\n@Component({\r\n selector: 'lib-property-documents',\r\n templateUrl: './documents.component.html',\r\n styleUrls: ['./documents.component.scss']\r\n})\r\nexport class DocumentsComponent implements AfterViewInit, OnChanges {\r\n @Input() files: PFile[];\r\n @Input() disabled: boolean;\r\n @Output() documentsInstance: EventEmitter<DocumentsComponent>;\r\n public documents: { name: string, value: PFileTypeEnum, loaded: boolean }[];\r\n private _files: PFile[];\r\n private readonly _newMedia: UserMedia[];\r\n\r\n constructor(\r\n private _visor: DocumentVisorService,\r\n private _snackBar: SnackBarService,\r\n private _http: HttpClient\r\n ) {\r\n this.documentsInstance = new EventEmitter<DocumentsComponent>();\r\n this.documents = ConstantsComponents.DocumentsList.map(doc => ({...doc}));\r\n this._newMedia = [];\r\n this._files = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.documentsInstance.emit(this);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['files'] && changes['files'].currentValue) {\r\n this._files = changes['files'].currentValue || [];\r\n this.validateDocumentsLoaded();\r\n }\r\n }\r\n\r\n getDocuments(): { documents: PFile[], newMedia: UserMedia[] } {\r\n return {documents: this._files, newMedia: this._newMedia};\r\n }\r\n\r\n openFile(type: PFileTypeEnum): void {\r\n const doc = this.getPFileByType(type);\r\n const media = this.getUserMediaByType(type);\r\n if (media) {\r\n this._visor.open(media.url);\r\n return;\r\n }\r\n if (doc) {\r\n this.openBlobFile(doc.fileCS.thumbnail);\r\n return;\r\n }\r\n if (!doc && !media) {\r\n this._snackBar.setMessage('Este documento no ha sido añadido', 'OK', 2500, 'left');\r\n }\r\n }\r\n\r\n onUploadFile(ev: UserMedia, doc: { name: string, value: PFileTypeEnum, loaded: boolean }): void {\r\n const name = doc.value.toString().toLowerCase();\r\n if (doc.loaded) {\r\n this.updateDocument(name);\r\n }\r\n doc.loaded = true;\r\n const file = new PFile();\r\n file.type = doc.value;\r\n ev.type = doc.value;\r\n file.media = false;\r\n const fileName = `${name}_${new Date().getTime()}.pdf`;\r\n file.name = fileName;\r\n ev.name = fileName;\r\n file.fileCS = {\r\n thumbnail: ev.url,\r\n blobName: null\r\n };\r\n this._files.push(file);\r\n this._newMedia.push(ev);\r\n }\r\n\r\n private openBlobFile(url: string): void {\r\n this.downloadFile(url)\r\n .subscribe((response) => {\r\n this._visor.open(response);\r\n });\r\n }\r\n\r\n private updateDocument(name: string): void {\r\n let i = -1, file: PFile = null;\r\n this._files.forEach((item, index) => {\r\n if (item.name === name) {\r\n file = item;\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._files.splice(i, 1);\r\n }\r\n if (file) {\r\n i = -1;\r\n this._newMedia.forEach((item, index) => {\r\n if (item.name === file.name) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n }\r\n }\r\n\r\n private validateDocumentsLoaded(): void {\r\n if (!this._files || this._files.length === 0) {\r\n return;\r\n }\r\n this._files.forEach((file) => this.documents.forEach(doc => {\r\n if (doc.value === file.type) {\r\n doc.loaded = true;\r\n }\r\n }));\r\n }\r\n\r\n private getPFileByType(type: PFileTypeEnum): PFile {\r\n let result = null;\r\n if (!this.files || this.files.length === 0) {\r\n return result;\r\n }\r\n this.files.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private getUserMediaByType(type: PFileTypeEnum): UserMedia {\r\n let result = null;\r\n if (!this._newMedia || this._newMedia.length === 0) {\r\n return result;\r\n }\r\n this._newMedia.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private downloadFile(url: string): Observable<string> {\r\n return this._http.get(url, {\r\n responseType: 'arraybuffer'\r\n }).pipe(map((payload) => {\r\n const blob = new Blob([payload], {\r\n type: 'application/pdf'\r\n });\r\n return URL.createObjectURL(blob);\r\n }));\r\n }\r\n}\r\n","import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\r\nimport {NewProperty} from '@maplander/types';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';\r\n\r\n\r\n@Component({\r\n selector: 'lib-property-details',\r\n templateUrl: './details.component.html',\r\n styleUrls: ['./details.component.scss']\r\n})\r\nexport class DetailsComponent implements OnInit, OnChanges {\r\n @Input() record: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Input() visibleTour: boolean;\r\n public amenities: AmenityItem[];\r\n public features: AmenityItem[];\r\n public propertyType: PropertyTypeItem;\r\n public agreementEndDate: number;\r\n\r\n constructor(\r\n private _sanitizer: DomSanitizer\r\n ) {\r\n this.amenities = [];\r\n this.features = [];\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.property = changes['property'].currentValue;\r\n this.searchPropertyType();\r\n this.createAmenities();\r\n this.createFeatures();\r\n this.validateAgreement();\r\n }\r\n }\r\n\r\n getTourUrl(): SafeResourceUrl {\r\n return this._sanitizer.bypassSecurityTrustResourceUrl(this.property.externalLink);\r\n }\r\n\r\n private validateAgreement(): void {\r\n if (this.property.propertyInfo.listingAgreementStartDate && this.property.propertyInfo.listingAgreementTime) {\r\n const startDate = new MDate(this.property.propertyInfo.listingAgreementStartDate).toDate();\r\n startDate.setDate(startDate.getDate() + this.property.propertyInfo.listingAgreementTime);\r\n this.agreementEndDate = MDate.getTimestamp(startDate);\r\n }\r\n }\r\n\r\n private searchPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (this.property.type === type.value) {\r\n this.propertyType = type;\r\n }\r\n });\r\n }\r\n\r\n private createAmenities(): void {\r\n this.amenities = [];\r\n let amenities: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n amenities = type.amenities;\r\n }\r\n });\r\n if (amenities.length > 0) {\r\n amenities.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.amenities.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private createFeatures(): void {\r\n this.features = [];\r\n let features: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n features = type.features;\r\n }\r\n });\r\n if (features.length > 0) {\r\n features.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.features.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component, ContentChild,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n SimpleChanges, TemplateRef,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {PFile} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-property-slide-show',\r\n templateUrl: './slide-show.component.html',\r\n styleUrls: ['./slide-show.component.scss']\r\n})\r\nexport class SlideShowComponent implements OnChanges, AfterViewInit {\r\n\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() customActions: TemplateRef<any>;\r\n @ViewChild('slider', {static: true}) private _slider: ElementRef;\r\n @Input() multimedia: PFile[];\r\n @Input() selectIndex: number;\r\n @Input() initialIndex: number;\r\n @Output() currentIndex: EventEmitter<number>;\r\n public count: number;\r\n public index: number;\r\n\r\n constructor(\r\n private _render: Renderer2\r\n ) {\r\n this.currentIndex = new EventEmitter<number>();\r\n this.index = this.initialIndex || 0;\r\n this.multimedia = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.currentIndex.emit(this.index);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['selectIndex'] && (changes['selectIndex'].currentValue !== undefined && changes['selectIndex'].currentValue !== null)) {\r\n this.moveImageByIndex(changes['selectIndex'].currentValue);\r\n }\r\n if (changes['multimedia'] && changes['multimedia'].currentValue) {\r\n this.multimedia = changes['multimedia'].currentValue || [];\r\n if (this.multimedia.length > 0) {\r\n this.count = this.multimedia.length;\r\n this.moveImageByIndex(this.initialIndex || 0);\r\n this.validateHTTPS();\r\n }\r\n }\r\n }\r\n\r\n moveImage(next?: boolean): void {\r\n this.index = next ? this.index + 1 : this.index - 1;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n moveImageByIndex(index: number): void {\r\n this.index = index;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n private validateHTTPS(): void {\r\n this.multimedia.forEach(item => {\r\n if (item.fileCS.thumbnail.indexOf('https') === -1) {\r\n item.fileCS.thumbnail = item.fileCS.thumbnail.replace('http', 'https');\r\n }\r\n });\r\n }\r\n}\r\n","import {NativeDateAdapter} from '@angular/material/core';\r\n\r\nexport class CustomDateAdapter extends NativeDateAdapter {\r\n format(date: Date, displayFormat: Object): string {\r\n return date.getFullYear().toString();\r\n }\r\n}\r\n","import {ChangeDetectorRef, Component, Inject, OnDestroy} from '@angular/core';\r\nimport {MatCalendar} from '@angular/material/datepicker';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {Subject} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker-header',\r\n templateUrl: './custom-datepicker-header.component.html',\r\n styleUrls: ['./custom-datepicker-header.component.scss']\r\n})\r\nexport class CustomDatepickerHeaderComponent<D> implements OnDestroy {\r\n\r\n private _destroyed = new Subject<void>();\r\n\r\n constructor(\r\n private _calendar: MatCalendar<D>, private _dateAdapter: DateAdapter<D>,\r\n @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats, cdr: ChangeDetectorRef) {\r\n _calendar.stateChanges\r\n .pipe(takeUntil(this._destroyed))\r\n .subscribe(() => cdr.markForCheck());\r\n }\r\n\r\n ngOnDestroy() {\r\n this._destroyed.next();\r\n this._destroyed.complete();\r\n }\r\n\r\n get periodLabel(): string {\r\n const currentDate = this._dateAdapter\r\n .format(this._calendar.activeDate, 'YYYY');\r\n return `${Number(currentDate) - 23} - ${currentDate}`;\r\n }\r\n\r\n previousClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, -23);\r\n }\r\n\r\n nextClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, 23);\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, forwardRef, Injector} from '@angular/core';\r\nimport {MatDatepicker} from '@angular/material/datepicker';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\nimport {CustomDateAdapter} from '../date-adapter';\r\nimport {CustomDatepickerHeaderComponent} from '../custom-datepicker-header/custom-datepicker-header.component';\r\n\r\nconst MY_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'LL'\r\n },\r\n display: {\r\n dateInput: 'YYYY',\r\n monthYearLabel: 'YYYY',\r\n dateA11yLabel: 'YYYY',\r\n monthYearA11yLabel: 'YYYY'\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker',\r\n templateUrl: './custom-datepicker.component.html',\r\n styleUrls: ['./custom-datepicker.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomDatepickerComponent),\r\n multi: true\r\n },\r\n {\r\n provide: MAT_DATE_FORMATS,\r\n useValue: MY_DATE_FORMATS\r\n },\r\n {\r\n provide: DateAdapter,\r\n useClass: CustomDateAdapter\r\n }\r\n ]\r\n})\r\nexport class CustomDatepickerComponent implements ControlValueAccessor, AfterViewInit {\r\n\r\n public currentYear: Date;\r\n public year: string;\r\n public customHeader = CustomDatepickerHeaderComponent;\r\n private _control: NgControl;\r\n\r\n constructor(\r\n private _injector: Injector\r\n ) {\r\n this.currentYear = new Date();\r\n this.year = '';\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._control = this._injector.get(NgControl);\r\n this._control.valueAccessor = this;\r\n }\r\n\r\n onYearSelected(ev: any, datepicker: MatDatepicker<Date>) {\r\n datepicker.close();\r\n this.year = ev;\r\n this._control.control.patchValue(ev);\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (value !== undefined) {\r\n this.year = value;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CustomDatepickerComponent } from './custom-datepicker/custom-datepicker.component';\r\nimport {CustomDatepickerHeaderComponent} from './custom-datepicker-header/custom-datepicker-header.component';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\n\r\nconst MATERIAL = [\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatDatepickerModule,\r\n MatButtonModule,\r\n MatIconModule\r\n];\r\n\r\nconst COMPONENTS = [\r\n CustomDatepickerComponent,\r\n CustomDatepickerHeaderComponent\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL\r\n ],\r\n declarations: [\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n CustomDatepickerHeaderComponent\r\n ],\r\n exports: [\r\n CustomDatepickerComponent\r\n ]\r\n})\r\nexport class CustomDatepickerModule { }\r\n","import {AfterViewInit, Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild} from '@angular/core';\r\nimport {CdkDrag, CdkDragMove, CdkDropList, CdkDropListGroup, moveItemInArray} from '@angular/cdk/drag-drop';\r\nimport {ViewportRuler} from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: 'lib-custom-drag-and-drop',\r\n templateUrl: './custom-drag-and-drop.component.html',\r\n styleUrls: ['./custom-drag-and-drop.component.scss']\r\n})\r\nexport class CustomDragAndDropComponent implements OnInit, AfterViewInit {\r\n @ViewChild(CdkDropListGroup, {static: true}) listGroup: CdkDropListGroup<CdkDropList>;\r\n @ViewChild(CdkDropList, {static: true}) placeholder: CdkDropList;\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() content: TemplateRef<any>;\r\n @Input() items: any[];\r\n @Output() itemsChanged: EventEmitter<any[]>;\r\n public target: CdkDropList;\r\n public targetIndex: number;\r\n public source: CdkDropList;\r\n public sourceIndex: number;\r\n public activeContainer;\r\n public dropListEnterPredicate: Function;\r\n\r\n constructor(private _viewportRuler: ViewportRuler) {\r\n this.itemsChanged = new EventEmitter<any[]>();\r\n this.target = null;\r\n this.source = null;\r\n this.dropListEnterPredicate = (drag: CdkDrag, drop: CdkDropList) => {\r\n if (drop === this.placeholder) {\r\n return true;\r\n }\r\n if (drop !== this.activeContainer) {\r\n return false;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const sourceElement = drag.dropContainer.element.nativeElement;\r\n const dropElement = drop.element.nativeElement;\r\n const dragIndex = __indexOf(dropElement.parentElement.children, (this.source ? phElement : sourceElement));\r\n const dropIndex = __indexOf(dropElement.parentElement.children, dropElement);\r\n if (!this.source) {\r\n this.sourceIndex = dragIndex;\r\n this.source = drag.dropContainer;\r\n phElement.style.width = sourceElement.clientWidth + 'px';\r\n phElement.style.height = sourceElement.clientHeight + 'px';\r\n sourceElement.parentElement.removeChild(sourceElement);\r\n }\r\n this.targetIndex = dropIndex;\r\n this.target = drop;\r\n phElement.style.display = '';\r\n dropElement.parentElement.insertBefore(phElement, (dropIndex > dragIndex\r\n ? dropElement.nextSibling : dropElement));\r\n this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);\r\n return false;\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const phElement = this.placeholder.element.nativeElement;\r\n phElement.style.display = 'none';\r\n phElement.parentElement.removeChild(phElement);\r\n }\r\n\r\n dragMoved(e: CdkDragMove) {\r\n const point = this.getPointerPositionOnPage(e.event);\r\n this.listGroup._items.forEach(dropList => {\r\n if (__isInsideDropListClientRect(dropList, point.x, point.y)) {\r\n this.activeContainer = dropList;\r\n return;\r\n }\r\n });\r\n }\r\n\r\n dropListDropped(): void {\r\n if (!this.target) {\r\n return;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const parent = phElement.parentElement;\r\n phElement.style.display = 'none';\r\n parent.removeChild(phElement);\r\n parent.appendChild(phElement);\r\n parent.insertBefore(this.source.element.nativeElement, parent.children[this.sourceIndex]);\r\n this.target = null;\r\n this.source = null;\r\n if (this.sourceIndex !== this.targetIndex) {\r\n moveItemInArray(this.items, this.sourceIndex, this.targetIndex);\r\n this.itemsChanged.emit(this.items);\r\n }\r\n }\r\n\r\n /** Determines the point of the page that was touched by the user. */\r\n getPointerPositionOnPage(event: MouseEvent | TouchEvent): any {\r\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\r\n const point = __isTouchEvent(event) ? (event.touches[0] || event.changedTouches[0]) : event;\r\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\r\n return {\r\n x: point.pageX - scrollPosition.left,\r\n y: point.pageY - scrollPosition.top\r\n };\r\n }\r\n}\r\n\r\nfunction __indexOf(collection, node) {\r\n return Array.prototype.indexOf.call(collection, node);\r\n}\r\n\r\n/** Determines whether an event is a touch event. */\r\nfunction __isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\r\n return event.type.startsWith('touch');\r\n}\r\n\r\nfunction __isInsideDropListClientRect(dropList: CdkDropList, x: number, y: number) {\r\n const {top, bottom, left, right} = dropList.element.nativeElement.getBoundingClientRect();\r\n return y >= top && y <= bottom && x >= left && x <= right;\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {EditorComponent} from './components/editor/editor.component';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {OwnerInfoComponent} from './components/owner-info/owner-info.component';\r\nimport {DocumentsComponent} from './components/documents/documents.component';\r\nimport {\r\n CountryCodeModule,\r\n DialogModule,\r\n LocationModule,\r\n SafeUrlModule, ShareModule,\r\n StringManipulationModule,\r\n UploadFileModule\r\n} from '@maplander/shared';\r\nimport {SnackBarModule} from '@maplander/core';\r\nimport {PropertyComponent} from './components/property/property.component';\r\nimport {DetailsComponent} from './components/details/details.component';\r\nimport {SlideShowComponent} from './components/slideshow/slide-show.component';\r\nimport {MultimediaUploaderComponent} from './components/multimedia-uploader/multimedia-uploader.component';\r\nimport {AnnounceConfirmComponent} from './components/announce-confirm/announce-confirm.component';\r\nimport {MultimediaUploaderService} from './components/multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from './components/announce-confirm/announce-confirm.service';\r\nimport {CustomDatepickerModule} from './components/editor/components/custom-datepicker/custom-datepicker.module';\r\nimport {DocumentVisorModule} from '../document-visor/document-visor.module';\r\nimport {PanoramaVisorModule} from '../panorama-visor/panorama-visor.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from '../../pipes/property-type/property-type.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatCheckboxModule} from '@angular/material/checkbox';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatRadioModule} from '@angular/material/radio';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatSidenavModule} from '@angular/material/sidenav';\r\nimport {MatTabsModule} from '@angular/material/tabs';\r\nimport {MatToolbarModule} from '@angular/material/toolbar';\r\nimport {MatNativeDateModule, MatRippleModule} from '@angular/material/core';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\nimport {EcoFabSpeedDialModule} from '@ecodev/fab-speed-dial';\r\nimport {FormatPriceModule} from '../../directives/format-price/format-price.module';\r\nimport {DragDropModule} from '@angular/cdk/drag-drop';\r\nimport { CustomDragAndDropComponent } from './components/custom-drag-and-drop/custom-drag-and-drop.component';\r\nimport {GalleryComponent} from './components/gallery/gallery.component';\r\nimport {GalleryService} from './components/gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from './token';\r\nimport { StatsComponent } from './components/stats/stats.component';\r\nimport {StatsService} from './components/stats/stats.service';\r\n\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatIconModule,\r\n MatButtonToggleModule,\r\n MatRadioModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatTabsModule,\r\n MatDatepickerModule,\r\n MatTooltipModule,\r\n MatRippleModule,\r\n MatNativeDateModule,\r\n DragDropModule\r\n];\r\n\r\nconst PAGES = [\r\n PropertyComponent\r\n];\r\n\r\nconst COMPONENTS = [\r\n DetailsComponent,\r\n EditorComponent,\r\n OwnerInfoComponent,\r\n SlideShowComponent,\r\n DocumentsComponent,\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n CustomDragAndDropComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst ENTRY_COMPONENTS = [\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst PROVIDERS = [\r\n MultimediaUploaderService,\r\n AnnounceConfirmService,\r\n CurrencyPipe,\r\n GalleryService,\r\n StatsService\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL,\r\n EcoFabSpeedDialModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n UploadFileModule,\r\n DocumentVisorModule.forChild(),\r\n OfferingTypeModule.forChild(),\r\n PropertyTypeModule.forChild(),\r\n SafeUrlModule.forChild(),\r\n StringManipulationModule.forChild(),\r\n FormatDateModule.forChild(),\r\n FormatPriceModule.forChild(),\r\n ShareModule.forChild(),\r\n PanoramaVisorModule,\r\n CountryCodeModule,\r\n LocationModule,\r\n DialogModule,\r\n CustomDatepickerModule,\r\n SnackBarModule.forRoot()\r\n ],\r\n declarations: [\r\n PAGES,\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n ENTRY_COMPONENTS\r\n ],\r\n exports: [\r\n PropertyComponent\r\n ],\r\n providers: [\r\n PROVIDERS\r\n ]\r\n})\r\nexport class PropertyModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_CARD_CONFIG_MODULE = new InjectionToken<boolean>('PROPERTY CARD CONFIG MODULE');\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, Optional, Output, SimpleChanges, OnInit} from '@angular/core';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\n\r\n@Component({\r\n selector: 'lib-property-card',\r\n templateUrl: './property-card.component.html',\r\n styleUrls: ['./property-card.component.scss']\r\n})\r\nexport class PropertyCardComponent implements OnChanges, OnInit {\r\n @Input() marker: Marker;\r\n @Input() href: string;\r\n @Input() target: string;\r\n @Input() queryParams: {\r\n [k: string]: any;\r\n };\r\n @Input() state: {\r\n [k: string]: any;\r\n };\r\n @Input() showAlert: boolean;\r\n @Input() positionLatLng: any;\r\n @Input() isFavorite: boolean;\r\n @Input() currency: string;\r\n @Input() showDiscard: boolean;\r\n @Input() mode: 'full' | 'summary' = 'full';\r\n @Output() markerChanged: EventEmitter<Marker>;\r\n @Output() favoriteChanged: EventEmitter<string>;\r\n @Output() propertyDiscarded: EventEmitter<string>;\r\n public info: PropertyCardInfo;\r\n public distance: any;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_CARD_CONFIG_MODULE) public isOPI: boolean,\r\n ) {\r\n this.currency = null;\r\n this.markerChanged = new EventEmitter<Marker>();\r\n this.favoriteChanged = new EventEmitter<string>();\r\n this.propertyDiscarded = new EventEmitter<string>();\r\n }\r\n\r\n ngOnInit() {\r\n if (this.positionLatLng) {\r\n this.latLng(this.positionLatLng.latitude, this.positionLatLng.longitude);\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n this.currency = changes['currency'].currentValue !== 'MXN' ? changes['currency'].currentValue : null;\r\n }\r\n if (changes['marker'] && changes['marker'].currentValue) {\r\n this.info = changes['marker'].currentValue.info;\r\n }\r\n }\r\n\r\n onFrontImageOver(): void {\r\n this.marker.hover = true;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n onFrontImageLeave(): void {\r\n this.marker.hover = false;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n favorite(): void {\r\n this.favoriteChanged.emit(this.info.propertyId);\r\n }\r\n\r\n discard(): void {\r\n this.propertyDiscarded.emit(this.info.propertyId);\r\n }\r\n\r\n private deg2rad(deg): any {\r\n return deg * (Math.PI / 180 );\r\n }\r\n\r\n private latLng(lat: any, lng: any): void {\r\n const lat1 = lat;\r\n const lon1 = lng;\r\n const lat2 = this.marker.location.latitude;\r\n const lon2 = this.marker.location.longitude;\r\n const R = 6371; // Radius of the earth in km\r\n const dLat = this.deg2rad(lat2 - lat1 ); // deg2rad below\r\n const dLon = this.deg2rad(lon2 - lon1 );\r\n const a =\r\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2)\r\n ;\r\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n let d = R * c; // Distance in km\r\n if (Math.trunc(d) < 1) {\r\n d = d * 1000;\r\n d = Math.trunc(d);\r\n if (d < 10) {\r\n this.distance = 10 + ' m de su búsqueda';\r\n } else {\r\n d = d - (d % 10);\r\n this.distance = d + ' m de su búsqueda';\r\n }\r\n } else {\r\n this.distance = d.toFixed(2) + ' km de su búsqueda';\r\n }\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {PropertyCardComponent} from './property-card.component';\r\nimport {RouterModule} from '@angular/router';\r\nimport {OfferingTypeModule} from './../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from './../../pipes/property-type/property-type.module';\r\nimport {ImageErrorModule} from './../../directives/image-error/image-error.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n PropertyTypeModule,\r\n OfferingTypeModule,\r\n ImageErrorModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n FormatDateModule\r\n ],\r\n declarations: [\r\n PropertyCardComponent\r\n ],\r\n exports: [\r\n PropertyCardComponent\r\n ]\r\n})\r\nexport class PropertyCardModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyCardModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_CARD_CONFIG_MODULE,\r\n useValue: isOPI\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {\r\n Address,\r\n CER,\r\n Currency,\r\n GeoPt,\r\n NewPropertyLite,\r\n NewPropertyLiteSuggest,\r\n OfferingTypeEnum,\r\n PropertyTypeEnum\r\n} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\nimport {PropertyTypeItem} from '../../utils/models/property-type-item';\r\nimport {OfferingTypePipe} from '../../pipes/offering-type/offering-type.pipe';\r\nimport {PropertyTypePipe} from '../../pipes/property-type/property-type.pipe';\r\nimport {Utils} from '../../utils';\r\nimport {CurrencyConverterService} from '../currency-converter/currency-converter.service';\r\n\r\ndeclare var google: any;\r\n\r\n@Injectable()\r\nexport class MarkersService {\r\n\r\n constructor(\r\n private _propertyTypePipe: PropertyTypePipe,\r\n private _offeringTypePipe: OfferingTypePipe,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n }\r\n\r\n private static getPropertyTypeItemByType(type: PropertyTypeEnum): PropertyTypeItem {\r\n let item: PropertyTypeItem = null;\r\n ConstantsComponents.PropertyTypeList.forEach((element) => {\r\n if (element.value === type) {\r\n item = element;\r\n }\r\n });\r\n return item;\r\n }\r\n\r\n private static validatePropertyInFavorites(propertyId: string, favorites: NewPropertyLite[]): boolean {\r\n let result = false;\r\n for (let i = 0; i < favorites.length; i++) {\r\n if (propertyId === favorites[i].id) {\r\n result = true;\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n private static calculateLocationFrom(location: GeoPt, bearingInRadians: number, distanceInMetres: number): GeoPt {\r\n const coordinateLatitudeInRadians = location.latitude * Math.PI / 180;\r\n const coordinateLongitudeInRadians = location.longitude * Math.PI / 180;\r\n const distanceComparedToEarth = distanceInMetres / 6378100.0;\r\n const resultLatitudeInRadians = Math.asin(Math.sin(coordinateLatitudeInRadians) * Math.cos(distanceComparedToEarth) +\r\n Math.cos(coordinateLatitudeInRadians) * Math.sin(distanceComparedToEarth) * Math.cos(bearingInRadians));\r\n const resultLongitudeInRadians = coordinateLongitudeInRadians + Math.atan2(Math.sin(bearingInRadians) *\r\n Math.sin(distanceComparedToEarth) * Math.cos(coordinateLatitudeInRadians), Math.cos(distanceComparedToEarth) -\r\n Math.sin(coordinateLatitudeInRadians) * Math.sin(resultLatitudeInRadians));\r\n const newCoordinates: any = {};\r\n newCoordinates.latitude = resultLatitudeInRadians * 180 / Math.PI;\r\n newCoordinates.longitude = resultLongitudeInRadians * 180 / Math.PI;\r\n return newCoordinates;\r\n }\r\n\r\n buildURL(config: {\r\n propertyId: string,\r\n offering: OfferingTypeEnum,\r\n propertyType: PropertyTypeEnum,\r\n address: Address\r\n }): string {\r\n const colony = config.address.colony ? config.address.colony.replace(/[\\])}[{(]/g, '') : '';\r\n const city = config.address.city ? config.address.city.replace(/[\\])}[{(]/g, '') : '';\r\n let url = 'property/';\r\n url += `${this._propertyTypePipe.transform(config.propertyType, true)}-`;\r\n url += `${this._offeringTypePipe.transform(config.offering, ' ').replace(/ /g, '')}-`;\r\n url += colony ? `${colony.replace(/\\//g, '-')}-` : '';\r\n url += city ? `${city.replace(/\\//g, '-')}-` : '';\r\n url += config.propertyId;\r\n url = Utils.removeDiacritics(url).replace(/ /g, '-').toLowerCase();\r\n return url;\r\n }\r\n\r\n validatePropertiesInPoly(properties: Marker[], paths: any[]): Marker[] {\r\n const polygon = new google.maps.Polygon({paths: paths});\r\n if (properties && properties.length > 0) {\r\n properties.map((el: Marker) => {\r\n el.extras['showInPolygon'] = false;\r\n const customLatLng = new google.maps.LatLng(el.location.latitude, el.location.longitude);\r\n if (google.maps.geometry.poly.containsLocation(customLatLng, polygon)) {\r\n el.extras['showInPolygon'] = true;\r\n return el;\r\n } else {\r\n el.extras['showInPolygon'] = false;\r\n return el;\r\n }\r\n });\r\n properties = properties.filter((e) => {\r\n if (e.extras['showInPolygon']) {\r\n return e;\r\n }\r\n });\r\n return properties;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n markersToCurrency(markers: Marker[], toCurrency: Currency, currencies: CER[]): Marker[] {\r\n markers = markers.map<Marker>(item => {\r\n if (Currency[item.info.currency] !== toCurrency) {\r\n item.info.price = this._converter.number(item.info.price, currencies, Currency[item.info.currency], toCurrency);\r\n item.info.currency = toCurrency.toString();\r\n }\r\n return item;\r\n });\r\n return markers;\r\n }\r\n\r\n buildMarkers(entities: NewPropertyLite[] | NewPropertyLiteSuggest[], favorites?: NewPropertyLite[]): Marker[] {\r\n const markers: Marker[] = [];\r\n entities.forEach((entity) => {\r\n const m: Marker = {\r\n location: entity.address.location,\r\n hover: false,\r\n visited: false,\r\n type: MarkersService.getPropertyTypeItemByType(entity.type),\r\n info: this.createPropertyInfoCard(entity),\r\n isFavorite: false,\r\n extras: {}\r\n };\r\n if (entity instanceof NewPropertyLite) {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.id, favorites) : false;\r\n } else {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.propertyId, favorites) : false;\r\n }\r\n markers.push(m);\r\n });\r\n return markers;\r\n }\r\n\r\n buildSpider(list: Marker[]): { markers: Marker[], polyLines: any[] } {\r\n const response = {markers: [], polyLines: []};\r\n list.map((el) => {\r\n el.extras['repeat'] = false;\r\n const size = list.filter(item => {\r\n return el.location.latitude === item.location.latitude && el.location.longitude === item.location.longitude;\r\n });\r\n const distance = 12 * size.length / 2.0;\r\n const radiansBetweenAnnotations = (Math.PI * 2) / size.length;\r\n if (!el.extras['repeat'] && size.length > 1) {\r\n const locationShare: any = Object.assign({}, el.location);\r\n for (let i = 0; i < size.length; i++) {\r\n const heading = radiansBetweenAnnotations * i;\r\n size[i]['repeat'] = true;\r\n const newLocation = MarkersService.calculateLocationFrom(locationShare, heading, distance);\r\n response.polyLines.push({\r\n path: [\r\n {\r\n latitude: Number(locationShare.latitude),\r\n longitude: Number(locationShare.longitude)\r\n },\r\n {\r\n latitude: Number(newLocation.latitude),\r\n longitude: Number(newLocation.longitude)\r\n }]\r\n });\r\n size[i].location = newLocation;\r\n }\r\n }\r\n return el;\r\n });\r\n response.markers = list;\r\n return response;\r\n }\r\n\r\n private createPropertyInfoCard(entity: NewPropertyLite | NewPropertyLiteSuggest): PropertyCardInfo {\r\n return {\r\n address: new Address(entity.address || null),\r\n authUsers: (entity instanceof NewPropertyLite) ? entity.authUsers : '',\r\n currency: entity.currency,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId,\r\n image: entity.image,\r\n offering: entity.offering,\r\n price: entity.price,\r\n type: entity.type,\r\n url: this.buildURL({\r\n address: entity.address,\r\n offering: entity.offering,\r\n propertyType: entity.type,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId\r\n }),\r\n status: (entity instanceof NewPropertyLite) ? entity.status : null,\r\n features: (entity instanceof NewPropertyLite) ? entity.features : null,\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MarkersService} from './markers.service';\r\nimport {CurrencyConverterModule} from '../currency-converter/currency-converter.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CurrencyConverterModule.forChild()\r\n ]\r\n})\r\nexport class MarkersModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkersModule,\r\n providers: [\r\n MarkersService\r\n ]\r\n };\r\n }\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@maplander/components/lib/pipes/address/address-format.pipe.ts","ng://@maplander/components/lib/pipes/address/address-format.module.ts","ng://@maplander/components/lib/utils/classes/filters-wrapper.ts","ng://@maplander/components/lib/utils/classes/mDate.ts","ng://@maplander/components/lib/pipes/format-date/format-date.pipe.ts","ng://@maplander/components/lib/pipes/format-date/format-date.module.ts","ng://@maplander/components/lib/utils/enums/amenity-name.ts","ng://@maplander/components/lib/constantsComponents.ts","ng://@maplander/components/lib/utils.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.pipe.ts","ng://@maplander/components/lib/pipes/marker-price/marker-price.module.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.pipe.ts","ng://@maplander/components/lib/pipes/offering-type/offering-type.module.ts","ng://@maplander/components/lib/pipes/property-type/property-type.pipe.ts","ng://@maplander/components/lib/pipes/property-type/property-type.module.ts","ng://@maplander/components/lib/directives/format-price/format-price.directive.ts","ng://@maplander/components/lib/directives/format-price/format-price.module.ts","ng://@maplander/components/lib/directives/image-error/image-error.directive.ts","ng://@maplander/components/lib/directives/image-error/image-error.module.ts","ng://@maplander/components/lib/components/document-visor/document-visor.component.ts","ng://@maplander/components/lib/components/document-visor/document-visor.service.ts","ng://@maplander/components/lib/components/document-visor/document-visor.module.ts","ng://@maplander/components/lib/utils/enums/filter-chip-type.ts","ng://@maplander/components/lib/utils/enums/filters-change-type.ts","ng://@maplander/components/lib/components/filters/token.ts","ng://@maplander/components/lib/components/filters/filters.service.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.component.ts","ng://@maplander/components/lib/components/fab-filters/fab-filters.module.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.service.ts","ng://@maplander/components/lib/utils/classes/mUtils.ts","ng://@maplander/components/lib/components/property/validators/remove-error.ts","ng://@maplander/components/lib/components/filters/filters.component.ts","ng://@maplander/components/lib/components/property/validators/currency-filter-validator.ts","ng://@maplander/components/lib/services/currency-converter/currency-converter.module.ts","ng://@maplander/components/lib/components/filters/filters.module.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.component.ts","ng://@maplander/components/lib/components/panorama-visor/panorama-visor.module.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.component.ts","ng://@maplander/components/lib/components/property/components/multimedia-uploader/multimedia-uploader.service.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.component.ts","ng://@maplander/components/lib/components/property/components/announce-confirm/announce-confirm.service.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.component.ts","ng://@maplander/components/lib/components/property/components/gallery/gallery.service.ts","ng://@maplander/components/lib/components/property/token.ts","ng://@maplander/components/lib/components/property/components/stats/stats.component.ts","ng://@maplander/components/lib/components/property/components/stats/stats.service.ts","ng://@maplander/components/lib/components/property/components/property/property.component.ts","ng://@maplander/components/lib/components/property/validators/property-editor-validators.ts","ng://@maplander/components/lib/components/property/components/editor/editor.component.ts","ng://@maplander/components/lib/components/property/validators/phone-fields-validator.ts","ng://@maplander/components/lib/components/property/components/owner-info/owner-info.component.ts","ng://@maplander/components/lib/components/property/components/documents/documents.component.ts","ng://@maplander/components/lib/components/property/components/details/details.component.ts","ng://@maplander/components/lib/components/property/components/slideshow/slide-show.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/date-adapter.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker-header/custom-datepicker-header.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker/custom-datepicker.component.ts","ng://@maplander/components/lib/components/property/components/editor/components/custom-datepicker/custom-datepicker.module.ts","ng://@maplander/components/lib/components/property/components/custom-drag-and-drop/custom-drag-and-drop.component.ts","ng://@maplander/components/lib/components/property/property.module.ts","ng://@maplander/components/lib/components/property-card/token.ts","ng://@maplander/components/lib/components/property-card/property-card.component.ts","ng://@maplander/components/lib/components/property-card/property-card.module.ts","ng://@maplander/components/lib/services/markers/markers.service.ts","ng://@maplander/components/lib/services/markers/markers.module.ts"],"names":["extendStatics","Object","setPrototypeOf","__proto__","Array","d","b","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","prototype","call","AddressFormatPipe","transform","value","long","country","result","language","street","colony","postalCode","city","state","Pipe","args","name","AddressFormatModule","forChild","ngModule","providers","NgModule","imports","CommonModule","declarations","exports","FiltersWrapper","component","this","_component","open","close","MDate","date","_timestamp","toString","getTimestamp","time","timestamp","getHours","getMinutes","getSeconds","Number","getFullYear","getMonth","getDate","slice","getWeekDayName","day","toLowerCase","getMonthName","month","toDate","cDate","getYear","getMoth","getDay","cTime","Date","getFormat","format","_a","_b","_c","_d","_e","format12Hours","FormatDatePipe","mDate","FormatDateModule","AdjacentCommerce","AdjacentGym","AdjacentPicnic","AirConditioner","Balcony","CustomerParking","DiningRoom","DoubleHeight","DressingRooms","FacingStreet","Finishings","Furnished","Garden","Gym","HighResistanceFloors","HighSpeedInternet","InCommercialArea","InIndustrialPark","InShoppingCenter","Jacuzzi","KitchenServices","MaidsBathroom","ManeuverArea","MeetingRoom","Mezzanine","MixedBuilding","NaturalLighting","Offices","OpenSpace","Platforms","Playground","Playroom","Pool","RailSpur","RailYard","Reception","SecurityGuard","Storage","VisitorParking","NearPublicTransportation","NearShops","OnBusyRoad","CountrySide","Downtown","GoodReachableTraffic","NearFitnessCentre","NearHighway","NearHospital","NearPark","NearSchools","OnQuietRoad","RoofGarden","PetFriendly","DifferentAbilities","ConstantsComponents","Amenities","roofGarden","checked","iconName","AmenityName","petFriendly","differentAbilities","adjacentCommerce","adjacentGym","adjacentPicnic","airConditioner","balcony","customerParking","diningRoom","doubleHeight","dressingRooms","facingStreet","finishings","furnished","garden","gym","highResistanceFloors","highSpeedInternet","inCommercialArea","inIndustrialPark","inShoppingCenter","jacuzzi","kitchenServices","maidsBathroom","maneuverArea","meetingRoom","mezzanine","mixedBuilding","naturalLighting","offices","openSpace","platforms","playground","playroom","pool","railSpur","railyard","reception","securityGuard","storage","visitorParking","features","DurationList","CommissionList","SALE","RENT","SharedCommissionList","LandUseList","LandUseEnum","SINGLE_FAMILY_HOUSING","MULTI_FAMILY_HOUSING","HOUSING_WITH_COMMERCE","HOUSING_WITH_OFFICE","MIXED_HOUSING","COMMERCE","OFFICE","SERVICES","INDUSTRY","AGRICULTURAL","OTHER","AnnounceCheckList","DocumentsList","PFileTypeEnum","DEED","loaded","OWNER_ID","WATER_BILL","ELECTRICITY_BILL","PROPERTY_BILL","CONSTANCY_OF_NO_DEBT","EXEMPTION_TAX","BUILDING_LICENSE","COMPLETION_OF_CONSTRUCTION","ALIGNMENT_AND_OFFICIAL_NUMBER","MORTGAGE","BedroomList","BathroomList","ParkingSpacesList","SurfaceList","ROIList","PropertyTypeList","PropertyTypeEnum","HOUSE","shortName","amenities","RESIDENTIAL","APARTMENT","ROOM","RETAIL","WAREHOUSE","LAND","INVESTMENT","NONE","OfferingTypeList","OfferingTypeEnum","LocateList","USD","locate","currency","MXN","GBP","EUR","BRL","CNY","PropertyStatusList","icon","StatusTypeEnum","ANNOUNCED","EXPIRED","HIDDEN","READY","DRAFT","Utils","round","precision","multiplier","Math","pow","getFilterByPropertyType","filter","type","offering","distance","location","latitude","longitude","upLimitPrice","downLimitPrice","bathrooms","exclusivity","bedrooms","parkingPlaces","extras","mainArea","roi","mls","getInitialFilter","isOPI","listErrorsByPropertyTypeForPublish","errorField","concat","getErrorsForPublish","property","price","description","image","secondaryArea","removeDiacritics","str","diacriticsMap","A","AA","AE","AO","AU","AV","AY","B","C","D","DZ","Dz","E","F","G","H","I","J","K","L","LJ","Lj","M","N","NJ","Nj","O","OI","OO","OU","P","Q","R","S","T","TZ","U","V","VY","W","X","Y","Z","a","aa","ae","ao","au","av","ay","c","dz","e","f","g","h","hv","j","k","l","lj","m","nj","o","oi","ou","oo","q","r","ss","tz","u","v","vy","w","x","y","z","Symbol","iterator","next","done","tslib_1.__values","keys","replace","MarkerPricePipe","outputPrice","toLocaleString","style","toFixed","MarkerPriceModule","OfferingTypePipe","prefix","response","forEach","OfferingTypeModule","PropertyTypePipe","PropertyTypeModule","FormatPriceDirective","_elRef","_currency","_subscription","Subscription","_el","nativeElement","removeError","control","error","err","errors","setErrors","ngOnChanges","changes","_this","currentValue","_value","validateFormatPrice","add","valueChanges","subscribe","ngAfterViewInit","addEventListener","onFocus","bind","onBlur","formatPrice","ngOnDestroy","unsubscribe","removeEventListener","event","target","isNaN","Directive","selector","ElementRef","CurrencyPipe","Input","FormatPriceModule","ImageErrorDirective","_ref","CDN_URL","constructor","HTMLImageElement","Error","_onError","updateUrl","typeImage","src","ImageErrorModule","DocumentVisorComponent","_data","_dialog","isBase64","btoa","atob","isURL","url","RegExp","test","ngOnInit","URL","revokeObjectURL","Component","template","Inject","MAT_DIALOG_DATA","MatDialogRef","DocumentVisorService","document","data","disableClose","panelClass","Injectable","MatDialog","MATERIAL","MatButtonModule","MatDialogModule","MatIconModule","DocumentVisorModule","SafeUrlModule","entryComponents","OFFERING","PROPERTY_TYPE","PRICE","BEDROOMS","BATHROOMS","PARKING_PLACES","SURFACE","AMENITIES","LISTING","APPLY","INIT","AREA","SAVE","LIST_TYPE","FILTERS_TOKEN","InjectionToken","FiltersService","_config","_startComponent","Subject","_notifier","BehaviorSubject","FiltersChangeType","ft","removeFiltersSaved","LocalStorageService","removeItem","FILTERS_SAVED_KEY","getFiltersSaved","getItem","saveFilters","config","setItem","filters","isSharedProperties","setChange","change","getChanges","asObservable","startComponent","wrapper","onStartComponent","Optional","FabFiltersComponent","_offeringPipe","_filtersService","METERS_TO_SQ","chips","filterDeleted","EventEmitter","_wrapper","init","openFilters","console","warn","onClickChip","FilterChipType","removeFilter","emit","sharedProperties","_filter","listingType","propertyType","offeringType","surface","push","text","mlsLabel","firstLetter","substr","toLocaleUpperCase","item","min","max","Output","FabFiltersModule","MatChipsModule","MatFormFieldModule","MatInputModule","CurrencyConverterService","list","prices","currencies","from","to","valueFrom","getValueByCurrency","valueTo","map","number","MUtils","linSpaceExp","start","stop","phi","log","length_1","log10","FiltersComponent","_render","_service","_formBuilder","_converter","filterChange","propertyTypeList","bedroomsList","bathroomsList","parkingPlacesList","surfaceList","roiList","surfaceUnitSelected","buildForm","initComponentByPropertyType","restoreLastFiltersSaved","listenChangesOnForm","openComponent","utils","initComponent","isRV","changePropertyType","index","resetFilters","applyAmenities","propertyTypeSelected","filtersForm","controls","setValue","changeFilter","getFilterByForm","changeOffering","ev","changeCurrency","changePrice","get","patchValue","minPrice","maxPrice","updateAmenity","amenity","indexOf","splice","saveSearchByFilters","applyFilters","filterToSearch","updateFiltersSaved","_isSharedProperties","propertyTypeItemIndex","updateFormByFilters","setPrices","controlName","controlName2","group","Validators","required","pattern","surfaceUnit","validator","peerControl","peerControl2","initUtils","currencyList","cers","reset","minPriceList","createPrices","limitPrice","Currency","maxPriceList","_tmpMinPriceList","_tmpMaxPriceList","propertyRanges","range","JSON","parse","stringify","filtersSaved","find","setStyle","difference","Renderer2","FormBuilder","CurrencyConverterModule","FiltersModule","provide","useValue","ReactiveFormsModule","FormsModule","MatRippleModule","MatSelectModule","MatButtonToggleModule","MatDividerModule","PanoramaVisorComponent","_lazy","checkTouchSupported","window","navigator","msMaxTouchPoints","undefined","load","then","setTimeout","showPanorama","catch","_panorama","dispose","_viewer","destroy","fullscreen","toggleFullscreen","changeControl","enableControl","PANOLENS","CONTROLS","ORBIT","requestPermissions","DEVICEORIENTATION","confirm","href","alert","changeMode","mode","disableEffect","enableEffect","MODES","CARDBOARD","STEREO","isTouch","ImagePanorama","Viewer","container","_container","controlBar","controlButtons","onWindowResize","offsetWidth","offsetHeight","doc","docEl","requestFullScreen","requestFullscreen","mozRequestFullScreen","webkitRequestFullScreen","msRequestFullscreen","cancelFullScreen","exitFullscreen","mozCancelFullScreen","webkitExitFullscreen","msExitFullscreen","fullscreenElement","mozFullScreenElement","webkitFullscreenElement","msFullscreenElement","isFullScreen","success","of","failed","DeviceMotionEvent","requestPermission","fromPromise","DeviceOrientationEvent","pipe","mergeMap","response2","LazyLoadService","ViewChild","static","PanoramaVisorModule","MatMenuModule","LazyLoaderModule","MultimediaUploaderComponent","currentType","IMAGE","fileType","currentIndex","SPHERIC","VIDEO","images","images360","videos","_newMedia","getYouTubeID","arr","split","parseMultimedia","onUploadImage","isArray","createImagePFile","createImage360PFile","onTabChanged","tab","onListChanged","position","removeMedia","id","fileCS","thumbnail","onYouTubeInputTextChanged","input","file","PFile","media","getTime","blobName","accept","multimedia","joinMultimediaTypes","newMedia","fileName","now","random","blob","MultimediaUploaderService","AnnounceConfirmComponent","_dialogRef","code","DialogResponseType","CANCEL","ACCEPT","AnnounceConfirmService","GalleryComponent","_breakpointObserver","getPFilesByType","sideOpened","indexSelected","typeSelected","count","sphere","video","observe","_mobileVersion","matches","assignCountByType","assignMultimediaByType","updateSideNav","selectPFile","onIndexSelectedChange","changePFileType","pFileType","BreakpointObserver","GalleryService","PROPERTY_TOKEN","StatsComponent","LeadInfo","decorators","StatsService","leadInfo","CREATE","UPDATE","ANNOUNCE","HIDE","SHOW","ADDRESS","OFFER","FAVORITE","REQUEST_INFO","SHARE","ARCHIVE","REAL_ESTATE_EXCHANGE","SHARE_COMMISSION","BROCHURE","POSTER","CLIENTS","BACK","SHOW_AGENTS","TARPS","PropertyComponent","_uploaderService","_announceService","_snackBar","_share","_gallery","_documentService","_statsService","sharedProperty","isShared","ownerAvailable","initCompleteProperty","modeChange","disableShareCommission","disableConfirmAnnounce","_allMultimedia","multimediaCount","completeProperty","NewCompleteProperty","validateMultimediaTypeCount","saveData","restoreFrontImageError","_editorInstance","validateFormInvalid","setMessage","parseDataByComponents","PropertyEventType","payload","agentActions","shareProperty","urlUser","userUrl","openGallery","goToStats","goToEditProperty","goToBack","goToClients","goToUpdateVisibility","status","goToPublish","validateFrontImageOnErrors","setErrorsOnFields","afterClosed","onMultimediaIndexChanged","changeMultimediaType","openUploaderMultimedia","assignFrontImage","onEditorInstance","onOwnerInstance","_ownerInstance","onDocumentsInstance","_documentsInstance","onSelectAddress","frontImageError","spherics","getMultimediaByType","getProperty","propertyInfo","owner","getOwner","documentsResponse","getDocuments","files","documents","complete","NewProperty","PropertyInfo","SnackBarService","ShareService","PropertyEditorValidators","form","condition","minPriceInvalid","markAsTouched","commissionInvalid","sharedCommissionInvalid","moment","momentImported","dateInput","display","monthYearLabel","dateA11yLabel","monthYearA11yLabel","EditorComponent","_adapter","REGEX_ONLY_INTEGERS","REGEX_MIDDLE_NUMBER","REGEX_WEBSITE","REGEX_ALPHA_NUMBER","editorInstance","selectAddress","offeringTypeList","landUseList","commissionList","durationList","sharedCommissionList","setLocale","_errorFields","_validators","parkingSpaces","externalLink","sku","propertyForm","consumerReporting","consumerReportingOption","maintenance","maintenancePrice","transfer","transferPrice","unit","AreaUnitEnum","M2","buildIn","landUse","mlm","sharedCommission","agreementDate","disabled","duration","commission","notes","address","township","extNumber","intNumber","mz","lt","visible","validators","geoPtGenerator","geoPt","minDistance","maxDistance","alpha","PI","sx","cos","deltaLat","sin","lat","deltaLong","searchAmenitiesByPropertyType","createProperty","updateAddressForm","setValidatorOnFields","updatePropertyByForm","getRawValue","_property","invalid","goToSelectAddress","_btnSubmitRef","click","outdoorNumber","assignAmenities","amenitiesList","assignLocationFeatures","featuresList","assignCommission","assignBusinessRules","updateFormByProperty","lowestPrice","condominiumFeePrice","leaseTransferPrice","areaUnit","builtIn","listingAgreementStartDate","listingAgreementTime","interiorNumber","publicLocation","_propertyTypeItem","Features","Address","remove","clearValidators","setValidators","updateValueAndValidity","MAT_DATE_LOCALE","DateAdapter","useClass","MomentDateAdapter","deps","MAT_MOMENT_DATE_ADAPTER_OPTIONS","MAT_DATE_FORMATS","ɵ0","DialogService","read","phoneFieldsValidator","parent","phoneFieldsError","OwnerInfoComponent","ownerInstance","ownerForm","lastName","email","phone","maxLength","minLength","createOwner","disable","onCodePhoneChanged","updateOwnerByForm","_owner","codePhone","updateFormByOwner","Owner","DocumentsComponent","_visor","_http","documentsInstance","_files","validateDocumentsLoaded","openFile","getPFileByType","getUserMediaByType","openBlobFile","onUploadFile","updateDocument","downloadFile","responseType","Blob","createObjectURL","HttpClient","DetailsComponent","_sanitizer","searchPropertyType","createAmenities","createFeatures","validateAgreement","getTourUrl","bypassSecurityTrustResourceUrl","startDate","setDate","agreementEndDate","DomSanitizer","SlideShowComponent","initialIndex","moveImageByIndex","validateHTTPS","moveImage","_slider","ContentChild","TemplateRef","CustomDateAdapter","__","create","tslib_1.__extends","displayFormat","NativeDateAdapter","CustomDatepickerHeaderComponent","_calendar","_dateAdapter","_dateFormats","cdr","_destroyed","stateChanges","takeUntil","markForCheck","defineProperty","currentDate","activeDate","previousClicked","addCalendarYears","nextClicked","MatCalendar","ChangeDetectorRef","CustomDatepickerComponent","_injector","customHeader","currentYear","year","_control","NgControl","valueAccessor","onYearSelected","datepicker","registerOnChange","fn","registerOnTouched","writeValue","NG_VALUE_ACCESSOR","useExisting","forwardRef","multi","ɵ0$1","Injector","MatDatepickerModule","COMPONENTS","CustomDatepickerModule","CustomDragAndDropComponent","_viewportRuler","itemsChanged","source","dropListEnterPredicate","drag","drop","placeholder","activeContainer","phElement","element","sourceElement","dropContainer","dropElement","dragIndex","__indexOf","parentElement","children","dropIndex","sourceIndex","width","clientWidth","height","clientHeight","removeChild","targetIndex","insertBefore","nextSibling","enter","offsetLeft","offsetTop","dragMoved","point","getPointerPositionOnPage","listGroup","_items","dropList","getBoundingClientRect","top","bottom","left","right","__isInsideDropListClientRect","dropListDropped","appendChild","moveItemInArray","items","startsWith","__isTouchEvent","touches","changedTouches","scrollPosition","getViewportScrollPosition","pageX","pageY","ViewportRuler","CdkDropListGroup","CdkDropList","collection","node","MatCheckboxModule","MatRadioModule","MatSidenavModule","MatToolbarModule","MatTabsModule","MatTooltipModule","MatNativeDateModule","DragDropModule","PAGES","ENTRY_COMPONENTS","PROVIDERS","PropertyModule","EcoFabSpeedDialModule","UploadFileModule","StringManipulationModule","ShareModule","CountryCodeModule","LocationModule","DialogModule","SnackBarModule","forRoot","PROPERTY_CARD_CONFIG_MODULE","PropertyCardComponent","markerChanged","favoriteChanged","propertyDiscarded","positionLatLng","latLng","info","onFrontImageOver","marker","hover","onFrontImageLeave","favorite","propertyId","discard","deg2rad","deg","lng","lat1","lon1","lat2","lon2","dLat","dLon","atan2","sqrt","trunc","PropertyCardModule","RouterModule","MarkersService","_propertyTypePipe","_offeringTypePipe","getPropertyTypeItemByType","validatePropertyInFavorites","favorites","calculateLocationFrom","bearingInRadians","distanceInMetres","coordinateLatitudeInRadians","coordinateLongitudeInRadians","distanceComparedToEarth","resultLatitudeInRadians","asin","resultLongitudeInRadians","newCoordinates","buildURL","validatePropertiesInPoly","properties","paths","polygon","google","maps","Polygon","el","customLatLng","LatLng","geometry","poly","containsLocation","markersToCurrency","markers","toCurrency","buildMarkers","entities","entity","visited","createPropertyInfoCard","isFavorite","NewPropertyLite","buildSpider","polyLines","size","radiansBetweenAnnotations","locationShare","heading","newLocation","path","authUsers","MarkersModule"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgBC,OAAOC,gBACtB,CAAEC,UAAW,cAAgBC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIC,KAAKD,EAAOA,EAAEE,eAAeD,KAAIF,EAAEE,GAAKD,EAAEC,KAQlE,IAAIE,EAAWR,OAAOS,QAAU,SAAkBC,GACrD,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIN,KADTK,EAAIG,UAAUF,GACOZ,OAAOgB,UAAUT,eAAeU,KAAKN,EAAGL,KAAII,EAAEJ,GAAKK,EAAEL,IAE9E,OAAOI,oBC5BX,SAAAQ,KAoCA,OA/BEA,EAAAF,UAAAG,UAAA,SAAUC,EAAgBC,EAAgBC,OACpCC,EAAS,GACPC,EAAWF,GAAW,KAE5B,OADAC,GAAUH,EAAMK,OACRD,GACN,IAAK,KACCH,GACFE,GAAU,MAAKH,EAAMM,QAAU,IAC/BH,GAAU,MAAKH,EAAMO,YAAc,IACnCJ,GAAU,MAAKH,EAAMQ,MAAQ,IAC7BL,GAAU,MAAKH,E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SAAUg/B,EAAOh/B,SACjBsB,MAAO09B,EAAO19B,MACdvB,KAAMi/B,EAAOj/B,KACb0L,IAAKxZ,KAAK4rC,SAAS,CACjBrS,QAASwT,EAAOxT,QAChBxrB,SAAUg/B,EAAOh/B,SACjBgR,aAAcguB,EAAOj/B,KACrB87B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOzf,GAAKyf,EAAOnD,aAEvExV,OAAS2Y,aAAkBI,EAAAA,gBAAmBJ,EAAO3Y,OAAS,KAC9DrrB,SAAWgkC,aAAkBI,EAAAA,gBAAmBJ,EAAOhkC,SAAW,2BA9KvEyR,EAAAA,sDANO5E,SADAL,SAGAyK,MAqLR4qB,EAvMA,GCAAiD,GAAA,WAKA,SAAAA,KAeA,OARSA,EAAAvuC,SAAP,WACE,MAAQ,CACNC,SAAUsuC,EACVruC,UAAW,CACTorC,0BAXPnrC,EAAAA,SAAQN,KAAA,CAAC,CACRO,QAAS,CACPC,EAAAA,aACA2mB,GAAwBhnB,gBAY5BuuC,EApBA","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {Address} from '@maplander/types';\r\n\r\n@Pipe({\r\n name: 'addressFormat'\r\n})\r\nexport class AddressFormatPipe implements PipeTransform {\r\n\r\n transform(value: Address, long?: boolean, country?: string): string {\r\n let result = '';\r\n const language = country || 'mx';\r\n result += value.street;\r\n switch (language) {\r\n case 'mx':\r\n if (long) {\r\n result += `, ${value.colony || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.colony || ''}`;\r\n }\r\n break;\r\n case 'usa':\r\n if (long) {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n result += `, ${value.postalCode || ''}`;\r\n result += `, ${value.country || ''}`;\r\n } else {\r\n result += `, ${value.city || ''}`;\r\n result += `, ${value.state || ''}`;\r\n }\r\n break;\r\n }\r\n return result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {AddressFormatPipe} from './address-format.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n AddressFormatPipe\r\n ],\r\n exports: [\r\n AddressFormatPipe\r\n ]\r\n})\r\nexport class AddressFormatModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: AddressFormatModule,\r\n providers: [\r\n AddressFormatPipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {FiltersComponent} from '../../components/filters/filters.component';\r\n\r\nexport class FiltersWrapper {\r\n private _component: FiltersComponent;\r\n\r\n constructor(component: FiltersComponent) {\r\n this._component = component;\r\n }\r\n\r\n open(): void {\r\n this._component.open();\r\n }\r\n\r\n close(): void {\r\n this._component.close();\r\n }\r\n\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\n/**\r\n *\r\n * @author Alejandro Lopez Arreola\r\n * Custom class for dates compatible with Google Data Store\r\n *\r\n * */\r\n\r\nexport class MDate {\r\n\r\n private _timestamp: string;\r\n\r\n /**\r\n * @param date Timestamp with format YYYYMMDD\r\n * @example 20190812\r\n * */\r\n constructor(date: number) {\r\n this._timestamp = date.toString();\r\n }\r\n\r\n /**\r\n * @param date Date object\r\n * @param time Returns timestamp as time, default is date\r\n * @example Date: Format YYYYMMDD = 20190812, Time: Format HHMMSS = 171401\r\n * @return number\r\n * */\r\n public static getTimestamp(date: Date, time?: boolean): number {\r\n let timestamp = '';\r\n if (time) {\r\n timestamp += `${date.getHours()}`;\r\n timestamp += date.getMinutes() < 10 ? `0${date.getMinutes()}` : `${date.getMinutes()}`;\r\n timestamp += date.getSeconds() < 10 ? `0${date.getSeconds()}` : `${date.getSeconds()}`;\r\n return Number(timestamp);\r\n } else {\r\n timestamp += `${date.getFullYear().toString()}`;\r\n timestamp += (date.getMonth() + 1) < 10 ? `0${(date.getMonth() + 1)}` : `${date.getMonth() + 1}`;\r\n timestamp += date.getDate() < 10 ? `0${date.getDate()}` : `${date.getDate().toString()}`;\r\n return Number(timestamp);\r\n }\r\n }\r\n\r\n private static getHours(time: string): string {\r\n return time.slice(0, 2);\r\n }\r\n\r\n private static getMinutes(time: string): string {\r\n return time.slice(2, 4);\r\n }\r\n\r\n private static getSeconds(time: string): string {\r\n return time.slice(4, time.length);\r\n }\r\n\r\n private static getWeekDayName(day: number, toLowerCase?: boolean): string {\r\n switch (day) {\r\n case 0:\r\n return toLowerCase ? 'lunes' : 'Lunes';\r\n case 1:\r\n return toLowerCase ? 'martes' : 'Martes';\r\n case 2:\r\n return toLowerCase ? 'miercoles' : 'Miercoles';\r\n case 3:\r\n return toLowerCase ? 'jueves' : 'Jueves';\r\n case 4:\r\n return toLowerCase ? 'viernes' : 'Viernes';\r\n case 5:\r\n return toLowerCase ? 'sabado' : 'Sabado';\r\n case 6:\r\n return toLowerCase ? 'domingo' : 'Domingo';\r\n }\r\n }\r\n\r\n private static getMonthName(month: string, toLowerCase?: boolean): string {\r\n switch (month) {\r\n case '01':\r\n return toLowerCase ? 'ene.' : 'Ene.';\r\n case '02':\r\n return toLowerCase ? 'feb.' : 'Feb.';\r\n case '03':\r\n return toLowerCase ? 'mar.' : 'Mar.';\r\n case '04':\r\n return toLowerCase ? 'abr.' : 'Abr.';\r\n case '05':\r\n return toLowerCase ? 'may.' : 'May.';\r\n case '06':\r\n return toLowerCase ? 'jun.' : 'Jun.';\r\n case '07':\r\n return toLowerCase ? 'jul.' : 'Jul.';\r\n case '08':\r\n return toLowerCase ? 'ago.' : 'Ago.';\r\n case '09':\r\n return toLowerCase ? 'sep.' : 'Sep.';\r\n case '10':\r\n return toLowerCase ? 'oct.' : 'Oct.';\r\n case '11':\r\n return toLowerCase ? 'nov.' : 'Nov.';\r\n case '12':\r\n return toLowerCase ? 'dic.' : 'Dic.';\r\n }\r\n }\r\n\r\n /**\r\n * @param time Timestamp with format HHMMSS\r\n * @example 171401\r\n * @return Date\r\n * Converting timestamp with format YYYYMMDD,\r\n * if you not assign the time param, the hours, minutes and seconds is a zero\r\n * */\r\n public toDate(time?: number): Date {\r\n if (time) {\r\n const cDate = `${this.getYear()}-${this.getMoth()}-${this.getDay()}`;\r\n const cTime = `${MDate.getHours(time.toString())}:${MDate.getMinutes(time.toString())}:${MDate.getSeconds(time.toString())}`;\r\n const fullCDate = `${cDate}T${cTime}Z`;\r\n return new Date(fullCDate);\r\n } else {\r\n return new Date(Number(this.getYear()), Number(this.getMoth()) - 1, Number(this.getDay()));\r\n }\r\n }\r\n\r\n /**\r\n * @param format Format date | 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' |'dd MMMMM yyyy HH:mm'\r\n * @param time Timestamp as time with format HHMMSS\r\n * @param toLowerCase Words on lower case\r\n * @param format12Hours 12 hours format on time\r\n * @return string\r\n * Return string with date format\r\n * */\r\n public getFormat(format: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm', {\r\n time = null,\r\n toLowerCase = false,\r\n format12Hours = false\r\n } = {}): string {\r\n let date = '', d: Date = null;\r\n switch (format) {\r\n case 'dd/MM/yyyy':\r\n date = `${this.getDay()}/${this.getMoth()}/${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM yyyy':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n break;\r\n case 'dd MMMMM':\r\n date = `${this.getDay()} ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n break;\r\n case 'EEEEE HH:mm':\r\n date += `${MDate.getWeekDayName(this.toDate(time).getDay() - 1, toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n case 'dd MMMMM yyyy HH:mm':\r\n date += `${this.getDay()}`;\r\n date += ` de ${MDate.getMonthName(this.getMoth(), toLowerCase)} ${this.getYear()}`;\r\n d = this.toDate(time);\r\n if (format12Hours) {\r\n date += d.getHours() === 13 ? ` a la ` : ` a las `;\r\n date += d.getHours() < 12 ? d.getHours() : d.getHours() - 12;\r\n date += ':' + d.getMinutes();\r\n date += d.getHours() < 12 ? ` AM` : ` PM`;\r\n } else {\r\n date += ' a las ';\r\n date += `${d.getHours()}:${d.getMinutes()}`;\r\n }\r\n break;\r\n }\r\n return date;\r\n }\r\n\r\n private getYear(): string {\r\n return this._timestamp.slice(0, 4);\r\n }\r\n\r\n private getMoth(): string {\r\n return this._timestamp.slice(4, 6);\r\n }\r\n\r\n private getDay(): string {\r\n return this._timestamp.slice(6, this._timestamp.length);\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {MDate} from '../../utils/classes';\r\n\r\n@Pipe({\r\n name: 'libFormatDate'\r\n})\r\nexport class FormatDatePipe implements PipeTransform {\r\n\r\n transform(value: any, mDate?: boolean, format?: 'dd/MM/yyyy' | 'dd MMMMM yyyy' | 'dd MMMMM' | 'EEEEE HH:mm' | 'dd MMMMM HH:mm' | 'dd MMMMM yyyy HH:mm'): any {\r\n if (mDate) {\r\n return new MDate(value).getFormat(format, {toLowerCase: true});\r\n } else {\r\n const d = new Date(Number(value));\r\n return `${d.getDate() < 10 ? '0' + d.getDate() : d.getDate()}/${d.getMonth() < 10 ? '0' + d.getMonth() : d.getMonth()}/${d.getFullYear()}`;\r\n }\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FormatDatePipe} from './format-date.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatDatePipe\r\n ],\r\n exports: [\r\n FormatDatePipe\r\n ]\r\n})\r\nexport class FormatDateModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatDateModule,\r\n providers: [\r\n FormatDatePipe\r\n ]\r\n };\r\n }\r\n}\r\n","export enum AmenityName {\r\n AdjacentCommerce = 'adjacentCommerce',\r\n AdjacentGym = 'gym',\r\n AdjacentPicnic = 'adjacentPicnic',\r\n AirConditioner = 'airConditioner',\r\n Balcony = 'balcony',\r\n CustomerParking = 'customerParking',\r\n DiningRoom = 'diningRoom',\r\n DoubleHeight = 'doubleHeight',\r\n DressingRooms = 'dressingRooms',\r\n FacingStreet = 'facingStreet',\r\n Finishings = 'finishings',\r\n Furnished = 'furnished',\r\n Garden = 'garden',\r\n Gym = 'gym',\r\n HighResistanceFloors = 'highResistanceFloors',\r\n HighSpeedInternet = 'highSpeedInternet',\r\n InCommercialArea = 'inCommercialArea',\r\n InIndustrialPark = 'inIndustrialPark',\r\n InShoppingCenter = 'inShoppingCenter',\r\n Jacuzzi = 'jacuzzi',\r\n KitchenServices = 'kitchenServices',\r\n MaidsBathroom = 'maidsBathroom',\r\n ManeuverArea = 'maneuverArea',\r\n MeetingRoom = 'meetingRoom',\r\n Mezzanine = 'mezzanine',\r\n MixedBuilding = 'mixedBuilding',\r\n NaturalLighting = 'naturalLighting',\r\n Offices = 'offices',\r\n OpenSpace = 'openSpace',\r\n Platforms = 'platforms',\r\n Playground = 'playground',\r\n Playroom = 'playroom',\r\n Pool = 'pool',\r\n RailSpur = 'railSpur',\r\n RailYard = 'maneuverArea',\r\n Reception = 'reception',\r\n SecurityGuard = 'securityGuard',\r\n Storage = 'storage',\r\n VisitorParking = 'visitorParking',\r\n NearPublicTransportation = 'nearPublicTransportation',\r\n NearShops = 'nearShops',\r\n OnBusyRoad = 'onBusyRoad',\r\n CountrySide = 'countrySide',\r\n Downtown = 'downtown',\r\n GoodReachableTraffic = 'goodReachableTraffic',\r\n NearFitnessCentre = 'nearFitnessCentre',\r\n NearHighway = 'nearHighway',\r\n NearHospital = 'nearHospital',\r\n NearPark = 'nearPark',\r\n NearSchools = 'nearSchools',\r\n OnQuietRoad = 'onQuietRoad',\r\n RoofGarden = 'roofGarden',\r\n PetFriendly = 'petFriendly',\r\n DifferentAbilities = 'differentAbilities'\r\n}\r\n","import {LandUseEnum, OfferingTypeEnum, PFileTypeEnum, PropertyTypeEnum, StatusTypeEnum} from '@maplander/types';\r\nimport {AmenitiesList} from './utils/models/amenities-list';\r\nimport {AmenityName} from './utils/enums/amenity-name';\r\nimport {PropertyTypeItem} from './utils/models/property-type-item';\r\nimport {PropertyStatusItem} from './utils/models/propertyStatusItem';\r\n\r\nexport class ConstantsComponents {\r\n static Amenities: AmenitiesList = {\r\n roofGarden: {\r\n checked: false,\r\n iconName: AmenityName.RoofGarden,\r\n value: AmenityName.RoofGarden,\r\n name: 'Terraza'\r\n },\r\n petFriendly: {\r\n checked: false,\r\n iconName: AmenityName.PetFriendly,\r\n value: AmenityName.PetFriendly,\r\n name: 'Acepta Mascotas'\r\n },\r\n differentAbilities: {\r\n checked: false,\r\n iconName: AmenityName.DifferentAbilities,\r\n value: AmenityName.DifferentAbilities,\r\n name: 'Con capacidades diferentes'\r\n },\r\n adjacentCommerce: {\r\n checked: false,\r\n iconName: AmenityName.AdjacentCommerce,\r\n value: AmenityName.AdjacentCommerce,\r\n name: 'Comercio adyacente'\r\n },\r\n adjacentGym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.AdjacentGym, name: 'Gym adyacente'},\r\n adjacentPicnic: {checked: false, iconName: AmenityName.AdjacentPicnic, value: AmenityName.AdjacentPicnic, name: 'Merendero adyacente'},\r\n airConditioner: {checked: false, iconName: AmenityName.AirConditioner, value: AmenityName.AirConditioner, name: 'Aire acondicionado'},\r\n balcony: {checked: false, iconName: AmenityName.Balcony, value: AmenityName.Balcony, name: 'Balcón'},\r\n customerParking: {\r\n checked: false,\r\n iconName: AmenityName.CustomerParking,\r\n value: AmenityName.CustomerParking,\r\n name: 'Estacionamiento para clientes'\r\n },\r\n diningRoom: {checked: false, iconName: AmenityName.DiningRoom, value: AmenityName.DiningRoom, name: 'Comedor'},\r\n doubleHeight: {checked: false, iconName: AmenityName.DoubleHeight, value: AmenityName.DoubleHeight, name: 'Doble altura'},\r\n dressingRooms: {checked: false, iconName: AmenityName.DressingRooms, value: AmenityName.DressingRooms, name: 'Con vestidores'},\r\n facingStreet: {checked: false, iconName: AmenityName.FacingStreet, value: AmenityName.FacingStreet, name: 'Frente a calle'},\r\n finishings: {checked: false, iconName: AmenityName.Finishings, value: AmenityName.Finishings, name: 'Con acabados'},\r\n furnished: {checked: false, iconName: AmenityName.Furnished, value: AmenityName.Furnished, name: 'Amueblada'},\r\n garden: {checked: false, iconName: AmenityName.Garden, value: AmenityName.Garden, name: 'JardÃn'},\r\n gym: {checked: false, iconName: AmenityName.Gym, value: AmenityName.Gym, name: 'Gym'},\r\n highResistanceFloors: {\r\n checked: false,\r\n iconName: AmenityName.HighResistanceFloors,\r\n value: AmenityName.HighResistanceFloors,\r\n name: 'Pisos de alta resistencia'\r\n },\r\n highSpeedInternet: {\r\n checked: false,\r\n iconName: AmenityName.HighSpeedInternet,\r\n value: AmenityName.HighSpeedInternet,\r\n name: 'Internet de alta velocidad'\r\n },\r\n inCommercialArea: {\r\n checked: false,\r\n iconName: AmenityName.InCommercialArea,\r\n value: AmenityName.InCommercialArea,\r\n name: 'En zona comercial'\r\n },\r\n inIndustrialPark: {\r\n checked: false,\r\n iconName: AmenityName.InIndustrialPark,\r\n value: AmenityName.InIndustrialPark,\r\n name: 'En parque industrial'\r\n },\r\n inShoppingCenter: {\r\n checked: false,\r\n iconName: AmenityName.InShoppingCenter,\r\n value: AmenityName.InShoppingCenter,\r\n name: 'En centro comercial'\r\n },\r\n jacuzzi: {checked: false, iconName: AmenityName.Jacuzzi, value: AmenityName.Jacuzzi, name: 'Jacuzzi'},\r\n kitchenServices: {\r\n checked: false,\r\n iconName: AmenityName.KitchenServices,\r\n value: AmenityName.KitchenServices,\r\n name: 'Servicios para cocina'\r\n },\r\n maidsBathroom: {checked: false, iconName: AmenityName.MaidsBathroom, value: AmenityName.MaidsBathroom, name: 'Cuarto de Servicio'},\r\n maneuverArea: {checked: false, iconName: AmenityName.ManeuverArea, value: AmenityName.ManeuverArea, name: 'Ãrea de maniobras'},\r\n meetingRoom: {checked: false, iconName: AmenityName.MeetingRoom, value: AmenityName.MeetingRoom, name: 'Sala de conferencias'},\r\n mezzanine: {checked: false, iconName: AmenityName.Mezzanine, value: AmenityName.Mezzanine, name: 'Con entrepiso'},\r\n mixedBuilding: {checked: false, iconName: AmenityName.MixedBuilding, value: AmenityName.MixedBuilding, name: 'En edificio mixto'},\r\n naturalLighting: {\r\n checked: false,\r\n iconName: AmenityName.NaturalLighting,\r\n value: AmenityName.NaturalLighting,\r\n name: 'Iluminacion natural'\r\n },\r\n offices: {checked: false, iconName: AmenityName.Offices, value: AmenityName.Offices, name: 'Con oficinas'},\r\n openSpace: {checked: false, iconName: AmenityName.OpenSpace, value: AmenityName.OpenSpace, name: 'Espacio abierto'},\r\n platforms: {checked: false, iconName: AmenityName.Platforms, value: AmenityName.Platforms, name: 'Andenes'},\r\n playground: {checked: false, iconName: AmenityName.Playground, value: AmenityName.Playground, name: 'Juegos infantiles'},\r\n playroom: {checked: false, iconName: AmenityName.Playroom, value: AmenityName.Playroom, name: 'Salón de juegos'},\r\n pool: {checked: false, iconName: AmenityName.Pool, value: AmenityName.Pool, name: 'Alberca'},\r\n railSpur: {checked: false, iconName: AmenityName.RailSpur, value: AmenityName.RailSpur, name: 'Espuela de FF.CC'},\r\n railyard: {checked: false, iconName: AmenityName.RailYard, value: AmenityName.RailYard, name: 'Patio de maniobras'},\r\n reception: {checked: false, iconName: AmenityName.Reception, value: AmenityName.Reception, name: 'Recepción'},\r\n securityGuard: {checked: false, iconName: AmenityName.SecurityGuard, value: AmenityName.SecurityGuard, name: 'Con vigilancia'},\r\n storage: {checked: false, iconName: AmenityName.Storage, value: AmenityName.Storage, name: 'Bodega'},\r\n visitorParking: {\r\n checked: false,\r\n iconName: AmenityName.VisitorParking,\r\n value: AmenityName.VisitorParking,\r\n name: 'Estacionamiento para visitas'\r\n },\r\n features: [\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPublicTransportation,\r\n value: AmenityName.NearPublicTransportation,\r\n name: 'Cerca de estaciones de transporte'\r\n },\r\n {checked: false, iconName: AmenityName.AdjacentCommerce, value: AmenityName.NearShops, name: 'Cerca de comercios'},\r\n {checked: false, iconName: AmenityName.OnBusyRoad, value: AmenityName.OnBusyRoad, name: 'Avenida principal'},\r\n {checked: false, iconName: AmenityName.CountrySide, value: AmenityName.CountrySide, name: 'Suburbio'},\r\n {checked: false, iconName: AmenityName.Downtown, value: AmenityName.Downtown, name: 'Céntrico'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.GoodReachableTraffic,\r\n value: AmenityName.GoodReachableTraffic,\r\n name: 'Se llega sin trafico'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearFitnessCentre,\r\n value: AmenityName.NearFitnessCentre,\r\n name: 'Cerca de centro deportivo'\r\n },\r\n {checked: false, iconName: AmenityName.NearHighway, value: AmenityName.NearHighway, name: 'Cerca de autopista'},\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearHospital,\r\n value: AmenityName.NearHospital,\r\n name: 'Cerca de centros de salud'\r\n },\r\n {\r\n checked: false,\r\n iconName: AmenityName.NearPark,\r\n value: AmenityName.NearPark,\r\n name: 'Cerca de parque'\r\n },\r\n {checked: false, iconName: AmenityName.NearSchools, value: AmenityName.NearSchools, name: 'Cerca de escuelas'},\r\n {checked: false, iconName: AmenityName.OnQuietRoad, value: AmenityName.OnQuietRoad, name: 'En calle tranquila'},\r\n ]\r\n };\r\n static DurationList = [\r\n 30, 60, 90, 180, 365\r\n ];\r\n static CommissionList: {SALE: number[], RENT: number[]} = {\r\n SALE: [0.06, 0.055, 0.05, 0.045, 0.04, 0.035, 0.030, 0.025, 0.020, 0.015, 0.01],\r\n RENT: [2, 1.5, 1, 0.5]\r\n };\r\n static SharedCommissionList: number[] = [\r\n 0.50, 0.40, 0.30, 0.20, 0.10\r\n ];\r\n static LandUseList: {name: string, value: LandUseEnum}[] = [\r\n {\r\n name: 'Habitacional unifamiliar',\r\n value: LandUseEnum.SINGLE_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional plurifamiliar',\r\n value: LandUseEnum.MULTI_FAMILY_HOUSING\r\n },\r\n {\r\n name: 'Habitacional con comercio',\r\n value: LandUseEnum.HOUSING_WITH_COMMERCE\r\n },\r\n {\r\n name: 'Habitacional con oficina',\r\n value: LandUseEnum.HOUSING_WITH_OFFICE\r\n },\r\n {\r\n name: 'Habitacional mixto',\r\n value: LandUseEnum.MIXED_HOUSING\r\n },\r\n {\r\n name: 'Comercio',\r\n value: LandUseEnum.COMMERCE\r\n },\r\n {\r\n name: 'Oficina',\r\n value: LandUseEnum.OFFICE\r\n },\r\n {\r\n name: 'Servicios',\r\n value: LandUseEnum.SERVICES\r\n },\r\n {\r\n name: 'Industria',\r\n value: LandUseEnum.INDUSTRY\r\n },\r\n {\r\n name: 'AgrÃcola',\r\n value: LandUseEnum.AGRICULTURAL\r\n }, {\r\n name: 'No especificado',\r\n value: LandUseEnum.OTHER\r\n }\r\n ];\r\n static AnnounceCheckList = [\r\n {\r\n name: 'Las fotos y videos son los correctos',\r\n value: 0,\r\n checked: false\r\n },\r\n {\r\n name: 'La ortografÃa y gramática es correcta',\r\n value: 1,\r\n checked: false\r\n },\r\n {\r\n name: 'Los datos de contacto son correctos',\r\n value: 2,\r\n checked: false\r\n },\r\n {\r\n name: 'La dirección, email y web están correctos',\r\n value: 3,\r\n checked: false\r\n },\r\n {\r\n name: 'Todo está correcto y apruebo mi anuncio',\r\n value: 4,\r\n checked: false\r\n }\r\n ];\r\n static DocumentsList: {name: string, value: PFileTypeEnum, loaded: boolean}[] = [\r\n {\r\n name: 'Escritura',\r\n value: PFileTypeEnum.DEED,\r\n loaded: false\r\n },\r\n {\r\n name: 'Identificación Propietario',\r\n value: PFileTypeEnum.OWNER_ID,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de agua',\r\n value: PFileTypeEnum.WATER_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo de luz',\r\n value: PFileTypeEnum.ELECTRICITY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Recibo predial',\r\n value: PFileTypeEnum.PROPERTY_BILL,\r\n loaded: false\r\n },\r\n {\r\n name: 'Constancia de no adeudo',\r\n value: PFileTypeEnum.CONSTANCY_OF_NO_DEBT,\r\n loaded: false\r\n },\r\n {\r\n name: 'Libertad de Gravamen',\r\n value: PFileTypeEnum.EXEMPTION_TAX,\r\n loaded: false\r\n },\r\n {\r\n name: 'Licencia de construcción',\r\n value: PFileTypeEnum.BUILDING_LICENSE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Terminación de obra',\r\n value: PFileTypeEnum.COMPLETION_OF_CONSTRUCTION,\r\n loaded: false\r\n },\r\n {\r\n name: 'Alineación y número oficial',\r\n value: PFileTypeEnum.ALIGNMENT_AND_OFFICIAL_NUMBER,\r\n loaded: false\r\n },\r\n {\r\n name: 'Hipoteca',\r\n value: PFileTypeEnum.MORTGAGE,\r\n loaded: false\r\n },\r\n {\r\n name: 'Otros',\r\n value: PFileTypeEnum.OTHER,\r\n loaded: false\r\n }\r\n ];\r\n static BedroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static BathroomList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static ParkingSpacesList: number[] = [\r\n 0, 1, 2, 3, 4\r\n ];\r\n static SurfaceList: number[] = [\r\n 50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000\r\n ];\r\n static ROIList: number[] = [\r\n 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20\r\n ];\r\n static PropertyTypeList: PropertyTypeItem[] = [\r\n {\r\n value: PropertyTypeEnum.HOUSE,\r\n iconName: 'house',\r\n name: 'Casa',\r\n shortName: 'Casa',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RESIDENTIAL,\r\n iconName: 'residential',\r\n name: 'Vivienda',\r\n shortName: 'Vivienda',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.APARTMENT,\r\n iconName: 'apartment',\r\n name: 'Departamento',\r\n shortName: 'Depto',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.ROOM,\r\n iconName: 'room',\r\n name: 'Habitación',\r\n shortName: 'Habitación',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.garden,\r\n ConstantsComponents.Amenities.pool,\r\n ConstantsComponents.Amenities.storage,\r\n ConstantsComponents.Amenities.maidsBathroom,\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.playground,\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.gym,\r\n ConstantsComponents.Amenities.balcony,\r\n ConstantsComponents.Amenities.jacuzzi,\r\n ConstantsComponents.Amenities.playroom,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.OFFICE,\r\n iconName: 'office',\r\n name: 'Oficina',\r\n shortName: 'Oficina',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.visitorParking,\r\n ConstantsComponents.Amenities.furnished,\r\n ConstantsComponents.Amenities.highSpeedInternet,\r\n ConstantsComponents.Amenities.reception,\r\n ConstantsComponents.Amenities.adjacentPicnic,\r\n ConstantsComponents.Amenities.meetingRoom,\r\n ConstantsComponents.Amenities.adjacentGym,\r\n ConstantsComponents.Amenities.openSpace,\r\n ConstantsComponents.Amenities.airConditioner,\r\n ConstantsComponents.Amenities.adjacentCommerce,\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.RETAIL,\r\n iconName: 'retail',\r\n name: 'Comercio',\r\n shortName: 'Comercio',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.mixedBuilding,\r\n ConstantsComponents.Amenities.facingStreet,\r\n ConstantsComponents.Amenities.maneuverArea,\r\n ConstantsComponents.Amenities.kitchenServices,\r\n ConstantsComponents.Amenities.finishings,\r\n ConstantsComponents.Amenities.mezzanine,\r\n ConstantsComponents.Amenities.inShoppingCenter,\r\n ConstantsComponents.Amenities.inCommercialArea,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.roofGarden,\r\n ConstantsComponents.Amenities.petFriendly,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.WAREHOUSE,\r\n iconName: 'warehouse',\r\n name: 'Bodega',\r\n shortName: 'Bodega',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard,\r\n ConstantsComponents.Amenities.customerParking,\r\n ConstantsComponents.Amenities.doubleHeight,\r\n ConstantsComponents.Amenities.railyard,\r\n ConstantsComponents.Amenities.platforms,\r\n ConstantsComponents.Amenities.highResistanceFloors,\r\n ConstantsComponents.Amenities.offices,\r\n ConstantsComponents.Amenities.dressingRooms,\r\n ConstantsComponents.Amenities.diningRoom,\r\n ConstantsComponents.Amenities.inIndustrialPark,\r\n ConstantsComponents.Amenities.naturalLighting,\r\n ConstantsComponents.Amenities.railSpur,\r\n ConstantsComponents.Amenities.differentAbilities\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.LAND,\r\n iconName: 'land',\r\n name: 'Terreno',\r\n shortName: 'Terreno',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: [\r\n ConstantsComponents.Amenities.securityGuard\r\n ]\r\n },\r\n {\r\n value: PropertyTypeEnum.INVESTMENT,\r\n iconName: 'investment',\r\n name: 'Inversión',\r\n shortName: 'Inversión',\r\n features: ConstantsComponents.Amenities.features,\r\n amenities: []\r\n },\r\n {\r\n value: PropertyTypeEnum.NONE,\r\n name: 'Todo',\r\n shortName: 'Todo',\r\n iconName: 'all',\r\n features: [],\r\n amenities: []\r\n }\r\n ];\r\n static OfferingTypeList: { value: OfferingTypeEnum, name: string }[] = [\r\n {\r\n value: OfferingTypeEnum.SALE,\r\n name: 'Venta'\r\n },\r\n {\r\n value: OfferingTypeEnum.RENT,\r\n name: 'Renta'\r\n },\r\n ];\r\n static LocateList: any = {\r\n USD: {locate: 'en-US', currency: 'USD'},\r\n MXN: {locate: 'es-MX', currency: 'MXN'},\r\n GBP: {locate: 'en-GB', currency: 'GBP'},\r\n EUR: {locate: 'de-DE', currency: 'EUR'},\r\n BRL: {locate: 'pt-BR', currency: 'BRL'},\r\n CNY: {locate: 'zh-CH', currency: 'CNY'}\r\n };\r\n static PropertyStatusList: PropertyStatusItem[] = [\r\n { icon: 'announce', name: 'Anunciadas', value: StatusTypeEnum.ANNOUNCED },\r\n { icon: 'expired', name: 'Expiradas', value: StatusTypeEnum.EXPIRED },\r\n { icon: 'hidden', name: 'Ocultas', value: StatusTypeEnum.HIDDEN },\r\n { icon: 'ready', name: 'Listas para anunciar', value: StatusTypeEnum.READY },\r\n { icon: 'draft', name: 'Borrador', value: StatusTypeEnum.DRAFT }\r\n ];\r\n}\r\n","import {Filter, NewProperty, OfferingTypeEnum, PropertyTypeEnum} from '@maplander/types';\r\n\r\nexport class Utils {\r\n static round(value: number, precision: number): number {\r\n const multiplier = Math.pow(10, precision || 0);\r\n return Math.round(value * multiplier) / multiplier;\r\n }\r\n static getFilterByPropertyType(filter: Filter): Filter {\r\n return {\r\n type: filter.type,\r\n offering: filter.offering,\r\n distance: filter.distance,\r\n location: {\r\n latitude: filter.location.latitude,\r\n longitude: filter.location.longitude\r\n },\r\n currency: filter.currency,\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter.exclusivity,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter.mls\r\n };\r\n }\r\n static getInitialFilter(isOPI: boolean, filter: Filter = null): Filter {\r\n return {\r\n type: isOPI ? PropertyTypeEnum.NONE : PropertyTypeEnum.RESIDENTIAL,\r\n offering: isOPI ? OfferingTypeEnum.RENT : OfferingTypeEnum.RENT,\r\n distance: filter ? filter.distance : 0,\r\n location: {\r\n latitude: filter ? filter.location.latitude : 0,\r\n longitude: filter ? filter.location.longitude : 0\r\n },\r\n currency: filter ? filter.currency : 'MXN',\r\n upLimitPrice: 0,\r\n downLimitPrice: 0,\r\n bathrooms: 0,\r\n exclusivity: filter ? filter.exclusivity : false,\r\n bedrooms: 0,\r\n parkingPlaces: 0,\r\n extras: [],\r\n mainArea: 0,\r\n roi: 0,\r\n mls: filter ? filter.mls : true\r\n };\r\n }\r\n static listErrorsByPropertyTypeForPublish(type: PropertyTypeEnum): string[] {\r\n let errorField = ['price', 'currency', 'description', 'image'];\r\n switch (type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat(['mainArea', 'bedrooms', 'bathrooms']);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n case PropertyTypeEnum.OFFICE:\r\n case PropertyTypeEnum.RETAIL:\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat(['mainArea']);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat(['mainArea', 'secondaryArea']);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat(['roi']);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static getErrorsForPublish(property: NewProperty): string[] {\r\n let errorField = [];\r\n errorField = errorField.concat((!property.price || property.price === 0) ? ['price'] : []);\r\n errorField = errorField.concat((!property.currency || property.currency === '') ? ['currency'] : []);\r\n errorField = errorField.concat((!property.description || property.description === '') ? ['description'] : []);\r\n errorField = errorField.concat((!property.image || property.image === '') ? ['image'] : []);\r\n switch (property.type) {\r\n case PropertyTypeEnum.HOUSE:\r\n case PropertyTypeEnum.APARTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bedrooms || property.features.bedrooms === 0)) ? ['bedrooms'] : []);\r\n errorField = errorField.concat((property.features && (!property.features.bathrooms || property.features.bathrooms === 0)) ? ['bathrooms'] : []);\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n errorField = errorField.concat(\r\n (property.features && (!property.features.secondaryArea || property.features.secondaryArea === 0)) ? ['secondaryArea'] : []);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n errorField = errorField.concat((property.features && (!property.features.roi || property.features.roi === 0)) ? ['roi'] : []);\r\n break;\r\n case PropertyTypeEnum.ROOM:\r\n errorField = errorField.concat((property.features && (!property.features.mainArea || property.features.mainArea === 0)) ? ['mainArea'] : []);\r\n break;\r\n }\r\n return errorField;\r\n }\r\n static removeDiacritics (str): string {\r\n const diacriticsMap = {\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,\r\n AA: /[\\uA732]/g,\r\n AE: /[\\u00C6\\u01FC\\u01E2]/g,\r\n AO: /[\\uA734]/g,\r\n AU: /[\\uA736]/g,\r\n AV: /[\\uA738\\uA73A]/g,\r\n AY: /[\\uA73C]/g,\r\n B: /[\\u0042\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181]/g,\r\n C: /[\\u0043\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\u00C7\\u1E08\\u0187\\u023B\\uA73E]/g,\r\n D: /[\\u0044\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779]/g,\r\n DZ: /[\\u01F1\\u01C4]/g,\r\n Dz: /[\\u01F2\\u01C5]/g,\r\n 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,\r\n F: /[\\u0046\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B]/g,\r\n G: /[\\u0047\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E]/g,\r\n H: /[\\u0048\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D]/g,\r\n I: /[\\u0049\\u24BE\\uFF29\\u00CC\\u00CD\\u00CE\\u0128\\u012A\\u012C\\u0130\\u00CF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197]/g,\r\n J: /[\\u004A\\u24BF\\uFF2A\\u0134\\u0248]/g,\r\n K: /[\\u004B\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2]/g,\r\n L: /[\\u004C\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780]/g,\r\n LJ: /[\\u01C7]/g,\r\n Lj: /[\\u01C8]/g,\r\n M: /[\\u004D\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C]/g,\r\n N: /[\\u004E\\u24C3\\uFF2E\\u01F8\\u0143\\u00D1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4]/g,\r\n NJ: /[\\u01CA]/g,\r\n Nj: /[\\u01CB]/g,\r\n 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,\r\n OI: /[\\u01A2]/g,\r\n OO: /[\\uA74E]/g,\r\n OU: /[\\u0222]/g,\r\n P: /[\\u0050\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754]/g,\r\n Q: /[\\u0051\\u24C6\\uFF31\\uA756\\uA758\\u024A]/g,\r\n R: /[\\u0052\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782]/g,\r\n S: /[\\u0053\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784]/g,\r\n T: /[\\u0054\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786]/g,\r\n TZ: /[\\uA728]/g,\r\n 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,\r\n V: /[\\u0056\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245]/g,\r\n VY: /[\\uA760]/g,\r\n W: /[\\u0057\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72]/g,\r\n X: /[\\u0058\\u24CD\\uFF38\\u1E8A\\u1E8C]/g,\r\n Y: /[\\u0059\\u24CE\\uFF39\\u1EF2\\u00DD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE]/g,\r\n Z: /[\\u005A\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762]/g,\r\n 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,\r\n aa: /[\\uA733]/g,\r\n ae: /[\\u00E6\\u01FD\\u01E3]/g,\r\n ao: /[\\uA735]/g,\r\n au: /[\\uA737]/g,\r\n av: /[\\uA739\\uA73B]/g,\r\n ay: /[\\uA73D]/g,\r\n b: /[\\u0062\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253]/g,\r\n c: /[\\u0063\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\u00E7\\u1E09\\u0188\\u023C\\uA73F\\u2184]/g,\r\n d: /[\\u0064\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A]/g,\r\n dz: /[\\u01F3\\u01C6]/g,\r\n 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,\r\n f: /[\\u0066\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C]/g,\r\n g: /[\\u0067\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F]/g,\r\n h: /[\\u0068\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265]/g,\r\n hv: /[\\u0195]/g,\r\n i: /[\\u0069\\u24D8\\uFF49\\u00EC\\u00ED\\u00EE\\u0129\\u012B\\u012D\\u00EF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131]/g,\r\n j: /[\\u006A\\u24D9\\uFF4A\\u0135\\u01F0\\u0249]/g,\r\n k: /[\\u006B\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3]/g,\r\n l: /[\\u006C\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747]/g,\r\n lj: /[\\u01C9]/g,\r\n m: /[\\u006D\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F]/g,\r\n n: /[\\u006E\\u24DD\\uFF4E\\u01F9\\u0144\\u00F1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5]/g,\r\n nj: /[\\u01CC]/g,\r\n 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,\r\n oi: /[\\u01A3]/g,\r\n ou: /[\\u0223]/g,\r\n oo: /[\\uA74F]/g,\r\n p: /[\\u0070\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755]/g,\r\n q: /[\\u0071\\u24E0\\uFF51\\u024B\\uA757\\uA759]/g,\r\n r: /[\\u0072\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783]/g,\r\n s: /[\\u0073\\u24E2\\uFF53\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B]/g,\r\n ss: /[\\u00DF]/g,\r\n t: /[\\u0074\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787]/g,\r\n tz: /[\\uA729]/g,\r\n 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,\r\n v: /[\\u0076\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C]/g,\r\n vy: /[\\uA761]/g,\r\n w: /[\\u0077\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73]/g,\r\n x: /[\\u0078\\u24E7\\uFF58\\u1E8B\\u1E8D]/g,\r\n y: /[\\u0079\\u24E8\\uFF59\\u1EF3\\u00FD\\u0177\\u1EF9\\u0233\\u1E8F\\u00FF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF]/g,\r\n z: /[\\u007A\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763]/g\r\n };\r\n for (const x of Object.keys(diacriticsMap)) {\r\n // Iterate through each keys in the above object and perform a replace\r\n str = str.replace(diacriticsMap[x], x);\r\n }\r\n return str;\r\n }\r\n}\r\n","/*\r\n * Copyright (C) MapLander S de R.L de C.V - All Rights Reserved\r\n * Unauthorized copying of this file, via any medium is strictly prohibited\r\n * Proprietary and confidential\r\n */\r\n\r\nimport {Pipe, PipeTransform} from '@angular/core';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\n\r\n@Pipe({\r\n name: 'markerPrice'\r\n})\r\nexport class MarkerPricePipe implements PipeTransform {\r\n\r\n transform(price: number, currency?: string): string {\r\n const locate: {locate: string, currency: string} = ConstantsComponents.LocateList[currency || 'MXN'];\r\n let outputPrice;\r\n if (((price / 100000.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100000.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'M';\r\n } else if (((price / 100.0) / 10.0) >= 1) {\r\n outputPrice = Utils.round(Number((price / 100.0) / 10.0), 2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n outputPrice += 'K';\r\n } else {\r\n outputPrice = Number(price).toFixed(2);\r\n outputPrice = Number(outputPrice).toLocaleString(locate.locate, {\r\n style: 'currency',\r\n currency: locate.currency\r\n }).toString();\r\n }\r\n return '' + outputPrice;\r\n }\r\n\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {MarkerPricePipe} from './marker-price.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n MarkerPricePipe\r\n ],\r\n exports: [\r\n MarkerPricePipe\r\n ]\r\n})\r\nexport class MarkerPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkerPriceModule,\r\n providers: [\r\n MarkerPricePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {OfferingTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'offeringType'\r\n})\r\nexport class OfferingTypePipe implements PipeTransform {\r\n\r\n transform(value: OfferingTypeEnum, prefix?: string): string {\r\n let response = prefix ? prefix : 'en';\r\n ConstantsComponents.OfferingTypeList.forEach(type => {\r\n if (type.value === value) {\r\n response += ` ${type.name.toLowerCase()}`;\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {OfferingTypePipe} from './offering-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n OfferingTypePipe\r\n ],\r\n exports: [\r\n OfferingTypePipe\r\n ]\r\n})\r\nexport class OfferingTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: OfferingTypeModule,\r\n providers: [\r\n OfferingTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\n\r\n@Pipe({\r\n name: 'propertyType'\r\n})\r\nexport class PropertyTypePipe implements PipeTransform {\r\n transform(value: PropertyTypeEnum, toLowerCase?: boolean): string {\r\n let result = '';\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === value) {\r\n result = type.name;\r\n }\r\n });\r\n return (toLowerCase) ? result.toLowerCase() : result;\r\n }\r\n\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PropertyTypePipe} from './property-type.pipe';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n PropertyTypePipe\r\n ],\r\n exports: [\r\n PropertyTypePipe\r\n ]\r\n})\r\nexport class PropertyTypeModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyTypeModule,\r\n providers: [\r\n PropertyTypePipe\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnChanges, OnDestroy, SimpleChanges} from '@angular/core';\r\nimport {CurrencyPipe} from '@angular/common';\r\nimport {AbstractControl} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[libFormatPrice]'\r\n})\r\nexport class FormatPriceDirective implements AfterViewInit, OnChanges, OnDestroy {\r\n\r\n @Input() control: AbstractControl;\r\n @Input() currency: string;\r\n private _el: HTMLInputElement;\r\n private _value: any;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n private _elRef: ElementRef,\r\n private _currency: CurrencyPipe\r\n ) {\r\n this._subscription = new Subscription();\r\n this._el = this._elRef.nativeElement;\r\n }\r\n\r\n private static removeError(control: AbstractControl, error: string): void {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n if (this._value) {\r\n this.validateFormatPrice(this._value);\r\n }\r\n }\r\n if (changes['control'] && changes['control'].currentValue) {\r\n this._subscription.add(\r\n this.control.valueChanges.subscribe(response => {\r\n this._value = response;\r\n })\r\n );\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._el.addEventListener('focus', this.onFocus.bind(this));\r\n this._el.addEventListener('blur', this.onBlur.bind(this));\r\n this._value = this._el.value;\r\n this._el.value = this.formatPrice(this._el.value);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n this._el.removeEventListener('focus', this.onFocus.bind(this));\r\n this._el.removeEventListener('blur', this.onBlur.bind(this));\r\n }\r\n\r\n private formatPrice(value: any): any {\r\n return this._currency.transform(value, this.currency && this.currency !== 'MXN' ? this.currency : null, 'symbol', '1.0-0');\r\n }\r\n\r\n private onFocus() {\r\n this._el.value = this._value;\r\n }\r\n\r\n private onBlur(event: any) {\r\n this.validateFormatPrice(event.target.value);\r\n }\r\n\r\n private validateFormatPrice(value: any): void {\r\n if (Number.isNaN(Number(value))) {\r\n this.control.setErrors({\r\n format: true\r\n });\r\n return;\r\n }\r\n FormatPriceDirective.removeError(this.control, 'format');\r\n this._value = value;\r\n this._el.value = this.formatPrice(value);\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {FormatPriceDirective} from './format-price.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n FormatPriceDirective\r\n ],\r\n exports: [\r\n FormatPriceDirective\r\n ]\r\n})\r\nexport class FormatPriceModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: FormatPriceModule,\r\n providers: [\r\n CurrencyPipe,\r\n FormatPriceDirective\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Directive, ElementRef, Input, OnDestroy} from '@angular/core';\r\nimport {PropertyTypeEnum} from '@maplander/types';\r\n\r\n@Directive({\r\n selector: '[libImageError]'\r\n})\r\nexport class ImageErrorDirective implements AfterViewInit, OnDestroy {\r\n\r\n @Input() typeImage: PropertyTypeEnum;\r\n private _el: HTMLImageElement;\r\n private _onError;\r\n private readonly CDN_URL: string = 'https://storage.googleapis.com/maplander-develop/public/file/front-end/cdn/images-stock';\r\n\r\n constructor(private _ref: ElementRef) {\r\n this._el = this._ref.nativeElement;\r\n if (this._el.constructor !== HTMLImageElement) {\r\n throw new Error('libImageError directive works only image element');\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._onError = () => {\r\n this.updateUrl();\r\n };\r\n this._el.addEventListener('error', this._onError);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._el.removeEventListener('error', this._onError);\r\n }\r\n\r\n updateUrl() {\r\n switch (this.typeImage) {\r\n case PropertyTypeEnum.HOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n case PropertyTypeEnum.OFFICE:\r\n this._el.src = `${this.CDN_URL}/Stock-Office.jpg`;\r\n break;\r\n case PropertyTypeEnum.RETAIL:\r\n this._el.src = `${this.CDN_URL}/Stock-Retail.jpg`;\r\n break;\r\n case PropertyTypeEnum.LAND:\r\n this._el.src = `${this.CDN_URL}/Stock-Land.jpg`;\r\n break;\r\n case PropertyTypeEnum.WAREHOUSE:\r\n this._el.src = `${this.CDN_URL}/Stock-Warehouse.jpg`;\r\n break;\r\n case PropertyTypeEnum.APARTMENT:\r\n case PropertyTypeEnum.ROOM:\r\n this._el.src = `${this.CDN_URL}/Stock-Apartment.jpg`;\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this._el.src = `${this.CDN_URL}/Stock-Investment.jpg`;\r\n break;\r\n case PropertyTypeEnum.RESIDENTIAL:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n default:\r\n this._el.src = `${this.CDN_URL}/Stock-House.jpg`;\r\n break;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {ImageErrorDirective} from './image-error.directive';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [\r\n ImageErrorDirective\r\n ],\r\n exports: [\r\n ImageErrorDirective\r\n ]\r\n})\r\nexport class ImageErrorModule { }\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\n\r\n@Component({\r\n selector: 'lib-document-visor',\r\n templateUrl: './document-visor.component.html',\r\n styleUrls: ['./document-visor.component.scss']\r\n})\r\nexport class DocumentVisorComponent implements OnInit {\r\n\r\n public url: string;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: string,\r\n private _dialog: MatDialogRef<DocumentVisorComponent>\r\n ) {\r\n }\r\n\r\n private static isBase64(str): boolean {\r\n try {\r\n return btoa(atob(str)) === str;\r\n } catch (err) {\r\n return false;\r\n }\r\n }\r\n\r\n private static isURL(url: string): boolean {\r\n const pattern = 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\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\\\d{2,5})?(?:[/?#]\\\\S*)?$', 'i');\r\n return pattern.test(url);\r\n }\r\n\r\n ngOnInit() {\r\n this.url = this._data;\r\n }\r\n\r\n close(): void {\r\n if (!DocumentVisorComponent.isBase64(this.url) && !DocumentVisorComponent.isURL(this.url)) {\r\n URL.revokeObjectURL(this.url);\r\n }\r\n this._dialog.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\n\r\n@Injectable()\r\nexport class DocumentVisorService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(document: string): MatDialogRef<DocumentVisorComponent> {\r\n return this._dialog.open(DocumentVisorComponent, {\r\n data: document,\r\n disableClose: true,\r\n panelClass: 'document_visor_dialog'\r\n });\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatDialogModule} from '@angular/material/dialog';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {DocumentVisorComponent} from './document-visor.component';\r\nimport {DocumentVisorService} from './document-visor.service';\r\nimport {SafeUrlModule} from '@maplander/shared';\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatDialogModule,\r\n MatIconModule\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n SafeUrlModule.forChild(),\r\n MATERIAL\r\n ],\r\n declarations: [\r\n DocumentVisorComponent\r\n ],\r\n exports: [\r\n DocumentVisorComponent\r\n ],\r\n entryComponents: [\r\n DocumentVisorComponent\r\n ]\r\n})\r\nexport class DocumentVisorModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: DocumentVisorModule,\r\n providers: [\r\n DocumentVisorService\r\n ]\r\n };\r\n }\r\n}\r\n","export enum FilterChipType {\r\n OFFERING = 'OFFERING',\r\n PROPERTY_TYPE = 'PROPERTY_TYPE',\r\n PRICE = 'PRICE',\r\n BEDROOMS = 'BEDROOMS',\r\n BATHROOMS = 'BATHROOMS',\r\n PARKING_PLACES = 'PARKING_PLACES',\r\n SURFACE = 'SURFACE',\r\n AMENITIES = 'AMENITIES',\r\n LISTING = 'LISTING'\r\n}\r\n","export enum FiltersChangeType {\r\n APPLY,\r\n INIT,\r\n AREA,\r\n SAVE,\r\n LIST_TYPE\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const FILTERS_TOKEN = new InjectionToken<boolean>('FILTERS MODULE CONFIG');\r\n","import {Inject, Injectable, Optional} from '@angular/core';\r\nimport {BehaviorSubject, Observable, Subject} from 'rxjs';\r\nimport {LocalStorageService} from '@maplander/static';\r\nimport {FiltersChangeType} from '../../utils/enums/filters-change-type';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {Utils} from '../../utils';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\nimport {FiltersSaved} from '../../utils/models';\r\n\r\n@Injectable()\r\nexport class FiltersService {\r\n\r\n private static FILTERS_SAVED_KEY = 'FILTERS';\r\n private _notifier: BehaviorSubject<FiltersChange>;\r\n private _startComponent: Subject<FiltersWrapper>;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean\r\n ) {\r\n this._startComponent = new Subject<FiltersWrapper>();\r\n this._notifier = new BehaviorSubject<FiltersChange>({\r\n filter: Utils.getInitialFilter(this._config || false),\r\n type: FiltersChangeType.INIT,\r\n ft: false\r\n });\r\n }\r\n\r\n static removeFiltersSaved(): void {\r\n LocalStorageService.removeItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static getFiltersSaved(): FiltersSaved {\r\n return LocalStorageService.getItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY);\r\n }\r\n\r\n static saveFilters(config: FiltersSaved): void {\r\n LocalStorageService.setItem<FiltersSaved>(FiltersService.FILTERS_SAVED_KEY, {\r\n filters: config.filters,\r\n ft: config.ft || false,\r\n isSharedProperties: config.isSharedProperties || false\r\n });\r\n }\r\n\r\n setChange(change: FiltersChange): void {\r\n this._notifier.next(change);\r\n }\r\n\r\n getChanges(): Observable<FiltersChange> {\r\n return this._notifier.asObservable();\r\n }\r\n\r\n startComponent(wrapper: FiltersWrapper): void {\r\n this._startComponent.next(wrapper);\r\n }\r\n\r\n onStartComponent(): Observable<FiltersWrapper> {\r\n return this._startComponent.asObservable();\r\n }\r\n}\r\n","import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';\r\nimport {Filter, PropertyTypeEnum} from '@maplander/types';\r\nimport {MarkerPricePipe} from './../../pipes/marker-price/marker-price.pipe';\r\nimport {OfferingTypePipe} from './../../pipes/offering-type/offering-type.pipe';\r\nimport {FilterChip} from './../../utils/models/filter-chip';\r\nimport {FilterChipType} from '../../utils/enums/filter-chip-type';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {FiltersService} from './../filters/filters.service';\r\nimport {Subscription} from 'rxjs';\r\nimport {FiltersChange} from '././../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes';\r\n\r\n@Component({\r\n selector: 'lib-fab-filters',\r\n templateUrl: './fab-filters.component.html',\r\n styleUrls: ['./fab-filters.component.scss']\r\n})\r\nexport class FabFiltersComponent implements OnInit, OnDestroy {\r\n @Input() isOPI: boolean;\r\n @Input() mlsLabel: string;\r\n @Output() filterDeleted: EventEmitter<FilterChipType>;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _filter: Filter;\r\n private _wrapper: FiltersWrapper;\r\n private _subscription: Subscription;\r\n public chips: FilterChip[];\r\n\r\n constructor(\r\n private _currency: MarkerPricePipe,\r\n private _offeringPipe: OfferingTypePipe,\r\n private _filtersService: FiltersService\r\n ) {\r\n this.chips = [];\r\n this._subscription = new Subscription();\r\n this.filterDeleted = new EventEmitter<FilterChipType>();\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._filtersService.onStartComponent().subscribe(response => {\r\n this._wrapper = response;\r\n })\r\n );\r\n this._subscription.add(\r\n this._filtersService.getChanges().subscribe((response: FiltersChange) => {\r\n this.init(response.filter, response.ft, response.isSharedProperties);\r\n })\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n openFilters(): void {\r\n if (!this._wrapper) {\r\n console.warn('[FabFiltersComponent] waiting onStartComponent');\r\n return;\r\n }\r\n this._wrapper.open();\r\n }\r\n\r\n onClickChip(type: FilterChipType): void {\r\n if (type === FilterChipType.PROPERTY_TYPE || type === FilterChipType.OFFERING) {\r\n this.openFilters();\r\n }\r\n }\r\n removeFilter(type: FilterChipType): void {\r\n this.filterDeleted.emit(type);\r\n }\r\n\r\n private init(filter: Filter, ft: boolean, sharedProperties?: boolean): void {\r\n this.chips = [];\r\n this._filter = filter;\r\n this.listingType(sharedProperties);\r\n this.propertyType();\r\n this.offeringType();\r\n this.price();\r\n this.surface(ft);\r\n this.bedrooms();\r\n this.bathrooms();\r\n this.parkingPlaces();\r\n this.amenities();\r\n }\r\n\r\n private listingType(sharedProperties?: boolean): void {\r\n if (!this.isOPI) {\r\n return;\r\n }\r\n this.chips.push({\r\n type: FilterChipType.LISTING,\r\n text: sharedProperties ? 'Compartidas' : (this._filter.mls ? this.mlsLabel || 'MLS' : 'Mi lista'),\r\n icon: [this._filter.mls ? 'mlm' : 'list']\r\n });\r\n }\r\n\r\n private offeringType(): void {\r\n if (this._filter.offering && this._filter.type !== PropertyTypeEnum.NONE) {\r\n let offering = this._offeringPipe.transform(this._filter.offering, ' ').replace(/ /g, '');\r\n const firstLetter = offering.substr(0, 1);\r\n offering = offering.replace(firstLetter, '');\r\n offering = `${firstLetter.toLocaleUpperCase()}${offering}`;\r\n this.chips.push({\r\n type: FilterChipType.OFFERING,\r\n text: offering,\r\n icon: null\r\n });\r\n }\r\n }\r\n\r\n private propertyType(): void {\r\n if (this._filter.type && this._filter.type !== PropertyTypeEnum.NONE) {\r\n ConstantsComponents.PropertyTypeList.forEach(item => {\r\n if (item.value === this._filter.type) {\r\n this.chips.push({\r\n type: FilterChipType.PROPERTY_TYPE,\r\n text: item.name,\r\n icon: [item.iconName]\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n private price(): void {\r\n let min = '', max = '', currency;\r\n if (this._filter.downLimitPrice !== 0) {\r\n min += this._currency.transform(this._filter.downLimitPrice);\r\n }\r\n if (this._filter.upLimitPrice !== 0) {\r\n max += this._currency.transform(this._filter.upLimitPrice);\r\n }\r\n if (min !== '' || max !== '') {\r\n currency = this._filter.currency ? this._filter.currency : '';\r\n this.chips.push({\r\n type: FilterChipType.PRICE,\r\n text: `${min}${min !== '' && max !== '' ? ' - ' : ''}${max} ${currency}`,\r\n icon: ['price']\r\n });\r\n }\r\n }\r\n\r\n private surface(ft: boolean): void {\r\n if (this._filter.mainArea !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.SURFACE,\r\n text: (ft ? (this._filter.mainArea / this.METERS_TO_SQ).toFixed(0).toString() : this._filter.mainArea.toString()) + (ft ? ' sq ft' : ' m2'),\r\n icon: ['surface']\r\n });\r\n }\r\n }\r\n\r\n private bedrooms(): void {\r\n if (this._filter.bedrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BEDROOMS,\r\n text: this._filter.bedrooms.toString(),\r\n icon: ['bedroom']\r\n });\r\n }\r\n }\r\n\r\n private bathrooms(): void {\r\n if (this._filter.bathrooms !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.BATHROOMS,\r\n text: this._filter.bathrooms.toString(),\r\n icon: ['bathroom']\r\n });\r\n }\r\n }\r\n\r\n private parkingPlaces(): void {\r\n if (this._filter.parkingPlaces !== 0) {\r\n this.chips.push({\r\n type: FilterChipType.PARKING_PLACES,\r\n text: this._filter.parkingPlaces.toString(),\r\n icon: ['parking']\r\n });\r\n }\r\n }\r\n\r\n private amenities(): void {\r\n if (this._filter.extras && this._filter.extras.length > 0) {\r\n this.chips.push({\r\n type: FilterChipType.AMENITIES,\r\n text: this._filter.extras.length.toString(),\r\n icon: [this._filter.extras[0]]\r\n });\r\n }\r\n }\r\n\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {FabFiltersComponent} from './fab-filters.component';\r\nimport {MatChipsModule} from '@angular/material/chips';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatInputModule} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatFormFieldModule,\r\n MatInputModule,\r\n OfferingTypeModule.forChild(),\r\n MarkerPriceModule.forChild()\r\n ],\r\n declarations: [\r\n FabFiltersComponent\r\n ],\r\n exports: [\r\n FabFiltersComponent\r\n ]\r\n})\r\nexport class FabFiltersModule {\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {CER, Currency} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class CurrencyConverterService {\r\n\r\n list(prices: number[], currencies: CER[], from: Currency, to: Currency): number[] {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n prices = prices.map(price => {\r\n if (from === to) {\r\n return price;\r\n } else {\r\n return valueTo * (price / valueFrom);\r\n }\r\n });\r\n return prices;\r\n }\r\n\r\n number(price: number, currencies: CER[], from: Currency, to: Currency): number {\r\n const valueFrom = this.getValueByCurrency(currencies, from), valueTo = this.getValueByCurrency(currencies, to);\r\n return valueTo * (price / valueFrom);\r\n }\r\n\r\n private getValueByCurrency(currencies: CER[], c: Currency): number {\r\n let value = 0;\r\n currencies.forEach(currency => {\r\n if (currency.type === c.toString()) {\r\n value = currency.value;\r\n }\r\n });\r\n return value;\r\n }\r\n}\r\n","export class MUtils {\r\n static linSpaceExp(start: number, stop: number, n: number): number[] {\r\n const list: number[] = [];\r\n const phi = 1.618033988749895, b = Math.log(stop / start) / ((n - 1) * Math.log(phi));\r\n for (let i = 0; i < n; i++) {\r\n list[i] = start * Math.pow(phi, b * i);\r\n const length = (Math.log10(list[i]) + 1);\r\n if (length > 2) {\r\n list[i] = (Math.round(list[i] / Math.pow(10, length - 2)) * Math.pow(10, length - 2));\r\n }\r\n }\r\n return list;\r\n }\r\n}\r\n","import {AbstractControl} from '@angular/forms';\r\n\r\nexport function removeError(control: AbstractControl, error: string) {\r\n const err = control.errors; // get control errors\r\n if (err) {\r\n delete err[error]; // delete your own error\r\n if (!Object.keys(err).length) { // if no errors left\r\n control.setErrors(null); // set control errors to null making it VALID\r\n } else {\r\n control.setErrors(err); // controls got other errors so set them back\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef, EventEmitter,\r\n Inject,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Optional, Output,\r\n Renderer2,\r\n SimpleChanges\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {Subscription} from 'rxjs';\r\nimport {AppUtil, CER, Currency, Filter, LimitPrice, OfferingTypeEnum, PropertyRange, PropertyTypeEnum} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Utils} from '../../utils';\r\nimport {FiltersChange} from './../../utils/models/filters-change';\r\nimport {FiltersWrapper} from '../../utils/classes/filters-wrapper';\r\nimport {PropertyTypeItem} from './../../utils/models/property-type-item';\r\nimport {CurrencyConverterService} from './../../services/currency-converter/currency-converter.service';\r\nimport {Filters} from '../../utils/interfaces/filters';\r\nimport {FiltersService} from './filters.service';\r\nimport {FiltersChangeType} from '../../utils/enums';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {MUtils} from '../../utils/classes/mUtils';\r\nimport {AmenityItem} from '../../utils/models';\r\nimport {CurrencyFilterValidator} from '../property/validators/currency-filter-validator';\r\n\r\n@Component({\r\n selector: 'lib-filters',\r\n templateUrl: './filters.component.html',\r\n styleUrls: ['./filters.component.scss']\r\n})\r\nexport class FiltersComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy, Filters {\r\n @Input() utils: AppUtil;\r\n @Input() newFilters: boolean;\r\n @Input() totalProperties: number;\r\n @Input() hideAmenities: boolean;\r\n @Input() isRV: boolean;\r\n @Output() filterChange: EventEmitter<Filter>;\r\n private readonly METERS_TO_SQ = 10.76391042;\r\n private _tmpMinPriceList: number[];\r\n private _tmpMaxPriceList: number[];\r\n private _subscription: Subscription;\r\n private _isSharedProperties: boolean;\r\n public filtersForm: FormGroup;\r\n public propertyTypeList: PropertyTypeItem[];\r\n public bedroomsList: number[];\r\n public bathroomsList: number[];\r\n public parkingPlacesList: number[];\r\n public currencyList: CER[];\r\n public minPriceList: number[];\r\n public maxPriceList: number[];\r\n public surfaceList: number[];\r\n public roiList: number[];\r\n public propertyTypeSelected: PropertyTypeItem;\r\n public filter: Filter;\r\n public isOPI: boolean;\r\n public surfaceUnitSelected: number;\r\n\r\n constructor(\r\n @Optional() @Inject(FILTERS_TOKEN) private _config: boolean,\r\n private _render: Renderer2,\r\n private _ref: ElementRef,\r\n private _service: FiltersService,\r\n private _formBuilder: FormBuilder,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n this.filterChange = new EventEmitter<Filter>();\r\n this.isOPI = this._config || false;\r\n this._subscription = new Subscription();\r\n this.propertyTypeList = ConstantsComponents.PropertyTypeList.map(item => ({...item}));\r\n this.bedroomsList = Object.assign([], ConstantsComponents.BedroomList);\r\n this.bathroomsList = Object.assign([], ConstantsComponents.BathroomList);\r\n this.parkingPlacesList = Object.assign([], ConstantsComponents.ParkingSpacesList);\r\n this.surfaceList = Object.assign([], ConstantsComponents.SurfaceList);\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.surfaceUnitSelected = 0;\r\n this.buildForm();\r\n this.initComponentByPropertyType();\r\n this.restoreLastFiltersSaved(true);\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnInit() {\r\n this.openComponent(false);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.utils) {\r\n return console.warn('[FiltersComponent] utils param is required');\r\n }\r\n this.initComponent();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n console.log('[FiltersComponent] utils ready');\r\n this.initComponent();\r\n }\r\n if (changes['isRv'] && changes['isRv'].currentValue) {\r\n this.isRV = changes['isRv'].currentValue || null;\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n open(): void {\r\n this.restoreLastFiltersSaved();\r\n this.openComponent(true);\r\n }\r\n\r\n close(): void {\r\n this.openComponent(false);\r\n }\r\n\r\n changePropertyType(index: number): void {\r\n this.resetFilters(index);\r\n this.applyAmenities();\r\n this.filter.type = this.propertyTypeSelected.value;\r\n switch (this.propertyTypeSelected.value) {\r\n case PropertyTypeEnum.ROOM:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.RENT);\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.filtersForm.controls['offering'].setValue(OfferingTypeEnum.SALE);\r\n break;\r\n }\r\n this.changeFilter();\r\n }\r\n\r\n changeFilter(): void {\r\n this.getFilterByForm();\r\n this.filterChange.emit(this.filter);\r\n }\r\n\r\n changeOffering(ev: string): void {\r\n this.filter.offering = ev as OfferingTypeEnum;\r\n this.changeFilter();\r\n }\r\n\r\n changeCurrency(ev: string): void {\r\n this.filter.currency = ev;\r\n this.changeFilter();\r\n }\r\n\r\n changePrice(): void {\r\n if (!this.filtersForm.get('minPrice').value || this.filtersForm.get('minPrice').value === '') {\r\n this.filtersForm.patchValue({\r\n minPrice: 0\r\n });\r\n }\r\n if (!this.filtersForm.get('maxPrice').value || this.filtersForm.get('maxPrice').value === '') {\r\n this.filtersForm.patchValue({\r\n maxPrice: 0\r\n });\r\n }\r\n this.changeFilter();\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n if (amenity.checked) {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n if (i > -1) {\r\n this.filter.extras.splice(i, 1);\r\n }\r\n } else {\r\n this.filter.extras.push(amenity.value);\r\n }\r\n amenity.checked = !amenity.checked;\r\n this.changeFilter();\r\n }\r\n\r\n saveSearchByFilters(): void {\r\n this.applyFilters(FiltersChangeType.SAVE);\r\n }\r\n\r\n applyFilters(type?: FiltersChangeType): void {\r\n this.getFilterByForm();\r\n const filterToSearch = Object.assign({}, this.filter);\r\n if (this.surfaceUnitSelected === 1) {\r\n filterToSearch.mainArea = filterToSearch.mainArea * this.METERS_TO_SQ;\r\n }\r\n this.updateFiltersSaved(filterToSearch);\r\n this._service.setChange({\r\n type: type || FiltersChangeType.APPLY,\r\n filter: filterToSearch,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties\r\n });\r\n this.openComponent(false);\r\n }\r\n\r\n resetFilters(propertyTypeItemIndex?: number): void {\r\n this.filter.currency = !propertyTypeItemIndex ? 'MXN' : this.filter.currency;\r\n this.initComponentByPropertyType(propertyTypeItemIndex);\r\n this.surfaceUnitSelected = 0;\r\n this.filter = propertyTypeItemIndex ? Utils.getFilterByPropertyType(this.filter) : Utils.getInitialFilter(this.isOPI, this.filter);\r\n this.updateFormByFilters();\r\n this.setPrices();\r\n }\r\n\r\n private buildForm(): void {\r\n this.filtersForm = this._formBuilder.group({\r\n offering: [],\r\n currency: [],\r\n minPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n maxPrice: ['', [Validators.required, Validators.pattern(new RegExp('(^[0-9]+)'))]],\r\n bedrooms: [],\r\n bathrooms: [],\r\n parkingPlaces: [],\r\n surface: [],\r\n surfaceUnit: [],\r\n roi: []\r\n }, {\r\n validator: CurrencyFilterValidator('minPrice', 'maxPrice')\r\n });\r\n }\r\n\r\n private updateFormByFilters(): void {\r\n this.filtersForm.patchValue({\r\n offering: this.filter.offering,\r\n currency: this.filter.currency,\r\n minPrice: this.filter.downLimitPrice,\r\n maxPrice: this.filter.upLimitPrice,\r\n bedrooms: this.filter.bedrooms,\r\n bathrooms: this.filter.bathrooms,\r\n parkingPlaces: this.filter.parkingPlaces,\r\n surface: this.filter.mainArea,\r\n surfaceUnit: this.surfaceUnitSelected,\r\n roi: this.filter.roi\r\n });\r\n }\r\n\r\n private getFilterByForm(): void {\r\n const data = this.filtersForm.value;\r\n this.filter.offering = data.offering;\r\n this.filter.currency = data.currency;\r\n this.filter.downLimitPrice = Number(data.minPrice);\r\n this.filter.upLimitPrice = Number(data.maxPrice);\r\n this.filter.bedrooms = Number(data.bedrooms);\r\n this.filter.bathrooms = Number(data.bathrooms);\r\n this.filter.parkingPlaces = Number(data.parkingPlaces);\r\n this.filter.mainArea = Number(data.surface);\r\n this.surfaceUnitSelected = Number(data.surfaceUnit);\r\n this.filter.roi = Number(data.roi);\r\n }\r\n\r\n private initComponent(): void {\r\n this.initUtils();\r\n this._subscription.add(\r\n this._service.getChanges().subscribe((response: FiltersChange) => {\r\n switch (response.type) {\r\n case FiltersChangeType.LIST_TYPE:\r\n this._isSharedProperties = response.isSharedProperties;\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n case FiltersChangeType.AREA:\r\n this.updateFiltersSaved(response.filter);\r\n break;\r\n }\r\n })\r\n );\r\n this._service.startComponent(new FiltersWrapper(this));\r\n }\r\n\r\n private initUtils(): void {\r\n this.currencyList = this.utils.cers;\r\n this.setPrices();\r\n }\r\n\r\n private setPrices(to?: Currency): void {\r\n this.filtersForm.controls['minPrice'].reset(0);\r\n this.filtersForm.controls['maxPrice'].reset(0);\r\n const offering = this.filtersForm.controls['offering'].value;\r\n this.minPriceList = this.createPrices(this.utils.limitPrice, this.propertyTypeSelected.value, offering);\r\n this.minPriceList = this._converter.list(this.minPriceList, this.utils.cers, Currency.USD, to || this.filter.currency as Currency);\r\n this.maxPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMinPriceList = Object.assign([], this.minPriceList);\r\n this._tmpMaxPriceList = Object.assign([], this.maxPriceList);\r\n }\r\n\r\n private applyAmenities(): void {\r\n this.propertyTypeSelected.amenities = this.propertyTypeSelected.amenities.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n this.propertyTypeSelected.features = this.propertyTypeSelected.features.map(amenity => {\r\n const i = this.filter.extras.indexOf(amenity.value);\r\n amenity.checked = (i > -1);\r\n return amenity;\r\n });\r\n }\r\n\r\n private createPrices(limitPrice: LimitPrice, propertyType: PropertyTypeEnum, offering: OfferingTypeEnum): number[] {\r\n let list: number[] = [];\r\n limitPrice.propertyRanges.forEach((range: PropertyRange) => {\r\n if (range.offering === offering && range.type === propertyType) {\r\n list = MUtils.linSpaceExp(range.min, range.max, 20);\r\n }\r\n });\r\n return list;\r\n }\r\n\r\n private initComponentByPropertyType(propertyTypeItemIndex: number = null): void {\r\n this.propertyTypeSelected = JSON.parse(\r\n JSON.stringify(ConstantsComponents.PropertyTypeList[propertyTypeItemIndex !== null ? propertyTypeItemIndex : 9]));\r\n }\r\n\r\n private updateFiltersSaved(filters: Filter): void {\r\n this.filter = filters;\r\n FiltersService.saveFilters({\r\n filters: filters,\r\n ft: this.surfaceUnitSelected === 1,\r\n isSharedProperties: this._isSharedProperties || false\r\n });\r\n }\r\n\r\n private restoreLastFiltersSaved(init?: boolean): void {\r\n const filtersSaved = FiltersService.getFiltersSaved() || null;\r\n this.filter = filtersSaved ? filtersSaved.filters : Utils.getInitialFilter(this.isOPI);\r\n if (filtersSaved) {\r\n if (filtersSaved.ft) {\r\n this.filter.mainArea = Number((this.filter.mainArea / this.METERS_TO_SQ).toFixed(0));\r\n this.surfaceUnitSelected = filtersSaved.ft ? 1 : 0;\r\n }\r\n this._isSharedProperties = filtersSaved.isSharedProperties || false;\r\n }\r\n this.propertyTypeSelected = ConstantsComponents.PropertyTypeList.find(item => item.value === this.filter.type);\r\n this.applyAmenities();\r\n this.updateFormByFilters();\r\n if (init) {\r\n this.applyFilters(FiltersChangeType.INIT);\r\n }\r\n }\r\n\r\n private openComponent(open: boolean): void {\r\n if (open) {\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'visible');\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '1');\r\n } else {\r\n this._render.setStyle(this._ref.nativeElement, 'opacity', '0');\r\n this._render.setStyle(this._ref.nativeElement, 'visibility', 'collapse');\r\n }\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.filtersForm.controls['offering'].valueChanges.subscribe(() => {\r\n this.setPrices();\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['currency'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.setPrices(value.toString() as Currency);\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['minPrice'].valueChanges.subscribe((value) => {\r\n if (!value) {\r\n return;\r\n }\r\n this.maxPriceList = Object.assign([], this._tmpMaxPriceList);\r\n const i = this.minPriceList.indexOf(value);\r\n if (i > -1) {\r\n this.maxPriceList.splice(0, i + 1);\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.filtersForm.controls['maxPrice'].valueChanges.subscribe(value => {\r\n if (!value) {\r\n return;\r\n }\r\n this.minPriceList = Object.assign([], this._tmpMinPriceList);\r\n const i = this.maxPriceList.indexOf(value);\r\n if (i > -1) {\r\n const difference = this.minPriceList.length - this.maxPriceList.length;\r\n this.minPriceList.splice(i + difference, this.minPriceList.length - 1);\r\n }\r\n })\r\n );\r\n }\r\n\r\n}\r\n","import {AbstractControl, FormGroup, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\n\r\nexport function CurrencyFilterValidator(controlName: string, controlName2: string): ValidatorFn {\r\n return (control: FormGroup): { [key: string]: boolean } | null => {\r\n if (control) {\r\n const peerControl = control.controls[controlName];\r\n const peerControl2 = control.controls[controlName2];\r\n if (peerControl2.value) {\r\n if (peerControl.value >= peerControl2.value) {\r\n peerControl2.setErrors({\r\n currency: true\r\n });\r\n }\r\n if (peerControl.value < peerControl2.value) {\r\n removeError(peerControl2, 'currency');\r\n }\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {CurrencyConverterService} from './currency-converter.service';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class CurrencyConverterModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: CurrencyConverterModule,\r\n providers: [\r\n CurrencyConverterService\r\n ]\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {FiltersComponent} from './filters.component';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatDividerModule} from '@angular/material/divider';\r\nimport {MarkerPriceModule} from './../../pipes/marker-price/marker-price.module';\r\nimport {CurrencyConverterModule} from './../../services/currency-converter/currency-converter.module';\r\nimport {FiltersService} from './filters.service';\r\nimport {FILTERS_TOKEN} from './token';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {MatRippleModule} from '@angular/material/core';\r\nimport { MatInputModule } from '@angular/material';\r\nimport {FormatPriceModule} from '../../directives/format-price/format-price.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n MatRippleModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatButtonToggleModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n MatDividerModule,\r\n MatInputModule,\r\n MarkerPriceModule.forChild(),\r\n CurrencyConverterModule.forChild(),\r\n FormatPriceModule.forChild()\r\n ],\r\n declarations: [\r\n FiltersComponent\r\n ],\r\n exports: [\r\n FiltersComponent\r\n ],\r\n providers: [\r\n FiltersService\r\n ]\r\n})\r\nexport class FiltersModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: FiltersModule,\r\n providers: [\r\n FiltersService,\r\n {\r\n provide: FILTERS_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {AfterViewInit, Component, ElementRef, Input, OnDestroy, ViewChild} from '@angular/core';\r\nimport {LazyLoadService} from '@maplander/shared';\r\nimport {Observable, of} from 'rxjs';\r\nimport {fromPromise} from 'rxjs/internal-compatibility';\r\nimport {map, mergeMap} from 'rxjs/operators';\r\n\r\ndeclare var PANOLENS: any;\r\ndeclare var DeviceOrientationEvent: any;\r\ndeclare var DeviceMotionEvent: any;\r\n\r\n@Component({\r\n selector: 'lib-panorama-visor',\r\n templateUrl: './panorama-visor.component.html',\r\n styleUrls: ['./panorama-visor.component.scss']\r\n})\r\nexport class PanoramaVisorComponent implements AfterViewInit, OnDestroy {\r\n @Input() url: string;\r\n @ViewChild('container', {static: true}) private _container: ElementRef;\r\n private _panorama: any;\r\n private _viewer: any;\r\n public isTouch: boolean;\r\n public showPanorama: boolean;\r\n public isFullScreen: boolean;\r\n\r\n constructor(\r\n private _lazy: LazyLoadService\r\n ) {\r\n }\r\n\r\n private static checkTouchSupported(): boolean {\r\n return window ? (\r\n window.navigator.msMaxTouchPoints !== null &&\r\n window.navigator.msMaxTouchPoints !== undefined)\r\n || 'ontouchstart' in window : false;\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (!this.url || this.url === '') {\r\n return;\r\n }\r\n this._lazy.load('https://pchen66.github.io/js/three/three.min.js').then(() => {\r\n return this._lazy.load('https://rawgit.com/pchen66/panolens.js/dev/build/panolens.min.js');\r\n }).then(() => {\r\n setTimeout(() => {\r\n this.showPanorama = true;\r\n this.init();\r\n }, 500);\r\n }).catch((e) => {\r\n console.log('Failed', e);\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n if (this._panorama) {\r\n this._panorama.dispose();\r\n }\r\n if (this._viewer) {\r\n this._viewer.dispose();\r\n this._viewer.destroy();\r\n }\r\n }\r\n\r\n fullscreen(): void {\r\n this.toggleFullscreen();\r\n }\r\n\r\n changeControl(type: 'TOUCH' | 'MOUSE' | 'SENSOR'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (type) {\r\n case 'MOUSE':\r\n case 'TOUCH':\r\n this._viewer.enableControl(PANOLENS.CONTROLS.ORBIT);\r\n break;\r\n case 'SENSOR':\r\n this.requestPermissions().subscribe((value) => {\r\n if (value) {\r\n this._viewer.enableControl(PANOLENS.CONTROLS.DEVICEORIENTATION);\r\n } else {\r\n if (confirm(`No se otorgarón los permisos de movimiento y orientación, ¿desea ir a ajustes?`)) {\r\n window.location.href = 'prefs:root=Safari';\r\n } else {\r\n alert('Permisos de movimiento y orientación no otorgados');\r\n }\r\n }\r\n });\r\n break;\r\n }\r\n }\r\n\r\n changeMode(mode: 'NORMAL' | 'CARDBOARD' | 'STEREOSCOPIC'): void {\r\n if (!this._viewer) {\r\n return;\r\n }\r\n switch (mode) {\r\n case 'NORMAL':\r\n this._viewer.disableEffect();\r\n break;\r\n case 'CARDBOARD':\r\n this._viewer.enableEffect(PANOLENS.MODES.CARDBOARD);\r\n break;\r\n case 'STEREOSCOPIC':\r\n this._viewer.enableEffect(PANOLENS.MODES.STEREO);\r\n break;\r\n }\r\n }\r\n\r\n private init(): void {\r\n try {\r\n this.isTouch = PanoramaVisorComponent.checkTouchSupported();\r\n this._panorama = new PANOLENS.ImagePanorama(this.url);\r\n this._viewer = new PANOLENS.Viewer({container: this._container.nativeElement, controlBar: true, controlButtons: []});\r\n this._viewer.onWindowResize(this._container.nativeElement.offsetWidth, this._container.nativeElement.offsetHeight);\r\n this._viewer.add(this._panorama);\r\n } catch (e) {\r\n console.log('Failed', e);\r\n }\r\n }\r\n\r\n private toggleFullscreen(): void {\r\n const doc: any = window.document;\r\n const docEl: any = this._container.nativeElement;\r\n const requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen ||\r\n docEl.webkitRequestFullScreen || docEl.msRequestFullscreen;\r\n const cancelFullScreen = doc.exitFullscreen || doc.mozCancelFullScreen || doc.webkitExitFullscreen || doc.msExitFullscreen;\r\n if (!doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {\r\n requestFullScreen.call(docEl);\r\n this.isFullScreen = true;\r\n } else {\r\n cancelFullScreen.call(doc);\r\n this.isFullScreen = false;\r\n }\r\n }\r\n\r\n private requestPermissions(): Observable<boolean> {\r\n const success = of(true), failed = of(false);\r\n if (typeof DeviceMotionEvent.requestPermission === 'function') {\r\n return fromPromise(DeviceOrientationEvent.requestPermission()).pipe(\r\n mergeMap((response) => {\r\n if (response === 'granted') {\r\n return fromPromise(DeviceMotionEvent.requestPermission()).pipe(\r\n map((response2) => {\r\n return response2 === 'granted';\r\n })\r\n );\r\n } else {\r\n return failed;\r\n }\r\n })\r\n );\r\n } else {\r\n return success;\r\n }\r\n }\r\n}\r\n","import {NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {PanoramaVisorComponent} from './panorama-visor.component';\r\nimport {LazyLoaderModule} from '@maplander/shared';\r\nimport {MatButtonModule, MatIconModule, MatMenuModule} from '@angular/material';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatMenuModule,\r\n MatButtonModule,\r\n MatIconModule,\r\n LazyLoaderModule.forChild()\r\n ],\r\n declarations: [\r\n PanoramaVisorComponent\r\n ],\r\n exports: [\r\n PanoramaVisorComponent\r\n ]\r\n})\r\nexport class PanoramaVisorModule {\r\n}\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\n\r\ninterface MultimediaUploaderData {\r\n currentType: PFileTypeEnum;\r\n multimedia: PFile[];\r\n newMedia: UserMedia[];\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property-multimedia-uploader',\r\n templateUrl: './multimedia-uploader.component.html',\r\n styleUrls: ['./multimedia-uploader.component.scss']\r\n})\r\nexport class MultimediaUploaderComponent implements OnInit {\r\n\r\n public fileType: 'image' | 'image360' | 'document';\r\n public images: PFile[];\r\n public images360: PFile[];\r\n public videos: PFile[];\r\n public currentIndex: number;\r\n private _newMedia: UserMedia[];\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: MultimediaUploaderData,\r\n private _dialog: MatDialogRef<MultimediaUploaderComponent, { multimedia: PFile[], newMedia: UserMedia[] }>\r\n ) {\r\n switch (this._data.currentType) {\r\n case PFileTypeEnum.IMAGE:\r\n this.fileType = 'image';\r\n this.currentIndex = 0;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.fileType = 'image360';\r\n this.currentIndex = 1;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.fileType = 'document';\r\n this.currentIndex = 2;\r\n break;\r\n }\r\n this.images = [];\r\n this.images360 = [];\r\n this.videos = [];\r\n this._newMedia = [];\r\n }\r\n\r\n private static getYouTubeID(text: string): string {\r\n if (text.indexOf('https://youtu.be/') !== -1) {\r\n text = text.replace('https://youtu.be/', '');\r\n return text;\r\n } else if (text.indexOf('https://www.youtube.com/') !== -1) {\r\n text = text.replace('https://www.youtube.com/', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('watch?v=') !== -1) {\r\n text = text.replace('watch?v=', '');\r\n } else {\r\n return text = null;\r\n }\r\n if (text.indexOf('&')) {\r\n const arr = text.split('&');\r\n text = arr[0];\r\n }\r\n return text;\r\n }\r\n\r\n ngOnInit() {\r\n this.parseMultimedia();\r\n }\r\n\r\n onUploadImage(ev: UserMedia | UserMedia[]): void {\r\n if (!ev) {\r\n return;\r\n }\r\n switch (this.fileType) {\r\n case 'image':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImagePFile(image);\r\n });\r\n } else {\r\n this.createImagePFile(ev);\r\n }\r\n break;\r\n case 'image360':\r\n if (Array.isArray(ev)) {\r\n ev.forEach(image => {\r\n this.createImage360PFile(image);\r\n });\r\n } else {\r\n this.createImage360PFile(ev);\r\n }\r\n break;\r\n }\r\n }\r\n\r\n onTabChanged(tab: number): void {\r\n this.currentIndex = tab;\r\n switch (tab) {\r\n case 0:\r\n this.fileType = 'image';\r\n break;\r\n case 1:\r\n this.fileType = 'image360';\r\n break;\r\n }\r\n }\r\n\r\n onListChanged(ev: PFile[]): void {\r\n switch (this.currentIndex) {\r\n case 0:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images = ev;\r\n }\r\n break;\r\n case 1:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.images360 = ev;\r\n }\r\n break;\r\n case 2:\r\n if (Array.isArray(ev) && ev.length > 0) {\r\n ev = ev.map((item, index) => {\r\n item.position = index;\r\n return item;\r\n });\r\n this.videos = ev;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n removeMedia(ev: PFile): void {\r\n let i = -1;\r\n if (!ev.id) {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n this._newMedia.forEach((item, index) => {\r\n if (item.url === ev.fileCS.thumbnail) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n } else {\r\n switch (ev.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.splice(this.images.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.splice(this.images360.indexOf(ev), 1);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.splice(this.videos.indexOf(ev), 1);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n onYouTubeInputTextChanged(input: HTMLInputElement): void {\r\n if (input.value === '') {\r\n return;\r\n }\r\n const id = MultimediaUploaderComponent.getYouTubeID(input.value);\r\n if (!id) {\r\n return;\r\n }\r\n if (id.length >= 11) {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.VIDEO;\r\n file.media = true;\r\n file.name = `video_${new Date().getTime()}`;\r\n file.fileCS = {\r\n thumbnail: id,\r\n blobName: null\r\n };\r\n file.position = this.videos.length === 0 ? 0 : this.videos.length;\r\n this.videos.push(file);\r\n input.value = '';\r\n }\r\n }\r\n\r\n accept(): void {\r\n this._dialog.close({multimedia: this.joinMultimediaTypes(), newMedia: this._newMedia});\r\n }\r\n\r\n close(): void {\r\n this._dialog.close(null);\r\n }\r\n\r\n private createImagePFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.IMAGE;\r\n image.type = PFileTypeEnum.IMAGE;\r\n file.media = true;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n const fileName = `image_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.position = this.images.length === 0 ? 0 : this.images.length;\r\n this._newMedia.push(image);\r\n this.images.push(file);\r\n }\r\n\r\n private createImage360PFile(image: UserMedia): void {\r\n const file = new PFile();\r\n file.type = PFileTypeEnum.SPHERIC;\r\n image.type = PFileTypeEnum.SPHERIC;\r\n file.media = true;\r\n const fileName = `spheric_${Date.now()}_${Math.round(Math.random() * 1000000)}.${image.blob.type.replace('image/', '')}`;\r\n file.name = fileName;\r\n image.name = fileName;\r\n file.fileCS = {\r\n thumbnail: image.url,\r\n blobName: null\r\n };\r\n file.position = this.images360.length === 0 ? 0 : this.images360.length;\r\n this._newMedia.push(image);\r\n this.images360.push(file);\r\n }\r\n\r\n private parseMultimedia(): void {\r\n if (this._data) {\r\n this._data.multimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.images.push(item);\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.images360.push(item);\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.videos.push(item);\r\n break;\r\n }\r\n });\r\n this._newMedia = this._data.newMedia || [];\r\n }\r\n }\r\n\r\n private joinMultimediaTypes(): PFile[] {\r\n let response = [];\r\n response = response.concat(this.images);\r\n response = response.concat(this.images360);\r\n response = response.concat(this.videos);\r\n return response;\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {MultimediaUploaderComponent} from './multimedia-uploader.component';\r\n\r\n@Injectable()\r\nexport class MultimediaUploaderService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(currentType: PFileTypeEnum, multimedia?: PFile[], newMedia?: UserMedia[]): MatDialogRef<MultimediaUploaderComponent> {\r\n return this._dialog.open<MultimediaUploaderComponent, {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]},\r\n {currentType: PFileTypeEnum, multimedia: PFile[], newMedia: UserMedia[]}>\r\n (MultimediaUploaderComponent, {\r\n data: {currentType: currentType || PFileTypeEnum.IMAGE, multimedia: multimedia || [], newMedia: newMedia || []},\r\n panelClass: 'multimedia-uploader-panel-class',\r\n disableClose: true\r\n });\r\n }\r\n}\r\n","import {Component} from '@angular/core';\r\nimport {MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse, DialogResponseType} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\n\r\n@Component({\r\n selector: 'lib-property-announce-confirm',\r\n templateUrl: './announce-confirm.component.html',\r\n styleUrls: ['./announce-confirm.component.scss']\r\n})\r\nexport class AnnounceConfirmComponent {\r\n\r\n public list: { name: string, value: number, checked: boolean }[];\r\n public errorField: boolean;\r\n constructor(\r\n private _dialogRef: MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>>\r\n ) {\r\n this.list = ConstantsComponents.AnnounceCheckList.map(item => ({...item}));\r\n }\r\n\r\n public close(): void {\r\n this._dialogRef.close({code: DialogResponseType.CANCEL});\r\n }\r\n\r\n public accept(): void {\r\n this.errorField = false;\r\n this.list.forEach(item => {\r\n if (!item.checked) {\r\n this.errorField = true;\r\n }\r\n });\r\n if (this.errorField) {\r\n return;\r\n }\r\n this._dialogRef.close({code: DialogResponseType.ACCEPT});\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {DialogResponse} from '@maplander/types';\r\nimport {AnnounceConfirmComponent} from './announce-confirm.component';\r\n\r\n@Injectable()\r\nexport class AnnounceConfirmService {\r\n\r\n constructor(private _dialog: MatDialog) {\r\n }\r\n\r\n public open():\r\n MatDialogRef<AnnounceConfirmComponent, DialogResponse<any>> {\r\n return this._dialog.open(AnnounceConfirmComponent, {\r\n disableClose: true,\r\n panelClass: 'confirm-announce-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, Inject, OnDestroy, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile, PFileTypeEnum} from '@maplander/types';\r\nimport {BreakpointObserver} from '@angular/cdk/layout';\r\nimport {GalleryConfig} from './gallery.service';\r\nimport {Subscription} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-gallery',\r\n templateUrl: './gallery.component.html',\r\n styleUrls: ['./gallery.component.scss']\r\n})\r\nexport class GalleryComponent implements OnInit, OnDestroy {\r\n\r\n public multimedia: PFile[];\r\n public sideOpened: boolean;\r\n public typeSelected: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n public indexSelected: number;\r\n public count: {\r\n image: number,\r\n video: number,\r\n sphere: number\r\n };\r\n private _mobileVersion: boolean;\r\n private _subscription: Subscription;\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) private _data: GalleryConfig,\r\n private _ref: MatDialogRef<GalleryComponent>,\r\n private _breakpointObserver: BreakpointObserver\r\n ) {\r\n this._subscription = new Subscription();\r\n this.multimedia = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia || []);\r\n this.sideOpened = true;\r\n this.indexSelected = this._data.indexSelected;\r\n this.typeSelected = 'IMAGE';\r\n this.count = {\r\n image: 0,\r\n sphere: 0,\r\n video: 0\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this._subscription.add(\r\n this._breakpointObserver.observe(['(max-width: 1024px)']).subscribe((state) => {\r\n this._mobileVersion = state.matches;\r\n })\r\n );\r\n this.assignCountByType();\r\n this.assignMultimediaByType();\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n close(): void {\r\n this._ref.close();\r\n }\r\n\r\n updateSideNav(): void {\r\n this.sideOpened = !this.sideOpened;\r\n }\r\n\r\n selectPFile(index: number): void {\r\n this.indexSelected = index;\r\n if (this._mobileVersion) {\r\n this.updateSideNav();\r\n }\r\n }\r\n\r\n onIndexSelectedChange(ev: number): void {\r\n this.indexSelected = ev;\r\n }\r\n\r\n changePFileType(type: 'IMAGE' | 'VIDEO' | 'SPHERIC'): void {\r\n this.indexSelected = 0;\r\n this.typeSelected = type;\r\n const pFileType = type as PFileTypeEnum;\r\n this.multimedia = this.getPFilesByType(pFileType, this._data.multimedia);\r\n }\r\n\r\n private assignCountByType(): void {\r\n this.count.image = this.getPFilesByType(PFileTypeEnum.IMAGE, this._data.multimedia).length;\r\n this.count.video = this.getPFilesByType(PFileTypeEnum.VIDEO, this._data.multimedia).length;\r\n this.count.sphere = this.getPFilesByType(PFileTypeEnum.SPHERIC, this._data.multimedia).length;\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n if (this._data.type) {\r\n this.typeSelected = this._data.type;\r\n this.multimedia = this.getPFilesByType(this.typeSelected as PFileTypeEnum, this._data.multimedia);\r\n }\r\n }\r\n\r\n private getPFilesByType(type: PFileTypeEnum, list: PFile[]): PFile[] {\r\n return list.filter(item => {\r\n return (item.type === type);\r\n }) || [];\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog, MatDialogRef} from '@angular/material/dialog';\r\nimport {PFile} from '@maplander/types';\r\nimport {GalleryComponent} from './gallery.component';\r\n\r\nexport interface GalleryConfig {\r\n multimedia: PFile[];\r\n indexSelected: number;\r\n type: 'IMAGE' | 'VIDEO' | 'SPHERIC';\r\n}\r\n\r\n\r\n@Injectable()\r\nexport class GalleryService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n public open(multimedia: PFile[], indexSelected?: number, type?: 'IMAGE' | 'VIDEO' | 'SPHERIC'): MatDialogRef<GalleryComponent> {\r\n return this._dialog.open<GalleryComponent, GalleryConfig>(\r\n GalleryComponent, {\r\n data: {\r\n multimedia: multimedia || [],\r\n indexSelected: indexSelected || 0,\r\n type: type || null\r\n },\r\n disableClose: true,\r\n panelClass: 'gallery_dialog'\r\n });\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_TOKEN = new InjectionToken<boolean>('PROPERTY MODULE CONFIG');\r\n","import {Component, Inject, OnInit} from '@angular/core';\r\nimport {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-stats',\r\n templateUrl: './stats.component.html',\r\n styleUrls: ['./stats.component.scss']\r\n})\r\nexport class StatsComponent implements OnInit {\r\n\r\n constructor(\r\n @Inject(MAT_DIALOG_DATA) public data: LeadInfo,\r\n private _dialogRef: MatDialogRef<StatsComponent>\r\n ) {\r\n this.data = new LeadInfo(this.data || null);\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n close(): void {\r\n this._dialogRef.close();\r\n }\r\n\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {MatDialog} from '@angular/material';\r\nimport {StatsComponent} from './stats.component';\r\nimport {LeadInfo} from '@maplander/types';\r\n\r\n@Injectable()\r\nexport class StatsService {\r\n\r\n constructor(\r\n private _dialog: MatDialog\r\n ) {\r\n }\r\n\r\n open(leadInfo: LeadInfo): void {\r\n this._dialog.open<void, LeadInfo>(StatsComponent, {\r\n data: leadInfo || null,\r\n panelClass: 'stats-panel-class'\r\n });\r\n }\r\n}\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, OnInit, Optional, Output, SimpleChanges} from '@angular/core';\r\nimport {\r\n Address,\r\n AppUtil,\r\n DialogResponseType,\r\n NewCompleteProperty,\r\n NewProperty,\r\n PFile,\r\n PFileTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum,\r\n UserMedia\r\n} from '@maplander/types';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {EditorComponent} from '../editor/editor.component';\r\nimport {OwnerInfoComponent} from '../owner-info/owner-info.component';\r\nimport {DocumentsComponent} from '../documents/documents.component';\r\nimport {MultimediaUploaderService} from '../multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from '../announce-confirm/announce-confirm.service';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {Utils} from '../../../../utils';\r\nimport {ShareService} from '@maplander/shared';\r\nimport {GalleryService} from '../gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from '../../token';\r\nimport {StatsService} from '../stats/stats.service';\r\n\r\nexport enum PropertyEventType {\r\n CREATE = 'CREATE',\r\n UPDATE = 'UPDATE',\r\n ANNOUNCE = 'ANNOUNCE',\r\n HIDE = 'HIDE',\r\n SHOW = 'SHOW',\r\n ADDRESS = 'ADDRESS',\r\n OFFER = 'OFFER',\r\n FAVORITE = 'FAVORITE',\r\n REQUEST_INFO = 'REQUEST_INFO',\r\n SHARE = 'SHARE',\r\n ARCHIVE = 'ARCHIVE',\r\n REAL_ESTATE_EXCHANGE = 'REAL_ESTATE_EXCHANGE',\r\n SHARE_COMMISSION = 'SHARE_COMMISSION',\r\n BROCHURE = 'BROCHURE',\r\n POSTER = 'POSTER',\r\n CLIENTS = 'CLIENTS',\r\n BACK = 'BACK',\r\n SHOW_AGENTS = 'SHOW_AGENTS',\r\n TARPS = 'TARPS'\r\n}\r\n\r\nexport interface PropertyEventChange {\r\n type: PropertyEventType;\r\n payload?: any;\r\n}\r\n\r\n@Component({\r\n selector: 'lib-property',\r\n templateUrl: './property.component.html',\r\n styleUrls: ['./property.component.scss']\r\n})\r\nexport class PropertyComponent implements OnInit, OnChanges {\r\n @Input() property: NewCompleteProperty;\r\n @Input() utils: AppUtil;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() mode: 'detail' | 'record' | 'add';\r\n @Input() sharedProperty: { isShared: boolean, ownerAvailable: boolean } = {isShared: false, ownerAvailable: true};\r\n @Input() address: Address;\r\n @Input() mlsLabel: string;\r\n @Input() disableShareCommission: boolean;\r\n @Input() isFavorite: boolean;\r\n @Input() disableConfirmAnnounce: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() userUrl: string;\r\n @Output() change: EventEmitter<PropertyEventChange>;\r\n @Output() modeChange: EventEmitter<'detail' | 'record' | 'add'>;\r\n public multimedia: PFile[];\r\n public isOPI: boolean;\r\n public currentIndex: number;\r\n public frontImageError: boolean;\r\n public currentType: PFileTypeEnum;\r\n public multimediaCount: {\r\n images: number,\r\n images360: number,\r\n videos: number\r\n };\r\n public completeProperty: NewCompleteProperty;\r\n private _allMultimedia: PFile[];\r\n private _newMedia: UserMedia[];\r\n private _editorInstance: EditorComponent;\r\n private _ownerInstance: OwnerInfoComponent;\r\n private _documentsInstance: DocumentsComponent;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_TOKEN) private _config: boolean,\r\n private _uploaderService: MultimediaUploaderService,\r\n private _announceService: AnnounceConfirmService,\r\n private _snackBar: SnackBarService,\r\n private _share: ShareService,\r\n private _gallery: GalleryService,\r\n private _documentService: DocumentVisorService,\r\n private _statsService: StatsService\r\n ) {\r\n this.initCompleteProperty();\r\n this.change = new EventEmitter<PropertyEventChange>();\r\n this.modeChange = new EventEmitter<'detail' | 'record' | 'add'>();\r\n this.disableShareCommission = false;\r\n this.disableConfirmAnnounce = false;\r\n this.currentIndex = 0;\r\n this.multimedia = [];\r\n this._allMultimedia = [];\r\n this._newMedia = [];\r\n this.multimediaCount = {\r\n images: 0,\r\n images360: 0,\r\n videos: 0\r\n };\r\n this.isOPI = this._config || false;\r\n this.currentType = PFileTypeEnum.IMAGE;\r\n }\r\n\r\n ngOnInit() {\r\n // this.agentActions('SHOW_AGENTS');\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.completeProperty = new NewCompleteProperty(changes['property'].currentValue || null);\r\n this.parseMultimedia();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n }\r\n\r\n saveData(): void {\r\n this.restoreFrontImageError();\r\n if (this._editorInstance.validateFormInvalid()) {\r\n this._snackBar.setMessage('Verifique todos los campos obligatorios', 'OK', 5000, 'left', 'bottom');\r\n return;\r\n }\r\n this.parseDataByComponents();\r\n this.change.emit({\r\n type: this.completeProperty.property.id ? PropertyEventType.UPDATE : PropertyEventType.CREATE,\r\n payload: {\r\n property: this.completeProperty,\r\n newMedia: this._newMedia\r\n }\r\n });\r\n }\r\n\r\n agentActions(type: any): void {\r\n this.change.emit({\r\n type: type as PropertyEventType,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n shareProperty(): void {\r\n this.agentActions('SHARE');\r\n this._share.open({\r\n url: this.completeProperty.property.url,\r\n urlUser: this.userUrl\r\n });\r\n }\r\n\r\n openGallery(): void {\r\n if (this._allMultimedia.length === 0) {\r\n return;\r\n }\r\n let type = null;\r\n if (this.multimedia.length > 0) {\r\n type = this.multimedia[0].type;\r\n }\r\n this._gallery.open(this._allMultimedia, this.currentIndex, type);\r\n }\r\n\r\n goToStats(): void {\r\n this._statsService.open(this.completeProperty.leadInfo || null);\r\n }\r\n\r\n goToEditProperty(): void {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n }\r\n\r\n goToBack(): void {\r\n this.restoreFrontImageError();\r\n this.change.emit({\r\n type: PropertyEventType.BACK\r\n });\r\n }\r\n\r\n goToClients(): void {\r\n this.change.emit({\r\n type: PropertyEventType.CLIENTS\r\n });\r\n }\r\n\r\n goToUpdateVisibility(): void {\r\n this.change.emit({\r\n type: this.completeProperty.property.status === StatusTypeEnum.ANNOUNCED ? PropertyEventType.HIDE : PropertyEventType.SHOW,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n\r\n goToPublish(): void {\r\n if (this.mode === 'add') {\r\n this.parseDataByComponents();\r\n }\r\n const errors = Utils.getErrorsForPublish(this.completeProperty.property);\r\n if (errors.length > 0) {\r\n this.mode = 'add';\r\n this.modeChange.emit(this.mode);\r\n setTimeout(() => {\r\n this.validateFrontImageOnErrors(errors);\r\n this._editorInstance.setErrorsOnFields(errors);\r\n }, 200);\r\n this._snackBar.setMessage('Complete los campos faltantes para poder publicar', 'OK', 5000, 'left', 'bottom');\r\n } else {\r\n if (this.disableConfirmAnnounce) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n return;\r\n }\r\n this._announceService.open().afterClosed().subscribe((response) => {\r\n if (response.code === DialogResponseType.ACCEPT) {\r\n this.change.emit({\r\n type: PropertyEventType.ANNOUNCE,\r\n payload: {property: this.completeProperty, newMedia: this._newMedia}\r\n });\r\n }\r\n });\r\n }\r\n }\r\n\r\n onMultimediaIndexChanged(ev: number): void {\r\n this.currentIndex = ev;\r\n }\r\n\r\n changeMultimediaType(type: string): void {\r\n this.currentType = type as PFileTypeEnum;\r\n this.assignMultimediaByType();\r\n }\r\n\r\n openUploaderMultimedia(): void {\r\n this._uploaderService.open(this.currentType, this._allMultimedia, this._newMedia).afterClosed().subscribe((response) => {\r\n if (response) {\r\n this._newMedia = response.newMedia || [];\r\n this._allMultimedia = Object.assign([], response.multimedia || []);\r\n this.assignFrontImage();\r\n this.assignMultimediaByType();\r\n this.validateMultimediaTypeCount();\r\n }\r\n });\r\n }\r\n\r\n onEditorInstance(ev: EditorComponent): void {\r\n this._editorInstance = ev;\r\n }\r\n\r\n onOwnerInstance(ev: OwnerInfoComponent): void {\r\n this._ownerInstance = ev;\r\n }\r\n\r\n onDocumentsInstance(ev: DocumentsComponent): void {\r\n this._documentsInstance = ev;\r\n }\r\n\r\n onSelectAddress(): void {\r\n this.change.emit({\r\n type: PropertyEventType.ADDRESS\r\n });\r\n }\r\n\r\n private restoreFrontImageError(): void {\r\n this.frontImageError = false;\r\n }\r\n\r\n private parseMultimedia(): void {\r\n this._allMultimedia = [];\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.images || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.videos || []);\r\n this._allMultimedia = this._allMultimedia.concat(this.completeProperty.spherics || []);\r\n }\r\n\r\n private getMultimediaByType(type: PFileTypeEnum): PFile[] {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === type) {\r\n response.push(item);\r\n }\r\n });\r\n return response;\r\n }\r\n\r\n private assignFrontImage(): void {\r\n const images: PFile[] = [];\r\n this._allMultimedia.forEach(multimedia => {\r\n if (multimedia.type === PFileTypeEnum.IMAGE) {\r\n images.push(multimedia);\r\n }\r\n });\r\n if (images.length > 0) {\r\n this.completeProperty.property.image = images[0].fileCS.thumbnail;\r\n this.frontImageError = false;\r\n } else {\r\n this.completeProperty.property.image = null;\r\n }\r\n this.completeProperty = new NewCompleteProperty(this.completeProperty);\r\n }\r\n\r\n private assignMultimediaByType(): void {\r\n const response = [];\r\n this._allMultimedia.forEach(item => {\r\n if (item.type === this.currentType) {\r\n response.push(item);\r\n }\r\n });\r\n this.multimedia = Object.assign([], response);\r\n }\r\n\r\n private validateFrontImageOnErrors(errors: string[]): void {\r\n errors.forEach(error => {\r\n if (error === 'image') {\r\n this.frontImageError = true;\r\n }\r\n });\r\n }\r\n\r\n private validateMultimediaTypeCount(): void {\r\n this.multimediaCount.images = 0;\r\n this.multimediaCount.images360 = 0;\r\n this.multimediaCount.videos = 0;\r\n this._allMultimedia.forEach(item => {\r\n switch (item.type) {\r\n case PFileTypeEnum.IMAGE:\r\n this.multimediaCount.images++;\r\n break;\r\n case PFileTypeEnum.SPHERIC:\r\n this.multimediaCount.images360++;\r\n break;\r\n case PFileTypeEnum.VIDEO:\r\n this.multimediaCount.videos++;\r\n break;\r\n }\r\n });\r\n }\r\n\r\n private parseDataByComponents(): void {\r\n this.completeProperty.property = this._editorInstance.getProperty();\r\n this.completeProperty.property.propertyInfo.owner = this._ownerInstance.getOwner();\r\n const documentsResponse = this._documentsInstance.getDocuments();\r\n this.completeProperty.files = documentsResponse.documents;\r\n this._newMedia = this._newMedia.concat(documentsResponse.newMedia);\r\n this.completeProperty.images = this.getMultimediaByType(PFileTypeEnum.IMAGE);\r\n this.completeProperty.spherics = this.getMultimediaByType(PFileTypeEnum.SPHERIC);\r\n this.completeProperty.videos = this.getMultimediaByType(PFileTypeEnum.VIDEO);\r\n }\r\n\r\n private initCompleteProperty(): void {\r\n const complete = new NewCompleteProperty();\r\n complete.property = new NewProperty();\r\n complete.property.propertyInfo = new PropertyInfo();\r\n this.completeProperty = complete;\r\n }\r\n}\r\n","import {FormGroup} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport class PropertyEditorValidators {\r\n static validator(form: FormGroup): void {\r\n // Min price rule\r\n let control = form.get('minPrice');\r\n let condition = Number(control.value) > Number(form.get('price').value);\r\n if (condition) {\r\n control.setErrors({\r\n minPriceInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'minPriceInvalid');\r\n }\r\n // Commission rule\r\n control = form.get('commission');\r\n condition = control.value && (!form.get('price').value || Number(form.get('price').value) === 0);\r\n if (condition) {\r\n control.setErrors({\r\n commissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'commissionInvalid');\r\n }\r\n // Consumer reporting rule\r\n control = form.get('consumerReportingOption');\r\n condition = form.get('consumerReporting').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Lease transfer rule\r\n control = form.get('transferPrice');\r\n condition = form.get('transfer').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Condominium fee rule\r\n control = form.get('maintenancePrice');\r\n condition = form.get('maintenance').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule\r\n control = form.get('sharedCommission');\r\n condition = form.get('mlm').value && !control.value;\r\n if (condition) {\r\n control.setErrors({\r\n required: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'required');\r\n }\r\n // Shared commission rule 2\r\n condition = form.get('mlm').value && !form.get('commission').value;\r\n control = form.get('sharedCommission');\r\n if (condition) {\r\n control.setErrors({\r\n sharedCommissionInvalid: true\r\n });\r\n control.markAsTouched();\r\n } else {\r\n removeError(control, 'sharedCommissionInvalid');\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n OnDestroy,\r\n OnInit,\r\n Output,\r\n SimpleChanges,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {FormBuilder, FormGroup, ValidatorFn, Validators} from '@angular/forms';\r\nimport {\r\n Address,\r\n Amenities,\r\n AppUtil,\r\n AreaUnitEnum,\r\n CER,\r\n Features,\r\n GeoPt,\r\n LandUseEnum,\r\n NewProperty,\r\n OfferingTypeEnum,\r\n PropertyInfo,\r\n PropertyTypeEnum,\r\n StatusTypeEnum\r\n} from '@maplander/types';\r\nimport {Subscription} from 'rxjs';\r\nimport {DialogService} from '@maplander/shared';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from '@angular/material/core';\r\nimport {MAT_MOMENT_DATE_ADAPTER_OPTIONS, MomentDateAdapter} from '@angular/material-moment-adapter';\r\nimport * as momentImported from 'moment';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyEditorValidators} from '../../validators/property-editor-validators';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {Utils} from '../../../../utils';\r\nconst moment = momentImported;\r\n\r\nconst MY_FORMATS = {\r\n parse: {\r\n dateInput: 'L',\r\n },\r\n display: {\r\n dateInput: 'L',\r\n monthYearLabel: 'MMM YYYY',\r\n dateA11yLabel: 'L',\r\n monthYearA11yLabel: 'MMMM YYYY',\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-editor',\r\n templateUrl: './editor.component.html',\r\n styleUrls: ['./editor.component.scss'],\r\n providers: [\r\n {provide: MAT_DATE_LOCALE, useValue: 'es-MX'},\r\n {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS]},\r\n {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}\r\n ]\r\n})\r\nexport class EditorComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {\r\n @ViewChild('btnSubmit', {static: true, read: ElementRef}) private _btnSubmitRef: ElementRef;\r\n @Input() utils: AppUtil;\r\n @Input() address: Address;\r\n @Input() propertyType: PropertyTypeEnum;\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Output() editorInstance: EventEmitter<EditorComponent>;\r\n @Output() selectAddress: EventEmitter<void>;\r\n /**\r\n * REGEX_ONLY_INTEGERS\r\n * Regex pattern to only accept integer and positive numbers\r\n * */\r\n private readonly REGEX_ONLY_INTEGERS = new RegExp(/^[0-9]\\d*$/);\r\n private readonly REGEX_MIDDLE_NUMBER = new RegExp(/^[0-9]*(\\.[5])?$/);\r\n private readonly REGEX_WEBSITE = new RegExp(/(http|https):\\/\\/(\\w+:?\\w*@)?(\\S+)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@\\-\\/]))?/);\r\n private readonly REGEX_ALPHA_NUMBER = new RegExp(/[A-Za-z0-9_]/);\r\n private readonly _subscription: Subscription;\r\n private readonly _validators: {\r\n bedrooms: ValidatorFn[],\r\n bathrooms: ValidatorFn[],\r\n parkingSpaces: ValidatorFn[],\r\n mainArea: ValidatorFn[],\r\n secondaryArea: ValidatorFn[],\r\n externalLink: ValidatorFn[],\r\n sku: ValidatorFn[]\r\n };\r\n private _property: NewProperty;\r\n private _propertyTypeItem: PropertyTypeItem;\r\n private _errorFields: string[];\r\n public propertyForm: FormGroup;\r\n public offeringTypeList: { name: string, value: OfferingTypeEnum }[];\r\n public currencyList: CER[];\r\n public roiList: number[];\r\n public landUseList: { name: string, value: LandUseEnum }[];\r\n public amenitiesList: AmenityItem[];\r\n public featuresList: AmenityItem[];\r\n public commissionList: number[];\r\n public sharedCommissionList: number[];\r\n public durationList: number[];\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder,\r\n private _dialog: DialogService,\r\n private _adapter: DateAdapter<any>\r\n ) {\r\n this.editorInstance = new EventEmitter<EditorComponent>();\r\n this.selectAddress = new EventEmitter<void>();\r\n this._subscription = new Subscription();\r\n this.offeringTypeList = ConstantsComponents.OfferingTypeList.map(doc => ({...doc}));\r\n this.landUseList = ConstantsComponents.LandUseList.map(doc => ({...doc}));\r\n this.commissionList = ConstantsComponents.CommissionList[OfferingTypeEnum.SALE];\r\n this.roiList = Object.assign([], ConstantsComponents.ROIList);\r\n this.durationList = Object.assign([], ConstantsComponents.DurationList);\r\n this.sharedCommissionList = Object.assign([], ConstantsComponents.SharedCommissionList);\r\n this._adapter.setLocale('es');\r\n this._errorFields = [];\r\n this._validators = {\r\n bedrooms: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n bathrooms: [Validators.pattern(this.REGEX_MIDDLE_NUMBER)],\r\n parkingSpaces: [Validators.pattern(this.REGEX_ONLY_INTEGERS)],\r\n mainArea: [],\r\n secondaryArea: [],\r\n externalLink: [Validators.pattern(this.REGEX_WEBSITE)],\r\n sku: [Validators.pattern(this.REGEX_ALPHA_NUMBER)]\r\n };\r\n this.propertyForm = this._formBuilder.group({\r\n offering: [OfferingTypeEnum.SALE],\r\n sku: [null, this._validators.sku],\r\n consumerReporting: [],\r\n consumerReportingOption: [1],\r\n currency: ['MXN'],\r\n minPrice: [],\r\n price: [],\r\n maintenance: [],\r\n maintenancePrice: [],\r\n transfer: [],\r\n transferPrice: [],\r\n bedrooms: [null, this._validators.bedrooms],\r\n bathrooms: [null, this._validators.bathrooms],\r\n parkingSpaces: [null, this._validators.parkingSpaces],\r\n mainArea: [null, this._validators.mainArea],\r\n secondaryArea: [null, this._validators.secondaryArea],\r\n unit: [AreaUnitEnum.M2],\r\n buildIn: [],\r\n landUse: [],\r\n exclusivity: [],\r\n mlm: [],\r\n sharedCommission: [],\r\n agreementDate: [{value: null, disabled: true}],\r\n duration: [],\r\n commission: [],\r\n roi: [],\r\n description: [],\r\n externalLink: [null, this._validators.externalLink],\r\n notes: [],\r\n address: this._formBuilder.group({\r\n country: [],\r\n postalCode: [],\r\n state: [],\r\n city: [],\r\n township: [],\r\n colony: [],\r\n street: [],\r\n extNumber: [],\r\n intNumber: [],\r\n mz: [],\r\n lt: [],\r\n visible: [true],\r\n }),\r\n }, {\r\n validators: PropertyEditorValidators.validator\r\n });\r\n }\r\n\r\n private static geoPtGenerator(geoPt: GeoPt, minDistance: number, maxDistance: number): GeoPt {\r\n const EARTH_RADIUS_METERS = 6371010.0;\r\n const l = Math.random() * (maxDistance - minDistance) + minDistance;\r\n const alpha = Math.random() * Math.PI / 2;\r\n const sx = (Math.random() < 0.5) ? l * Math.cos(alpha) : -l * Math.cos(alpha);\r\n const sy = (Math.random() < 0.5) ? l * Math.sin(alpha) : -l * Math.sin(alpha);\r\n const deltaLat = sy / EARTH_RADIUS_METERS * 180 / Math.PI;\r\n const lat = geoPt.latitude + deltaLat;\r\n const deltaLong = sx / EARTH_RADIUS_METERS / Math.cos(lat * Math.PI / 180) * 180 / Math.PI;\r\n return {\r\n latitude: lat,\r\n longitude: geoPt.longitude + deltaLong\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n this.listenChangesOnForm();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['utils'] && changes['utils'].currentValue) {\r\n this.currencyList = changes['utils'].currentValue.cers;\r\n }\r\n if (changes['propertyType'] && changes['propertyType'].currentValue) {\r\n this.propertyType = changes['propertyType'].currentValue;\r\n this.searchAmenitiesByPropertyType();\r\n }\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.createProperty(changes['property'].currentValue);\r\n }\r\n if (changes['address'] && changes['address'].currentValue) {\r\n this.updateAddressForm(changes['address'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.editorInstance.emit(this);\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscription.unsubscribe();\r\n }\r\n\r\n getProperty(): NewProperty {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n this.updatePropertyByForm(this.propertyForm.getRawValue());\r\n return this._property;\r\n }\r\n\r\n validateFormInvalid(): boolean {\r\n this.setValidatorOnFields(this._errorFields, true);\r\n return this.propertyForm.invalid;\r\n }\r\n\r\n updateAmenity(amenity: AmenityItem): void {\r\n amenity.checked = !amenity.checked;\r\n this._property.amenities[amenity.value] = amenity.checked;\r\n }\r\n\r\n goToSelectAddress(): void {\r\n this.selectAddress.emit();\r\n }\r\n\r\n setErrorsOnFields(errors: string[]): void {\r\n this._errorFields = errors;\r\n this.setValidatorOnFields(this._errorFields);\r\n this._btnSubmitRef.nativeElement.click();\r\n }\r\n\r\n private updateAddressForm(address: Address): void {\r\n this.propertyForm.patchValue({\r\n address: {\r\n country: address.country,\r\n state: address.state,\r\n city: address.city,\r\n township: address.township,\r\n colony: address.colony,\r\n street: address.street,\r\n postalCode: address.postalCode,\r\n extNumber: address.outdoorNumber\r\n }\r\n });\r\n }\r\n\r\n private assignAmenities(): void {\r\n this.amenitiesList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignLocationFeatures(): void {\r\n this.featuresList.forEach((amenity) => {\r\n amenity.checked = this._property.amenities[amenity.value];\r\n });\r\n }\r\n\r\n private assignCommission(): void {\r\n this.commissionList = ConstantsComponents.CommissionList[this._property.offering];\r\n }\r\n\r\n private assignBusinessRules(): void {\r\n switch (this.propertyType) {\r\n case PropertyTypeEnum.ROOM:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.RENT\r\n });\r\n break;\r\n case PropertyTypeEnum.INVESTMENT:\r\n this.propertyForm.patchValue({\r\n offering: OfferingTypeEnum.SALE\r\n });\r\n break;\r\n }\r\n if (this._property.status === StatusTypeEnum.ANNOUNCED) {\r\n const errors = Utils.listErrorsByPropertyTypeForPublish(this._property.type);\r\n this.setValidatorOnFields(errors);\r\n }\r\n }\r\n\r\n private updateFormByProperty(): void {\r\n this.propertyForm.patchValue({\r\n offering: this._property.offering,\r\n sku: this._property.sku,\r\n consumerReporting: this._property.propertyInfo.consumerReporting && this._property.propertyInfo.consumerReporting !== 0,\r\n consumerReportingOption: this._property.propertyInfo.consumerReporting,\r\n currency: this._property.currency,\r\n minPrice: this._property.propertyInfo.lowestPrice,\r\n price: this._property.price,\r\n maintenance: this._property.features.condominiumFeePrice && this._property.features.condominiumFeePrice !== 0,\r\n maintenancePrice: this._property.features.condominiumFeePrice,\r\n transfer: this._property.propertyInfo.leaseTransferPrice && this._property.propertyInfo.leaseTransferPrice !== 0,\r\n transferPrice: this._property.propertyInfo.leaseTransferPrice,\r\n bedrooms: this._property.features.bedrooms,\r\n bathrooms: this._property.features.bathrooms,\r\n parkingSpaces: this._property.features.parkingSpaces,\r\n mainArea: this._property.features.mainArea,\r\n secondaryArea: this._property.features.secondaryArea,\r\n unit: this._property.features.areaUnit,\r\n buildIn: this._property.features.builtIn ? new Date(this._property.features.builtIn, 1, 1) : null,\r\n landUse: this._property.features.landUse,\r\n exclusivity: this._property.propertyInfo.exclusivity,\r\n mlm: this._property.propertyInfo.mls,\r\n sharedCommission: this._property.propertyInfo.sharedCommission,\r\n agreementDate: this._property.propertyInfo.listingAgreementStartDate ?\r\n moment(new MDate(this._property.propertyInfo.listingAgreementStartDate).toDate()) : null,\r\n duration: this._property.propertyInfo.listingAgreementTime,\r\n commission: this._property.propertyInfo.commission,\r\n roi: this._property.features.roi,\r\n description: this._property.description,\r\n externalLink: this._property.externalLink,\r\n notes: this._property.propertyInfo.notes,\r\n address: {\r\n country: this._property.address.country,\r\n state: this._property.address.state,\r\n city: this._property.address.city,\r\n township: this._property.address.township,\r\n colony: this._property.address.colony,\r\n postalCode: this._property.address.postalCode,\r\n street: this._property.address.street,\r\n extNumber: this._property.address.outdoorNumber,\r\n intNumber: this._property.address.interiorNumber,\r\n mz: this._property.address.mz,\r\n lt: this._property.address.lt,\r\n visible: this._property.address.visible || false,\r\n }\r\n });\r\n }\r\n\r\n private updatePropertyByForm(data: any): void {\r\n this._property.type = this.propertyType;\r\n this._property.offering = data.offering;\r\n this._property.sku = data.sku;\r\n this._property.propertyInfo.consumerReporting = data.consumerReporting ? data.consumerReportingOption : null;\r\n this._property.currency = data.currency;\r\n this._property.propertyInfo.lowestPrice = data.minPrice ? Number(data.minPrice) : null;\r\n this._property.price = data.price ? Number(data.price) : null;\r\n this._property.features.condominiumFeePrice = data.maintenance ? Number(data.maintenancePrice) : null;\r\n this._property.propertyInfo.leaseTransferPrice = data.transfer ? Number(data.transferPrice) : null;\r\n this._property.features.bedrooms = data.bedrooms ? Number(data.bedrooms) : null;\r\n this._property.features.bathrooms = data.bathrooms ? Number(data.bathrooms) : null;\r\n this._property.features.parkingSpaces = data.parkingSpaces ? Number(data.parkingSpaces) : null;\r\n this._property.features.mainArea = data.mainArea ? Number(data.mainArea) : null;\r\n this._property.features.secondaryArea = data.secondaryArea ? Number(data.secondaryArea) : null;\r\n this._property.features.areaUnit = data.unit;\r\n this._property.features.builtIn = data.buildIn ? data.buildIn.getFullYear() : null;\r\n this._property.features.landUse = data.landUse;\r\n this._property.propertyInfo.exclusivity = data.exclusivity;\r\n this._property.propertyInfo.mls = data.mlm;\r\n this._property.propertyInfo.sharedCommission = data.mlm ? Number(data.sharedCommission) : null;\r\n this._property.propertyInfo.listingAgreementStartDate =\r\n data.agreementDate ? MDate.getTimestamp(data.agreementDate.toDate()) : null;\r\n this._property.propertyInfo.listingAgreementTime = data.duration;\r\n this._property.propertyInfo.commission = data.commission;\r\n this._property.features.roi = data.roi;\r\n this._property.description = data.description;\r\n this._property.externalLink = data.externalLink;\r\n this._property.propertyInfo.notes = data.notes;\r\n this._property.address.country = data.address.country;\r\n this._property.address.state = data.address.state;\r\n this._property.address.city = data.address.city;\r\n this._property.address.township = data.address.township;\r\n this._property.address.colony = data.address.colony;\r\n this._property.address.postalCode = data.address.postalCode;\r\n this._property.address.street = data.address.street;\r\n this._property.address.outdoorNumber = data.address.extNumber;\r\n this._property.address.interiorNumber = data.address.intNumber;\r\n this._property.address.mz = data.address.mz;\r\n this._property.address.lt = data.address.lt;\r\n this._property.address.location = this.address.location;\r\n this._property.address.publicLocation = !data.address.visible ?\r\n EditorComponent.geoPtGenerator(this.address.location, 200, 400) : this.address.location;\r\n this._property.address.visible = data.address.visible;\r\n }\r\n\r\n private searchAmenitiesByPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach(type => {\r\n if (type.value === this.propertyType) {\r\n this._propertyTypeItem = type;\r\n this.amenitiesList = type.amenities.map(item => ({...item}));\r\n this.featuresList = type.features.map(item => ({...item}));\r\n }\r\n });\r\n }\r\n\r\n private listenChangesOnForm(): void {\r\n this._subscription.add(\r\n this.propertyForm.controls['offering'].valueChanges.subscribe((value) => {\r\n this.commissionList = ConstantsComponents.CommissionList[value];\r\n this.propertyForm.patchValue({\r\n minPrice: null,\r\n maxPrice: null\r\n });\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['price'].valueChanges.subscribe((value) => {\r\n if (value && Number(value) === 0) {\r\n this.propertyForm.patchValue({\r\n minPrice: null\r\n });\r\n }\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['mlm'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['sharedCommission'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['maintenance'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['maintenancePrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['transfer'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['transferPrice'].setValue(null);\r\n })\r\n );\r\n this._subscription.add(\r\n this.propertyForm.controls['consumerReporting'].valueChanges.subscribe(() => {\r\n this.propertyForm.controls['consumerReportingOption'].setValue(1);\r\n })\r\n );\r\n }\r\n\r\n private createProperty(property?: NewProperty): void {\r\n this._property = new NewProperty(property || null);\r\n this._property.type = this.propertyType;\r\n this._property.propertyInfo = new PropertyInfo(property ? property.propertyInfo : null);\r\n this._property.features = new Features(property ? property.features : null);\r\n this._property.address = new Address(property ? property.address : null);\r\n this._property.amenities = new Amenities(property ? property.amenities : null);\r\n this.assignBusinessRules();\r\n if (property && property.id) {\r\n this.updateFormByProperty();\r\n this.assignAmenities();\r\n this.assignLocationFeatures();\r\n this.assignCommission();\r\n }\r\n }\r\n\r\n private setValidatorOnFields(errors: string[], remove?: boolean): void {\r\n if (errors.length === 0) {\r\n return;\r\n }\r\n errors.forEach(error => {\r\n if (!this.propertyForm.controls[error]) {\r\n return;\r\n }\r\n if (remove) {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(this._validators[error] ? this._validators[error] : []);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n } else {\r\n this.propertyForm.controls[error].clearValidators();\r\n this.propertyForm.controls[error].setValidators(\r\n this._validators[error] ? this._validators[error].concat(Validators.required) : [Validators.required]);\r\n this.propertyForm.controls[error].updateValueAndValidity();\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import {AbstractControl, ValidatorFn} from '@angular/forms';\r\nimport {removeError} from './remove-error';\r\n\r\nexport function phoneFieldsValidator(controlName: string): ValidatorFn {\r\n return (control: AbstractControl): { [key: string]: boolean } | null => {\r\n if (control.parent) {\r\n const peerControl = control.parent.controls[controlName] as AbstractControl;\r\n if (!control.value && !peerControl.value) {\r\n removeError(peerControl, 'phoneFieldsError');\r\n return null;\r\n }\r\n if (control.value !== '' && (!peerControl.value || peerControl.value === '')) {\r\n peerControl.setErrors({\r\n phoneFieldsError: true\r\n });\r\n }\r\n if ((peerControl.value && peerControl.value !== '') && (!control.value || control.value === '')) {\r\n return {\r\n phoneFieldsError: true\r\n };\r\n }\r\n }\r\n return null;\r\n };\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {CountryCode, Owner} from '@maplander/types';\r\nimport {FormBuilder, FormGroup, Validators} from '@angular/forms';\r\nimport {phoneFieldsValidator} from '../../validators/phone-fields-validator';\r\n\r\n@Component({\r\n selector: 'lib-property-owner-info',\r\n templateUrl: './owner-info.component.html',\r\n styleUrls: ['./owner-info.component.scss']\r\n})\r\nexport class OwnerInfoComponent implements OnChanges, AfterViewInit {\r\n @Input() owner: Owner;\r\n @Input() disabled: boolean;\r\n @Output() ownerInstance: EventEmitter<OwnerInfoComponent>;\r\n public ownerForm: FormGroup;\r\n private _owner: Owner;\r\n\r\n constructor(\r\n private _formBuilder: FormBuilder\r\n ) {\r\n this.ownerInstance = new EventEmitter<OwnerInfoComponent>();\r\n this.ownerForm = this._formBuilder.group({\r\n name: [],\r\n lastName: [],\r\n email: ['', [Validators.email]],\r\n code: ['', [phoneFieldsValidator('phone')]],\r\n phone: ['', [\r\n phoneFieldsValidator('code'),\r\n Validators.maxLength(13),\r\n Validators.minLength(8),\r\n Validators.pattern(new RegExp(/^[0-9]\\d*$/))]\r\n ],\r\n address: []\r\n });\r\n this.createOwner();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['disabled']) {\r\n this.ownerForm.disable();\r\n }\r\n if (changes['owner'] && changes['owner'].currentValue) {\r\n this.createOwner(changes['owner'].currentValue);\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.ownerInstance.emit(this);\r\n }\r\n\r\n onCodePhoneChanged(ev: CountryCode): void {\r\n this.ownerForm.controls['code'].setValue(ev ? ev.code : '');\r\n }\r\n\r\n getOwner(): Owner {\r\n this.updateOwnerByForm(this.ownerForm.value);\r\n return this._owner;\r\n }\r\n\r\n private updateOwnerByForm(data: any): void {\r\n this._owner.name = data.name;\r\n this._owner.lastName = data.lastName;\r\n this._owner.email = data.email;\r\n this._owner.phone = data.phone;\r\n this._owner.codePhone = data.code ? data.code.replace('+', '') : '';\r\n this._owner.address = data.address;\r\n }\r\n\r\n private updateFormByOwner(): void {\r\n this.ownerForm.patchValue({\r\n name: this._owner.name,\r\n lastName: this._owner.lastName,\r\n email: this._owner.email,\r\n phone: this._owner.phone,\r\n code: (this._owner.codePhone) ? `+${this._owner.codePhone}` : '',\r\n address: this._owner.address,\r\n });\r\n }\r\n\r\n private createOwner(owner?: Owner): void {\r\n this._owner = new Owner(owner || null);\r\n if (owner) {\r\n this.updateFormByOwner();\r\n }\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnChanges, Output, SimpleChanges} from '@angular/core';\r\nimport {PFile, PFileTypeEnum, UserMedia} from '@maplander/types';\r\nimport {DocumentVisorService} from '../../../document-visor/document-visor.service';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {SnackBarService} from '@maplander/core';\r\nimport {Observable} from 'rxjs';\r\nimport {map} from 'rxjs/operators';\r\nimport {HttpClient} from '@angular/common/http';\r\n\r\n@Component({\r\n selector: 'lib-property-documents',\r\n templateUrl: './documents.component.html',\r\n styleUrls: ['./documents.component.scss']\r\n})\r\nexport class DocumentsComponent implements AfterViewInit, OnChanges {\r\n @Input() files: PFile[];\r\n @Input() disabled: boolean;\r\n @Output() documentsInstance: EventEmitter<DocumentsComponent>;\r\n public documents: { name: string, value: PFileTypeEnum, loaded: boolean }[];\r\n private _files: PFile[];\r\n private readonly _newMedia: UserMedia[];\r\n\r\n constructor(\r\n private _visor: DocumentVisorService,\r\n private _snackBar: SnackBarService,\r\n private _http: HttpClient\r\n ) {\r\n this.documentsInstance = new EventEmitter<DocumentsComponent>();\r\n this.documents = ConstantsComponents.DocumentsList.map(doc => ({...doc}));\r\n this._newMedia = [];\r\n this._files = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.documentsInstance.emit(this);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['files'] && changes['files'].currentValue) {\r\n this._files = changes['files'].currentValue || [];\r\n this.validateDocumentsLoaded();\r\n }\r\n }\r\n\r\n getDocuments(): { documents: PFile[], newMedia: UserMedia[] } {\r\n return {documents: this._files, newMedia: this._newMedia};\r\n }\r\n\r\n openFile(type: PFileTypeEnum): void {\r\n const doc = this.getPFileByType(type);\r\n const media = this.getUserMediaByType(type);\r\n if (media) {\r\n this._visor.open(media.url);\r\n return;\r\n }\r\n if (doc) {\r\n this.openBlobFile(doc.fileCS.thumbnail);\r\n return;\r\n }\r\n if (!doc && !media) {\r\n this._snackBar.setMessage('Este documento no ha sido añadido', 'OK', 2500, 'left');\r\n }\r\n }\r\n\r\n onUploadFile(ev: UserMedia, doc: { name: string, value: PFileTypeEnum, loaded: boolean }): void {\r\n const name = doc.value.toString().toLowerCase();\r\n if (doc.loaded) {\r\n this.updateDocument(name);\r\n }\r\n doc.loaded = true;\r\n const file = new PFile();\r\n file.type = doc.value;\r\n ev.type = doc.value;\r\n file.media = false;\r\n const fileName = `${name}_${new Date().getTime()}.pdf`;\r\n file.name = fileName;\r\n ev.name = fileName;\r\n file.fileCS = {\r\n thumbnail: ev.url,\r\n blobName: null\r\n };\r\n this._files.push(file);\r\n this._newMedia.push(ev);\r\n }\r\n\r\n private openBlobFile(url: string): void {\r\n this.downloadFile(url)\r\n .subscribe((response) => {\r\n this._visor.open(response);\r\n });\r\n }\r\n\r\n private updateDocument(name: string): void {\r\n let i = -1, file: PFile = null;\r\n this._files.forEach((item, index) => {\r\n if (item.name === name) {\r\n file = item;\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._files.splice(i, 1);\r\n }\r\n if (file) {\r\n i = -1;\r\n this._newMedia.forEach((item, index) => {\r\n if (item.name === file.name) {\r\n i = index;\r\n }\r\n });\r\n if (i > -1) {\r\n this._newMedia.splice(i, 1);\r\n }\r\n }\r\n }\r\n\r\n private validateDocumentsLoaded(): void {\r\n if (!this._files || this._files.length === 0) {\r\n return;\r\n }\r\n this._files.forEach((file) => this.documents.forEach(doc => {\r\n if (doc.value === file.type) {\r\n doc.loaded = true;\r\n }\r\n }));\r\n }\r\n\r\n private getPFileByType(type: PFileTypeEnum): PFile {\r\n let result = null;\r\n if (!this.files || this.files.length === 0) {\r\n return result;\r\n }\r\n this.files.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private getUserMediaByType(type: PFileTypeEnum): UserMedia {\r\n let result = null;\r\n if (!this._newMedia || this._newMedia.length === 0) {\r\n return result;\r\n }\r\n this._newMedia.forEach(item => {\r\n if (item.type === type) {\r\n result = item;\r\n }\r\n });\r\n return result;\r\n }\r\n\r\n private downloadFile(url: string): Observable<string> {\r\n return this._http.get(url, {\r\n responseType: 'arraybuffer'\r\n }).pipe(map((payload) => {\r\n const blob = new Blob([payload], {\r\n type: 'application/pdf'\r\n });\r\n return URL.createObjectURL(blob);\r\n }));\r\n }\r\n}\r\n","import {Component, Input, OnChanges, OnInit, SimpleChanges} from '@angular/core';\r\nimport {NewProperty} from '@maplander/types';\r\nimport {AmenityItem} from '../../../../utils/models/amenity-item';\r\nimport {ConstantsComponents} from '../../../../constantsComponents';\r\nimport {PropertyTypeItem} from '../../../../utils/models/property-type-item';\r\nimport {MDate} from '../../../../utils/classes';\r\nimport {DomSanitizer, SafeResourceUrl} from '@angular/platform-browser';\r\n\r\n\r\n@Component({\r\n selector: 'lib-property-details',\r\n templateUrl: './details.component.html',\r\n styleUrls: ['./details.component.scss']\r\n})\r\nexport class DetailsComponent implements OnInit, OnChanges {\r\n @Input() record: boolean;\r\n @Input() currencyConverted: { currency: string, price: number };\r\n @Input() property: NewProperty;\r\n @Input() mlsLabel: string;\r\n @Input() visibleTour: boolean;\r\n public amenities: AmenityItem[];\r\n public features: AmenityItem[];\r\n public propertyType: PropertyTypeItem;\r\n public agreementEndDate: number;\r\n\r\n constructor(\r\n private _sanitizer: DomSanitizer\r\n ) {\r\n this.amenities = [];\r\n this.features = [];\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['property'] && changes['property'].currentValue) {\r\n this.property = changes['property'].currentValue;\r\n this.searchPropertyType();\r\n this.createAmenities();\r\n this.createFeatures();\r\n this.validateAgreement();\r\n }\r\n }\r\n\r\n getTourUrl(): SafeResourceUrl {\r\n return this._sanitizer.bypassSecurityTrustResourceUrl(this.property.externalLink);\r\n }\r\n\r\n private validateAgreement(): void {\r\n if (this.property.propertyInfo.listingAgreementStartDate && this.property.propertyInfo.listingAgreementTime) {\r\n const startDate = new MDate(this.property.propertyInfo.listingAgreementStartDate).toDate();\r\n startDate.setDate(startDate.getDate() + this.property.propertyInfo.listingAgreementTime);\r\n this.agreementEndDate = MDate.getTimestamp(startDate);\r\n }\r\n }\r\n\r\n private searchPropertyType(): void {\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (this.property.type === type.value) {\r\n this.propertyType = type;\r\n }\r\n });\r\n }\r\n\r\n private createAmenities(): void {\r\n this.amenities = [];\r\n let amenities: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n amenities = type.amenities;\r\n }\r\n });\r\n if (amenities.length > 0) {\r\n amenities.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.amenities.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n\r\n private createFeatures(): void {\r\n this.features = [];\r\n let features: AmenityItem[] = [];\r\n ConstantsComponents.PropertyTypeList.forEach((type) => {\r\n if (type.value === this.property.type) {\r\n features = type.features;\r\n }\r\n });\r\n if (features.length > 0) {\r\n features.forEach((amenity) => {\r\n if (this.property.amenities[amenity.value]) {\r\n this.features.push(amenity);\r\n }\r\n });\r\n }\r\n }\r\n}\r\n","import {\r\n AfterViewInit,\r\n Component, ContentChild,\r\n ElementRef,\r\n EventEmitter,\r\n Input,\r\n OnChanges,\r\n Output,\r\n Renderer2,\r\n SimpleChanges, TemplateRef,\r\n ViewChild\r\n} from '@angular/core';\r\nimport {PFile} from '@maplander/types';\r\n\r\n@Component({\r\n selector: 'lib-property-slide-show',\r\n templateUrl: './slide-show.component.html',\r\n styleUrls: ['./slide-show.component.scss']\r\n})\r\nexport class SlideShowComponent implements OnChanges, AfterViewInit {\r\n\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() customActions: TemplateRef<any>;\r\n @ViewChild('slider', {static: true}) private _slider: ElementRef;\r\n @Input() multimedia: PFile[];\r\n @Input() selectIndex: number;\r\n @Input() initialIndex: number;\r\n @Output() currentIndex: EventEmitter<number>;\r\n public count: number;\r\n public index: number;\r\n\r\n constructor(\r\n private _render: Renderer2\r\n ) {\r\n this.currentIndex = new EventEmitter<number>();\r\n this.index = this.initialIndex || 0;\r\n this.multimedia = [];\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.currentIndex.emit(this.index);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['selectIndex'] && (changes['selectIndex'].currentValue !== undefined && changes['selectIndex'].currentValue !== null)) {\r\n this.moveImageByIndex(changes['selectIndex'].currentValue);\r\n }\r\n if (changes['multimedia'] && changes['multimedia'].currentValue) {\r\n this.multimedia = changes['multimedia'].currentValue || [];\r\n if (this.multimedia.length > 0) {\r\n this.count = this.multimedia.length;\r\n this.moveImageByIndex(this.initialIndex || 0);\r\n this.validateHTTPS();\r\n }\r\n }\r\n }\r\n\r\n moveImage(next?: boolean): void {\r\n this.index = next ? this.index + 1 : this.index - 1;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n moveImageByIndex(index: number): void {\r\n this.index = index;\r\n if (this.index === this.multimedia.length) {\r\n this.index = 0;\r\n }\r\n this.currentIndex.emit(this.index);\r\n this._render.setStyle(this._slider.nativeElement, 'margin-left', `-${this.index * 100}%`);\r\n }\r\n\r\n private validateHTTPS(): void {\r\n this.multimedia.forEach(item => {\r\n if (item.fileCS.thumbnail.indexOf('https') === -1) {\r\n item.fileCS.thumbnail = item.fileCS.thumbnail.replace('http', 'https');\r\n }\r\n });\r\n }\r\n}\r\n","import {NativeDateAdapter} from '@angular/material/core';\r\n\r\nexport class CustomDateAdapter extends NativeDateAdapter {\r\n format(date: Date, displayFormat: Object): string {\r\n return date.getFullYear().toString();\r\n }\r\n}\r\n","import {ChangeDetectorRef, Component, Inject, OnDestroy} from '@angular/core';\r\nimport {MatCalendar} from '@angular/material/datepicker';\r\nimport {DateAdapter, MAT_DATE_FORMATS, MatDateFormats} from '@angular/material/core';\r\nimport {takeUntil} from 'rxjs/operators';\r\nimport {Subject} from 'rxjs';\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker-header',\r\n templateUrl: './custom-datepicker-header.component.html',\r\n styleUrls: ['./custom-datepicker-header.component.scss']\r\n})\r\nexport class CustomDatepickerHeaderComponent<D> implements OnDestroy {\r\n\r\n private _destroyed = new Subject<void>();\r\n\r\n constructor(\r\n private _calendar: MatCalendar<D>, private _dateAdapter: DateAdapter<D>,\r\n @Inject(MAT_DATE_FORMATS) private _dateFormats: MatDateFormats, cdr: ChangeDetectorRef) {\r\n _calendar.stateChanges\r\n .pipe(takeUntil(this._destroyed))\r\n .subscribe(() => cdr.markForCheck());\r\n }\r\n\r\n ngOnDestroy() {\r\n this._destroyed.next();\r\n this._destroyed.complete();\r\n }\r\n\r\n get periodLabel(): string {\r\n const currentDate = this._dateAdapter\r\n .format(this._calendar.activeDate, 'YYYY');\r\n return `${Number(currentDate) - 23} - ${currentDate}`;\r\n }\r\n\r\n previousClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, -23);\r\n }\r\n\r\n nextClicked() {\r\n this._calendar.activeDate = this._dateAdapter.addCalendarYears(this._calendar.activeDate, 23);\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, forwardRef, Injector} from '@angular/core';\r\nimport {MatDatepicker} from '@angular/material/datepicker';\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR, NgControl} from '@angular/forms';\r\nimport {DateAdapter, MAT_DATE_FORMATS} from '@angular/material/core';\r\nimport {CustomDateAdapter} from '../date-adapter';\r\nimport {CustomDatepickerHeaderComponent} from '../custom-datepicker-header/custom-datepicker-header.component';\r\n\r\nconst MY_DATE_FORMATS = {\r\n parse: {\r\n dateInput: 'LL'\r\n },\r\n display: {\r\n dateInput: 'YYYY',\r\n monthYearLabel: 'YYYY',\r\n dateA11yLabel: 'YYYY',\r\n monthYearA11yLabel: 'YYYY'\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'lib-property-custom-datepicker',\r\n templateUrl: './custom-datepicker.component.html',\r\n styleUrls: ['./custom-datepicker.component.scss'],\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => CustomDatepickerComponent),\r\n multi: true\r\n },\r\n {\r\n provide: MAT_DATE_FORMATS,\r\n useValue: MY_DATE_FORMATS\r\n },\r\n {\r\n provide: DateAdapter,\r\n useClass: CustomDateAdapter\r\n }\r\n ]\r\n})\r\nexport class CustomDatepickerComponent implements ControlValueAccessor, AfterViewInit {\r\n\r\n public currentYear: Date;\r\n public year: string;\r\n public customHeader = CustomDatepickerHeaderComponent;\r\n private _control: NgControl;\r\n\r\n constructor(\r\n private _injector: Injector\r\n ) {\r\n this.currentYear = new Date();\r\n this.year = '';\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this._control = this._injector.get(NgControl);\r\n this._control.valueAccessor = this;\r\n }\r\n\r\n onYearSelected(ev: any, datepicker: MatDatepicker<Date>) {\r\n datepicker.close();\r\n this.year = ev;\r\n this._control.control.patchValue(ev);\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n }\r\n\r\n writeValue(value: any): void {\r\n if (value !== undefined) {\r\n this.year = value;\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CustomDatepickerComponent } from './custom-datepicker/custom-datepicker.component';\r\nimport {CustomDatepickerHeaderComponent} from './custom-datepicker-header/custom-datepicker-header.component';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatButtonModule} from '@angular/material/button';\r\n\r\nconst MATERIAL = [\r\n MatFormFieldModule,\r\n MatInputModule,\r\n MatDatepickerModule,\r\n MatButtonModule,\r\n MatIconModule\r\n];\r\n\r\nconst COMPONENTS = [\r\n CustomDatepickerComponent,\r\n CustomDatepickerHeaderComponent\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL\r\n ],\r\n declarations: [\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n CustomDatepickerHeaderComponent\r\n ],\r\n exports: [\r\n CustomDatepickerComponent\r\n ]\r\n})\r\nexport class CustomDatepickerModule { }\r\n","import {AfterViewInit, Component, ContentChild, EventEmitter, Input, OnInit, Output, TemplateRef, ViewChild} from '@angular/core';\r\nimport {CdkDrag, CdkDragMove, CdkDropList, CdkDropListGroup, moveItemInArray} from '@angular/cdk/drag-drop';\r\nimport {ViewportRuler} from '@angular/cdk/overlay';\r\n\r\n@Component({\r\n selector: 'lib-custom-drag-and-drop',\r\n templateUrl: './custom-drag-and-drop.component.html',\r\n styleUrls: ['./custom-drag-and-drop.component.scss']\r\n})\r\nexport class CustomDragAndDropComponent implements OnInit, AfterViewInit {\r\n @ViewChild(CdkDropListGroup, {static: true}) listGroup: CdkDropListGroup<CdkDropList>;\r\n @ViewChild(CdkDropList, {static: true}) placeholder: CdkDropList;\r\n @ContentChild(TemplateRef, {static: true})\r\n @Input() content: TemplateRef<any>;\r\n @Input() items: any[];\r\n @Output() itemsChanged: EventEmitter<any[]>;\r\n public target: CdkDropList;\r\n public targetIndex: number;\r\n public source: CdkDropList;\r\n public sourceIndex: number;\r\n public activeContainer;\r\n public dropListEnterPredicate: Function;\r\n\r\n constructor(private _viewportRuler: ViewportRuler) {\r\n this.itemsChanged = new EventEmitter<any[]>();\r\n this.target = null;\r\n this.source = null;\r\n this.dropListEnterPredicate = (drag: CdkDrag, drop: CdkDropList) => {\r\n if (drop === this.placeholder) {\r\n return true;\r\n }\r\n if (drop !== this.activeContainer) {\r\n return false;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const sourceElement = drag.dropContainer.element.nativeElement;\r\n const dropElement = drop.element.nativeElement;\r\n const dragIndex = __indexOf(dropElement.parentElement.children, (this.source ? phElement : sourceElement));\r\n const dropIndex = __indexOf(dropElement.parentElement.children, dropElement);\r\n if (!this.source) {\r\n this.sourceIndex = dragIndex;\r\n this.source = drag.dropContainer;\r\n phElement.style.width = sourceElement.clientWidth + 'px';\r\n phElement.style.height = sourceElement.clientHeight + 'px';\r\n sourceElement.parentElement.removeChild(sourceElement);\r\n }\r\n this.targetIndex = dropIndex;\r\n this.target = drop;\r\n phElement.style.display = '';\r\n dropElement.parentElement.insertBefore(phElement, (dropIndex > dragIndex\r\n ? dropElement.nextSibling : dropElement));\r\n this.placeholder.enter(drag, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);\r\n return false;\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const phElement = this.placeholder.element.nativeElement;\r\n phElement.style.display = 'none';\r\n phElement.parentElement.removeChild(phElement);\r\n }\r\n\r\n dragMoved(e: CdkDragMove) {\r\n const point = this.getPointerPositionOnPage(e.event);\r\n this.listGroup._items.forEach(dropList => {\r\n if (__isInsideDropListClientRect(dropList, point.x, point.y)) {\r\n this.activeContainer = dropList;\r\n return;\r\n }\r\n });\r\n }\r\n\r\n dropListDropped(): void {\r\n if (!this.target) {\r\n return;\r\n }\r\n const phElement = this.placeholder.element.nativeElement;\r\n const parent = phElement.parentElement;\r\n phElement.style.display = 'none';\r\n parent.removeChild(phElement);\r\n parent.appendChild(phElement);\r\n parent.insertBefore(this.source.element.nativeElement, parent.children[this.sourceIndex]);\r\n this.target = null;\r\n this.source = null;\r\n if (this.sourceIndex !== this.targetIndex) {\r\n moveItemInArray(this.items, this.sourceIndex, this.targetIndex);\r\n this.itemsChanged.emit(this.items);\r\n }\r\n }\r\n\r\n /** Determines the point of the page that was touched by the user. */\r\n getPointerPositionOnPage(event: MouseEvent | TouchEvent): any {\r\n // `touches` will be empty for start/end events so we have to fall back to `changedTouches`.\r\n const point = __isTouchEvent(event) ? (event.touches[0] || event.changedTouches[0]) : event;\r\n const scrollPosition = this._viewportRuler.getViewportScrollPosition();\r\n return {\r\n x: point.pageX - scrollPosition.left,\r\n y: point.pageY - scrollPosition.top\r\n };\r\n }\r\n}\r\n\r\nfunction __indexOf(collection, node) {\r\n return Array.prototype.indexOf.call(collection, node);\r\n}\r\n\r\n/** Determines whether an event is a touch event. */\r\nfunction __isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\r\n return event.type.startsWith('touch');\r\n}\r\n\r\nfunction __isInsideDropListClientRect(dropList: CdkDropList, x: number, y: number) {\r\n const {top, bottom, left, right} = dropList.element.nativeElement.getBoundingClientRect();\r\n return y >= top && y <= bottom && x >= left && x <= right;\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule, CurrencyPipe} from '@angular/common';\r\nimport {EditorComponent} from './components/editor/editor.component';\r\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\r\nimport {OwnerInfoComponent} from './components/owner-info/owner-info.component';\r\nimport {DocumentsComponent} from './components/documents/documents.component';\r\nimport {\r\n CountryCodeModule,\r\n DialogModule,\r\n LocationModule,\r\n SafeUrlModule, ShareModule,\r\n StringManipulationModule,\r\n UploadFileModule\r\n} from '@maplander/shared';\r\nimport {SnackBarModule} from '@maplander/core';\r\nimport {PropertyComponent} from './components/property/property.component';\r\nimport {DetailsComponent} from './components/details/details.component';\r\nimport {SlideShowComponent} from './components/slideshow/slide-show.component';\r\nimport {MultimediaUploaderComponent} from './components/multimedia-uploader/multimedia-uploader.component';\r\nimport {AnnounceConfirmComponent} from './components/announce-confirm/announce-confirm.component';\r\nimport {MultimediaUploaderService} from './components/multimedia-uploader/multimedia-uploader.service';\r\nimport {AnnounceConfirmService} from './components/announce-confirm/announce-confirm.service';\r\nimport {CustomDatepickerModule} from './components/editor/components/custom-datepicker/custom-datepicker.module';\r\nimport {DocumentVisorModule} from '../document-visor/document-visor.module';\r\nimport {PanoramaVisorModule} from '../panorama-visor/panorama-visor.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {OfferingTypeModule} from '../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from '../../pipes/property-type/property-type.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatButtonToggleModule} from '@angular/material/button-toggle';\r\nimport {MatCheckboxModule} from '@angular/material/checkbox';\r\nimport {MatDatepickerModule} from '@angular/material/datepicker';\r\nimport {MatFormFieldModule} from '@angular/material/form-field';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {MatInputModule} from '@angular/material/input';\r\nimport {MatRadioModule} from '@angular/material/radio';\r\nimport {MatSelectModule} from '@angular/material/select';\r\nimport {MatSidenavModule} from '@angular/material/sidenav';\r\nimport {MatTabsModule} from '@angular/material/tabs';\r\nimport {MatToolbarModule} from '@angular/material/toolbar';\r\nimport {MatNativeDateModule, MatRippleModule} from '@angular/material/core';\r\nimport {MatTooltipModule} from '@angular/material/tooltip';\r\nimport {EcoFabSpeedDialModule} from '@ecodev/fab-speed-dial';\r\nimport {FormatPriceModule} from '../../directives/format-price/format-price.module';\r\nimport {DragDropModule} from '@angular/cdk/drag-drop';\r\nimport { CustomDragAndDropComponent } from './components/custom-drag-and-drop/custom-drag-and-drop.component';\r\nimport {GalleryComponent} from './components/gallery/gallery.component';\r\nimport {GalleryService} from './components/gallery/gallery.service';\r\nimport {PROPERTY_TOKEN} from './token';\r\nimport { StatsComponent } from './components/stats/stats.component';\r\nimport {StatsService} from './components/stats/stats.service';\r\n\r\n\r\nconst MATERIAL = [\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatIconModule,\r\n MatButtonToggleModule,\r\n MatRadioModule,\r\n MatInputModule,\r\n MatFormFieldModule,\r\n MatSelectModule,\r\n MatSidenavModule,\r\n MatToolbarModule,\r\n MatTabsModule,\r\n MatDatepickerModule,\r\n MatTooltipModule,\r\n MatRippleModule,\r\n MatNativeDateModule,\r\n DragDropModule\r\n];\r\n\r\nconst PAGES = [\r\n PropertyComponent\r\n];\r\n\r\nconst COMPONENTS = [\r\n DetailsComponent,\r\n EditorComponent,\r\n OwnerInfoComponent,\r\n SlideShowComponent,\r\n DocumentsComponent,\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n CustomDragAndDropComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst ENTRY_COMPONENTS = [\r\n MultimediaUploaderComponent,\r\n AnnounceConfirmComponent,\r\n GalleryComponent,\r\n StatsComponent\r\n];\r\n\r\nconst PROVIDERS = [\r\n MultimediaUploaderService,\r\n AnnounceConfirmService,\r\n CurrencyPipe,\r\n GalleryService,\r\n StatsService\r\n];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MATERIAL,\r\n EcoFabSpeedDialModule,\r\n ReactiveFormsModule,\r\n FormsModule,\r\n UploadFileModule,\r\n DocumentVisorModule.forChild(),\r\n OfferingTypeModule.forChild(),\r\n PropertyTypeModule.forChild(),\r\n SafeUrlModule.forChild(),\r\n StringManipulationModule.forChild(),\r\n FormatDateModule.forChild(),\r\n FormatPriceModule.forChild(),\r\n ShareModule.forChild(),\r\n PanoramaVisorModule,\r\n CountryCodeModule,\r\n LocationModule,\r\n DialogModule,\r\n CustomDatepickerModule,\r\n SnackBarModule.forRoot()\r\n ],\r\n declarations: [\r\n PAGES,\r\n COMPONENTS\r\n ],\r\n entryComponents: [\r\n ENTRY_COMPONENTS\r\n ],\r\n exports: [\r\n PropertyComponent\r\n ],\r\n providers: [\r\n PROVIDERS\r\n ]\r\n})\r\nexport class PropertyModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_TOKEN,\r\n useValue: isOPI || false\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {InjectionToken} from '@angular/core';\r\n\r\nexport const PROPERTY_CARD_CONFIG_MODULE = new InjectionToken<boolean>('PROPERTY CARD CONFIG MODULE');\r\n","import {Component, EventEmitter, Inject, Input, OnChanges, Optional, Output, SimpleChanges, OnInit} from '@angular/core';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\n\r\n@Component({\r\n selector: 'lib-property-card',\r\n templateUrl: './property-card.component.html',\r\n styleUrls: ['./property-card.component.scss']\r\n})\r\nexport class PropertyCardComponent implements OnChanges, OnInit {\r\n @Input() marker: Marker;\r\n @Input() href: string;\r\n @Input() target: string;\r\n @Input() queryParams: {\r\n [k: string]: any;\r\n };\r\n @Input() state: {\r\n [k: string]: any;\r\n };\r\n @Input() showAlert: boolean;\r\n @Input() positionLatLng: any;\r\n @Input() isFavorite: boolean;\r\n @Input() currency: string;\r\n @Input() showDiscard: boolean;\r\n @Input() mode: 'full' | 'summary' = 'full';\r\n @Output() markerChanged: EventEmitter<Marker>;\r\n @Output() favoriteChanged: EventEmitter<string>;\r\n @Output() propertyDiscarded: EventEmitter<string>;\r\n public info: PropertyCardInfo;\r\n public distance: any;\r\n\r\n constructor(\r\n @Optional() @Inject(PROPERTY_CARD_CONFIG_MODULE) public isOPI: boolean,\r\n ) {\r\n this.currency = null;\r\n this.markerChanged = new EventEmitter<Marker>();\r\n this.favoriteChanged = new EventEmitter<string>();\r\n this.propertyDiscarded = new EventEmitter<string>();\r\n }\r\n\r\n ngOnInit() {\r\n if (this.positionLatLng) {\r\n this.latLng(this.positionLatLng.latitude, this.positionLatLng.longitude);\r\n }\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n if (changes['currency'] && changes['currency'].currentValue) {\r\n this.currency = changes['currency'].currentValue !== 'MXN' ? changes['currency'].currentValue : null;\r\n }\r\n if (changes['marker'] && changes['marker'].currentValue) {\r\n this.info = changes['marker'].currentValue.info;\r\n }\r\n }\r\n\r\n onFrontImageOver(): void {\r\n this.marker.hover = true;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n onFrontImageLeave(): void {\r\n this.marker.hover = false;\r\n this.markerChanged.emit(this.marker);\r\n }\r\n\r\n favorite(): void {\r\n this.favoriteChanged.emit(this.info.propertyId);\r\n }\r\n\r\n discard(): void {\r\n this.propertyDiscarded.emit(this.info.propertyId);\r\n }\r\n\r\n private deg2rad(deg): any {\r\n return deg * (Math.PI / 180 );\r\n }\r\n\r\n private latLng(lat: any, lng: any): void {\r\n const lat1 = lat;\r\n const lon1 = lng;\r\n const lat2 = this.marker.location.latitude;\r\n const lon2 = this.marker.location.longitude;\r\n const R = 6371; // Radius of the earth in km\r\n const dLat = this.deg2rad(lat2 - lat1 ); // deg2rad below\r\n const dLon = this.deg2rad(lon2 - lon1 );\r\n const a =\r\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(this.deg2rad(lat1)) * Math.cos(this.deg2rad(lat2)) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2)\r\n ;\r\n const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n let d = R * c; // Distance in km\r\n if (Math.trunc(d) < 1) {\r\n d = d * 1000;\r\n d = Math.trunc(d);\r\n if (d < 10) {\r\n this.distance = 10 + ' m de su búsqueda';\r\n } else {\r\n d = d - (d % 10);\r\n this.distance = d + ' m de su búsqueda';\r\n }\r\n } else {\r\n this.distance = d.toFixed(2) + ' km de su búsqueda';\r\n }\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {CommonModule} from '@angular/common';\r\nimport {PropertyCardComponent} from './property-card.component';\r\nimport {RouterModule} from '@angular/router';\r\nimport {OfferingTypeModule} from './../../pipes/offering-type/offering-type.module';\r\nimport {PropertyTypeModule} from './../../pipes/property-type/property-type.module';\r\nimport {ImageErrorModule} from './../../directives/image-error/image-error.module';\r\nimport {FormatDateModule} from '../../pipes/format-date/format-date.module';\r\nimport {MatButtonModule} from '@angular/material/button';\r\nimport {MatIconModule} from '@angular/material/icon';\r\nimport {PROPERTY_CARD_CONFIG_MODULE} from './token';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n RouterModule,\r\n PropertyTypeModule,\r\n OfferingTypeModule,\r\n ImageErrorModule,\r\n MatIconModule,\r\n MatButtonModule,\r\n FormatDateModule\r\n ],\r\n declarations: [\r\n PropertyCardComponent\r\n ],\r\n exports: [\r\n PropertyCardComponent\r\n ]\r\n})\r\nexport class PropertyCardModule {\r\n static forChild(isOPI?: boolean): ModuleWithProviders {\r\n return {\r\n ngModule: PropertyCardModule,\r\n providers: [\r\n {\r\n provide: PROPERTY_CARD_CONFIG_MODULE,\r\n useValue: isOPI\r\n }\r\n ]\r\n };\r\n }\r\n}\r\n","import {Injectable} from '@angular/core';\r\nimport {\r\n Address,\r\n CER,\r\n Currency,\r\n GeoPt,\r\n NewPropertyLite,\r\n NewPropertyLiteSuggest,\r\n OfferingTypeEnum,\r\n PropertyTypeEnum\r\n} from '@maplander/types';\r\nimport {ConstantsComponents} from '../../constantsComponents';\r\nimport {Marker} from '../../utils/models/marker';\r\nimport {PropertyCardInfo} from '../../utils/models/property-card-info';\r\nimport {PropertyTypeItem} from '../../utils/models/property-type-item';\r\nimport {OfferingTypePipe} from '../../pipes/offering-type/offering-type.pipe';\r\nimport {PropertyTypePipe} from '../../pipes/property-type/property-type.pipe';\r\nimport {Utils} from '../../utils';\r\nimport {CurrencyConverterService} from '../currency-converter/currency-converter.service';\r\n\r\ndeclare var google: any;\r\n\r\n@Injectable()\r\nexport class MarkersService {\r\n\r\n constructor(\r\n private _propertyTypePipe: PropertyTypePipe,\r\n private _offeringTypePipe: OfferingTypePipe,\r\n private _converter: CurrencyConverterService\r\n ) {\r\n }\r\n\r\n private static getPropertyTypeItemByType(type: PropertyTypeEnum): PropertyTypeItem {\r\n let item: PropertyTypeItem = null;\r\n ConstantsComponents.PropertyTypeList.forEach((element) => {\r\n if (element.value === type) {\r\n item = element;\r\n }\r\n });\r\n return item;\r\n }\r\n\r\n private static validatePropertyInFavorites(propertyId: string, favorites: NewPropertyLite[]): boolean {\r\n let result = false;\r\n for (let i = 0; i < favorites.length; i++) {\r\n if (propertyId === favorites[i].id) {\r\n result = true;\r\n break;\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n private static calculateLocationFrom(location: GeoPt, bearingInRadians: number, distanceInMetres: number): GeoPt {\r\n const coordinateLatitudeInRadians = location.latitude * Math.PI / 180;\r\n const coordinateLongitudeInRadians = location.longitude * Math.PI / 180;\r\n const distanceComparedToEarth = distanceInMetres / 6378100.0;\r\n const resultLatitudeInRadians = Math.asin(Math.sin(coordinateLatitudeInRadians) * Math.cos(distanceComparedToEarth) +\r\n Math.cos(coordinateLatitudeInRadians) * Math.sin(distanceComparedToEarth) * Math.cos(bearingInRadians));\r\n const resultLongitudeInRadians = coordinateLongitudeInRadians + Math.atan2(Math.sin(bearingInRadians) *\r\n Math.sin(distanceComparedToEarth) * Math.cos(coordinateLatitudeInRadians), Math.cos(distanceComparedToEarth) -\r\n Math.sin(coordinateLatitudeInRadians) * Math.sin(resultLatitudeInRadians));\r\n const newCoordinates: any = {};\r\n newCoordinates.latitude = resultLatitudeInRadians * 180 / Math.PI;\r\n newCoordinates.longitude = resultLongitudeInRadians * 180 / Math.PI;\r\n return newCoordinates;\r\n }\r\n\r\n buildURL(config: {\r\n propertyId: string,\r\n offering: OfferingTypeEnum,\r\n propertyType: PropertyTypeEnum,\r\n address: Address\r\n }): string {\r\n const colony = config.address.colony ? config.address.colony.replace(/[\\])}[{(]/g, '') : '';\r\n const city = config.address.city ? config.address.city.replace(/[\\])}[{(]/g, '') : '';\r\n let url = 'property/';\r\n url += `${this._propertyTypePipe.transform(config.propertyType, true)}-`;\r\n url += `${this._offeringTypePipe.transform(config.offering, ' ').replace(/ /g, '')}-`;\r\n url += colony ? `${colony.replace(/\\//g, '-')}-` : '';\r\n url += city ? `${city.replace(/\\//g, '-')}-` : '';\r\n url += config.propertyId;\r\n url = Utils.removeDiacritics(url).replace(/ /g, '-').toLowerCase();\r\n return url;\r\n }\r\n\r\n validatePropertiesInPoly(properties: Marker[], paths: any[]): Marker[] {\r\n const polygon = new google.maps.Polygon({paths: paths});\r\n if (properties && properties.length > 0) {\r\n properties.map((el: Marker) => {\r\n el.extras['showInPolygon'] = false;\r\n const customLatLng = new google.maps.LatLng(el.location.latitude, el.location.longitude);\r\n if (google.maps.geometry.poly.containsLocation(customLatLng, polygon)) {\r\n el.extras['showInPolygon'] = true;\r\n return el;\r\n } else {\r\n el.extras['showInPolygon'] = false;\r\n return el;\r\n }\r\n });\r\n properties = properties.filter((e) => {\r\n if (e.extras['showInPolygon']) {\r\n return e;\r\n }\r\n });\r\n return properties;\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n markersToCurrency(markers: Marker[], toCurrency: Currency, currencies: CER[]): Marker[] {\r\n markers = markers.map<Marker>(item => {\r\n if (Currency[item.info.currency] !== toCurrency) {\r\n item.info.price = this._converter.number(item.info.price, currencies, Currency[item.info.currency], toCurrency);\r\n item.info.currency = toCurrency.toString();\r\n }\r\n return item;\r\n });\r\n return markers;\r\n }\r\n\r\n buildMarkers(entities: NewPropertyLite[] | NewPropertyLiteSuggest[], favorites?: NewPropertyLite[]): Marker[] {\r\n const markers: Marker[] = [];\r\n entities.forEach((entity) => {\r\n const m: Marker = {\r\n location: entity.address.location,\r\n hover: false,\r\n visited: false,\r\n type: MarkersService.getPropertyTypeItemByType(entity.type),\r\n info: this.createPropertyInfoCard(entity),\r\n isFavorite: false,\r\n extras: {}\r\n };\r\n if (entity instanceof NewPropertyLite) {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.id, favorites) : false;\r\n } else {\r\n m.isFavorite = favorites && favorites.length > 0 ? MarkersService.validatePropertyInFavorites(entity.propertyId, favorites) : false;\r\n }\r\n markers.push(m);\r\n });\r\n return markers;\r\n }\r\n\r\n buildSpider(list: Marker[]): { markers: Marker[], polyLines: any[] } {\r\n const response = {markers: [], polyLines: []};\r\n list.map((el) => {\r\n el.extras['repeat'] = false;\r\n const size = list.filter(item => {\r\n return el.location.latitude === item.location.latitude && el.location.longitude === item.location.longitude;\r\n });\r\n const distance = 12 * size.length / 2.0;\r\n const radiansBetweenAnnotations = (Math.PI * 2) / size.length;\r\n if (!el.extras['repeat'] && size.length > 1) {\r\n const locationShare: any = Object.assign({}, el.location);\r\n for (let i = 0; i < size.length; i++) {\r\n const heading = radiansBetweenAnnotations * i;\r\n size[i]['repeat'] = true;\r\n const newLocation = MarkersService.calculateLocationFrom(locationShare, heading, distance);\r\n response.polyLines.push({\r\n path: [\r\n {\r\n latitude: Number(locationShare.latitude),\r\n longitude: Number(locationShare.longitude)\r\n },\r\n {\r\n latitude: Number(newLocation.latitude),\r\n longitude: Number(newLocation.longitude)\r\n }]\r\n });\r\n size[i].location = newLocation;\r\n }\r\n }\r\n return el;\r\n });\r\n response.markers = list;\r\n return response;\r\n }\r\n\r\n private createPropertyInfoCard(entity: NewPropertyLite | NewPropertyLiteSuggest): PropertyCardInfo {\r\n return {\r\n address: new Address(entity.address || null),\r\n authUsers: (entity instanceof NewPropertyLite) ? entity.authUsers : '',\r\n currency: entity.currency,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId,\r\n image: entity.image,\r\n offering: entity.offering,\r\n price: entity.price,\r\n type: entity.type,\r\n url: this.buildURL({\r\n address: entity.address,\r\n offering: entity.offering,\r\n propertyType: entity.type,\r\n propertyId: (entity instanceof NewPropertyLite) ? entity.id : entity.propertyId\r\n }),\r\n status: (entity instanceof NewPropertyLite) ? entity.status : null,\r\n features: (entity instanceof NewPropertyLite) ? entity.features : null,\r\n };\r\n }\r\n}\r\n","import {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport {MarkersService} from './markers.service';\r\nimport {CurrencyConverterModule} from '../currency-converter/currency-converter.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CurrencyConverterModule.forChild()\r\n ]\r\n})\r\nexport class MarkersModule {\r\n static forChild(): ModuleWithProviders {\r\n return {\r\n ngModule: MarkersModule,\r\n providers: [\r\n MarkersService\r\n ]\r\n };\r\n }\r\n}\r\n"]}
|