@maplander/components 0.21.26 → 0.21.27
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 +2 -2
- 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/services/markers/markers.service.js +3 -3
- package/esm5/lib/services/markers/markers.service.js +3 -3
- package/fesm2015/maplander-components.js +2 -2
- package/fesm2015/maplander-components.js.map +1 -1
- package/fesm5/maplander-components.js +2 -2
- package/fesm5/maplander-components.js.map +1 -1
- package/lib/services/markers/markers.service.d.ts +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","__values","o","m","Symbol","iterator","next","value","done","AddressFormatPipe","transform","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","nj","oi","ou","oo","q","r","ss","tz","u","v","vy","w","x","y","z","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","_wrapper","init","openFilters","console","warn","onClickChip","FilterChipType","sharedProperties","_filter","listingType","offeringType","propertyType","surface","push","text","mlsLabel","firstLetter","substr","toLocaleUpperCase","item","min","max","FabFiltersModule","MatChipsModule","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","changeFilter","EventEmitter","propertyTypeList","bedroomsList","bathroomsList","parkingPlacesList","surfaceList","roiList","surfaceUnitSelected","buildForm","initComponentByPropertyType","restoreLastFiltersSaved","listenChangesOnForm","openComponent","utils","initComponent","changePropertyType","index","resetFilters","locationType","municipality","applyAmenities","propertyTypeSelected","filtersForm","controls","setValue","emit","payload","changeOffering","ev","get","markAsTouched","changeCurrency","changeFilterStatus","changeState","updateAmenity","amenity","indexOf","splice","saveSearchByFilters","applyFilters","getFilterByForm","filterToSearch","updateFiltersSaved","_isSharedProperties","propertyTypeItemIndex","updateFormByFilters","setPrices","propertyTotal","controlName","controlName2","group","Validators","required","minPrice","pattern","maxPrice","surfaceUnit","validator","peerControl","peerControl2","patchValue","initUtils","currencyList","cers","reset","minPriceList","createPrices","limitPrice","Currency","maxPriceList","_tmpMinPriceList","_tmpMaxPriceList","propertyRanges","range","JSON","parse","stringify","filtersSaved","find","setStyle","difference","Renderer2","FormBuilder","Output","CurrencyConverterModule","FiltersModule","provide","useValue","ReactiveFormsModule","FormsModule","MatRippleModule","MatFormFieldModule","MatSelectModule","MatButtonToggleModule","MatDividerModule","MatInputModule","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","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","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","buildNewSpider","newList","list_1","list_1_1","listElement","authUsers","MarkersModule"],"mappings":";;;;;;;;;;;;;;oFAgBA,IAAIA,EAAgBC,OAAOC,gBACtB,CAAEC,UAAW,cAAgBC,OAAS,SAAUC,EAAGC,GAAKD,EAAEF,UAAYG,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KA,SAAAA,KAeA,OARSA,EAAAtuC,SAAP,WACE,MAAQ,CACNC,SAAUquC,EACVpuC,UAAW,CACT8qC,0BAXP7qC,EAAAA,SAAQN,KAAA,CAAC,CACRO,QAAS,CACPC,EAAAA,aACAqmB,GAAwB1mB,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, Input, OnDestroy, OnInit} 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 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 }\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\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.offeringType();\r\n this.propertyType();\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\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatButtonModule,\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() stateOptions: Array<{name: string, total: number}>;\r\n @Input() propertyTotal: number;\r\n @Output() changeFilter: EventEmitter<{type: 'propertyType' | 'filter' | 'offer' | 'init', payload: {filter: Filter, value: any}}>;\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.changeFilter = new EventEmitter<{type: 'propertyType' | 'filter' | 'offer' | 'init', payload: {filter: Filter, value: any}}>();\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.filter.locationType = 'STATE';\r\n this.filter.state = null;\r\n this.filter.municipality = null;\r\n this.filter.colony = null;\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.emit({type: 'propertyType', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n changeOffering(ev: string): void {\r\n this.filter.locationType = 'STATE';\r\n this.filter.state = null;\r\n this.filter.municipality = null;\r\n this.filter.colony = null;\r\n this.filtersForm.get('state').setValue('');\r\n this.filtersForm.get('state').markAsTouched();\r\n this.filter.offering = ev as OfferingTypeEnum;\r\n this.changeFilter.emit({type: 'offer', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n\r\n }\r\n\r\n changeCurrency(ev: string): void {\r\n this.filter.currency = ev;\r\n this.changeFilterStatus();\r\n }\r\n\r\n changeState(ev: string): void {\r\n this.filter.state = ev;\r\n this.changeFilterStatus();\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.changeFilterStatus();\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 this.propertyTotal = 0;\r\n }\r\n\r\n private buildForm(): void {\r\n this.filtersForm = this._formBuilder.group({\r\n state: ['', [Validators.required]],\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 changeFilterStatus(): 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.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: filterToSearch}});\r\n }\r\n\r\n private updateFormByFilters(): void {\r\n this.filtersForm.patchValue({\r\n state: this.filter.state,\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.state = data.state;\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.changeFilter.emit({type: 'init', payload: {filter: null, value: null}});\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\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 ],\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 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 += config.address.colony ? `${config.address.colony}-` : '';\r\n url += config.address.city ? `${config.address.city}-` : '';\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 buildNewSpider(list: Array<{ id: string, location: GeoPt, price: number,\r\n currency: string, url: string }>): { markers: Marker[], polyLines: any[] } {\r\n const response = {markers: [], polyLines: []};\r\n const newList = [];\r\n for (const listElement of list) {\r\n newList.push({\r\n id: listElement.id,\r\n location: listElement.location,\r\n price: listElement.price,\r\n currency: listElement.currency,\r\n url: listElement.url,\r\n extras: {}\r\n });\r\n }\r\n newList.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","__values","o","m","Symbol","iterator","next","value","done","AddressFormatPipe","transform","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","nj","oi","ou","oo","q","r","ss","tz","u","v","vy","w","x","y","z","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","_wrapper","init","openFilters","console","warn","onClickChip","FilterChipType","sharedProperties","_filter","listingType","offeringType","propertyType","surface","push","text","mlsLabel","firstLetter","substr","toLocaleUpperCase","item","min","max","FabFiltersModule","MatChipsModule","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","changeFilter","EventEmitter","propertyTypeList","bedroomsList","bathroomsList","parkingPlacesList","surfaceList","roiList","surfaceUnitSelected","buildForm","initComponentByPropertyType","restoreLastFiltersSaved","listenChangesOnForm","openComponent","utils","initComponent","changePropertyType","index","resetFilters","locationType","municipality","applyAmenities","propertyTypeSelected","filtersForm","controls","setValue","emit","payload","changeOffering","ev","get","markAsTouched","changeCurrency","changeFilterStatus","changeState","updateAmenity","amenity","indexOf","splice","saveSearchByFilters","applyFilters","getFilterByForm","filterToSearch","updateFiltersSaved","_isSharedProperties","propertyTypeItemIndex","updateFormByFilters","setPrices","propertyTotal","controlName","controlName2","group","Validators","required","minPrice","pattern","maxPrice","surfaceUnit","validator","peerControl","peerControl2","patchValue","initUtils","currencyList","cers","reset","minPriceList","createPrices","limitPrice","Currency","maxPriceList","_tmpMinPriceList","_tmpMaxPriceList","propertyRanges","range","JSON","parse","stringify","filtersSaved","find","setStyle","difference","Renderer2","FormBuilder","Output","CurrencyConverterModule","FiltersModule","provide","useValue","ReactiveFormsModule","FormsModule","MatRippleModule","MatFormFieldModule","MatSelectModule","MatButtonToggleModule","MatDividerModule","MatInputModule","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","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","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","buildNewSpider","newList","list_1","list_1_1","listElement","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,GAqEJ,SAASQ,EAASC,GACrB,IAAIC,EAAsB,mBAAXC,QAAyBF,EAAEE,OAAOC,UAAWV,EAAI,EAChE,OAAIQ,EAAUA,EAAEH,KAAKE,GACd,CACHI,KAAM,WAEF,OADIJ,GAAKP,GAAKO,EAAEJ,SAAQI,OAAI,GACrB,CAAEK,MAAOL,GAAKA,EAAEP,KAAMa,MAAON,sBCvGhD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AAW,MACvC0U,UAAYlB,aAAkBI,EAAAA,gBAAmBJ,EAAOkB,UAAY,GACpEnhC,SAAUigC,EAAOjgC,SACjB88B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOvf,GAAKuf,EAAOnD,WACrE/5B,MAAOk9B,EAAOl9B,MACdxB,SAAU0+B,EAAO1+B,SACjBsB,MAAOo9B,EAAOp9B,MACdvB,KAAM2+B,EAAO3+B,KACboL,IAAKlZ,KAAKsrC,SAAS,CACjBrS,QAASwT,EAAOxT,QAChBlrB,SAAU0+B,EAAO1+B,SACjBuQ,aAAcmuB,EAAO3+B,KACrBw7B,WAAamD,aAAkBI,EAAAA,gBAAmBJ,EAAOvf,GAAKuf,EAAOnD,aAEvEvV,OAAS0Y,aAAkBI,EAAAA,gBAAmBJ,EAAO1Y,OAAS,KAC9DhrB,SAAW0jC,aAAkBI,EAAAA,gBAAmBJ,EAAO1jC,SAAW,2BA3NvEmR,EAAAA,sDANO5E,UADAL,SAGAkK,MAkORmrB,KCpPAsD,GAAA,WAKA,SAAAA,KAeA,OARSA,EAAAtuC,SAAP,WACE,MAAQ,CACNC,SAAUquC,EACVpuC,UAAW,CACT8qC,0BAXP7qC,EAAAA,SAAQN,KAAA,CAAC,CACRO,QAAS,CACPC,EAAAA,aACAqmB,GAAwB1mB,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, Input, OnDestroy, OnInit} 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 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 }\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\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.offeringType();\r\n this.propertyType();\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\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatChipsModule,\r\n MatIconModule,\r\n MatButtonModule,\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() stateOptions: Array<{name: string, total: number}>;\r\n @Input() propertyTotal: number;\r\n @Output() changeFilter: EventEmitter<{type: 'propertyType' | 'filter' | 'offer' | 'init', payload: {filter: Filter, value: any}}>;\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.changeFilter = new EventEmitter<{type: 'propertyType' | 'filter' | 'offer' | 'init', payload: {filter: Filter, value: any}}>();\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.filter.locationType = 'STATE';\r\n this.filter.state = null;\r\n this.filter.municipality = null;\r\n this.filter.colony = null;\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.emit({type: 'propertyType', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n }\r\n\r\n changeOffering(ev: string): void {\r\n this.filter.locationType = 'STATE';\r\n this.filter.state = null;\r\n this.filter.municipality = null;\r\n this.filter.colony = null;\r\n this.filtersForm.get('state').setValue('');\r\n this.filtersForm.get('state').markAsTouched();\r\n this.filter.offering = ev as OfferingTypeEnum;\r\n this.changeFilter.emit({type: 'offer', payload: {filter: this.filter, value: this.filtersForm.value}});\r\n\r\n }\r\n\r\n changeCurrency(ev: string): void {\r\n this.filter.currency = ev;\r\n this.changeFilterStatus();\r\n }\r\n\r\n changeState(ev: string): void {\r\n this.filter.state = ev;\r\n this.changeFilterStatus();\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.changeFilterStatus();\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 this.propertyTotal = 0;\r\n }\r\n\r\n private buildForm(): void {\r\n this.filtersForm = this._formBuilder.group({\r\n state: ['', [Validators.required]],\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 changeFilterStatus(): 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.changeFilter.emit({type: 'filter', payload: {filter: this.filter, value: filterToSearch}});\r\n }\r\n\r\n private updateFormByFilters(): void {\r\n this.filtersForm.patchValue({\r\n state: this.filter.state,\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.state = data.state;\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.changeFilter.emit({type: 'init', payload: {filter: null, value: null}});\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\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 ],\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 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 += config.address.colony ? `${config.address.colony}-` : '';\r\n url += config.address.city ? `${config.address.city}-` : '';\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 buildNewSpider(list: Array<{ id: string, location: GeoPt, price: number,\r\n currency: string, url: string }>): { markers: any[], polyLines: any[] } {\r\n const response = {markers: [], polyLines: []};\r\n const newList = [];\r\n for (const listElement of list) {\r\n newList.push({\r\n id: listElement.id,\r\n location: listElement.location,\r\n price: listElement.price,\r\n currency: listElement.currency,\r\n url: listElement.url,\r\n extras: {}\r\n });\r\n }\r\n newList.map((el) => {\r\n el.extras['repeat'] = false;\r\n const size = newList.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 = newList;\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"]}
|